Re: [osg-users] Drawing a line once( bullet physics integration )

2009-05-28 Thread Rafa Gaitan
Hi Eduardo, I'm not sure what are you trying to do, but I'm sure that there is a scenegraph like approach. Maybe using a Switch Node over that, so with an UpdateCallback you can determine which subgraph is rendered, or maybe a custom drawable so you can control what do you want to draw, or even

Re: [osg-users] Drawing a line once( bullet physics integration )

2009-05-28 Thread Stephan Huber
Hi Edurardo, Eduardo Alberto Hernández Muñoz schrieb: I'm trying to integrate bullet with osg; the problem comes with bullet's debug drawing. Bullet has an abstract class, with drawing functions to be implemented by the user. The main requirement is simply to render a line; however I need

Re: [osg-users] add/remove camera crash

2009-05-28 Thread Robert Osfield
Hi Guy, You don't say where you are adding your HUD camera's - to the graphics window, to the viewer as a slave/separate view or embedded in the scene graph. For the first two examples setting the data variance to dynamic won't be sufficient as it's a high level objects that is being removed -

[osg-users] crash when closing an embeddedWindow viewer with a shader example

2009-05-28 Thread Jonas Walti
Hi, I'm develping an application which does render the osgviewers output with the equalizer (parallel rendering) framework. I use Code: _window = viewer-setUpViewerAsEmbeddedInWindow(x,y,w,h); to set up the viewer as embedded window and render the frame with viewer-frame(); I managed to

Re: [osg-users] add/remove camera crash

2009-05-28 Thread Mathias Fröhlich
Hi, On Thursday 28 May 2009, Robert Osfield wrote: You don't say where you are adding your HUD camera's - to the graphics window, to the viewer as a slave/separate view or embedded in the scene graph. For the first two examples setting the data variance to dynamic won't be sufficient as

[osg-users] FBOs, MRTs, postprocessing, multi-pass, GLSL-Shader

2009-05-28 Thread Daniel Wirz
Hi, I'm a newbie on OpenSceneGraph. I have written an OpenGL program which do computations in screen space. In my program, frame buffer objects (FBOs) with multiple render targets (MRTs) are used. My code looks like: first pass: render scene: - use GLSL shaders

Re: [osg-users] FBOs, MRTs, postprocessing, multi-pass, GLSL-Shader

2009-05-28 Thread J.P. Delport
Hi, have a look at the osgstereomatch example, there multipass and MRT are used together. Also have a look at osgPPU and osgCompute which are external to OSG. For simple flip-flop FBO use you can look at osggameoflife jp Daniel Wirz wrote: Hi, I'm a newbie on OpenSceneGraph. I have

[osg-users] Constrain primitiveset type using osgconv

2009-05-28 Thread Maxime BOUCHER
Hi, I wonder: While using osgconv (for example on a .dae to .osg) is it possible to restrain the type of the PrimitiveSet ? Thank you! Cheers, Maxime -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=13085#13085

Re: [osg-users] Attack the PrimitiveSet

2009-05-28 Thread Paul Melis
Hi, Maxime BOUCHER wrote: For anyone who would read this thread an d reproduce the same, don't. It seems the DrawArrayLengths contains a single number representing in a way I don't understand the primitives EVEN IF you can access the primitives the same way than for a DrawElementsUthing.

Re: [osg-users] Attack the PrimitiveSet

2009-05-28 Thread Maxime BOUCHER
You're right, it 's not that hard. Actually, indices are stored in a VertexIndices IntArray. Whereas they are directly stored in the PrimitiveSet for a DrawElement. If someone knows why there are these several types for PrimitiveSets, and especially this difference between DrawArrayLengths and

Re: [osg-users] Attack the PrimitiveSet

2009-05-28 Thread Jason Daly
Maxime BOUCHER wrote: You're right, it 's not that hard. Actually, indices are stored in a VertexIndices IntArray. Whereas they are directly stored in the PrimitiveSet for a DrawElement. If someone knows why there are these several types for PrimitiveSets, and especially this difference

Re: [osg-users] crash when closing an embeddedWindow viewer with a shader example

2009-05-28 Thread Robert Osfield
On Thu, May 28, 2009 at 4:00 PM, Jonas Walti wal...@bfh.ch wrote: First, thank you for your fast answer... @robert: This is what I also supposed. When I took once again a look at your osgviewerGLUT demo I figured out that this demo closes the viewer with Code: if (viewer.valid()) viewer=0;

[osg-users] osg::ref_ptr used anymore

2009-05-28 Thread Rabbi Robinson
Hi, I wonder osg::ref_ptr is used anymore for automatic memory management. I remember sometime ago I got an error from mishandling multiple inheritance, the error printed on the screen was that the reference count of a node is some non-sense number when the destructor of the node executes

Re: [osg-users] osg::ref_ptr used anymore

2009-05-28 Thread Jason Daly
Rabbi Robinson wrote: Since I did not use osg::ref_ptr in that code and it looks like reference count is kept somewhere in the node. My question is that if automatic memory management is used even without osg::ref_ptr. Short answer is yes. The longer explanation is that almost all OSG

Re: [osg-users] osg::ref_ptr used anymore

2009-05-28 Thread Rabbi Robinson
Hi, Thanks, that explains it. Correct me if I am wrong. So to use it, just create osg::ref_ptr and use it as regular pointer and the memory will be managed by osg::ref_ptr. In a simple case, I careate Node* node = osg::ref_ptrnew Node and, call void* ptr = node. I suppose the reference count

Re: [osg-users] osg::ref_ptr used anymore

2009-05-28 Thread Rabbi Robinson
Hi, Sorry, 404 Thank you! Cheers, Rabbi -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=13110#13110 ___ osg-users mailing list osg-users@lists.openscenegraph.org

Re: [osg-users] osg::ref_ptr used anymore

2009-05-28 Thread Jolley, Thomas P
Hi Rabbi, The URL wrapped around to the next line. Use the full URL. -Original Message- From: Rabbi Robinson [mailto:longa...@gmail.com] Sent: Thursday, May 28, 2009 11:20 AM To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] osg::ref_ptr used anymore Hi, Sorry,

Re: [osg-users] osg::ref_ptr used anymore

2009-05-28 Thread Paul Martz
I think you'd benefit from looking at some OSG examples (all of which use ref_ptr) and reading the memory management section in the OSG Quick Start Guide (http://stores.lulu.com/pmartz). Paul Martz Skew Matrix Software LLC http://www.skew-matrix.com +1 303 859 9466

[osg-users] Multiple animations

2009-05-28 Thread Christopher Back
Hi, I have put together a series of animations as separate activities for training purposes. I need to somehow combine then into one application, the load time is too long for me to be able to demonstrate them in a professional manner otherwise. I am using osg 2.2 and I have not been able to stop

[osg-users] MFC or Win32 based viewer

2009-05-28 Thread Clay, Bruce
I have tried all of the ones except for osgWin32Demo (the link is nonresponsive) in the windowing Toolkit section and can not get them to compile with the current version of OSG for various reasons. One uses a CameraManipulator which doe4s not seem to be in the current build. Another is looking

Re: [osg-users] Multiple animations

2009-05-28 Thread Paul Martz
If you've written your application correctly, your animations are controlled by the FrameStanp simulation time. You specify the current simulation time as a parameter to osgViewer::Viewer::frame(). So, if you want the animation to stop, you just pass in the same value for each frame. This works

Re: [osg-users] osg::ref_ptr used anymore

2009-05-28 Thread Jason Daly
Rabbi Robinson wrote: Hi, Thanks, that explains it. Correct me if I am wrong. So to use it, just create osg::ref_ptr and use it as regular pointer and the memory will be managed by osg::ref_ptr. In a simple case, I careate Node* node = osg::ref_ptrnew Node and, call void* ptr = node. I

[osg-users] osgGlut does not build

2009-05-28 Thread Clay, Bruce
I can not get the osgGlut viewer to build either. The error list is attached below. I am using Visual Studio 2005 and compiling against OSG 2.8.1, OpenThreads and Producer both pulled with svn today. Several of the errors in this list come from STL Any thoughts? Bruce

Re: [osg-users] Hope this is the right way to post this (osgEphemeris problem with simple example)

2009-05-28 Thread Don Dakin
Hi Richard, I have not yet come to compiling any example/sample code to check these features out. I stopped at trying with the simple example when it did not work. I could try it with codeing it up but that would require more time. If there is no quick answer to this working using osgviewer

[osg-users] Access vertices and faces after load the model

2009-05-28 Thread Xin Chen
Hi, I'm new to OSG. I use the following code to load my model, which is successful. How can I access the vertices and faces of the model? Thank you. nNode = osgDB::readNodeFile(D:/Livingroom.3DS); Thank you! Cheers, xinchen -- Read this topic online here:

Re: [osg-users] Drawing a line once( bullet physics integration )

2009-05-28 Thread Paul Martz
I've implemented an OSG-based subclass of btDebugDraw. This is part of a larger osgBullet library I'm developing that will aid in developing applications that use both Bullet and OSG. I know this doesn't help you now, but it will be open sourced in the future. When I get a drawLine call, I just

Re: [osg-users] osg::ref_ptr used anymore

2009-05-28 Thread Ismail Pazarbasi
2009/5/28 Jason Daly jd...@ist.ucf.edu: Rabbi Robinson wrote: [snip] If later I call, ptr = NULL, it doesn't seem that there is anyway to tell node to decrement the reference count in node. This will decrement the reference count in node.  If the reference count goes to zero, it will be

Re: [osg-users] osg::ref_ptr used anymore

2009-05-28 Thread Jason Daly
Ismail Pazarbasi wrote: small correction, if you don't misunderstand; that will not decrease reference count, since ptr is void* and has no connection whatsoever with pointee (osg::Referenced). In following case: osg::ref_ptrosg::Node pnode = new osg::Node; void* ptr = pnode; ptr = NULL; (this

[osg-users] Looking for GLSL Parallax Occlusion Mapping

2009-05-28 Thread Chris 'Xenon' Hanson
I've tried posting this a couple of times, and it disappears. It went through yesterday as a reply to a test post, so I'm going to try again with the proper subject. I'm looking to add extra visual realism to surfaces using shaders. Grass, gravel and dirt are some of the obvious candidates,

Re: [osg-users] Access vertices and faces after load the model

2009-05-28 Thread Jason Daly
Xin Chen wrote: Hi, I'm new to OSG. I use the following code to load my model, which is successful. How can I access the vertices and faces of the model? Thank you. nNode = osgDB::readNodeFile(D:/Livingroom.3DS); Access them for what purpose? When your model is loaded, a scene

Re: [osg-users] MFC or Win32 based viewer

2009-05-28 Thread Cory Riddell
The osgviewer app that comes with OSG works in Windows. Also, the bundled examples include an MFC based viewer called osgviewerMFC. Cory Clay, Bruce wrote: I have tried all of the ones except for osgWin32Demo (the link is nonresponsive) in the windowing Toolkit section and

[osg-users] Ground clamping to paging terrain

2009-05-28 Thread brettwiesner
Hi, I want to position something (let's say a building) to a terrain. Currently I'm getting the Z value for the building doing this with an osgUtil::IntersectVisitor and that works fine for static terrains. When I run on a paging terrain (like one from osgEarth) and I position the building,

Re: [osg-users] Looking for GLSL Parallax Occlusion Mapping

2009-05-28 Thread Jason Daly
Hi, Chris, I went to the Siggraph 2005 sketch, so I'm somewhat familiar with the technique (though I've never implemented it). I wouldn't think it would be terribly hard to translate the HLSL code to GLSL, would it? In any case there's a gamedev.net article on it (with HLSL .fx file

Re: [osg-users] Access vertices and faces after load the model

2009-05-28 Thread Ismail Pazarbasi
2009/5/28 Xin Chen chenxi...@hotmail.com: Hi,    I'm new to OSG. I use the following code to load my model, which is successful.  How can I access the vertices and faces of the model? Thank you. nNode = osgDB::readNodeFile(D:/Livingroom.3DS); Thank you! Cheers, xinchen

Re: [osg-users] MFC or Win32 based viewer

2009-05-28 Thread Ismail Pazarbasi
2009/5/28 Clay, Bruce bc...@ball.com: I have tried all of the ones except for osgWin32Demo (the link is nonresponsive) in the windowing Toolkit section and can not get them to compile with the current version of OSG for various reasons.  One uses a CameraManipulator which doe4s not seem to be

Re: [osg-users] Access vertices and faces after load the model

2009-05-28 Thread Xin Chen
Jason Daly wrote: Xin Chen wrote: Hi, I'm new to OSG. I use the following code to load my model, which is successful. How can I access the vertices and faces of the model? Thank you. nNode = osgDB::readNodeFile(D:/Livingroom.3DS); Access them for what purpose?

Re: [osg-users] Access vertices and faces after load the model

2009-05-28 Thread Xin Chen
ismailp wrote: 2009/5/28 Xin Chen : Hi,    I'm new to OSG. I use the following code to load my model, which is successful.  How can I access the vertices and faces of the model? Thank you. nNode = osgDB::readNodeFile(D:/Livingroom.3DS); Thank you!

Re: [osg-users] Access vertices and faces after load the model

2009-05-28 Thread Jason Daly
Xin Chen wrote: Thank you for the reply. I do need the vertices and faces. My application is to load CAD model and simulate the projection (X-ray image) of the model according to the materials. So the ability to access individual vertices are important for my application. Any easy

Re: [osg-users] Access vertices and faces after load the model

2009-05-28 Thread Ismail Pazarbasi
2009/5/28 Xin Chen osgfo...@tevs.eu: Hello Ismail,       Thanks for your reply. I did look at the source code to load .stl models. I found that there are _vertices and _normal variables in the source code. That's why I'm asking if there is a way to access those parameters. Any idea or

Re: [osg-users] Access vertices and faces after load the model

2009-05-28 Thread Jason Daly
Jason Daly wrote: If you really do need to get at the low-level data, you can use the NodeVisitor method I described previously. You'll need to create a class that inherits from osg::NodeVisitor and overrides the apply(Geometry *) method to perform whatever operations you need on each

Re: [osg-users] Ground clamping to paging terrain

2009-05-28 Thread Chris 'Xenon' Hanson
brettwiesner wrote: I want to position something (let's say a building) to a terrain. Currently I'm getting the Z value for the building doing this with an osgUtil::IntersectVisitor and that works fine for static terrains. When I run on a paging terrain (like one from osgEarth) and I position

Re: [osg-users] Access vertices and faces after load the model

2009-05-28 Thread Chris 'Xenon' Hanson
Xin Chen wrote: Thanks for your reply. I did look at the source code to load .stl models. I found that there are _vertices and _normal variables in the source code. That's why I'm asking if there is a way to access those parameters. Any idea or sample code? Thank you. I think

Re: [osg-users] Looking for GLSL Parallax Occlusion Mapping

2009-05-28 Thread Chris 'Xenon' Hanson
Jason Daly wrote: I went to the Siggraph 2005 sketch, so I'm somewhat familiar with the technique (though I've never implemented it). I wouldn't think it would be terribly hard to translate the HLSL code to GLSL, would it? In any case there's a gamedev.net article on it (with HLSL .fx file

Re: [osg-users] Access vertices and faces after load the model

2009-05-28 Thread Paul Martz
Just to kind of sum up what has been said here... To get the vertices and other vertex attributes, you use get* methods in the Geometry class. See the Geometry header file. There could be dozens, possibly thousands of Geometry objects in your scene graph. You use a NodeVisitor to walk your scene

Re: [osg-users] Ground clamping to paging terrain

2009-05-28 Thread Paul Martz
There is an osgSim::ElevationSlice that might be useful here, because it is smart about paged databases and will go to the highest LOD to get the elevation values. Paul Martz Skew Matrix Software LLC http://www.skew-matrix.com +1 303 859 9466 ___

Re: [osg-users] Ground clamping to paging terrain

2009-05-28 Thread Glenn Waldron
Brett, Installing a ReadCallback on your IntersectionVisitor will allow it to traverse PagedLODs so you can intersect with the highest LOD. Look at osgSim::HeightAboveTerrain for a demonstration of the technique. If you don't like that approach, you could install an

[osg-users] Drawing a point

2009-05-28 Thread Mojtaba Fathi
Hi all Accept my apology for such a simple question. I want to display two coincident points at (0,0,0). I use code like this: int main() {     osgViewer::Viewer viewer;     osg::ref_ptrosg::Group root (new osg::Group);     osg::ref_ptrosg::Geode geode (new osg::Geode());    

Re: [osg-users] Drawing a point

2009-05-28 Thread Paul Martz
You are correct that it has something to do with BoundingBox. The BoundingBox around a single point (or two coincident points, in this case) has zero volume, so either the CullVisitor is discarding it, or the auto compute of near far is computing two coincident planes and everything is clipped.

[osg-users] Can I change the plugin directory structure?

2009-05-28 Thread rpingry
Hello All, I have noticed that for the past little while the plugins are compiled to their own directory with the version number. I am not quite sure why this is beneficial, it seems like you would always want the plugins compiled with the version of OSG you have compiled, and it seems that

Re: [osg-users] Can I change the plugin directory structure?

2009-05-28 Thread Paul Martz
Incidentally, this has been discussed a lot in the past, so searching the archives would have turned up all this info You don't have to be on this list very long to see the same question pop up multiple times. I'm guilty of it myself. :-) -Paul

Re: [osg-users] Can I change the plugin directory structure?

2009-05-28 Thread Jean-Sébastien Guay
Hi Paul, You don't have to be on this list very long to see the same question pop up multiple times. I'm guilty of it myself. :-) Sure, but I prefer to remind people that the archives exist, while at the same time giving answers to their questions, rather than let it slide. I figure it's

Re: [osg-users] Can I change the plugin directory structure?

2009-05-28 Thread James Killian
Then just copy the right version of the OSG DLLs into your app's bin directory (with its executable) and the osgPlugins-VERSION directory there too (with the plugins inside the directory). ..somepath/bin/myapp.exe ..somepath/bin/osg.dll ..somepath/bin/all other dlls you need

Re: [osg-users] Can I change the plugin directory structure?

2009-05-28 Thread Jean-Sébastien Guay
Hi James, Again with the black background and black text in your message... very hard to read. I thought you'd fixed this? :-) J-S -- __ Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com