Re: [osg-users] [osgPlugins] collada: use of bind_vertex_input

2010-08-17 Thread Luc Frauciel
Hi,

I've encoutered kmz files with dae files inside that look like that :

Code:

bind_material
technique_common
  instance_material symbol=building_0 
target=#building_0/instance_material
  instance_material symbol=building_1 target=#building_1
bind semantic=CHANNEL1 target=#b1-obj-tverts/bind
  /instance_material
/technique_common
  /bind_material




The texture coords are not loaded.
If I add a bind_vertex_input element, textures works.


Code:

bind_material
technique_common
  instance_material symbol=building_0 
target=#building_0/instance_material
  instance_material symbol=building_1 target=#building_1
bind semantic=CHANNEL1 target=#b1-obj-tverts/bind
bind_vertex_input semantic=CHANNEL1 
input_semantic=TEXCOORD input_set=1/ 
  /instance_material
/technique_common
  /bind_material




Do someone know what's happening ? Is it a problem in the file or the dae 
reader ? The file is opened correctly in GoogleEarth.


Thank you!

Cheers,
Luc

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=30846#30846





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [osgPlugins] collada: use of bind_vertex_input

2010-08-17 Thread Luc Frauciel

lucfrauciel wrote:
 Hi,
 
 I've encoutered kmz files with dae files inside that look like that :
 
 Code:
 
 bind_material
 technique_common
   instance_material symbol=building_0 
 target=#building_0/instance_material
   instance_material symbol=building_1 target=#building_1
 bind semantic=CHANNEL1 target=#b1-obj-tverts/bind
   /instance_material
 /technique_common
   /bind_material
 
 
 
 
 The texture coords are not loaded.
 If I add a bind_vertex_input element, textures works.
 
 
 Code:
 
 bind_material
 technique_common
   instance_material symbol=building_0 
 target=#building_0/instance_material
   instance_material symbol=building_1 target=#building_1
 bind semantic=CHANNEL1 target=#b1-obj-tverts/bind
   bind_vertex_input semantic=CHANNEL1 
 input_semantic=TEXCOORD input_set=1/ 
   /instance_material
 /technique_common
   /bind_material
 
 
 
 
 Do someone know what's happening ? Is it a problem in the file or the dae 
 reader ? The file is opened correctly in GoogleEarth.
 
 
 Thank you!
 
 Cheers,
 Luc


The issue is similar to :
http://forum.openscenegraph.org/viewtopic.php?t=2676  (more recent thread)

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=30855#30855





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] [osgPlugins] collada: use of bind_vertex_input

2009-04-23 Thread Martin Scheffler
Hi,

I export from Max using the feeling exporter 3.05b (c gives the same results).
I have a diffuse map and an ambient map in my model. When importing the collada 
file into osg, the maps are not shown. It seems that I have to modify 
[code]instance_material symbol=r8.3.007_1 
target=#r8.3.007-material/[/code]
to 
[code]
instance_material symbol=r8.3.007_1 target=#r8.3.007-material
bind_vertex_input semantic=CHANNEL2 input_semantic=TEXCOORD input_set=2/
bind_vertex_input semantic=CHANNEL1 input_semantic=TEXCOORD input_set=1/
/instance_material
[/code]
Then everything works as expected. 
Is this faulty behavior of the exporter? The collada 1.4 spec says:


[quote]
The bind_vertex_input element binds geometry vertex streams (identified as 
input elements
within geometry elements) to material effect vertex stream semantics. Although 
applications commonly
perform automatic binding of vertex streams with identical semantic 
identifiers, there are frequently
mismatches in a semantic identifier’s meaning. Use bind_vertex_input to 
remove these
ambiguities 
[/quote]

So maybe the exporter could detect texture coordinate sets automatically?

Thanks,
Martin[/quote]

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=10711#10711





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [osgPlugins] collada: use of bind_vertex_input

2009-04-23 Thread Roger James




Martin Scheffler wrote:

  Hi,

I export from Max using the feeling exporter 3.05b (c gives the same results).
I have a diffuse map and an ambient map in my model. When importing the collada file into osg, the maps are not shown. It seems that I have to modify 
[code]instance_material symbol="r8.3.007_1" target="#r8.3.007-material"/[/code]
to 
[code]
instance_material symbol="r8.3.007_1" target="#r8.3.007-material"
bind_vertex_input semantic="CHANNEL2" input_semantic="TEXCOORD" input_set="2"/
bind_vertex_input semantic="CHANNEL1" input_semantic="TEXCOORD" input_set="1"/
/instance_material
[/code]
Then everything works as expected. 
Is this faulty behavior of the exporter? The collada 1.4 spec says:


[quote]
The bind_vertex_input element binds geometry vertex streams (identified as input elements
within geometry elements) to material effect vertex stream semantics. Although applications commonly
perform automatic binding of vertex streams with identical semantic identifiers, there are frequently
mismatches in a semantic identifier’s meaning. Use bind_vertex_input to remove these
ambiguities 
[/quote]

So maybe the exporter could detect texture coordinate sets automatically?

Thanks,
Martin[/quote]

  

Martin,

When I added the support for bind_vertex_input I am afraid I was quite
strict in requiring it to be present. I admit if there if there was
only one vertex stream with a CHANNEL1 or a CHANNEL2 semantic available
then probably the binding should be automatic. However, in this case it
looks like the exporter is still at fault as the the streams appear to
have been given a TEXCOORD semantic, and because there are two of them
then a bind_vertex_input is definitely needed to differentiate between
the input sets.

Roger


___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org