[osg-users] Node with different projection/view matrix fixed pipeline

2020-01-15 Thread Catalin
Hi,

Is there a way to change the view matrix or projection matrix for a just a
specific node in fixed pipeline mode?
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OpenSceneGraph-3.6.5 release candidate 1 tagged, please test

2020-01-15 Thread Paul Leopard
I was using 3.14. I have switched to 3.15 today and the build system now
works

I will test OSG-3.6.5 on Windows and Ubuntu and report back

Thanks,
Paul


On Wed, Jan 15, 2020 at 7:46 AM Voerman, L.  wrote:

> Hi Robert,
> All seems fine to me, using
> windows 10 Enterprise 1909 18363,592
> Visual Studio 15.9.19
> CMake 3.15.5
> Regards, Laurens.
>
>
> On Wed, Jan 15, 2020 at 2:24 PM Robert Osfield 
> wrote:
>
>>
>> On Wednesday, 15 January 2020 13:15:27 UTC, Paul Leopard wrote:
>>>
>>> My comment was made with regard to 3.6.5, I am unable to build 3.6.5.  I
>>> was just describing the procedure and noting that it was the same procedure
>>> I've used successfully for building 3.6.4.
>>>
>>
>> What is generated? Are errors reports?
>>
>> What version of cmake or CMakeSetup are you using?
>>
>> Could other Windows using trying things our as I only have a Linux system
>> to test against.
>>
>>
>> --
>> 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/34e9c95f-5b39-4e2e-8b72-50fec80ffcee%40googlegroups.com
>> 
>> .
>> ___
>> osg-users mailing list
>> osg-users@lists.openscenegraph.org
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>
> --
> 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/CAG7xrZfPuX7ZfNwM9QVQ6HXYn1PJG_xyQbCZ8RWpiijdALkvQg%40mail.gmail.com
> 
> .
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
> --
> 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/CAG7xrZfPuX7ZfNwM9QVQ6HXYn1PJG_xyQbCZ8RWpiijdALkvQg%40mail.gmail.com
> .
>


-- 
I don't want to pass quietly into the night. I want to slide in sideways
kickin and screamin
Life really is awesome ... Soak it up while you can ...

--PHL--

-- 
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/CACDcJu2J8-ucY8Cu_XjWyS7T%3DAT%3Dan4XRfDcdYaoxXRU_-FB2g%40mail.gmail.com.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OpenSceneGraph-3.6.5 release candidate 1 tagged, please test

2020-01-15 Thread Voerman, L.
Hi Robert,
All seems fine to me, using
windows 10 Enterprise 1909 18363,592
Visual Studio 15.9.19
CMake 3.15.5
Regards, Laurens.


On Wed, Jan 15, 2020 at 2:24 PM Robert Osfield 
wrote:

>
> On Wednesday, 15 January 2020 13:15:27 UTC, Paul Leopard wrote:
>>
>> My comment was made with regard to 3.6.5, I am unable to build 3.6.5.  I
>> was just describing the procedure and noting that it was the same procedure
>> I've used successfully for building 3.6.4.
>>
>
> What is generated? Are errors reports?
>
> What version of cmake or CMakeSetup are you using?
>
> Could other Windows using trying things our as I only have a Linux system
> to test against.
>
>
> --
> 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/34e9c95f-5b39-4e2e-8b72-50fec80ffcee%40googlegroups.com
> 
> .
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>

-- 
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/CAG7xrZfPuX7ZfNwM9QVQ6HXYn1PJG_xyQbCZ8RWpiijdALkvQg%40mail.gmail.com.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

-- 
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/CAG7xrZfPuX7ZfNwM9QVQ6HXYn1PJG_xyQbCZ8RWpiijdALkvQg%40mail.gmail.com.


Re: [osg-users] OpenSceneGraph-3.6.5 release candidate 1 tagged, please test

2020-01-15 Thread Robert Osfield

On Wednesday, 15 January 2020 13:15:27 UTC, Paul Leopard wrote:
>
> My comment was made with regard to 3.6.5, I am unable to build 3.6.5.  I 
> was just describing the procedure and noting that it was the same procedure 
> I've used successfully for building 3.6.4.
>

What is generated? Are errors reports?

What version of cmake or CMakeSetup are you using?

Could other Windows using trying things our as I only have a Linux system 
to test against.
 

-- 
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/34e9c95f-5b39-4e2e-8b72-50fec80ffcee%40googlegroups.com.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OpenSceneGraph-3.6.5 release candidate 1 tagged, please test

2020-01-15 Thread Paul Leopard
My comment was made with regard to 3.6.5, I am unable to build 3.6.5.  I
was just describing the procedure and noting that it was the same procedure
I've used successfully for building 3.6.4.

On Wed, Jan 15, 2020 at 2:52 AM Robert Osfield 
wrote:

> Hi Paul,
>
> On Tuesday, 14 January 2020 18:45:28 UTC, Paul Leopard wrote:
>>
>> Using my 3.6-4 procedure, no visual studio files are generated by the
>> cmake system
>>
>> >mkdir release_build
>> >cd release_build
>> >cmake ../ -DCMAKE_INSTALL_PREFIX=../ -DCMAKE_BUILD_TYPE=Release
>>
>> No .sln, no .vcxproj is generated
>>
>
> This thread is for testing of the OSG-3.6.5 release candidate 1, not
> 3.6.4, lots of things have been fixed since 3.6.4, so please test the
> OpenSceneGraph-3.6 branch head or the 3.6.5-rc1.
>
>
> --
> 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/91056bbd-9979-47cf-89cb-2fc4fadf7aef%40googlegroups.com
> 
> .
>


-- 
I don't want to pass quietly into the night. I want to slide in sideways
kickin and screamin
Life really is awesome ... Soak it up while you can ...

--PHL--

-- 
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/CACDcJu0V-pPq99m7xMj5CZNEr-cR0oTM5keJ%2Bu5kbXXUOwNENQ%40mail.gmail.com.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Loading textured meshes (obj+mtl) leads to crash in osg 3.4.1

2020-01-15 Thread 'Tom Pollok' via OpenSceneGraph Users
Hi Laurens,

thank you for clarification! My problem was that im using openscenegraph in 
combination with osgEarth. I figured out how to fix it, so in case other 
osg and osgEarth users might run into the same issue.

To fix the issue i had to include

#include 

and after loading the model i had to run the shader generator on the model.

osgEarth::Registry::shaderGenerator().run( model );

Now everything works fine.

Thank you very much for your super quick help @Laurens and @Robert !!!

Best,
Tom

Am Mittwoch, 15. Januar 2020 13:00:41 UTC+1 schrieb Voerman, L.:
>
> Hi Tom,
> Your model works with texture for me, in osg 3.4.0 as well as 3.6.5 with 
> the following commands:
> sed -E "s#(f [0-9]+/[0-9]+)/0 ([0-9]+/[0-9]+)/0 ([0-9]+/[0-9]+)/0#\1 \2 
> \3#" "Data2.obj" > noNormals.obj
> osgviewer -O noRotation  noNormals.obj 
> Laurens.
>
>
> On Wed, Jan 15, 2020 at 12:24 PM 'Tom Pollok' via OpenSceneGraph Users <
> osg-...@googlegroups.com > wrote:
>
>> Hello Robert,
>>
>> to test it with my old osg version, i fixed the obj file such it does not 
>> contain any indices to normals anymore, as there are no normals.
>> This indeed helped loading the model, but no textures appear at all. 
>> Should it load the textures automatically due to the first line in the obj 
>> file being mtllib Data.mtl and the use of usemtl material_0 before the 
>> faces or do i need to take extra care when loading a textured model?
>>
>> For loading, im using only:
>>
>> osgDB::Options* opt = new 
>> osgDB::Options;opt->setOptionString("noRotation");osg::ref_ptr 
>> node = osgDB::readNodeFile(pathToObjFile, opt);
>>
>>
>> Best,
>> Tom
>>
>>
>> Am Dienstag, 14. Januar 2020 17:25:27 UTC+1 schrieb Robert Osfield:
>>>
>>> On Tue, 14 Jan 2020 at 15:26, 'Tom Pollok' via OpenSceneGraph Users <
>>> osg-...@googlegroups.com> wrote:
>>>
 Thank you for the workaround.

 So as far as i understand you only add the texture coordinate and 
 normal, if there exists one with a index greater than 0 and less then the 
 number of normals or texture coordinates.
 So that means that openscenegraph now will be able to display the 
 textured mesh, even if the normals are missing, right?

>>>
>>> Yes, that's correct, you'll get a textured mesh with no normals assigned.
>>>
>>> Robert.
>>>  
>>>
>> -- 
>> 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-...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/osg-users/b55a82c5-4801-49da-b1c4-149d868bd6fa%40googlegroups.com
>>  
>> 
>> .
>> ___
>> osg-users mailing list
>> osg-...@lists.openscenegraph.org 
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>
>

-- 
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/79d8878f-0123-4a3a-8d70-1e2e3eb9e20c%40googlegroups.com.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Loading textured meshes (obj+mtl) leads to crash in osg 3.4.1

2020-01-15 Thread Voerman, L.
Hi Tom,
Your model works with texture for me, in osg 3.4.0 as well as 3.6.5 with
the following commands:
sed -E "s#(f [0-9]+/[0-9]+)/0 ([0-9]+/[0-9]+)/0 ([0-9]+/[0-9]+)/0#\1 \2
\3#" "Data2.obj" > noNormals.obj
osgviewer -O noRotation  noNormals.obj
Laurens.


On Wed, Jan 15, 2020 at 12:24 PM 'Tom Pollok' via OpenSceneGraph Users <
osg-us...@googlegroups.com> wrote:

> Hello Robert,
>
> to test it with my old osg version, i fixed the obj file such it does not
> contain any indices to normals anymore, as there are no normals.
> This indeed helped loading the model, but no textures appear at all.
> Should it load the textures automatically due to the first line in the obj
> file being mtllib Data.mtl and the use of usemtl material_0 before the
> faces or do i need to take extra care when loading a textured model?
>
> For loading, im using only:
>
> osgDB::Options* opt = new 
> osgDB::Options;opt->setOptionString("noRotation");osg::ref_ptr 
> node = osgDB::readNodeFile(pathToObjFile, opt);
>
>
> Best,
> Tom
>
>
> Am Dienstag, 14. Januar 2020 17:25:27 UTC+1 schrieb Robert Osfield:
>>
>> On Tue, 14 Jan 2020 at 15:26, 'Tom Pollok' via OpenSceneGraph Users <
>> osg-...@googlegroups.com> wrote:
>>
>>> Thank you for the workaround.
>>>
>>> So as far as i understand you only add the texture coordinate and
>>> normal, if there exists one with a index greater than 0 and less then the
>>> number of normals or texture coordinates.
>>> So that means that openscenegraph now will be able to display the
>>> textured mesh, even if the normals are missing, right?
>>>
>>
>> Yes, that's correct, you'll get a textured mesh with no normals assigned.
>>
>> Robert.
>>
>>
> --
> 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/b55a82c5-4801-49da-b1c4-149d868bd6fa%40googlegroups.com
> 
> .
> ___
> 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] Loading textured meshes (obj+mtl) leads to crash in osg 3.4.1

2020-01-15 Thread 'Tom Pollok' via OpenSceneGraph Users
Hello Robert,

to test it with my old osg version, i fixed the obj file such it does not 
contain any indices to normals anymore, as there are no normals.
This indeed helped loading the model, but no textures appear at all. Should 
it load the textures automatically due to the first line in the obj file 
being mtllib Data.mtl and the use of usemtl material_0 before the faces or 
do i need to take extra care when loading a textured model?

For loading, im using only:

osgDB::Options* opt = new 
osgDB::Options;opt->setOptionString("noRotation");osg::ref_ptr node 
= osgDB::readNodeFile(pathToObjFile, opt);


Best,
Tom


Am Dienstag, 14. Januar 2020 17:25:27 UTC+1 schrieb Robert Osfield:
>
> On Tue, 14 Jan 2020 at 15:26, 'Tom Pollok' via OpenSceneGraph Users <
> osg-...@googlegroups.com > wrote:
>
>> Thank you for the workaround.
>>
>> So as far as i understand you only add the texture coordinate and normal, 
>> if there exists one with a index greater than 0 and less then the number of 
>> normals or texture coordinates.
>> So that means that openscenegraph now will be able to display the 
>> textured mesh, even if the normals are missing, right?
>>
>
> Yes, that's correct, you'll get a textured mesh with no normals assigned.
>
> Robert.
>  
>

-- 
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/b55a82c5-4801-49da-b1c4-149d868bd6fa%40googlegroups.com.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


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

2020-01-15 Thread Trajce Nikolov NICK
Hi,

the .mtl file is text file where the materials are defined. You can change
the ambient, diffuse there with text editor

On Wed, Jan 15, 2020 at 10:15 AM Voerman, L.  wrote:

> Hi Jiljith,
> I see no problem in your code, and it works when I add it to my osgviewer.
> with OSG_NOTIFY_LEVEL=NOTICE it generates 2 messages:
> Obj Found map in options, [DIFFUSE]=0
> Scaling image 'D:\laurens\Download\objDog/Dog_diffuse.jpg' from (450,450)
> to (512,512)
>
> I suggest you can convert your file with "osgconv -O DIFFUSE=0
> 12228_Dog_v1_L2.obj 12228_Dog_v1_L2.obj.osgt"
> so you can read it in your program with "osgDB::readRefNodeFile(path.
> toStdString() + ".osgt", opt);"
> maybe your scene has no light, or other reasons why the dog shows up black.
> Laurens.
>
>
> On Wed, Jan 15, 2020 at 8:10 AM JILJITH JOHN 
> wrote:
>
>> 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 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
>


-- 
trajce nikolov nick
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


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

2020-01-15 Thread Voerman, L.
Hi Jiljith,
I see no problem in your code, and it works when I add it to my osgviewer.
with OSG_NOTIFY_LEVEL=NOTICE it generates 2 messages:
Obj Found map in options, [DIFFUSE]=0
Scaling image 'D:\laurens\Download\objDog/Dog_diffuse.jpg' from (450,450)
to (512,512)

I suggest you can convert your file with "osgconv -O DIFFUSE=0
12228_Dog_v1_L2.obj 12228_Dog_v1_L2.obj.osgt"
so you can read it in your program with "osgDB::readRefNodeFile(path.
toStdString() + ".osgt", opt);"
maybe your scene has no light, or other reasons why the dog shows up black.
Laurens.


On Wed, Jan 15, 2020 at 8:10 AM JILJITH JOHN 
wrote:

> 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 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] 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 
> 
>
> 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 mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OpenSceneGraph-3.6.5 release candidate 1 tagged, please test

2020-01-15 Thread Robert Osfield
Hi Paul,

On Tuesday, 14 January 2020 18:45:28 UTC, Paul Leopard wrote:
>
> Using my 3.6-4 procedure, no visual studio files are generated by the 
> cmake system
>
> >mkdir release_build
> >cd release_build
> >cmake ../ -DCMAKE_INSTALL_PREFIX=../ -DCMAKE_BUILD_TYPE=Release
>
> No .sln, no .vcxproj is generated
>

This thread is for testing of the OSG-3.6.5 release candidate 1, not 3.6.4, 
lots of things have been fixed since 3.6.4, so please test the 
OpenSceneGraph-3.6 branch head or the 3.6.5-rc1. 
 

-- 
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/91056bbd-9979-47cf-89cb-2fc4fadf7aef%40googlegroups.com.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Create BoundingBoxes dynamically, by creating global Geode and attaching children later

2020-01-15 Thread Martin Steinborn
Hello,

I want to display my own BoundingBoxes (BBs) using osg. The way I am trying 
to do it is the following:
1) create a Geode and set it as Child of the overall scene. Create a global 
pointer to be able to add children to this Geode.
2) for every BoundingBox I find, create a new Geometry with a LINE_LOOP 
PrimitiveSet and add the draw-able as Child to the geode
3) after every iteration, multiple BBs could be generated and need to be 
deleted, because the objects in the BBs or the camera may have moved

I managed to show one BB in my scene by directly creating the Geode and the 
Box as child, but I cant get it working, using the above described method. 
I think that the Problem is with rerendering the previously created Geode, 
but I may be wrong. The other think, that may prevent stuff from rendering, 
is that I delete the BBs in the next "iteration".

Scene creation and Vertex positions are "correct", I've used the same code 
in my working example where I created Geode and DrawArray at once.

Here is a part of my Code, ill try to add some explanation:

Visual.h
...
/** Create scene object for all the Bounding Boxes to be drawn into **/
osg::ref_ptr myGeode;
...

--
Visual.cpp

// called on plug-in load
void Visual::load()
{
...
createBoundingBoxScene();
}

// called with 60fps
void Visual::update()
{
// remove old BBs and create new one
myGeode->removeDrawables(0, myGeode->getNumDrawables());
 createBoundingBox();
}

/*
* \brief   Visual create BoundingBox as Child to Geode
* creates a BoundingBox via DrawArray and lines over (later given) 
vertices, and adds them as child to the global Geode
*/
void Visual::createBoundingBox()
{
osg::Geometry* geo = new osg::Geometry;
osg::ref_ptr myBBPoints = new osg::Vec3dArray; // array of 
BB cordinates
osg::ref_ptr color = new osg::Vec4dArray;
color->push_back(osg::Vec4d(1.0, 0.0, 0.0, 1.0)); // create color: red
osg::DrawArrays* da = new osg::DrawArrays(osg::PrimitiveSet::LINE_LOOP, 0, 
myBBPoints->size()); // LINE_LOOP, because BBs are a loop for sure

myBBPoints->push_back(osg::Vec3d(754.0, 3860.0, 11.0)); // 4 corner 
vertices, TODO: if working, pass Global Points as parameters in function
myBBPoints->push_back(osg::Vec3d(760.0, 3860.0, 11.0));
myBBPoints->push_back(osg::Vec3d(760.0, 3860.0, 13.0));
myBBPoints->push_back(osg::Vec3d(754.0, 3860.0, 13.0));

geo->setVertexArray(myBBPoints);
geo->addPrimitiveSet(da);
geo->setColorArray(color);
geo->setColorBinding(osg::Geometry::BIND_PER_PRIMITIVE);
geo->setDataVariance(osg::Object::DYNAMIC);

// add geometry to geode to be drawn
myGeode->addDrawable(geo);

// force scene / Geode to be redrawn ? all necessary, all useless?
geo->dirtyDisplayList();
geo->dirtyBound();
da->dirty();
myGeode->dirtyBound();
}

/*
* \brief   Visual create global Geode as child to scene
* get 3D scene of environment, create a (global) geode and add it as child 
to scene.
*/

void Visual::createBoundingBoxScene()
{
osg::Group * scene = 
findScene3D(dynamic_cast(myGraphicalContext->getScene())); 
//works
if (scene)
{
myGeode = new osg::Geode;
myGeode->setDataVariance(osg::Object::DYNAMIC);
myGeode->setName("Geode");
osg::MatrixTransform* mat = new osg::MatrixTransform;
mat->setReferenceFrame(osg::Transform::ABSOLUTE_RF); // (?) use global 
coordinate system, not local
osg::StateSet *stateset = myGeode->getOrCreateStateSet();

stateset->setMode(GL_LIGHTING, osg::StateAttribute::ON);
   stateset->setRenderBinDetails(INT_MAX, "RenderBin"); // make 
sure to print at last possible time

// add global Geode as child to scene
scene->addChild(mat);
mat->addChild(myGeode);

std::cout << "Scene created successfully, name: " << scene->getName() << " 
with " << scene->getNumChildren() << " children." << std::endl;
}
else mySimulationContext->printErrorMessage("Failed to get scene node.");
}

I hope the code is not too long, but because I'm new to osg, I dont know 
what is important and what not.

Have a nice Day and thanks for your responses

-- 
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/b2866ce9-f4c2-4395-bf2a-06db06d84ed5%40googlegroups.com.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org