Re: [osg-users] Seeking advice: Efficient method for large grid rendering (terrain) with unique state per grid square

2015-09-10 Thread Robert Osfield
Hi John, When dealing with large amounts of data the best approach is typically to use paging, you can use the osg::PageLOD node to support this when generating your own scene graphs, or use VirtualPlanetBuilder to creat a paged database offline, or osgEarth to create the paged database at

Re: [osg-users] pfObject::getNamedUserDataSlot

2015-09-10 Thread Robert Osfield
Hi Tony, As Nick says there is the Node::setUserValue(..) template method and Node::setUserData(). When you use UserValue it creates a UserDataContainer to hold the values in a vector of osg::Object*, so this UserDataContainer kinda has "slots". The UserDataContainer is only created on demand

Re: [osg-users] pfObject::getNamedUserDataSlot

2015-09-10 Thread Robert Osfield
Hi Tony, On 10 September 2015 at 09:30, Tony Vasile wrote: > Unfortunately we have a tight schedule to do this port. The usual 6 months > of work in 4 months type of affair. Thanks for the advice. > I can sympathise with impossible tight schedules, my point still stands

Re: [osg-users] Change picked points' color ---why can't work in the pick function?

2015-09-10 Thread Yexin Wang
Thank you so much, dear Trajce! That's exactly what I want! :D :D :D Trajce Nikolov NICK wrote: > Hi, > > can you try geom->dirtyDisplayLists() after changing the color? > > Nick > > -- Read this topic online here:

[osg-users] Seeking advice: Efficient method for large grid rendering (terrain) with unique state per grid square

2015-09-10 Thread John Peterson
Hello everyone, I am seeking some advice on the best way to implement a particular task using OSG. Hopefully I can articulate what I'd like to do in a way that makes sense--please do not hesitate to ask if I need to clarify. Essentially, I'd like to use OSG to render a large grid which is

Re: [osg-users] pfObject::getNamedUserDataSlot

2015-09-10 Thread Tony Vasile
Hi Nick & Robert, That's not quite the same functionality as it appears that in Performer there is some sort of memory/map that is used to map a user defined name as a string to a slot number. You then add data to the node using this slot number. Performer does have a call to setUserData

Re: [osg-users] [Questio nabout StateSet.cpp] truncated attribute override value?

2015-09-10 Thread Voerman, L.
Hi Julien, it's OFF, the enum for StateAttribute::OFF is 0x0, so anything not ON has value OFF. Regards, Laurens. On Wed, Sep 9, 2015 at 7:45 PM, Julien Valentin wrote: > Hi, > Iwould like to introspect StateSet in order to know which override value > is activated

Re: [osg-users] how to get the handle of opengl texture that corresponds to a OSG::Texture

2015-09-10 Thread Robert Osfield
Hi Qingjie, This is no longer about the OSG, it's about C++. Your mistake is straight forward C++ issue of not matching the base classes parameters when overidding a method: The Camera::DrawCallback base class is: /** Draw callback for custom operations.*/ struct OSG_EXPORT

Re: [osg-users] pfObject::getNamedUserDataSlot

2015-09-10 Thread Robert Osfield
Hi Tony, Spend some time with OSG code, you'll find it far more flexible than anything that Performer had. It's investing time into learning the OSG rather than just working out how to do something equivalent to Performer because your original design may well have been compromised by the

Re: [osg-users] pfObject::getNamedUserDataSlot

2015-09-10 Thread Trajce Nikolov NICK
Hi Tony, you have two options: - osg::Object:get/setUserData - osg::Object:setUserValue (for this one you have to #include Nick On Thu, Sep 10, 2015 at 7:56 AM, Tony Vasile wrote: > Is there an equivalent function to the Performer > pfObject::getNamedUserDataSlot? Our

Re: [osg-users] pfObject::getNamedUserDataSlot

2015-09-10 Thread Tony Vasile
Unfortunately we have a tight schedule to do this port. The usual 6 months of work in 4 months type of affair. Thanks for the advice. Tony V -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=65091#65091

Re: [osg-users] [Question about StateSet.cpp] truncated attribute override value?

2015-09-10 Thread Voerman, L.
Sorry, you are right, i did not read your question properly. Modes could have a value OFF, attributes do not, they are always ON Laurens. On Thu, Sep 10, 2015 at 1:35 PM, Julien Valentin wrote: > I think you misread the question: > You can't know if the flags is

[osg-users] OSG rendering to live video stream

2015-09-10 Thread Trajce Nikolov NICK
Hi Community, I am wondering if someone knows the way to create live stream from OSG rendering probably in combination with ffmpeg + ffserver, or any other way - cross-platform preferred though Thanks a bunch as always, Cheers, Nick -- trajce nikolov nick

Re: [osg-users] [Question about StateSet.cpp] truncated attribute override value?

2015-09-10 Thread Julien Valentin
I think you misread the question: You can't know if the flags is ON/OFF as the bit seams ignored and then not stored... Using the posted code, it never returns 1. Voerman, L. wrote: > Hi Julien,it's OFF, the enum for StateAttribute::OFF is 0x0, so anything not > ON has value OFF. > Regards,

Re: [osg-users] [Question about StateSet.cpp] truncated attribute override value?

2015-09-10 Thread Julien Valentin
Thanks, That's what i suspected... Have a good day:) Voerman, L. wrote: > Sorry, you are right, i did not read your question properly.Modes could have > a value OFF, attributes do not, they are always ON > Laurens. > > > On Thu, Sep 10, 2015 at 1:35 PM, Julien Valentin < ()> wrote: > > > I

Re: [osg-users] [Questio nabout StateSet.cpp] truncated attribute override value?

2015-09-10 Thread Robert Osfield
Hi Julien, I don't recall the why and wherefores of this particular bit of code in StateSet.cpp (i.e. line 1662 and associated code) but it's a lng time since I wrote it ;-) My best guess right now is that the ON/OFF for StateAttribute doesn't affect anything, a StateAttribute isn't like a

Re: [osg-users] Seeking advice: Efficient method for large grid rendering (terrain) with unique state per grid square

2015-09-10 Thread John Peterson
Thank you for your reply, Robert. You mentioned PagedLOD nodes. While I might not use the paged version of the LODs nodes just yet, I've been thinking a lot about whether LOD nodes are the way to go in order to get OSG to cull large portions of my terrain without having to traverse and render

Re: [osg-users] OSG rendering to live video stream

2015-09-10 Thread Chris Hanson
Basically, you'd just Render To Texture and then feed that image to a memory-sourced encoder. There's sample code here for a desktop-to-ffmpeg ecode: http://stackoverflow.com/questions/29341161/encode-h264-video-using-ffmpeg-library-memory-issues You'd set up your encode options using options

Re: [osg-users] OSG rendering to live video stream

2015-09-10 Thread Trajce Nikolov NICK
Thanks Chris! Nick On Thu, Sep 10, 2015 at 6:10 PM, Chris Hanson wrote: > Basically, you'd just Render To Texture and then feed that image to a > memory-sourced encoder. There's sample code here for a desktop-to-ffmpeg > ecode: > >

Re: [osg-users] OSG rendering to live video stream

2015-09-10 Thread Chris Hanson
No worries. Would be interested to know what you're going to do with it. On Thu, Sep 10, 2015 at 11:25 AM, Trajce Nikolov NICK < trajce.nikolov.n...@gmail.com> wrote: > Thanks Chris! > > Nick > > On Thu, Sep 10, 2015 at 6:10 PM, Chris Hanson > wrote: > >> Basically, you'd

Re: [osg-users] OSG rendering to live video stream

2015-09-10 Thread Chris Hanson
Oohh! I'll use the secret handshake then! ;)​ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

[osg-users] strange behavior

2015-09-10 Thread ted morris
hi, I am using 3.4.0 with VisualStudio 2013, Win 8.1/x64, which all built fine (examples all work as expected). So, I wrote a very simple program, which unfortunately renders the cube offset from the horizontal axis, instead of being centered. The bounding sphere center = 0,0,0. If I instead

Re: [osg-users] Reading files and callbacks

2015-09-10 Thread Tony Vasile
SMesserschmidt wrote: > Hi Tony > > From examples/osgcallback > > class MyReadFileCallback : public osgDB::Registry::ReadFileCallback > { > public: > virtual osgDB::ReaderWriter::ReadResult readNode(const std::string& > fileName, const osgDB::ReaderWriter::Options* options) > { >

Re: [osg-users] Reading files and callbacks

2015-09-10 Thread Tony Vasile
Okay I modified the example visit_model.cpp from the OpenSceneGraph 3.0 Beginner's Guide to print the Descriptions and there was the data I was looking for. The sonic boom of comprehension. Tony V -- Read this topic online here:

Re: [osg-users] Seeking advice: Efficient method for large grid rendering (terrain) with unique state per grid square

2015-09-10 Thread Chris Hanson
I think it's sometimes useful to step back and ask what the problem is you're trying to solve. Many times people pose questions like "Why can't I get hummingbirds to carry machine guns?" where they have already self-selected a strategy (hummingbirds) as an implementation requirement, thus making

Re: [osg-users] OSG rendering to live video stream

2015-09-10 Thread Trajce Nikolov NICK
TOP SECRET :-))) Will ping you privately :-) Nick On Thu, Sep 10, 2015 at 7:39 PM, Chris Hanson wrote: > No worries. Would be interested to know what you're going to do with it. > > On Thu, Sep 10, 2015 at 11:25 AM, Trajce Nikolov NICK < > trajce.nikolov.n...@gmail.com>

Re: [osg-users] Seeking advice: Efficient method for large grid rendering (terrain) with unique state per grid square

2015-09-10 Thread Robert Osfield
Hi John, LOD (Level Of Detail) is all about providing multiple versions each with different resolution of geometry and/or texture data so that lower resolution versions are used at far distances and higher resolution versions are used at a nearer distance. LOD's can also be used in conjunction