PDA

View Full Version : I have the .dll, I have the .mi declaration... how do I get a shader into XSI!?


MasterZap
08-22-2004, 04:21 PM
I have written a mental ray shader.

I have the shaders declaration file (.mi file)

I have it's DLL.

I have to test it in XSI. I downloaded the 30 day trial thinamajig.

But XSI uses SPDL's and all sorts of strange stuff I don't get.

Can someone tell me how to do it?

To make more "complicated", my shader is based on a mental ray material phenomena.

How!?!?!? I'm lost :)

/Z

horst hrubesch
08-23-2004, 10:14 AM
Hi Zap,

Did you install the SDK? If not run setup again and install it using custom install (never did it afterwards but should work I guess). After that you will find XSISDK->Wizards->shader->index.htm. This gives you the "Shader Wizard" guiding you through creating a shader project. After you saved it somewhere pick the .spdl and throw away the cpp skeleton files.

Hope this helps,
Felix

MasterZap
08-23-2004, 10:20 AM
I will try this, but I have a sneaky suspicion it won't help.

I have a material phenomena consiting of 7 subshaders that need to work as a cohesive whole (to the user).

In most other mental ray integration you just use the .mi file directly. This is confusing me somewhat. :eek:

/Z

horst hrubesch
08-23-2004, 10:54 AM
In the SDK Customization Guide under Mental Ray Shaders - MR and Metashaders -> SPDL is a (very) small example. Other than that a lot of XSI Shaders are phenomenas using subshaders. For example doubleclick a Phong shader in the Rendertree to open it's PPG and rightclick on the Phong name. You will see Edit... . Choose it and have a look at the SPDL.


Sorry to be not much of help but it's a start,
Felix

francescaluce
08-23-2004, 12:58 PM
dunno what you intend by 'material phenomena'.. hope for you just a shadergraph.. 'coz strictly material phenomena.. are not supported in xsi..


Node "diffuse" = guid "{D5FD3F94-F3C9-11D8-A025-B3FE8363704E}";
Node "lightmap_write" = guid "{CúFD3F77-F3C9-11D8-B166-CD45363704E}";

Connection "diffuse::diffuse" = interface "diffuse_color";
Connection "diffuse::diffuse_gamma" = value 1.0;
Connection "lightmap_write::there_is_not" = interface "a_lightmap_port";



node "myshader" = material opaque
{
material = "diffuse";
lightmap = "lightmap_write";
} ;

and try to assign it as a root for your shader (effectively trying to get a mat phen)..

Connection root = "myshader";

and get the error..

'ERROR : Material root connections are not supported. Yet.


:) :)


ciao
francesca

MasterZap
08-23-2004, 01:53 PM
Hi Fransesca!

Paolo Berto was just talking about you. The world is small. :)

Maybe we should do this in email?

/Z

thebigMuh
08-23-2004, 03:19 PM
If you have multiple small shaders and want to link them together into a big supra-shader, then you will have to write a separate SPDL for each of the shader parts, and an extra SPDL where you pull them all together into a single phenomenon and declare the UI for it.


The standard Material shaders in XSI are all made that way. They consist of an illumination shader, a shadow shader, a reflection shader, a refraction shader and a photon shader, all mangled together into a material phenomenon.

You can take a look at the standard Phong illumination shader in Application/phenolib/spdl/sibase/material-phong.spdl. The easiest way to build a phenomenon is to just assemble it in the rendertree from your base shaders and then type it out in a text editor.

Just in case you are thinking of the mental ray SSS shaders here, I'm not sure how far lightmap rendering is supported in XSI 4.0 :shrug:

Ciao, ímuh!

francescaluce
08-23-2004, 04:00 PM
ehy zap.. mail sent. :cool:






ciao
francesca

MasterZap
08-23-2004, 07:31 PM
Hi Francesca, got it, will reply but have a ton of other things on my plate for the moment.

bigMuh:


Just in case you are thinking of the mental ray SSS shaders here

Ah, mind readers? :)

But it looks like lightmapping is... troublesome.

/Z

francescaluce
08-23-2004, 08:18 PM
Hi Francesca, got it, will reply but have a ton of other things on my plate for the moment. I asked nothing.. man, I have no problems at all.. I know what can I do and what not in xsi.. the .splds were for you !! :scream:





ciao
francesca

MasterZap
08-23-2004, 08:46 PM
Well common courtesy dictates I email you and say thanks. But I guess I did it just now, didn't I !?! :bounce:

/Z

francescaluce
08-23-2004, 09:20 PM
bye bye mr.zap.






francesca

thebigMuh
08-23-2004, 11:38 PM
Ah, mind readers? :)

But it looks like lightmapping is... troublesome.

/Z
Doesn't take a whole lot of mindreading to get that ;)

If you need help with getting an SPDL to work, just scream, but I'm afraid noone except for the XSI dev team can help you with getting the lightmap portion to work.

Ciao, ímuh!

francescaluce
08-24-2004, 12:55 AM
theBigMuh.. you're missing something.. masterZap is a mentalimages freelance.. he's not here to get help.. he was here to help someone else.. but something gone wrong.. maybe too much work.. lucky you who are a student and have all the time you want..

now I know... strange but a nice person. :scream: :)




ciao
francesca

thebigMuh
08-24-2004, 01:56 AM
Luckily I'm not just a student, I'm even a student in his holidays :)

Easily possible I'm missing something however, I'm not omniscient after all.

I know he works at MI, but that doesn't mean he knows his ways round in XSI, and his opening posts indicated a question for help :)

Ciao, ímuh!

MasterZap
08-24-2004, 06:36 AM
Precicely.

/Z

francescaluce
08-24-2004, 01:27 PM
zap thanks for email.. I appreciated it. :)



Easily possible I'm missing something however, I'm not omniscient after all.actually, I do not think is a matter of omniscience.



ciao
francesca

CGTalk Moderation
01-19-2006, 02:00 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.