Writing a Phenomenon for Softimage XSI and Mental Ray
July 2nd, 2006 by Stefano Jannuzzo - Viewed 26325 times - Popularity: 22%Some details
First, you have to declare the nodes you are going to exploit. We have four nodes here, each to be declared with a line:
Node <node name> = guid <node reference guid>
The node reference guid can be found as follows:
Right mouse click on the node name (Vector_state in the example) and choose Edit.
This will open the script editor, showing you the spdl file of the node (sib_state_vector.spdl). Simply copy and paste the Reference guid to your phenomenon spdl.
Once you have declared the four nodes, you can hardcode the parameters and establish the connections.
The vector_state node must be forced to output the Intersection point.
If you read further sib_state_vector.spdl, you’ll find the mode integer parameter, and down in the parameter default section you see that Intersection point corresponds to a value of 2.
The same thing for vector_to_scalar. Since we want the X component to be output, we must set the component value to 0.
The vector_state output must plug into the vector_2_scalar input. This is accomplished by setting
Connection "vector_2_scalar input::input" = "vector_state";
You continue similarly, except for the inputs that come directly from the spdl interface, instead that from hardcoded values or connection.
This is done by the interface keyword, followed by the parameter name.
The boolean switcher is our topmost node, which is then finally declared as our root.
Now you are ready to install the spdl file.
Choose File->Plug-in Manager, go to the SPDLs section and click Install.
Browse for your spdl and click Install.
The log will tell what happened and where the phenomenon was installed.
Now open a browser, go to the user folder and find the preset under the Shaders folder. Drag and drop it into the rendertree, replacing the old nodes, and you’re set.
You can download the full SPDL for your enjoyment.
If you have any comments or suggestions, please post in the comments below!
Pages: 1 2









July 3rd, 2006 at 11:43 am
This article looks ok on FireFox, but in Internet Explorer the large bitmaps aren”t being shrunk and the pagef formatting falls apart
July 3rd, 2006 at 12:27 pm
Luc-Eric, can you tell me if things are looking better? I think I may have fixed things but running IE7.0 I couldn”t see the issue to start with.
Thanks,
July 3rd, 2006 at 12:44 pm
yes it’’s ok now
July 4th, 2006 at 2:32 pm
is there any speed increase when rendering 1 phenomenon versus its many parts?
July 5th, 2006 at 2:47 am
No, no speed change at all
March 9th, 2007 at 5:53 pm
Is it possible to find Shaders GUID by scripting. Exemble, selecting a shader in XSI Explorer, running a script and tell what is the GUID of this Shader?
March 12th, 2007 at 4:50 am
I don’t think, but I can’t be sure. However, as said, if you edit the shader spdl in the script editor (RMB + “Edit”) you have it there, after the “Reference” keyword
March 30th, 2007 at 10:01 pm
Hi man! Your site is cool! Visit my sites, please:
March 30th, 2007 at 10:01 pm
Amazing artwork! This is spectacularly done! Visit my sites, please:
June 14th, 2007 at 1:40 pm
hi all.
June 15th, 2007 at 6:14 pm
Patrick, I think this is what the XSIUtils.DataRepository.GetIdentifier() method does, with siObjectCLSID as second parameter.
For example:
LogMessage( “GUID = ” + XSIUtils.DataRepository.GetIdentifier( Selection.Item(0), siObjectCLSID ) );
July 3rd, 2007 at 8:27 pm
Thanks Sylvain. It’s a good start, I’m looking in a way to build those Phenomenon by script after building them in the Render Tree.
March 13th, 2008 at 7:44 am
[...] is an example of how sometimes you can write a phenomenon just to downgrade a more powerful node to get what you [...]