Jump to content

Procedural instancing


Recommended Posts

Hi. I want to rotate object inside FOR_ALL_GPOINTS in VRAY from one vector to another:

UT_Vector3 baseDir(1, 0, 0);

UT_Vector3 zDir(0, 0, 1);

UT_Matrix3 NRot;

UT_Matrix4 xform;

FOR_ALL_GPOINTS(gdpa, pointPtr)

{

.........................................

xform.identity();

NRot.dihedral(baseDir, zDir);

xform = NRot;

openGeometryObject();

setTransform(xform, 0);

.......................................

}

But all geos are disappear.

Thanks.

Link to comment
Share on other sites

Hi, Sibarrick!

I thinik, no. I want to rotate geometry in the origin. Any other transformation matrixs as translation or scale will be mult after that. Simply rotation.

Can you post some samples of right transformation?

Ok. The problem is in center of rotation... Geometry are running away with rotation of 0.5 and stay still with 0...

Edited by Nasyrov
Link to comment
Share on other sites

  • 5 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...