Jump to content

OBJ transforms to points


protean

Recommended Posts

Hi,

I'm having a small problem getting transformations from OBJ into SOPs. The idea is to convert the layout at object level into a point cloud for copying.  I'm clearly not handling the primitive intrinsic data correctly so any pointers would be helpful.  I'm using an object merge to pack the primitives and hopefully use the the primitive intrinsic attribs to orient the copies.

Cheers

J

OBJ_to_points.hip

obj to points.jpg

Edited by protean
Link to comment
Share on other sites

well if you have identical objects and you just need to match obj transform to the SOP level, then this wrangle would work:

@P = point(1, "P", @ptnum);

first input is the original object without transform, second input is the one transformed and object merged (see the pic)

 

aaa.jpg

Link to comment
Share on other sites

Thanks. I'm not sure that helps though. I don't want to deform the objects in SOPs, I need to generate a point for each object transform at object level so I can recreate the distribution via a copy sop.

Not only that but understanding why the transform matrix is not working as I assumed it should would be beneficial as a learning experience.

Cheers


J

Link to comment
Share on other sites

you can also apply the transformation after the copy sop which might give you a little more control

matrix3 x = primintrinsic(1, "transform", @ptnum);
setprimintrinsic(0, "transform", @ptnum, x);
@P = point(1, "P", @ptnum);

where input 1 is your object merge

 

  • Like 2
Link to comment
Share on other sites

Here it is.  To be properly integrated with the packed disk primitive setup I assume 'scale' would need to be 'pscale' but it's no problem.

OBJ_to_copySop_002.hip

I had a setup to do this after the copy as you suggest which was great but the setup/tools our environment artists are using don't really allow for that. 

Edited by protean
Link to comment
Share on other sites

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...