Page 2 of 2 FirstFirst 12
Results 11 to 14 of 14

Thread: Animating materials

  1. #11
    Senior Member
    Join Date
    Aug 2004
    Location
    California
    Posts
    771

    Re: Animating materials

    Quote Originally Posted by newbie
    I have just realized that <param> cannot reference a material parameter directly because <bind_material> may contain several <instance_material> nodes.
    Well <param> refers to things semantically so yes your observation is partly true. The run-time has to understand and resolve the linkage to the semantic reference. It's not (always) literal in the XML sense.
    Quote Originally Posted by newbie
    So i guess i should use <bind> nodes to connect <param> nodes to material parameters :

    Is that the recommended way for animating material parameters ?
    Yes you can use the two elements to create a more explicit description (scaffolding) of the effect parameters you want to animate without ambiguity.
    Quote Originally Posted by newbie
    How does it work when the parameter is an <array> and one wants to animate a single value in the array ?
    Can somebody give me an example ?
    The <bind target="here[3]"> is an sidref_type so you can use selection syntax at that point in the description.

  2. #12

    Re: Animating materials

    Quote Originally Posted by marcus
    Quote Originally Posted by newbie
    How does it work when the parameter is an <array> and one wants to animate a single value in the array ?
    Can somebody give me an example ?
    The <bind target="here[3]"> is an sidref_type so you can use selection syntax at that point in the description.
    Sorry my question was ambiguous. What i was asking is : when an effect parameter is an array, how do we say in <bind> that we only want to animate a single value in the array ?

    For instance :

    Code :
    <effect>
        <newparam sid="numbers">
            <array length="3">
                <float>1.0</float>
                <float>2.0</float>
                <float>3.0</float>
            </array>
        </newparam>
    </effect>
     
    ...
     
    <node id="transform">
        <translate sid="translate">10 20 30</translate>
    </node>
     
    ...
     
    <instance_material>
        <bind semantic="numbers" target="transform/translate.X"/>
    </instance_material>

    In this example, we don't know where to copy the float value coming from translate.X.
    should it go to numbers[0], numbers[1], numbers[2] ?

    I guess we are not supposed to only animate a single value. Only the full array can be animated. Is that correct ?

  3. #13
    coders_gaint
    Guest

    Re: Animating materials

    can u please give me the collada file which contains animating material data.I hope this will help a lot for better understanding for material animation
    pls....

  4. #14
    coders_gaint
    Guest

    Re: Animating materials

    Is there anyone can provide me the file which contains material animation as discussed in the above list of threads.

Page 2 of 2 FirstFirst 12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •