[osg-users] Help with OSG_OPTIMIZER

2015-10-02 Thread maya leonard
Hi Robert,

I'm looking for TriangleLists that do not reproduce the same vertices
in VertexArray.

-
For example I want this:

DrawElementsUInt TRIANGLES 5766
{
2 0 1 2 1 3 1 2 4 1
}

VertexArray Vec3Array 1024
{
-291.43 -202.75 266.13
-272.63 -202.75 267.03
-253.83 -202.75 265.69
-235.03 -202.75 267.56
-235.03 -202.75 297.56
...
}

-

but I'm getting this:

DrawElementsUInt TRIANGLES 5766
{
0 1 2 3 4 5 6 7 8 9
}

VertexArray Vec3Array 1024
{
-253.83 -202.75 265.69
-291.43 -202.75 266.13
-272.63 -202.75 267.03
-253.83 -202.75 265.69
-272.63 -202.75 267.03
-235.03 -202.75 267.56
-272.63 -202.75 267.03
-253.83 -202.75 265.69


}

Thank you,

Maya


Hi Maya,

What do you mean by unique?

Robert.


On 1 October 2015 at 22:04, maya leonard http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org>>
wrote:

>* Hello OSG developers,
*>>* I'm trying to have all my VertexArray outputs unique in my osg output
*>* file. I tried using set OSG_OPTIMIZER=INDEX_MESH and other settings, but my
*>* VertexArray always has duplicates.
*>>* The osg output file is from osgUtil::DelaunayTriangulator.
*>>* I tried using the osgconv tool, but have the same problem.
*>>* Can someone point me in the right direction to have unique VertexArray
*>* outputs?
*>>>* Thank you,
*>* Maya
*>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] [vpb] terrain altimetry not visible after osgdem generation

2015-10-02 Thread Francesco Argese
Hi,

I'm trying to obtain a full earth including terrains for all parts (or at least 
for some parts) using Virtual Planet Builder.

I'm using bluemarble textures and ASTER GDEM as digital elevation model.

In order to generate the earth model I use the command below. It generates the 
whole earth with the texture but it seems that the terrain elevation is 
lacking: indeed, when I go near to the mountains with osgviewer, the terrain 
altimetry is not visible and they seems flat. 

What could be the problem? Is there in the command-line any problem with the 
command or with data I'm using?

Where can I find prepared reference sample data to do some tests with osgdem?


Code:
osgdem --bluemarble-west -t land_shallow_topo_west.tif --bluemarble-east -t 
land_shallow_topo_east.tif -d GDEM-10km-colorized.tif -l 8 -v 1.0 --geocentric 
--POLYGONAL --PagedLOD -o earth/earth.ive 



Thank you!

Cheers,
Francesco


Francesco Argese

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=65288#65288





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


Re: [osg-users] Help with OSG_OPTIMIZER

2015-10-02 Thread Robert Osfield
Hi Maya,

I have just had a quick look at the osgUtil code and can't spot a dedicate
utility that just removes duplicate vertices from osg::Geometry.  The
osgUtil/MeshOptimizer's and  osgUtil::TriStripVisitor have code for
removing duplicates, these ensure that not only vertices but any associated
texcoords, normals etc. are all duplicates before removing the duplicates.
I guess you could try an run these over your dataset.

One thing to note  is that the .osg and .osgt formats are ascii and not
write out to the same precision as floating point values handled natively
by the CPU so you might not see differences in the output that exist in
memory.

Another avenue you could take is to write you own code to dedicate
duplicate vertices and remove them.

Robert.

On 2 October 2015 at 13:36, maya leonard  wrote:

> Hi Robert,
>
> I'm looking for TriangleLists that do not reproduce the same vertices in 
> VertexArray.
>
> -
> For example I want this:
>
> DrawElementsUInt TRIANGLES 5766
> {
> 2 0 1 2 1 3 1 2 4 1
> }
>
> VertexArray Vec3Array 1024
> {
> -291.43 -202.75 266.13
> -272.63 -202.75 267.03
> -253.83 -202.75 265.69
> -235.03 -202.75 267.56
> -235.03 -202.75 297.56
> ...
> }
>
> -
>
> but I'm getting this:
>
> DrawElementsUInt TRIANGLES 5766
> {
> 0 1 2 3 4 5 6 7 8 9
> }
>
> VertexArray Vec3Array 1024
> {
> -253.83 -202.75 265.69
> -291.43 -202.75 266.13
> -272.63 -202.75 267.03
> -253.83 -202.75 265.69
> -272.63 -202.75 267.03
> -235.03 -202.75 267.56
> -272.63 -202.75 267.03
> -253.83 -202.75 265.69
>
> 
> }
>
> Thank you,
>
> Maya
>
>
> Hi Maya,
>
> What do you mean by unique?
>
> Robert.
>
>
> On 1 October 2015 at 22:04, maya leonard  > 
> wrote:
>
> >* Hello OSG developers,
> *>>* I'm trying to have all my VertexArray outputs unique in my osg output
> *>* file. I tried using set OSG_OPTIMIZER=INDEX_MESH and other settings, but 
> my
> *>* VertexArray always has duplicates.
> *>>* The osg output file is from osgUtil::DelaunayTriangulator.
> *>>* I tried using the osgconv tool, but have the same problem.
> *>>* Can someone point me in the right direction to have unique VertexArray
> *>* outputs?
> *>>>* Thank you,
> *>* Maya
> *>
>
>
> ___
> 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] diable tex gen

2015-10-02 Thread Trajce Nikolov NICK
>  for the later simply toggle the GL_TEXTURE_GEN_S, T, R and Q modes via a
StateSet attached to the top of the scene graph/view's master Camera.

That was it ... Thanks !!!

Nick

On Fri, Oct 2, 2015 at 9:17 AM, Robert Osfield 
wrote:

> Hi Nick,
>
> On 1 October 2015 at 19:52, Trajce Nikolov NICK <
> trajce.nikolov.n...@gmail.com> wrote:
>
>> I bit of simple question: How to disable TexGen totally?
>>
>
> For all users of the OSG users simultaneously?  Which is clearly a bit
> harsh.   Or just for for your own scene graph?
>
> Presuming your are hell bent of global domination I will assume that
> later.  However, left with another question, for a shader or fixed function
> based scene graph?
>
> For the former, modify your shaders, for the later simply toggle the
> GL_TEXTURE_GEN_S, T, R and Q modes via a StateSet attached to the top of
> the scene graph/view's master Camera.
>
> Robert.
>
> ___
> 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] Help with OSG_OPTIMIZER

2015-10-02 Thread Robert Osfield
Hi Maya,

What do you mean by unique?

Robert.


On 1 October 2015 at 22:04, maya leonard  wrote:

> Hello OSG developers,
>
> I'm trying to have all my VertexArray outputs unique in my osg output
> file. I tried using set OSG_OPTIMIZER=INDEX_MESH and other settings, but my
> VertexArray always has duplicates.
>
> The osg output file is from osgUtil::DelaunayTriangulator.
>
> I tried using the osgconv tool, but have the same problem.
>
> Can someone point me in the right direction to have unique VertexArray
> outputs?
>
>
> Thank you,
> Maya
>
>
>
>
> ___
> 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] Crash when application closes if linking with OSG

2015-10-02 Thread Robert Osfield
Hi David,

Curious bug.  Perhaps another solution would be to call
DisplaySettings::instance() at the start of main.

An actual bug fix might be to put in a proxy object into
src/osg/DisplauySettings.cpp that forces that DisplaySettings::instance()
to be constructed during static initialization, this would obviously
require a patch to the core OSG, something I'm happy to do, but won't help
you right away.

Robert.



On 2 October 2015 at 17:07, David Siñuela  wrote:

> Hello,
>
> We have a Qt application that uses OSG for the 3D viewer/editor, but the
> OSG viewer may not be used if the user does not open the 3D view tab. We
> are in the process of upgrading to OSG 3.4 and we noticed that the
> application crashes when the user quits if the 3D view is never open.
>
> The problem seems to be the order in which the static variables are
> destroyed at shutdown. The stacktrace looks like this:
>
> Program received signal SIGSEGV, Segmentation fault.
> 0x01d8a0b0 in
> osg::DisplaySettings::getNumOfHttpDatabaseThreadsHint (this=0x0) at
> /home/siu/src/pix4dmapper/2.1/external_tmp/build/openscenegraph/include/osg/DisplaySettings:203
> (gdb) bt
> #0  0x01d8a0b0 in
> osg::DisplaySettings::getNumOfHttpDatabaseThreadsHint (this=0x0) at
> /home/siu/src/pix4dmapper/2.1/external_tmp/build/openscenegraph/include/osg/DisplaySettings:203
> #1  0x01d86b47 in osgDB::DatabasePager::DatabasePager
> (this=0x3a10fb0) at
> /home/siu/src/pix4dmapper/2.1/external_tmp/build/openscenegraph/src/osgDB/DatabasePager.cpp:
> #2  0x01d87815 in osgDB::DatabasePager::prototype () at
> /home/siu/src/pix4dmapper/2.1/external_tmp/build/openscenegraph/src/osgDB/DatabasePager.cpp:1235
> #3  0x01d1ceef in InitRegistry::~InitRegistry (this=0x32cc6f3
> , __in_chrg=) at
> /home/siu/src/pix4dmapper/2.1/external_tmp/build/openscenegraph/src/osgViewer/ViewerBase.cpp:53
> #4  0x7fffec82df88 in __run_exit_handlers () from /usr/lib/libc.so.6
> #5  0x7fffec82dfd5 in exit () from /usr/lib/libc.so.6
> #6  0x7fffec818617 in __libc_start_main () from /usr/lib/libc.so.6
> #7  0x00ea3709 in _start ()
>
> As shown in the trace calling DatabasePager::prototype() is creating the
> static DatabasePager for the first time and this one calls
> osg::DisplaySettings::instance() which was released already. It is easily
> reproducible on linux with gcc. Removing the
> osgDB::DatabasePager::prototype() = 0; line fixes the crash but I am not
> sure about the intent of that line.
>
> Regards,
>
> --
> David Sinuela Pastor
>
>
> *Pix4D SA*
> *EPFL Innovation Park*
> *Building D*
> *1015 Lausanne - Switzerland*
> *Email: david.sinu...@pix4d.com
> *
> *Skype: david.sinuela.pix4d*
> *www.pix4d.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


[osg-users] Crash when application closes if linking with OSG

2015-10-02 Thread David Siñuela
Hello,

We have a Qt application that uses OSG for the 3D viewer/editor, but the
OSG viewer may not be used if the user does not open the 3D view tab. We
are in the process of upgrading to OSG 3.4 and we noticed that the
application crashes when the user quits if the 3D view is never open.

The problem seems to be the order in which the static variables are
destroyed at shutdown. The stacktrace looks like this:

Program received signal SIGSEGV, Segmentation fault.
0x01d8a0b0 in osg::DisplaySettings::getNumOfHttpDatabaseThreadsHint
(this=0x0) at
/home/siu/src/pix4dmapper/2.1/external_tmp/build/openscenegraph/include/osg/DisplaySettings:203
(gdb) bt
#0  0x01d8a0b0 in
osg::DisplaySettings::getNumOfHttpDatabaseThreadsHint (this=0x0) at
/home/siu/src/pix4dmapper/2.1/external_tmp/build/openscenegraph/include/osg/DisplaySettings:203
#1  0x01d86b47 in osgDB::DatabasePager::DatabasePager
(this=0x3a10fb0) at
/home/siu/src/pix4dmapper/2.1/external_tmp/build/openscenegraph/src/osgDB/DatabasePager.cpp:
#2  0x01d87815 in osgDB::DatabasePager::prototype () at
/home/siu/src/pix4dmapper/2.1/external_tmp/build/openscenegraph/src/osgDB/DatabasePager.cpp:1235
#3  0x01d1ceef in InitRegistry::~InitRegistry (this=0x32cc6f3
, __in_chrg=) at
/home/siu/src/pix4dmapper/2.1/external_tmp/build/openscenegraph/src/osgViewer/ViewerBase.cpp:53
#4  0x7fffec82df88 in __run_exit_handlers () from /usr/lib/libc.so.6
#5  0x7fffec82dfd5 in exit () from /usr/lib/libc.so.6
#6  0x7fffec818617 in __libc_start_main () from /usr/lib/libc.so.6
#7  0x00ea3709 in _start ()

As shown in the trace calling DatabasePager::prototype() is creating the
static DatabasePager for the first time and this one calls
osg::DisplaySettings::instance() which was released already. It is easily
reproducible on linux with gcc. Removing the
osgDB::DatabasePager::prototype() = 0; line fixes the crash but I am not
sure about the intent of that line.

Regards,

-- 
David Sinuela Pastor


*Pix4D SA*
*EPFL Innovation Park*
*Building D*
*1015 Lausanne - Switzerland*
*Email: david.sinu...@pix4d.com
*
*Skype: david.sinuela.pix4d*
*www.pix4d.com* 
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] diable tex gen

2015-10-02 Thread Robert Osfield
Hi Nick,

On 1 October 2015 at 19:52, Trajce Nikolov NICK <
trajce.nikolov.n...@gmail.com> wrote:

> I bit of simple question: How to disable TexGen totally?
>

For all users of the OSG users simultaneously?  Which is clearly a bit
harsh.   Or just for for your own scene graph?

Presuming your are hell bent of global domination I will assume that
later.  However, left with another question, for a shader or fixed function
based scene graph?

For the former, modify your shaders, for the later simply toggle the
GL_TEXTURE_GEN_S, T, R and Q modes via a StateSet attached to the top of
the scene graph/view's master Camera.

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