View Full Version : animating placeholders for HD instance

03-26-2008, 01:08 AM
I plan to have loads of car in a shot.
There is still and moving cars.
Some are driving on a roadway ramp (=not horizontally)
Is there a "good" way to animate placeholders (quads) to use HD instance on top ? Thanks

04-05-2008, 02:46 PM
Is there a "good" way to animate placeholders (quads) to use HD instance on top ? Thanks

This is a question that comes up a lot. I thought there was some motion plug-in that would make objects stick to the ground while they're moving... I don't remember what it was called. Maybe I should make one :)

Jim M
04-05-2008, 04:29 PM
Sticky Motion Modifier.

04-05-2008, 04:34 PM
Sticky and Stickysurface comes to mind.
Part of LW.

04-06-2008, 12:56 AM
thanks :-)

04-06-2008, 02:15 AM
"Maybe I should make one " could be a good solution :D
Problem is to have a smooth path without jumping or strange rotations.

04-07-2008, 02:53 AM
My way:

- Draw trajectory (Top view) with LWCAD's spline (or whatever tool you like)

- Normalize point distribution with 'PathDivider' plugin
At this point you have an spline with points regularly distributed.

- Use 'KO_POINTFIT' plugin to adjust trayectory on ground's surface (better tripled)

- Export spline as motion path.

- Import into Layout (Load Motion File). Now you have an object moving along a path at a constant speed.


If you want it to decelerate on corners: when drawing the spline, use LWCAD's curve knive to isolate the corner, then use again 'PathDivider' to redistribute points on that segment so points are closer to each other. Use Knife and Divider once more (or even more times) on a smaller segment of that corner. A sparse distribution of points means fast movement and a more condensed one means slow movement.

Merge points before exporting to avoid strange behaviours

Use Speedometer custom object on moving object to have a real numeric reference of object speed (m/s. So 10 means 40Km/h).

Scale keyframing if you need to make global movement faster or slower (I use numeric time scale in Scene Editor)

Activate fractional frames. Sometimes i had problems when adjusting the right global speed after a lot of tests (oscillant speed).

Well, that's all. It's far from perfect, but it works. Hope it helps

04-07-2008, 03:03 AM
Of course you can also use the same motion path on other objects by applyng an offset to the keyframing

04-07-2008, 03:44 AM
And then you use Aligh To Path for heading and pitch?

04-07-2008, 04:05 AM
Yes, or align to velocity i f you use 9.x

04-07-2008, 04:29 AM
Thanks for answer Kagonto. But I use this way already, for one car...:D
If I have loads of cars each with one placeholder for HDi, it is very heavy and Hdi is badly used.
I think it would be better to use your path to make a path for particules and use sticky to stick on floor (as Lim M said).
So we can use HDi to populate with cars.

Mr Rid
05-26-2008, 09:57 PM
This may sound a bit complicated, but is useful in a number of situations. I did this recently to get a herd of horses running over a landscape using instancing.

What I usually do is make a Y displacement map out of the road(ground, etc) to then apply as a world coordinate to the instancing mesh. The mesh can then be moved along X or Z and Y, world displacement will make it conform to the height and vertical contours of the ground or road. I would use a bone chain and the old morph-thru-bones trick to follow a horizontal curve.

Use an orthogonal camera on -Y with the ground in frame. Apply a black to white luminous Y gradient, with white at highest point, black at the lowest, set Type to Cubic, and keys to Linear. May use Distance to Pivot, and/or may place nulls in layout to coincide with the hi and low points of your ground and get as precise values as possible. Transfer the null Y values to your gradient.

Render a high res TGA with no compression which is the "Targa Format .tga" saver, not "LW_TGA24." Load in PShop, zoom in and crop exactly the shape of your ground/road/etc. Save out uncompressed TGA.

Apply as Y, world map to the instancing mesh in Layout, turn off mipmap and pixel blending.

Whenever possible, I always make landscapes with world displacement maps for a number of useful reasons. For instance I can animate water or fire moving over the lansdcape, similar to how the sticky plugin works, but Sticky can behave weirdly. I usually have the lowest point of my ground at 0, and use the Distance to Pivot gradient for the above technique. Then when I apply the displacement map, the amplitude should equal the high (white) Y value.

I place instancing mesh at the starting position in the scene and save transform, and then place it at the end position and save transform. Then use these as a guide for the base and morph positions. When you apply the morph over frames, the mesh will snake thru a chain of curved bones. Further displacement may be applied on the X to add random curves as with a landscape. Apply a slight taper (just 2% will do) to the instancing mesh in modeler to make all the polys slightly shorter at one end. Set Instance rotations to 'Shortest Edge' and the instances will follow each poly as they turn thru deformations.