SOFTIMAGE|XSI Highlight Script

or how to precisely position
the specular highlight on a surface
using a SOFTIMAGE|XSI script.

Copyright © 2000, Guy Rabiller

Highlight Script
- 290k

One of the strong points of virtual lightning is to be able to avoid real world constraints from a set. Here, we want to place precisely a 'specular highlight' on a surface. Thanks to the power of the SOFTIMAGE|XSI constraints, I've created this little script wich will help us to place this specular highlight precisely with the help of a null constrained on the surface of an object. It's possible to use this technique even with polygonal objects by 'ShrinkWrapping' a nurbs surface around it.

Note: You can use this script for other purposes. For example, to place a reflected object and be able to control precisely the reflexion impact on the surface



Installation of the Script

First, open the ' Script Editor '.

Click the ' Script Editor ' Icon

Open' highlight_cp.js '.

Change from the ' Toolbar Panel ' to the
' Palette' and ' Custom Script Panel '.

In the ' Script Editor ', select all the contents of script ( CTRL + a), then ' Drag & Drop ' it on the ' Custom Script Panel '. The ' Add Script Command ' panel will appear.

Enter the name which you want to appear on the button in ' Command Name ' and the name which will be used to control the script in ' Command Name For Scripting

The script and its associated Button
are now installed and ready to be used.




Create a primitive ' Get>Primitive>SurfaceSphere '.

With the Sphere selected, click the button
of command which we have just added.


Note:   You should select only one surface at a time. If not, the script will stop and will inform you of the problem. The same will happen if you select a polygonal object.

Open the explorer to the object.
You will notice that the Script has created a hierarchy,
whose root is a null which we will use to us to place the specular hightlight.

Select the null ' sphere_highlight '.


In the' Selection ' panel, click on ' Property ' and choose ' Cns   Surface '.


Adjust the ' U Location ' and ' V Location ' to precisely place the null , and thus the specular high light.

You can also animate these two parameters if you need to.

You will find another script called ' highlight_cp.js ' with a control panel where you will be able to choose the type of light you want to create.

[ rev. 14/09/00 - d/m/y ]

Copyright © 2000, Guy Rabiller