Jump to content

Reflectin on points


frankengen

Recommended Posts

Hi i want have my points be reflective with a point normal..

Like this

 

I tried tranfsering normals from a sphere with normal pointing out but it does not seem to work.

Does anyone have any ideas or could anyone pleas send me an example scene.

It would be much appreciated , thank you in advance :D

Many thanks Frank

 
 
  • Like 1
Link to comment
Share on other sites

Adding decent normals to a point cloud is pretty simple with an attrib wrangle sop, place this in the code:

float max_distance = 1;
int max_points = 50;

int handle = pcopen(1 ,"P", @P, max_distance, max_points);
@N = normalize(@P- pcfilter(handle, "P"));

This point the normal away from the local average, works pretty well. Play with the max distance to match you scene scale.

 

Cheers,

koen

 

  • Like 1
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...