Point Wrangle on a group of points deleting the normal on non selected points.

   3036   2   2
User Avatar
Member
4 posts
Joined: Sept. 2013
Offline
Hello!

I'm trying to create a simple bulge effect on a group of points. But the non-selected points seems to lose its normal information.

I selected the points in the viewport and created a group (from within the viewport):

The normals seem fine here.

I added a point wrangle with the following code (set to run only on the group):
@P += @N * 0.2;


But the result looks like this:

The normals from the non-selected points are gone, and the rest of them turned blue. Not sure why.

I tried to do the same with a point VOP, and it seems to work fine:


The normals stay green, unlike point wrangle.

Here's the VOP setup:


I'm not sure why this is happening as they are essentially doing the same thing. I'd appreciate your help in solving this!
User Avatar
Member
1743 posts
Joined: March 2012
Offline
There are no normals on the original geometry. If you hold down the middle mouse button on the node before the Point Wrangle, you'll see that there's no N attribute. When there's no point or vertex N on a piece of geometry, the viewport automatically computes vertex normals by default, shown in green.

When you refer to @Nin Point Wrangle and there's no point N attribute, it has a special case to automatically compute a point N attribute. You can avoid it being added to the output geometry by setting “Attributes to Create” to Pinstead of *, so that it only writes to the P attribute, not P and N. In the Point VOP, my guess is that N already isn't being exported, so it's not being written-to.

Hopefully that helps clear up what's going on.
Writing code for fun and profit since... 2005? Wow, I'm getting old.
https://www.youtube.com/channel/UC_HFmdvpe9U2G3OMNViKMEQ [www.youtube.com]
User Avatar
Member
4 posts
Joined: Sept. 2013
Offline
Thanks a lot! That makes sense.

I was able to fix it by doing what you suggested (writing to P instead of *).
  • Quick Links