[osg-users] [osgPlugins] Trouble with texture to export to OSGJS format

Mathieu Bartillat mathieu.rougeron at telespazio.com
Mon Jul 27 00:59:05 PDT 2015


Good morning,

I'm hardly trying to export a 3d model to OSGJS format but I have trouble with the textures. Concretely the textures do not appear in the OSGJS output file.

What I did:

1) initially I had an IVE file that an infographist gave me. I tried the two commands osgconv File.ive File.osgjs.
I got this return:
Fatal nb colors 1 != 1349
can't save osgjs file
Unable to write to output stream

Idem with osgconv -O OutputTextureFiles File.ive File.osgjs

2) I tried (just for test) to convert the ive file to osg format. It works but the output file has no texture.

3) I asked the infographist to export the model to OBJ format with 3dsMAX. So I got an OBJ file and a MTL file.
Then I do osgconv -O OutputTextureFiles File.obj File.osgjs
I get some warnings such as

*** line not handled *** :map_refl C:\myFolder\myFolder2\maps\refmap_txt.jpg
Warning: [ReaderWriterOBJ::convertElementListToGeometry] Some faces from geometry '' were reversed by the plugin

Strange because the JPG file really exists in my fodler ! I have other JPG files and I have no warning message for them.
Anyway, I do not think it is the source of the problem. 
But the final OSGJS does not appear with textures, as no texture is exported. The geometry is correct.



Apparently I did something wrong, but I don't know where !
If someone has an idea about this export issue ?


Thanks a lot and have a good day,
Mathieu

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








More information about the osg-users mailing list