bret curtis | 27 Aug 17:31 2015
Picon

Re: [osgPlugins] ETC1 and other TC format support in DDS plugin

Here is the good news, ETC1 is supported by NVIDIA's binary blob on Linux even though it isn't announced. So
it can be tested. I validated this by loading a KTX file (instead of a DDS) file, so the code to handle ETC1 is
available but only in the KTX plugin.

VC4 (in RPi) announces support, but it isn't live yet. Eric Anholt confirmed this when I talked to him last
week. It is coming.

Intel announces support, but OSG gives an message that the opengl function isn't supported. So I don't know
if this is problem with Intel's driver or in OSG itself.

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

Tony Vasile | 27 Aug 10:51 2015
Picon

OSG equivalent of Performer pfSequence

We are in the middle of porting some Performer code and I have across some code which uses pfSequence to do
some simple animation. Is there an equivalent class in OpenSceneGraph?

Tony V

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

sam | 26 Aug 23:51 2015
Picon

Animating Textures

Hi All,

I have individual nodes that have textures on them that animate; That's to say the texture moves not the actual mesh. I've been trying to figure out how to accomplish this in OSG. Is there a way to define a texture matrix that does movement? The only other way I can think of is manipulating the UV coordinates in an update callback.

Thanks, Sam
<div><div dir="ltr">
<div>
<div>Hi All,<br><br>
</div>I have individual nodes that have textures on them that animate; That's to say the texture moves not the actual mesh. I've been trying to figure out how to accomplish this in OSG. Is there a way to define a texture matrix that does movement? The only other way I can think of is manipulating the UV coordinates in an update callback.<br><br>
</div>Thanks, Sam<br>
</div></div>
Michael May | 25 Aug 12:59 2015
Picon
Picon

Preprocessing Viewer

Hi,

I want to add a pre-processing step for rendering several environment maps. The environment maps are used
for rendering the scene later. 
How does it work?

Using multiple (composite)viewers does not work. So, I create a view for preprocessing. The view is then
rendered using frame(). 
After render the preprocess view, I remove it and create the view for rendering the scene. Note, both views
has several camera slaves.

Code:

//Scene Loading, creating cameras, and so on
...
osg::ArgumentParser psr(&argc, argv);
osgViewer::CompositeViewer* viewer2 = new osgViewer::CompositeViewer(psr);

osgViewer::View* view2 = new osgViewer::View();
view2->setCamera(m_camera2);
view2->setSceneData( scene_obj);
scene_manager->createPreprocess(graphic_context, view2); //Creates camera slaves for pre-processing
viewer2->addView(view2);
viewer2->frame();
viewer2->removeView(view2);

osgViewer::View* view = new osgViewer::View();
view->setCamera(m_camera);
view->setSceneData( scene_obj);

scene_manager->setSlaveCameras(view, graphic_context); //creates camera slaves for scene rendering

//Add Event Handler and so on... 
...

while(!viewer2->done()) 
{
if(!view->getCameraManipulator() && view->getCamera()->getAllowEventFocus())
view->setCameraManipulator(new osgGA::TrackballManipulator());	    
viewer2->setReleaseContextAtEndOfFrameHint(false);
if(_firstFrame)
{
view->init();
if(!viewer2->isRealized())
viewer2->realize();

_firstFrame = false;
}

viewer2->advance(USE_REFERENCE_TIME);   			
viewer2->eventTraversal();
viewer2->updateTraversal();
viewer2->renderingTraversals();
}

This technique works, but the frame-rate decreses dramatically. 
Does anybody have an idea?

Thank you!

Cheers,
Michael

I am using Osg 3.4 rc-2 with GL3.0 profile. 
Code:

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

Luciano Buglioni | 25 Aug 12:48 2015
Picon

osgviewer texture maps lost

Hi, my name is Luciano and i'm new in OSG, until now very happy with it.
Mi intention is to develop a deferred shading editable pipeline with osg and qt based, with post processing
and global illumination, but is so far from now :). I've ound here an excellent deferred render pipeline
from konner user which i've been tested in my onboard card notebook.

Recently, i have downloaded Sponza atrium classic scene and loaded with osgviewer, and whereas in 3dsmax
all maps are placed correctly, in osgviewer some if them are lost (walls and floor). Does texture
coordinated store on .osgb file i'm right? Could be adopted some mapping technique which osg does not support?
Apologyze mi ignorance, i'm new on all this!
Suppose it is a simple thing, i'll try to find out what i'm doing wrong..

Screenshots are in my site (faiengine dot org, i can't put it yet :' )

Thank you!
Luciano

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

Attachments: 
http://forum.openscenegraph.org//files/cnob6zluyaegkca_213.jpg

Julie Green | 25 Aug 11:52 2015
Picon

UpdateCallback

Hi,

Is there a way of passing arguments to operator method of NodeCallback? I have a vertex array and need to
modify it every frame.

Thank you!

Cheers,
Julie

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

Julie Green | 25 Aug 08:02 2015
Picon

Image file loading

Hi,
I have a problem with image file loading

Code:

std::string path("D:/i.png");
osg::ref_ptr<osg::Image> image = osgDB::readImageFile(path);

The file is there, but my application doesn't load it.

Thanks for your help!

Cheers,
Julie

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

Vitaliy Polyakov | 23 Aug 23:41 2015
Picon

AutoTransform can't leave unchanged the form of graphic item

Hi,

I trying to draw the plus symbol on the view using osg::AutoTransform
This is my code
http://pastebin.com/Jzpgz376

The problem is that, when I move the symbol it's form changed.
Is it osg::AutoTransform problem?

Thank you!

Cheers,
Vitaliy

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

Trajce Nikolov NICK | 21 Aug 16:35 2015
Picon

ECEF orientation - roll acts as yaw

Hi community,

I am aware from the search I did through the archive that some might resolved this and have it working - I am trying a simple thing, to move the camera on an ellipsoid using geodetic coordinates and euler angles (NED alike). All works, but the roll, rotation around Vec3(0,1,0) acts as changing its heading.

Here some snippets:

<snip>
double lat = 36.9268;
double lon = -75.9845;
double alt = 5608.62;
static double heading = 0.0;
static double pitch = 0.0;
static double roll = 0.0;

osg::Vec3d euler(heading, pitch+osg::DegreesToRadians(90.0), roll);

roll += osg::DegreesToRadians(1.0);

osg::Matrixd mx = toMatrix(
0.0,0.0,0.0,
osg::RadiansToDegrees(euler.x()), osg::RadiansToDegrees(euler.y()), osg::RadiansToDegrees(euler.z())
);

osg::EllipsoidModel em;
osg::Matrixd l2w;
em.computeLocalToWorldTransformFromLatLongHeight(osg::DegreesToRadians(lat), osg::DegreesToRadians(lon), alt, l2w);

viewer->getView(0)->getCamera()->setViewMatrix(osg::Matrixd::inverse(mx * l2w));
....
....
osg::Matrixd toMatrix(double x, double y, double z, double h, double p, double r)
{
osg::Matrixd mxR;
mxR.makeRotate(osg::DegreesToRadians(r), osg::Vec3(0, 1, 0));
osg::Matrixd mxP;
mxP.makeRotate(osg::DegreesToRadians(p), osg::Vec3(1, 0, 0));
osg::Matrixd mxH;
mxH.makeRotate(osg::DegreesToRadians(-h), osg::Vec3(0, 0, 1));
osg::Matrixd mxT;
mxT.makeTranslate(osg::Vec3(x, y, z));

return (mxR*mxP*mxH*mxT);
}


</snip>


Any clue? Thanks a bunch for any input!!!!

Cheers,
Nick

--
trajce nikolov nick
<div><div dir="ltr">Hi community,<div><br></div>
<div>I am aware from the search I did through the archive that some might resolved this and have it working - I am trying a simple thing, to move the camera on an ellipsoid using geodetic coordinates and euler angles (NED alike). All works, but the roll, rotation around Vec3(0,1,0) acts as changing its heading.</div>
<div><br></div>
<div>Here some snippets:</div>
<div><br></div>
<div>&lt;snip&gt;</div>
<div>
<div>
<span class="Apple-tab-span">		</span>double lat = 36.9268;</div>
<div>
<span class="Apple-tab-span">		</span>double lon = -75.9845;</div>
<div>
<span class="Apple-tab-span">		</span>double alt = 5608.62;</div>
<div><span class="Apple-tab-span">				</span></div>
<div>
<span class="Apple-tab-span">		</span>static double heading = 0.0;</div>
<div>
<span class="Apple-tab-span">		</span>static double pitch = 0.0;</div>
<div>
<span class="Apple-tab-span">		</span>static double roll = 0.0;</div>
<div><br></div>
<div>
<span class="Apple-tab-span">		</span>osg::Vec3d euler(heading, pitch+osg::DegreesToRadians(90.0), roll);<span class="Apple-tab-span">		</span>
</div>
<div><br></div>
<div>
<span class="Apple-tab-span">		</span>roll += osg::DegreesToRadians(1.0);<span class="Apple-tab-span">		</span>
</div>
<div><br></div>
<div>
<span class="Apple-tab-span">		</span>osg::Matrixd mx = toMatrix(</div>
<div>
<span class="Apple-tab-span">			</span>0.0,0.0,0.0,</div>
<div>
<span class="Apple-tab-span">			</span>osg::RadiansToDegrees(euler.x()), osg::RadiansToDegrees(euler.y()), osg::RadiansToDegrees(euler.z())</div>
<div>
<span class="Apple-tab-span">		</span>);</div>
<div><br></div>
<div>
<span class="Apple-tab-span">		</span>osg::EllipsoidModel em;</div>
<div>
<span class="Apple-tab-span">		</span>osg::Matrixd l2w;</div>
<div>
<span class="Apple-tab-span">		</span>em.computeLocalToWorldTransformFromLatLongHeight(osg::DegreesToRadians(lat), osg::DegreesToRadians(lon), alt, l2w);</div>
<div><br></div>
<div>
<span class="Apple-tab-span">		</span>viewer-&gt;getView(0)-&gt;getCamera()-&gt;setViewMatrix(osg::Matrixd::inverse(mx * l2w));</div>
</div>
<div>....</div>
<div>....</div>
<div>
<div>osg::Matrixd toMatrix(double x, double y, double z, double h, double p, double r)</div>
<div>{</div>
<div>
<span class="Apple-tab-span">	</span>osg::Matrixd mxR;</div>
<div>
<span class="Apple-tab-span">	</span>mxR.makeRotate(osg::DegreesToRadians(r), osg::Vec3(0, 1, 0));</div>
<div>
<span class="Apple-tab-span">	</span>osg::Matrixd mxP;</div>
<div>
<span class="Apple-tab-span">	</span>mxP.makeRotate(osg::DegreesToRadians(p), osg::Vec3(1, 0, 0));</div>
<div>
<span class="Apple-tab-span">	</span>osg::Matrixd mxH;</div>
<div>
<span class="Apple-tab-span">	</span>mxH.makeRotate(osg::DegreesToRadians(-h), osg::Vec3(0, 0, 1));</div>
<div>
<span class="Apple-tab-span">	</span>osg::Matrixd mxT;</div>
<div>
<span class="Apple-tab-span">	</span>mxT.makeTranslate(osg::Vec3(x, y, z));</div>
<div><br></div>
<div>
<span class="Apple-tab-span">	</span>return (mxR*mxP*mxH*mxT);</div>
<div>}</div>
</div>
<div><br></div>
<div><br></div>
<div>&lt;/snip&gt;<br clear="all"><div><br></div>
<div><br></div>
<div>Any clue? Thanks a bunch for any input!!!!</div>
<div><br></div>
<div>Cheers,</div>
<div>Nick</div>
<div><br></div>-- <br><div class="gmail_signature">trajce nikolov nick<br>
</div>
</div>
</div></div>
Abst Zhang | 21 Aug 05:19 2015

is there someone who has used osgqtquick?

Hi,

I download the osgqtquick code from 
git.podsvirov.pro/?p=osg/osgqtquick.git;a=snapshot;h=d835c61f8970d95552a1fc23e8d0f81f28010c1c;sf=tgz

I tried the source code and find some problem. 
when i resize the windows  , the updateviewport()(osgviewport.cpp) method would execute updataFBO()
method , but in the updataFBO() method, the Qopenglcontext * currentcontext is null. so the fbo
initialized failed, and the program is crashed. 

but in the initFBO() method , it can find Qopenglcontext correctly, is there anyone  who can give me a pointer
to solve this? 

when i delete the updataFBO method , it does work , but the size of texture will not changed any more. 

Thank you!

Cheers,
xinghangz

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

michael kapelko | 21 Aug 03:04 2015
Picon

How to convert bounding box to position and scale?

Hi.
I want to convert bounding box to position and scale of a box.
I tried to do it, but I couldn't get it right. Can anyone share the formula?

Thanks.
<div><div dir="ltr">
<div>
<div>Hi.<br>
</div>I want to convert bounding box to position and scale of a box.<br>I tried to do it, but I couldn't get it right. Can anyone share the formula?<br>
</div>
<br>Thanks.<br>
</div></div>

Gmane