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
>>>>
>>>>
>>>
>>
>

Reply via email to