Parameters Units Missing.

November 29th, 2005 by Francois Lord - Viewed 9010 times -




A whole lot of time can be wasted by tweeking a parameter in XSI when you don’t know the units it’s expressed in. This is especially true in simulation.

Simulations

You can deduce the units of a parameter rapidly with only a few tries. The Age of a particle is expressed in seconds, not frames. The Size of a particle is in scene units, not pixels. Starting from that, we can assume that the Rotation Velocity is in degrees per seconds, not degrees per frame, and that the Allowed Linear Velocity is expressed in units per seconds.

Things get a little more tricky when you want to animate a parameter according to the age of a particle. The key you set at frame 50 doesn’t mean 50 seconds, but 50 frames. This is not consistent with the other examples stated above, but it”s a lot easier to figure by yourself as it’s more intuitive.

For a rigid body object, the help file says the Linear Velocity Limit is in units. Of course, experimentation shows it’s in units per seconds. Setting the Angular Velocity Limit is awkward. The help file says the value is expressed in radians. Experimentation suggests it’s in degrees per 2 seconds!

1
2
3
4
5
6
7
8
CreatePrim "Cube", "MeshSurface"
CreateActiveRigidBody "cube"
SetValue "cube.DynamicsInitState.angvelz", 90
SetValue "cube.RigidBodyProp.VelLimitsActive", True
SetValue "cube.RigidBodyProp.AngVelLimit", 60
SetValue "PlayControl.Format", 7
SetValue "PlayControl.Out", 25
PlayForwardsFromStart

After one second of simulation, the rotation is roughly half of the Angular Velocity Limit.

Displacement

Rendering parameters can also cause a considerable amount of confusion. Displacement and Final Gathering both have parameters that can be switched between absolute and camera view reference. In the Displacement tab of the GeoApprox PPG of an object, when set to Fine, there is a parameter called Length. This parameter is expressed in scene units. Mental ray will try to keep the triangles no bigger than Length. You must adjust this parameter to the scale of your object or scene. The render time can go through the roof if you activate View Dependent without modifying the value of Length because its units have changed. It’s now expressed in pixels, making the size of the triangles dependent on the distance to the camera, and in this case, smaller than half a pixel by default.

Final Gathering

The same goes for the Min and Max Radius in the Final Gathering tab of the Render Options PPG. Their values are normally expressed in scene units. When you click on the Automatic Compute button, XSI calculates the average bounding box size of all the objects in the scene in scene units and sets the two parameters accordingly. However, when you activate the View Dependent check box, the values of the radius are now in pixels. If you click on the Automatic Compute button, it will still calculate the values in scene units, and set the wrong values in the parameters, possibly increasing render time considerably and unnecessarily.

Volume Effects

I’ve seen many artists having problems with the Volume Effects shader. This is a fine shader even if it hasn’t evolved a lot since its early days in Soft|3D. It has a parameter called Step Size, which controls the spatial resolution of the marching algorithm. It’s expressed in scene units so it is very dependent on the scene scale. Applying this shader on a pass in a very big scene can lead to nightmares in terms of rendering time. It’s important to understand this parameter when using the Volume Effects shader, and the fact that its units are in scene units scaled by the size of the object it’s applied on. If you apply it to a scaled up cube (scaling = 100, 100, 100), the Step Size will be expressed in scene units * 100.

Depth of Field

The Depth of Field Shader is particular. Many of its parameters names say they are in inches, when in fact they are in scene units. I suppose the developer wanted us to use a scene scale of 1 unit = 1 inch to make sure the result would match reality. I don’t think this was a very good idea. It confuses more than anything.

I wish Softimage could add some space or some tooltips in PPGs to display the units. It would help the users determine the best values for certain parameters without having to go in the documentation all the time. In the mean time, experimentation is still our best resource.

2 Responses to “Parameters Units Missing.”

  1. Salut François!

    Thanks a lot for this mine of information, I”m sure it will save hours of fiddling. It would have save me so many if I had this read this article few years ago!

    Thanks
    Bernard

  2. Rob Wuijster says:

    It would be nice if this info just would be in the PPG. Just stuff like “px”, “su”, “fr”, sec”, “deg”, “rad” etc.
    I agree with Bernard, your article saves a lot of work fiddling ;)

    Luc-Eric, maybe something for the upcoming update of V5??