[osg-users] Re: Imported .obj file not showing textures.

2020-01-15 Thread JILJITH JOHN
Dear Tom,

Thank you for the reply. I tried to load your model. It is crashing in my 
PC also.
OSG version is 3.6.4

On Tuesday, January 14, 2020 at 3:54:05 PM UTC+5:30, Tom Pollok wrote:
>
> Which version of openscenegraph are you using?
>
> Would you mind trying my obj model with mtl and jpg texture file.
>
> https://owncloud.iosb.fraunhofer.de/owncloud/s/dc8dkbXrQz3gTuh 
> <https://www.google.com/url?q=https%3A%2F%2Fowncloud.iosb.fraunhofer.de%2Fowncloud%2Fs%2Fdc8dkbXrQz3gTuh=D=1=AFQjCNGQR0mkd74jVhmhZl1hMtC0PDspiA>
>
> Pw: osg
>
> I use the following to load it, but it crashes on my system with 
> openscenegraph_3.4.1. 
> Im curious if it works on your system.
>
> osgDB::Options* opt = new 
> osgDB::Options;opt->setOptionString("noRotation");osg::ref_ptr 
> node = osgDB::readNodeFile(pathToObjFile, opt);
>
>
> Am Dienstag, 14. Januar 2020 10:52:54 UTC+1 schrieb JILJITH JOHN:
>>
>> [image: Capture.PNG]
>>
>> [image: Capture.PNG]
>> Hi,
>>
>> I am developing a tool for editing 3D models using openscenegraph. When I 
>> tried to load an .obj file, the texture is not applied. I am getting only 
>> black shade.
>> The model is imported using the below code. 
>>
>>
>>  osg::ref_ptr model1= osgDB::readNodeFile(path.toStdString());
>>  model1->setDataVariance(osg::Object::DYNAMIC);
>>
>>
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"OpenSceneGraph Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to osg-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osg-users/1f803fa5-c636-47c8-84df-1ddb8f81cd5a%40googlegroups.com.


[osg-users] Re: Imported .obj file not showing textures.

2020-01-14 Thread JILJITH JOHN
Hi Laurens,

The answer is so great. I am getting the texture applied. But it is in the 
osgviewer.exe only. 
Problematically I tried to add the option. Its not working.

osgDB::Options* opt = new osgDB::Options;


opt->setOptionString("DIFFUSE=0");


osg::ref_ptr model1= osgDB::readNodeFile(path.toStdString(), opt);




On Tuesday, January 14, 2020 at 6:39:07 PM UTC+5:30, L. Voerman wrote:
>
> repost in google group; It seems like my reply to the mailing list does 
> not show up in google groups.
>
>
> Hi Jiljith,
>
> The material has both an ambient and a diffuse texture (both refer to the 
> same file)
> while this can be made to work with a shader, using the fixed function 
> pipeline means you'll have to choose one:
>
> osgviewer -O DIFFUSE=0 12228_Dog_v1_L2.obj
> Laurens.
>
> On Tuesday, January 14, 2020 at 10:52:54 AM UTC+1, JILJITH JOHN wrote:
>>
>>
>> Hi,
>>
>> I am developing a tool for editing 3D models using openscenegraph. When I 
>> tried to load an .obj file, the texture is not applied. I am getting only 
>> black shade.
>> The model is imported using the below code. 
>>
>>
>>  osg::ref_ptr model1= osgDB::readNodeFile(path.toStdString());
>>  model1->setDataVariance(osg::Object::DYNAMIC);
>>
>>
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"OpenSceneGraph Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to osg-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osg-users/424783f2-415d-4351-8bf7-83bc25d30936%40googlegroups.com.


[osg-users] Imported .obj file not showing textures.

2020-01-14 Thread JILJITH JOHN


[image: Capture.PNG]

[image: Capture.PNG]
Hi,

I am developing a tool for editing 3D models using openscenegraph. When I 
tried to load an .obj file, the texture is not applied. I am getting only 
black shade.
The model is imported using the below code. 


 osg::ref_ptr model1= osgDB::readNodeFile(path.toStdString());
 model1->setDataVariance(osg::Object::DYNAMIC);



-- 
You received this message because you are subscribed to the Google Groups 
"OpenSceneGraph Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to osg-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osg-users/2877ba6a-106a-4833-a726-8c318648a466%40googlegroups.com.