material module

20 views
Skip to first unread message

marco.v...@gmail.com

unread,
Mar 20, 2015, 6:19:09 PM3/20/15
to pyco...@googlegroups.com
Hello ,

I'm writing about this comment in the load function of the material module

 Right now, this just stores a reference to the effect which is instantiated in the material. The effect instance can have parameters, but this is rarely used in   the wild, so it is not yet implemented.

I actually do need to use these parameters.   The params exist under the material tab in the form of the pasted text below.  I was wondering if there are
any plans to add this or if I could get some hints on how to do this myself?  I'm not an expert but I'm guessing that I basically need to create an Effect
instance and load the parameters from there ?? 

Thank you for any help.


    <material id="cos_bluegrit_FX_glow" name="cos_bluegrit_FX_glow">
      <instance_effect url="FX_Particles.bdae#FX_Particles-fx">
        <setparam ref="Diffuse-surface">
          <surface type="2D">
            <init_from>light001.tga</init_from>
            <format>A8R8G8B8</format>
          </surface>
        </setparam>
        <setparam ref="Diffuse" sid="Diffuse">
          <sampler2D>
            <source>Diffuse-surface</source>
            <wrap_s>WRAP</wrap_s>
            <wrap_t>WRAP</wrap_t>
            <minfilter>NEAREST</minfilter>
            <magfilter>LINEAR</magfilter>
          </sampler2D>
        </setparam>
        <setparam ref="DiffuseColor">
          <float4>1 1 1 1</float4>
        </setparam>
        <setparam ref="DiffuseSampler_scaleoffset">
          <float4>1 1 1 1</float4>
        </setparam>
        <setparam ref="alphaFade">
          <float>1</float>
        </setparam>
        <setparam ref="DiffuseTint" sid="DiffuseTint">
          <float4>0.05000001 0.10000002 0.15000004 1</float4>
        </setparam>
        <setparam ref="DiffuseSampler_alpha-surface">
          <surface type="2D">
            <init_as_null/>
            <format>A8R8G8B8</format>
          </surface>
        </setparam>
        <setparam ref="DiffuseSampler_alpha" sid="DiffuseSampler_alpha">
          <sampler2D>
            <source>DiffuseSampler_alpha-surface</source>
            <wrap_s>NONE</wrap_s>
            <wrap_t>NONE</wrap_t>
            <minfilter>NONE</minfilter>
            <magfilter>NONE</magfilter>
          </sampler2D>
        </setparam>
        <setparam ref="falloff">
          <float>2</float>
        </setparam>
        <extra>
          <technique profile="Glitch">
            <setparam ref="FX_Particles-fx-profile_GLES2/CurrentTechnique">
              <string>Ad_FALLOFF</string>
            </setparam>
          </technique>
        </extra>
      </instance_effect>

Jeff Terrace

unread,
Mar 23, 2015, 7:22:44 PM3/23/15
to pyco...@googlegroups.com
Can you provide the rest of your collada file?

--
You received this message because you are subscribed to the Google Groups "pycollada" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pycollada+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Marco Vidaurre

unread,
Mar 23, 2015, 7:47:59 PM3/23/15
to pyco...@googlegroups.com
Sure thing .   I tried to start doing this today by adding a new function to the Effect class that would create and return instances of the Material instance_effect over rides , but didn't get to far :/




--
You received this message because you are subscribed to a topic in the Google Groups "pycollada" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/pycollada/HpAMABs3xcY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to pycollada+...@googlegroups.com.
example.dae
Reply all
Reply to author
Forward
0 new messages