Hi all. I am trying to make a cloner, using MCG, but I am having a problem offsetting the duplicates in the Up vector direction. When placing the MCG in front view the cloned meshes get cloned in the forward vector direction instead. How can I make the cloned meshes go towards the up vector no matter which view I am in?
here is my graph so far...
Solved! Go to Solution.
Solved by ads_royje. Go to Solution.
Hi @Anonymous,
the MCG transforms you are applying are (by default) in Local space.
When creating the MCG object from a viewport, like any other primitive, it'll give it a rotation.
For instance, create a Teapot in Front view, it'll be rotated.
Set the MCG object to have rotation x 0.0 instead of rotation x 90.0
You could replace the input operator"Identity Matrix" by the input operator "Geometry: Local to World Matrix".
You would get the Matrix in World Space.
I hope that can help,
Hi Jean, I still could not get this to work. Firstly, with the local to world matrix node, I could not figure out exactly this node works. If I rotate this matrix, the object still duplicates in the "Y" axis. In addition, I could not find a node that will set the object's rotation to a given value. I see that I can rotate a mesh, but if it is true that the x axis is 90.0, then rotating the mesh by -90.0 does rotate the object, but the object still duplicates in the "Y" axis.
Hi @Anonymous,
Sorry, you are right, the operator "Geometry: Local to World" does not help you just by replacing Identity Matrix, I should of just loaded the graph first. This operator is indeed intended for transforming to World.
In my first proposed way, only the starting Matrix was world, the offset was still local.
The local matrix results (the output of Generate Array of N) has the local Matrix (Identity Matrix) and the offset from Vector that needs to be.
I've attached a modified versions of your graph (just remove .txt from the file name), that does transform all to World. So no matter the way the MCG object is placed in the scene, it'll always clone in the World coordinates.
@Anonymous,
That did the trick. Thank you so much. Also, could you please elaborate more on why this works? It is kind of confusing when you have mentioned that by default, object creation is placed in local space, but you have first converted the matrix to world space and then reversed the matrix back to local space. Isn't it true that by placing an inverse matrix node it switches the world space matrix back to local space?
Can't find what you're looking for? Ask the community or share your knowledge.