<div dir="ltr">Hi Mathieu, <div><br></div><div>You should use the gles plugin to export to avoid the Fatal nb colors error.</div><div>See: <a href="https://github.com/cedricpinson/osgjs/wiki/Convert-model-with-OSG">https://github.com/cedricpinson/osgjs/wiki/Convert-model-with-OSG</a>. </div><div><br></div><div>For the images: </div><div><br></div><div>You can try to convert first your model to osgb and write the textures to disk and then convert to osgjs using $osgconv file.osgb.gles file.osgjs, if the osgjs plugin is not writting to disk the images.</div><div>Also you can save them as inline images in the same osgjs file. The resultant file will be bigger though, but it is ok for quick tests. For example drag & dropping here <a href="http://webkeux.com/osgjs-test/">http://webkeux.com/osgjs-test/</a> <br></div><div><br></div><div>One more thing, if you have the images as separate files you <b>must </b>use a server (http server I mean). </div><div><br></div><div>Cheers. </div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-07-27 9:59 GMT+02:00 Mathieu Bartillat <span dir="ltr"><<a href="mailto:mathieu.rougeron@telespazio.com" target="_blank">mathieu.rougeron@telespazio.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Good morning,<br>
<br>
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.<br>
<br>
What I did:<br>
<br>
1) initially I had an IVE file that an infographist gave me. I tried the two commands osgconv File.ive File.osgjs.<br>
I got this return:<br>
Fatal nb colors 1 != 1349<br>
can't save osgjs file<br>
Unable to write to output stream<br>
<br>
Idem with osgconv -O OutputTextureFiles File.ive File.osgjs<br>
<br>
2) I tried (just for test) to convert the ive file to osg format. It works but the output file has no texture.<br>
<br>
3) I asked the infographist to export the model to OBJ format with 3dsMAX. So I got an OBJ file and a MTL file.<br>
Then I do osgconv -O OutputTextureFiles File.obj File.osgjs<br>
I get some warnings such as<br>
<br>
*** line not handled *** :map_refl C:\myFolder\myFolder2\maps\refmap_txt.jpg<br>
Warning: [ReaderWriterOBJ::convertElementListToGeometry] Some faces from geometry '' were reversed by the plugin<br>
<br>
Strange because the JPG file really exists in my fodler ! I have other JPG files and I have no warning message for them.<br>
Anyway, I do not think it is the source of the problem.<br>
But the final OSGJS does not appear with textures, as no texture is exported. The geometry is correct.<br>
<br>
<br>
<br>
Apparently I did something wrong, but I don't know where !<br>
If someone has an idea about this export issue ?<br>
<br>
<br>
Thanks a lot and have a good day,<br>
Mathieu<br>
<br>
------------------<br>
Read this topic online here:<br>
<a href="http://forum.openscenegraph.org/viewtopic.php?p=64482#64482" rel="noreferrer" target="_blank">http://forum.openscenegraph.org/viewtopic.php?p=64482#64482</a><br>
<br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
osg-users mailing list<br>
<a href="mailto:osg-users@lists.openscenegraph.org">osg-users@lists.openscenegraph.org</a><br>
<a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" rel="noreferrer" target="_blank">http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">Jordi Torres<br><br><br></div></div>
</div>