Re: [osg-users] Converting large obj file with osgconv
Hi, do you have problem with not enough free memory or do you hit 2GB per 32 bit process limit in MS Windows? In second case, if you use Visual Studio, you can enable LARGEADDRESSAWARE linker flag for osgconv. As an addition you will need /3GB in boot.ini for 32 bit Windows XP. This will extend memory available for 32 bit process. Otherwise, you might consider using 64bit OSG. Also, you can try to do conversion in 2 steps, first with -O noTexturesInIVEFile and then convert resulting .ive into second one with textures inside. I used this approach some time ago and it worked for some of my large models. Best, Marcin Crampman pisze: Hi, I'm having problems when I try to convert a lagre obj file (~600MB) into a ive file using osgconv : the conversion took ages and eventually failed after eating the whole swap. Is there any solution or workaround ? Thanks! ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Converting large obj file with osgconv
Hi, I'm using a 64 bit linux system, with 2GB of ram and ~10GB of swap. The conversion failed after ~12 hours, and the obj model doesn't have any textures. Marcin Prus a écrit : Hi, do you have problem with not enough free memory or do you hit 2GB per 32 bit process limit in MS Windows? In second case, if you use Visual Studio, you can enable LARGEADDRESSAWARE linker flag for osgconv. As an addition you will need /3GB in boot.ini for 32 bit Windows XP. This will extend memory available for 32 bit process. Otherwise, you might consider using 64bit OSG. Also, you can try to do conversion in 2 steps, first with -O noTexturesInIVEFile and then convert resulting .ive into second one with textures inside. I used this approach some time ago and it worked for some of my large models. Best, Marcin Crampman pisze: Hi, I'm having problems when I try to convert a lagre obj file (~600MB) into a ive file using osgconv : the conversion took ages and eventually failed after eating the whole swap. Is there any solution or workaround ? Thanks! ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Converting large obj file with osgconv
Crampman wrote: I'm using a 64 bit linux system, with 2GB of ram and ~10GB of swap. The conversion failed after ~12 hours, and the obj model doesn't have any textures. How much geometry is there in your model? The OSG .obj plugin isn't very efficient. But .obj is very easy to parse (although things like groups might make conversion slightly more difficult), so you could try to do it yourself and directly construct the necessary OSG objects from c++ while reading in the .obj file... Paul Marcin Prus a écrit : Hi, do you have problem with not enough free memory or do you hit 2GB per 32 bit process limit in MS Windows? In second case, if you use Visual Studio, you can enable LARGEADDRESSAWARE linker flag for osgconv. As an addition you will need /3GB in boot.ini for 32 bit Windows XP. This will extend memory available for 32 bit process. Otherwise, you might consider using 64bit OSG. Also, you can try to do conversion in 2 steps, first with -O noTexturesInIVEFile and then convert resulting .ive into second one with textures inside. I used this approach some time ago and it worked for some of my large models. Best, Marcin Crampman pisze: Hi, I'm having problems when I try to convert a lagre obj file (~600MB) into a ive file using osgconv : the conversion took ages and eventually failed after eating the whole swap. Is there any solution or workaround ? Thanks! ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Converting large obj file with osgconv
osgconv uses Optimizer by default, perhaps you can try conversion with all optimisations turned off? You can switch default optimisations using OSG_OPTIMIZER environmental variable Marcin Crampman pisze: Hi, I'm using a 64 bit linux system, with 2GB of ram and ~10GB of swap. The conversion failed after ~12 hours, and the obj model doesn't have any textures. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Converting large obj file with osgconv
Thanks for your quick replies, My model contains 8,726,464 vertexes and 17,377,292 tris I'll look for loading the obj from c++. Cramp' Paul Melis a écrit : Crampman wrote: I'm using a 64 bit linux system, with 2GB of ram and ~10GB of swap. The conversion failed after ~12 hours, and the obj model doesn't have any textures. How much geometry is there in your model? The OSG .obj plugin isn't very efficient. But .obj is very easy to parse (although things like groups might make conversion slightly more difficult), so you could try to do it yourself and directly construct the necessary OSG objects from c++ while reading in the .obj file... Paul Marcin Prus a écrit : Hi, do you have problem with not enough free memory or do you hit 2GB per 32 bit process limit in MS Windows? In second case, if you use Visual Studio, you can enable LARGEADDRESSAWARE linker flag for osgconv. As an addition you will need /3GB in boot.ini for 32 bit Windows XP. This will extend memory available for 32 bit process. Otherwise, you might consider using 64bit OSG. Also, you can try to do conversion in 2 steps, first with -O noTexturesInIVEFile and then convert resulting .ive into second one with textures inside. I used this approach some time ago and it worked for some of my large models. Best, Marcin Crampman pisze: Hi, I'm having problems when I try to convert a lagre obj file (~600MB) into a ive file using osgconv : the conversion took ages and eventually failed after eating the whole swap. Is there any solution or workaround ? Thanks! ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Converting large obj file with osgconv
Hi Cramp, It could be that the tri stripper is bluking at such a large dataset. Try disable the tri stripping via: osgconv myfile.obj myfile.osg -O noTriStripPolygons You can query the options via: osgconv --format obj Plugin osgPlugins-2.9.0/osgdb_obj.so { ReaderWriter : Wavefront OBJ Reader { extensions : .objAlias Wavefront OBJ format options: AMBIENT= Set texture unit for ambient texture options: BUMP= Set texture unit for bumpmap texture options: DIFFUSE= Set texture unit for diffuse texture options: DISPLACEMENT= Set texture unit for displacement texture options: OPACITY= Set texture unit for opacity/dissolve texture options: REFLECTION= Set texture unit for reflection texture options: SPECULAR= Set texture unit for specular texture options: SPECULAR_EXPONENT=Set texture unit for specular exponent texture options: noRotation Do not do the default rotate about X axis options: noTesselateLargePolygonsDo not do the default tesselation of large polygons options: noTriStripPolygons Do not do the default tri stripping of polygons } } Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Converting large obj file with osgconv
Crampman wrote: Thanks for your quick replies, My model contains 8,726,464 vertexes and 17,377,292 tris That's not as much as I was expecting. I'm pretty sure I loaded models with similar sizes in OSG (which also took quite some time). I would say check out Robert's suggestion first (disabling the tri stripper) Paul ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Converting large obj file with osgconv
Hi, thanks for your help we've done the conversion with one file (not the biggest), but now when I try loading the data in IVE it makes a segfault ?! I've also successfully converted the IVE to osg, but it make the same segfault... I'm using OpenSceneGraph Library 2.6.1 with openthreads-version-number 2.3.0 Below is the log in the console setting OSG_NOTIFY_LEVEL=DEBUG. Maybe blocking the optimisations as suggested by Marcin Prus could help ? If you have any idea, for the conversion or for viewing the object ? We just would like to view the full object in a "low" resolution, and zoom to some part of the object in full resolution... It seems to me that building an LOD hierarchy, would be best way to do it... But is it the best in our case (we have a single big cylindrical object) to use "simple LOD" or do we need to build a pagedLOD or something different ? Any advice is welcome, Pierre. /mnt/s2/2$ export OSG_NOTIFY_LEVEL=DEBUG osgviewer /mnt/s2/2/Data/IMERIR/ExtractedSurface.obj.ive RegisterWindowingSystemInterfaceProxy() X11WindowingSystemInterface() GraphicsContext::setWindowingSystemInterface() 0x96a1530 0xb792f740 CullSettings::readEnvironmentalVariables() CullSettings::readEnvironmentalVariables() CullSettings::readEnvironmentalVariables() CullSettings::readEnvironmentalVariables() CullSettings::readEnvironmentalVariables() CullSettings::readEnvironmentalVariables() DriveManipulator::_height set to ==1.5 CullSettings::readEnvironmentalVariables() CullSettings::readEnvironmentalVariables() CullSettings::readEnvironmentalVariables() CullSettings::readEnvironmentalVariables() CullSettings::readEnvironmentalVariables() CullSettings::readEnvironmentalVariables() CullSettings::readEnvironmentalVariables() CullSettings::readEnvironmentalVariables() CullSettings::readEnvironmentalVariables() CullSettings::readEnvironmentalVariables() itr='/mnt/s2/2/ext/lib' FindFileInPath() : trying /mnt/s2/2/ext/lib/osgPlugins-2.6.1/osgdb_ive.so ... FindFileInPath() : USING /mnt/s2/2/ext/lib/osgPlugins-2.6.1/osgdb_ive.so Opened DynamicLibrary osgPlugins-2.6.1/osgdb_ive.so FindFileInPath(/mnt/s2/2/Data/IMERIR/ExtractedSurface.obj.ive): returning /mnt/s2/2/Data/IMERIR/ExtractedSurface.obj.ive ive::DataInputStream.setLoadExternalReferenceFiles()=1 Stats before: Object Type #Unique #Instanced StateSet0 0 Group 1 1 Transform 0 0 LOD 0 0 Switch 0 0 Geode 1 1 Drawable1 1 Geometry1 1 Vertices5376293 5376293 Primitives 1076368510763685 Optimizer::optimize() doing REMOVE_LOADED_PROXY_NODES Optimizer::optimize() doing COMBINE_ADJACENT_LODS Optimizer::optimize() doing OPTIMIZE_TEXTURE_SETTINGS Optimizer::optimize() doing SHARE_DUPLICATE_STATE Num of StateSet=0 Optimizer::optimize() doing FLATTEN_STATIC_TRANSFORMS ** RemoveStaticTransformsVisitor *** Pass 0 Optimizer::optimize() doing CHECK_GEOMETRY Optimizer::optimize() doing MERGE_GEOMETRY MERGE_GEOMETRY took 1.40896 Optimizer::optimize() doing REMOVE_REDUNDANT_NODES Stats after: Object Type #Unique #Instanced StateSet0 0 Group 1 1 Transform 0 0 LOD 0 0 Switch 0 0 Geode 1 1 Drawable1 1 Geometry1 1 Vertices5376293 5376293 Primitives 1076368510763685 View::setSceneData() Reusing exisitng scene0x96a23c0 Erreur de segmentation Le vendredi 27 février 2009 à 11:04 +, Robert Osfield a écrit : > Hi Cramp, > > It could be that the tri stripper is bluking at such a large dataset. > Try disable the tri stripping via: > > osgconv myfile.obj myfile.osg -O noTriStripPolygons > > You can query the options via: > > osgconv --format obj > Plugin osgPlugins-2.9.0/osgdb_obj.so > { > ReaderWriter : Wavefront OBJ Reader > { > extensions : .objAlias Wavefront OBJ format > options: AMBIENT= Set texture unit for > ambient texture > options: BUMP= Set texture unit for > bumpmap texture > options: DIFFUSE= Set texture unit for > diffuse texture > options: DISPLACEMENT= Set texture unit for > displacement texture > options: OPACITY= Set texture unit for > opacity/dissolve texture > options: REFLECTION= Set texture unit for > reflection texture > options: SPECULAR= Set texture unit for > specular texture > options: SPECULAR_EXPONENT=Set texture unit for > specular exponent texture > options: noRotation Do not do the default > rotate about X axis > options: noTesselateLargePolygonsDo not do the default > tesselation of large polygons > options: noTriStripPolygons Do not do the default > tri stripping of polygons > } >