I would like to have my normals point outwards

   14058   11   4
User Avatar
Member
30 posts
Joined: Nov. 2017
Offline
Hey guys! question; How do i get my normals on a circle to point outwards, with the goal of having anything I Copy to points, orient themselves in the same way.

What happens is this. I make a circle. Then give it normals. I then make a an additional curve.



But when I turn on “copy to Points” They shoot off like this. All the curves go into the wrong direction.



My ultimate goal is to have the normals point outwards like this.

https://i.imgur.com/hbjHvmP.png [i.imgur.com]

So that I can align my curves to that. Then randomize the length. So that I can use those curves to create a custom velocity for a splat simulation I'm working on .

Attachments:
TEMP.gif (844.9 KB)

http://paulmillerart.com/ [paulmillerart.com]
User Avatar
Member
340 posts
Joined: June 2017
Online
You can create a circle of points with the normals facing away from the center of the circle but that will be a problem if you want a polygon face to the circle.

An easier way would be to have faces added which will fix the normal. See attachment (probably there is an easier way with VEX). The way I would approach this would be not to use copy to points at all but use a copy transform node with the object offset from (0,0,0) and have rotation in the copy transform set to something other than 0.
Edited by Island - May 27, 2020 21:04:32

Attachments:
Normals.jpg (124.1 KB)
CopyTransformCircle.hiplc (96.2 KB)
CirclePointNormal.hiplc (103.1 KB)
CircleExtrudeNormal.hiplc (107.3 KB)

User Avatar
Member
30 posts
Joined: Nov. 2017
Offline
ah ok. Thank you Island. I'll give it a go right now
http://paulmillerart.com/ [paulmillerart.com]
User Avatar
Member
87 posts
Joined: July 2005
Offline
If your circle is at the origin, attach a wrangle after it with this:

@N = @P;

Make sure your line is pointing down Z when you copy it to the points.
Edited by kemijo - May 28, 2020 01:12:32

Attachments:
outwardFacingNormals.hipnc (70.8 KB)

/ken_jones/$: _
User Avatar
Member
340 posts
Joined: June 2017
Online
Leaving out a copy transform (since it looks like you just want the force direction for your “splat”), All methods outlined will give the same result for a circle. However, if you make your splat a curve, you will need to decide if you want the force direction the tangent to the curve or from a origin (kemijo's method). I assume you are considering copying these points with a copy transform node and then an attribute transfer? See difference:
Edited by Island - May 28, 2020 15:47:34

Attachments:
TangentVSpointposn.jpg (129.4 KB)

User Avatar
Member
833 posts
Joined: Jan. 2018
Offline
I just watched this video last night, I think it answers your question using PolyFrame:

https://youtu.be/SnGSCO0CwAc?t=180 [youtu.be]
>>Kays
For my Houdini tutorials and more visit:
https://www.youtube.com/c/RightBrainedTutorials [www.youtube.com]
User Avatar
Member
340 posts
Joined: June 2017
Online
The circlepointnormal file above uses PolyFrame.

I wonder whether you might do better just changing the settings in the fluid to create a better splat, though. Here is a splat that took 30 seconds to create using just a cylinder and the “Flip fluid from object” with a ground plane collider - with the only tweak being a drop in the particle separation.

To get a different look, play with gravity direction in autodopnet, with viscosity in flipfluidobject node within the autodopnet, and with particlefluidsurfaces node in tube_object_fluid (with smoothing turned on).
Edited by Island - May 29, 2020 21:36:59

Attachments:
Splat.hiplc (2.1 MB)
Splat.jpg (185.5 KB)

User Avatar
Member
331 posts
Joined: April 2018
Online
Orientation Along Curve is more intuitive to use than PolyFrame, if you're on H18.
User Avatar
Member
38 posts
Joined: June 2019
Offline
I'm doing it like this in a point wrangle :

vector a = set(0,0,0);
@N = normalize(a + @P);
User Avatar
Member
474 posts
Joined: July 2005
Offline
If your curve is in a plane, you can use the normal of the plane and the tangent of each curve point.

For example if your curve is in the XZ plane the normal (or lets say up vector) is (0,1,0).

If you apply the cross product on the tangent and the up vector, you should get the desired result.

Attachments:
normal_by_tangent_up.hipnc (111.3 KB)

User Avatar
Member
30 posts
Joined: Nov. 2017
Offline
Wow! Thank you guys so much! You've given me so much to read and try. I appreciate all of you jumping in . Thank you for the assitance

Thanks island for the file for reference! It's incredibly helpful.
http://paulmillerart.com/ [paulmillerart.com]
User Avatar
Member
3 posts
Joined: Dec. 2021
Offline
frBorges34
I'm doing it like this in a point wrangle :

vector a = set(0,0,0);
@N = normalize(a + @P);

Thank you! Was looking for this since new to Houdini and didn't find the correct way of applying vector math. Thanks!
  • Quick Links