ICE constraints tutorials?

273 views
Skip to first unread message

Morten Bartholdy

unread,
Feb 27, 2012, 10:10:22 AM2/27/12
to soft...@listproc.autodesk.com

I am trying to align my characters in a crowd via ICE, but I am having trouble getting it working properly. What I want is for them to sit facing inwards, perpendicular to the emitter surface and y-axis up.

 

I can align them to the emitters surface normal, but cannot figure out how to also give them a y upvector and face inwards.

 

- or, I can get them to point inwards (sort of) by aligning them to a vector (Align Particle to Vector) subtracting their emitter position from the closest point on an object to look, at plus an extra Align Particle to Vector node to make their y-axis point up. This almost works, but I get some weird flipping  - notice characters close to the camera in this movie:

http://dl.dropbox.com/u/763668/ICE/ICE_Direction_Constraint_01.mov

 

The direction constraint method is less ideal than aligning relative to the normal of the emitter object, so I would prefer to find a method that is based on the normal alignment. The documentation is not very helpful on this topic, and I have watched some of Stephen Blairs and Andy Nocholas ICE Basics tutorials but didn't quite find what I needed.

 

So I wonder if anyone could point me to a tutorial that covers orientation and directional and up-vector constraints in ICE?

 

I am kind of stuck here so any insight or pointers will be much appreciated.

 

 

Best Regards

Morten Bartholdy
VFX Supervisor/3D Lead
www.gimmickvfx.com

ICE_Crowd_Direction_Constraint.jpg
ICE_Crowd_Normal_Constraint.jpg

Bradley Gabe

unread,
Feb 27, 2012, 10:16:18 AM2/27/12
to Morten Bartholdy, soft...@listproc.autodesk.com
Use the y-axis as their direction vector, and use the inward facing surface normal as the up vector?

Bradley Gabe

unread,
Feb 27, 2012, 10:18:19 AM2/27/12
to Morten Bartholdy, soft...@listproc.autodesk.com
If the normal to the surface doesn't face the characters properly towards the field, you can also draw a curve around the inside of the bottom row, then use closest location to the curve and point the up vector at that. Then you can tune the rotation of your crowd by adjusting the curve.

dominik

unread,
Feb 27, 2012, 11:27:02 AM2/27/12
to soft...@listproc.autodesk.com

Hey Morten,

 

I did something similar or exactly of what Bradley said to align procedural city buildings with their closest streets

 

I’ve linked a viewport and Icetree snips. I hope it will help you.

 

http://dl.dropbox.com/u/10537591/PostAboutOrientation/Icetree.JPG

http://dl.dropbox.com/u/10537591/PostAboutOrientation/viewport.JPG

 

Cheers

 

 

Dominik Kirouac // SHED
artiste 3D

1410, RUE STANLEY, 11E ÉTAGE MONTRÉAL (QUÉBEC) H3A 1P8
T 514 849-1555 F 514 849-5025 WWW.SHEDMTL.COM

piotrek marczak

unread,
Feb 27, 2012, 11:55:20 AM2/27/12
to soft...@listproc.autodesk.com
I hate rotations, they are neither easy or intuitive... I think learning pashtun would be more straightforward than learning maths behind rotations.
 
Sent: Monday, February 27, 2012 5:13 PM
Subject: Re: ICE constraints tutorials?
 

Thanks Piotrek, but I am afraid that explanation is beyond my grasp. I might as well be trying to read a cook book in Pashtun, the only difference being I understand the individual words, some sentences, but still the meaning is completely lost. The documentation on ICE is similar in my view, which is why ICE, IMHO, is difficult to work with for non technical artists :(

I would soo much like to have the documentation include practical examples of simple stuff like what I am trying to do here.

Morten


Den 27. februar 2012 kl. 16:53 skrev piotrek marczak <xsimail...@gmail.com>:

 
Sent: Monday, February 27, 2012 4:10 PM
Subject: ICE constraints tutorials?
 
rotate.JPG

Bradley Gabe

unread,
Feb 27, 2012, 12:09:55 PM2/27/12
to soft...@listproc.autodesk.com
It depends on if you are learning Euler Pashtun versus quaternion Pashtun.

Bradley Gabe

unread,
Feb 27, 2012, 12:17:28 PM2/27/12
to soft...@listproc.autodesk.com
I don't know if you are trying to orient particles, then applying instances to them, or building a custom constraint to rotate a control node in your rig.

Either way, the node you want is Direction to Rotation.

That node has two vectors for input, a direction and an up-vector. It is analogous to the direction constraint except for one difference. The direction constraint, by default uses the x-axis to point at, and the y-axis is the up vector, though you have simple toggle switches to modify the axis.

In ICE, they are assuming we are creating particle effects that have to face the camera. So the direction and up vectors fed into the Direction to Rotation node result in an orientation of y-axis as direction, and x-axis as the up vector.

So, when you want to change the orientation axis of a node using Direction to Rotation, you multiply (or add) the resulting rotation by another rotation node. I usually use an Euler to Rotation node where I can try out different 90 degree increments until my rotation results in what I need.

Keep in mind, since rotation math is done via matrix in ICE, the order of the operation is important! Whether you multiply the adjustment rotation before or after the result of the Direction to Rotation node will result in the rotation either being applied locally or globally to your particles. So if it's not working at first, try changing the multiplication order.

-Bradley

Morten Bartholdy

unread,
Feb 28, 2012, 3:42:46 AM2/28/12
to soft...@listproc.autodesk.com

Thanks Dominik. So it looks like you find the tangents for the closest locations and use that as upvector for the particles, right!? I don't get the Add, If, First Valid, Add section, but I guess that was specific to your scenario. I will try and see if I can put this together, and see what I get.

 

BTW great job on the latest IGA - beautiful work on everything! Say hi to Sylvain for me :)

 

Morten

Morten Bartholdy

unread,
Feb 28, 2012, 4:30:18 AM2/28/12
to soft...@listproc.autodesk.com

Hi Brad - thanks for your patience!

 

I am adding points from vertices on the emitter, then Set Instance Geometry , so I guess I need to orient particles. I am using Direction to Rotation. I get closest location on the object to look at, then subtract emission point positions from that so I get a vector going from one position to the other (I guess) which is visualized in the stills I attached - see the one attached here. 

The thing is I would rather orient the particles relative to the emitter normal, as it is more accurate and can be controlled more precisely. Since the emitter normal for this emitter will be pointing inwards but also upwards, I believe I need a direction constraint along the normal inwards combined with an upvector. I have tried doing this by aligning the particle to the surface, which gets me halfway - the characters point facing inwards from the emitter along the surface normal, but their local z-axis (the instance objects axis) is rotated wrong along the surface, so their y-axis are pointing in all sorts of directions. So next I try adding an upvector using Align Particle to Vector setting local and to vectors to Y=1. This makes the charaters point y-axis upwards, but also partly overrides the previous normal alignment, so they no longer face inwards. At this point I get stuck :/

 

I was hoping that along with the ability to put instances on particles there would be some more high level tools/nodes to orient these instances than vector math. Sigh.

 

Morten

ICE_Crowd_Direction_Constraint_B.jpg

Morten Bartholdy

unread,
Feb 28, 2012, 4:39:40 AM2/28/12
to soft...@listproc.autodesk.com

Agree on that one Piotrek - although I am not quite sure if you mean it or you are jokin ;)

 

MB

Morten Bartholdy

unread,
Feb 28, 2012, 4:56:18 AM2/28/12
to soft...@listproc.autodesk.com

When I try to align my particles to the emitter normal, I run in to context problems I cant figure out. I get the Point Normal from the emitter geometry, then plug it in to either port of Direction to Orientation, next when I want to plug that in to Set Particle Orientation, I get a context mismatch between geometry data output and expected pointcloud input. Stuck and don't know why. The same applies if I try to plug the point normal into an Align Particle to Vector node.

 

Trying to orient myself and a few particles - MB

 

 


Den 27. februar 2012 kl. 18:17 skrev Bradley Gabe <with...@gmail.com>:

Eric Thivierge

unread,
Feb 28, 2012, 5:30:11 AM2/28/12
to Morten Bartholdy, soft...@listproc.autodesk.com
The problem is that you're getting data from the mesh and trying to set data on the particles with it. Instead you need to get closest location on the emitter mesh and get the point normal from that location.

I recommend instead, you should add them by generating a sample set (See Generate Sample Set) and plug the 'locations' out port into the 'Positions1' of the 'Add Point' node. This will give you an emit location from which you can get the emit location normal to use in your particle context.


--------------------------------------------
Eric Thivierge
http://www.ethivierge.com

Eric Thivierge

unread,
Feb 28, 2012, 5:31:29 AM2/28/12
to Morten Bartholdy, soft...@listproc.autodesk.com
Also change the Generate Sample Set to:
Emission Type: Point
Rate Type: All Points
Time Varying: Off

--------------------------------------------
Eric Thivierge
http://www.ethivierge.com


Reply all
Reply to author
Forward
0 new messages