Jump to content

GU_Detail::normal and the second input.


Recommended Posts

gdp->normal();

creates normals as you would expect.

the following doesn't work:

const GU_Detail *r_gdp;

r_gdp=inputGeo(1);

r_gdp->normal();

I'm assuming this has something to do with r_gdp being a "copy" of

the gdp from the second input. Is there a way around this?

I could compute the normals with a facet before attaching it

to the second input, but I'd like to do the calculation in the

sop itself. This way I could insure that the user wasn't inputting "bad"

normals.

Many thanks

Luca

Link to comment
Share on other sites

I heard back from sidefx they told me that it's a bad idea to modify a const piece of geometry.

here's what they recommended instead:

UT_Vector3Array normals;

r_gdp->normal(normals);

seems to do the trick

L

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