Re: [osg-users] [osgPlugins] Incorrect normals calculated on 3DS import

2011-07-13 Thread Alexey Chernov
Sukender, thanks for references. I've also read that per-vertex model is more precise than per-face, and the result in my case is more similar to per-face example.. So, am I right that these problems are completely because of this exact model and not the algorithm? -- Read

Re: [osg-users] [osgPlugins] Incorrect normals calculated on 3DS import

2011-07-08 Thread Alexey Chernov
Yes, I can, but the main aim of my application is to support both OBJ and 3DS formats of models which are loaded by user, so I wanted to know how to load 3DS and avoid problems mentioned above. -- Read this topic online here:

Re: [osg-users] [osgPlugins] Incorrect normals calculated on 3DS import

2011-07-07 Thread Alexey Chernov
Thank you, Sukender, But can you suggest to some universal way to get valid model from 3DS in OSG? For example, is it possible to calculate normals in PER FACE mode. What's the common way to workaround problems with 3DS-imported models in OSG? -- Read this topic online here:

Re: [osg-users] [osgPlugins] readNodeFile() with OBJ files is extremely slow when used in Qt4 app

2011-07-04 Thread Alexey Chernov
Ulrich Hertlein wrote: Rather than setting the global locale, maybe we set the 'C' locale on the I/O streams only: ios_base::imbue(locale::classic()) Yes, I think it's more sensible, but will it affect also C-style functions? There's main part of input using sscanf() there. Perhaps,

[osg-users] [osgPlugins] Incorrect normals calculated on 3DS import

2011-07-04 Thread Alexey Chernov
Hi, I tried to load a model from 3DS file and found that it has some strange lighting effect both in osgviewer and in my application: on model's borders there're dark areas and it seems as if there're low of polygons (a screenshot and model are attached). I was suggested that the problem is

Re: [osg-users] [osgPlugins] readNodeFile() with OBJ files is extremely slow when used in Qt4 app

2011-07-01 Thread Alexey Chernov
Well, I've finally found the problem. It is in Model::readOBJ() method in obj.cpp file. The problem is that sscanf() reads data from *.obj file in default locale. Qt has the following code inside its QCoreApplication constructor: Code: setlocale(LC_ALL, );// use correct char

[osg-users] [osgPlugins] readNodeFile() with OBJ files is extremely slow when used in Qt4 app

2011-06-30 Thread Alexey Chernov
Hi, I suffer very strange problem: osgDB::readNodeFile() method is dramatically slow when loading *.obj files and is called from Qt4 application. The tiny test Qt project is attached. For every other format I ever tried everything work flawlessly. I also found that the cause is in

Re: [osg-users] [osgPlugins] OBJ (WaveFront) files can't be loaded

2011-06-29 Thread Alexey Chernov
Hi, Per, thank you very much for such a detailed description! I really didn't expected it is something wrong with the file itself. So, can I override these opacity parameters in osgviewer somehow or I need to solve the file instead? And, maybe you have some idea, why it can freeze the

Re: [osg-users] [osgPlugins] OBJ (WaveFront) files can't be loaded

2011-06-29 Thread Alexey Chernov
Yeah, I've changed Tr value in *.mtl file to '1' and it works! That's really great. So, the only remaining problem is with hangs and freezes in readNodeFile, hope I can solve it, too. Per, massive thanks for your help! -- Read this topic online here:

[osg-users] [osgPlugins] OBJ (WaveFront) files can't be loaded

2011-06-28 Thread Alexey Chernov
Hi, I suffer strange problem loading obj file in OpenSceneGraph (tried versions from 2.8.3 to 3.0 RC2). osgviewer starts successfully, prints nothing to console but don't show the model, only background is painted. If I load the file in my code using Code: osg::Node* model =