Hi Daniel Thank you for the link. However I don't see how to use that in my case. I mean only using the Softimage to MR translator and available SDK tools.
I you are interrested in a global parameter shader solution, the thing I made using a CustomProperty works well, I don't know if it the simplest but well... I can share it if you want. many thanks 2012/9/25 Daniel Brassard <dbrassar...@gmail.com> > I was thinking a shader parameter assignment but I don't know if that > would work in your case. > > > http://docs.autodesk.com/MENTALRAY/2013/ENU/mental-ray-help/files/manual/node113.html#paramassign > > > > On Tue, Sep 25, 2012 at 11:08 AM, Rémi Arquier <arqu...@gmail.com> wrote: > >> There is several instances of the lightmap shader. Some parameters values >> of the shader need to be different "per shader instance", and others, like >> the path of a directory where to put the all lightmaps maps, need to be the >> same for each shader instances. >> >> For the moment, I put a single UserDataBlob nested in a single null >> X3dObject in the Softimage scene, and in the the shader's code, I recurse >> down the scene db over all miInstance until the UserDataBlob with correct >> ID is found. If you have a simpler solution ... would be good. >> >> 2012/9/25 Daniel Brassard <dbrassar...@gmail.com> >> >>> Instances in MR inherit from the main shader declaration/definition >>> itself. Is the custom lightmap shader only used once in the Softimage scene >>> and all instance inherit from the lightmap or is each instance of the >>> lightmap has it's own UserDataBlob? >>> >>> On Tue, Sep 25, 2012 at 9:51 AM, Rémi Arquier <arqu...@gmail.com> wrote: >>> >>>> Hi Daniel, Yes it looks like it is by design. But note that the Scene >>>> Root derive from a X3DObject. >>>> I think the UserDataBlob is exported for scene elements which generate >>>> leaf instances only. >>>> >>>> I just need to export global data for a custom lightmap shader, all >>>> shader instances need that same data, and I don't realy know where to put >>>> it on Softimage side. Nothing very exciting. >>>> >>>> As you seem aware of thoses things, how do you do when you need a >>>> global parameter for a given shader, regarding the spdl parameters ? By >>>> "global", I mean that all shader instances would share the same parameter' >>>> value, and if I would change the value using one of the spdl interface of >>>> one shader instance, the others values of the other parameter instances >>>> would change also. You see what I mean ? >>>> >>>> Rémi >>>> >>>> >>>> 2012/9/25 Daniel Brassard <dbrassar...@gmail.com> >>>> >>>>> I think it is by design unfortunately, Rémi, >>>>> >>>>> This feature is only available when the UserDataBlob is nested >>>>>> directly under a >>>>>> Camera<http://download.autodesk.com/global/docs/softimage2013/en_us/sdkguide/si_om/Camera.html> >>>>>> , >>>>>> Light<http://download.autodesk.com/global/docs/softimage2013/en_us/sdkguide/si_om/Light.html> >>>>>> or >>>>>> X3DObject<http://download.autodesk.com/global/docs/softimage2013/en_us/sdkguide/si_om/X3DObject.html> >>>>>> . >>>>> >>>>> >>>>> What I wish would be an ICE UserDataBlob node that we could feed >>>>> anything we want to it! >>>>> >>>>> It look like you are thinking outside the box to have a need for >>>>> userdatablob on scene root! I'm curious! >>>>> >>>>> On Tue, Sep 25, 2012 at 5:19 AM, Rémi Arquier <arqu...@gmail.com>wrote: >>>>> >>>>>> Hi list >>>>>> >>>>>> I don't know if it is a bug or not, but when I put a renderable >>>>>> UserDatablob on the Scene Root, I cannot get it back in my Mental Ray >>>>>> shaders. I looked into the miArchive and I don't see it (I see it when it >>>>>> is attached to an other X3DObject like object/cam/light, but not when >>>>>> attached on the scene root). >>>>>> >>>>>> Is it normal ? I find it sad since it would be a good place for >>>>>> placing global data for shaders. >>>>>> >>>>>> cheers >>>>>> >>>>>> Rémi Arquier >>>>>> >>>>>> >>>>> >>>> >>> >> >