Hi folks,
I wonder whether collada supports using textures on lights i.e. a projector or the flashlight from doom3 ;). I have already consulted the specs but something like that is not meantioned there.
Any suggestions?
Regards,
Stefan
Hi folks,
I wonder whether collada supports using textures on lights i.e. a projector or the flashlight from doom3 ;). I have already consulted the specs but something like that is not meantioned there.
Any suggestions?
Regards,
Stefan
In general, have a look at how COLLADA FX represents shaders with textures in the COLLADA 1.4.1 Release Notes Revision A.
For the actual shader, you’ll want to use a projected texture “light shader”… e.g: Projected Texture simple overview
If you want to associate the texture with a specific light (as opposed to a full-screen effect), you can add an <extra> element that contains the texturing information to the <light> that you want to project the texture from.
Hi,
thanks for the reply first . I think the last part of it answered what I
wanted to now. I’m rather new to collada and sometimes still not quite
sure of how to express certain things correctly.
Since I want to use a shader with my light source I would probably go for something like this, right?:
<light name=".." id="..'>
<technique_common>
...
</technique_common>
<extra>
<technique_common>
<instance_effect url="...">
...
</instance_effect>
</technique_common>
</extra>
</light>
Where the specified effect contains the shader and its setup.
You shouldn’t use <technique_common> in your <extra>. What you are trying to do isn’t part of COLLADA’s common profile and it would be very misleading.
It wouldn’t be valid anyways. The only child allowed in <extra> is <technique> with a profile attribute to identify the profile.
<extra>
<technique profile="mySpecialProfile" >
<instance_effect url="...">
...
-Andy