randomizing normals

   608   2   0
User Avatar
Member
54 posts
Joined: Jan. 2015
Offline
I'm trying to create a copy to points system that has random rotations on the y but only slight tilting on x and z. Picture blades of grass. They all point up, and spin 360 around the Y but then lean left and right a little.

so I have a randomize attribute set to normals. and when I do -1 to 1 for the X and 0-0 for the Y, the -1 to 1 on the Z it does the spin around the Y. however when I introduce just a little. on the Y .1 for max it does mostly what I want but then I also get a handful of them pointing down? That doesn't make sense to me, and if you look at the normals of the points they look fine,

any ideas what's going on? or is there a better way to do this?

Thanks
Chris
Edited by chris wells - Feb. 1, 2018 23:19:53

Attachments:
NormalRandomize.hipnc (93.5 KB)

User Avatar
Member
418 posts
Joined: Feb. 2017
Offline
here you are,

01) I made the font to line up from bottom, just easier to manage
02) in transform I align the ‘up’ end of the object (the L) to point to Z, this is how Houdini align things to N

(you can use the pighead to see this, the pig looks out to the front, ie. Z, so when you clone out this pighead, you'll see him looking up, using your flat grid as the emitter that is)
Edited by vusta - Feb. 2, 2018 00:22:49

Attachments:
NormalRandomize_fixed.hipnc (99.5 KB)

User Avatar
Member
54 posts
Joined: Jan. 2015
Offline
thanks for such a quick response vusta! that is a great solution for the grass. I ran into another hangup when I tried to do tress with it. I wanted the trees to just lean a little not quite the 45 angle. which if I crank the up normal then they don't lean so far, however the more lean I remove the more 360 rotation i also remove so they are standing up, straighter but are lining up facing forward.

this did however help me find a solution, made me think of gimbal lock, so I went back to the original one where I had thinks flipping and added an up vector. in a wrangle and it fixed it.

I'm attaching the scene incase anyone else searches for this, then they have two solutions for different problems.

Thanks
Chris

Attachments:
NormalRandomizeUPvector.hipnc (98.7 KB)

  • Quick Links