[osg-users] Parameter ratio in osgUtil::LineSegmentIntersector::Intersection

2008-09-30 Thread Andreas Goebel
Hello, I need to sort out intersections that are very close to each other. So I took a look at the LineSegmentIntersector::Intersection definition: bool operator (const Intersection rhs) const { return ratio rhs.ratio; } typedef std::vectorunsigned int IndexList;

Re: [osg-users] Parameter ratio in osgUtil::LineSegmentIntersector::Intersection

2008-09-30 Thread Paul Melis
Andreas Goebel wrote: Hello, I need to sort out intersections that are very close to each other. So I took a look at the LineSegmentIntersector::Intersection definition: bool operator (const Intersection rhs) const { return ratio rhs.ratio; } typedef

Re: [osg-users] Parameter ratio in osgUtil::LineSegmentIntersector::Intersection

2008-09-30 Thread Andreas Goebel
Paul Melis schrieb: Andreas Goebel wrote: What is that ratio-parameter expressing? May I assume that points which are very close to each other do have a ratio that is very close? I guess that the other direction is not true: Points with a close ratio might be apart. My impression so far has

Re: [osg-users] [osg-submissions] View Dependent Shadow maps(LispSM)

2008-09-30 Thread Wojciech Lewandowski
Adrian, Does osgShadow::ShadowMap works in the same case ? I tried to mimic osgShadow::ShadowMap functionality. Both osgShadow::StandardShadowMap osgShadow::ShadowMap try to lcate the light and compute its proper modelview matrix by scanning render stage state attributes. If the light was

Re: [osg-users] frame control and callback

2008-09-30 Thread Wojciech Lewandowski
Hi Matthieu, Try using --SingleThreded mode with your viewer. I once tried to do similar thing. Although in my case I was dumping color buffer.But very often I was reading wrong portion of the whole range. It turned out that default multithreading of OSG was runnig two frames concurently and

[osg-users] Problems integrating MFC example with existing application

2008-09-30 Thread Jesper D. Thomsen
Hi again all, I have an existing MFC application with a window based on Cview, which have been used as an OpenGL rendering canvas. I have now disabled the OpenGL rendering of the window and instead replicated the osgviewermfc example in my application in exactly the same way as in the example.

[osg-users] frame control and callback

2008-09-30 Thread Matthieu DIRRENBERGER
Hello OSG users, I am a new on OSG and I have some difficulties to finish an application. I am trying to do an application which computes pre-calculated height-maps from a scene. Simply, I make a draughtboard from the scene; and a camera takes shots from Z-buffer for each square looking

Re: [osg-users] [resolved] frame control and callback

2008-09-30 Thread Matthieu DIRRENBERGER
Hi Wojtek, Thanks a lot, it's work ;-) It was that, one thread more safe, than multi-thread to takes shots frame per frame... That little point should be explain in the user documentation, but it is a known problem in graphic programming. I just forgot that... Cheers, Matthieu

Re: [osg-users] [resolved] frame control and callback

2008-09-30 Thread Wojciech Lewandowski
Cool, I am glad it was so simple ;-) - Original Message - From: Matthieu DIRRENBERGER To: OpenSceneGraph Users Sent: Tuesday, September 30, 2008 5:17 PM Subject: Re: [osg-users] [resolved] frame control and callback Hi Wojtek, Thanks a lot, it's work ;-) It was

[osg-users] Smoothing camera movements from HMD's input.

2008-09-30 Thread alessandro terenzi
I'm integrating a head mounted display (HMD) in my OSG application, the HMD's APIs give me Euler's angles (yaw, pitch and roll) and I use them to adjust my scene's camera view using an update callback. But I noticed that, changing camera view from frame to frame, results in jerky movements, even

Re: [osg-users] vpb: Spherical terrains?

2008-09-30 Thread Glenn Waldron
Alejandro, Try adding --radius-polar in addition to --radius-equator. Glenn On Tue, Sep 30, 2008 at 12:13 PM, Alejandro Aguilar Sierra [EMAIL PROTECTED] wrote: Hi Robert, Actually the original data has all the information needed, I gess. It's the height map of Earth's Moon, taken from

Re: [osg-users] Smoothing camera movements from HMD's input.

2008-09-30 Thread Stephan Maximilian Huber
Hi Alessandro, alessandro terenzi schrieb: I'm integrating a head mounted display (HMD) in my OSG application, the HMD's APIs give me Euler's angles (yaw, pitch and roll) and I use them to adjust my scene's camera view using an update callback. But I noticed that, changing camera view from

Re: [osg-users] Smoothing camera movements from HMD's input.

2008-09-30 Thread Brian R Hill
You don't want to interpolate euler angles. You'll have issues with zero crossings and gimbal lock, unless you add a bunch of checks and conditionals. Brian [EMAIL PROTECTED] wrote: - To: OpenSceneGraph Users osg-users@lists.openscenegraph.org From: Stephan Maximilian Huber [EMAIL

Re: [osg-users] LiSPSM and main camera nearFarRatio?

2008-09-30 Thread Jean-Sébastien Guay
Hi Wojtek, I guess that for this computation I may somehow use default clamp callback nearFarRatio. Put a breakpoint in line 255 in MinimalShadowMap.cpp. This is the line where clampProjectionMatrix is called and check what is the nearFarRation inside this call. Let me know what you find. I

Re: [osg-users] Smoothing camera movements from HMD's input

2008-09-30 Thread Jim Brooks
In order to solve this problem, I was thinking about creating an animation path (on the fly) from a previously stored orientation to current head orientation. Is this the correct way to proceed? Or there is some other technique to smooth the resulting camera movements? osg::AnimationPath

Re: [osg-users] Problems integrating MFC example with existing application

2008-09-30 Thread Simon
Yup, the mfc example is broken. If you don't mind it being single threaded, have a look at the osgViewerGtk one. I adapted that to work with OwlNext2 in about half an hour. you want something like this: osgViewer::GraphicsWindow*m_pWindow = m_pViewer-setUpViewerAsEmbeddedInWindow(0, 0,

Re: [osg-users] Smoothing camera movements from HMD's input

2008-09-30 Thread alessandro terenzi
Yes, indeed I have a PositionAttitudeTransform node that represent my virtual camera, and whose attitude is set by HMD's data and later used to set the camera's view matrix just before calling viewer.frame(). So I thuoght to 'animate' the attitude instead of just setting values from HMD' tracker.

Re: [osg-users] useCursor

2008-09-30 Thread paul1492
Is this a race condition??? Sometimes I get this X11ErrorHandling problem and other times I don't.  Just before turning off the cursor, I have a _viewer-realize(); I assume this is where the graphics context is created.  If I put a sleep between the realize and the useCursor loop, it seems to

[osg-users] NodeVisitors and Synchronization

2008-09-30 Thread Argentieri, John-P63223
Folks, Once I've called Node::accept(NodeVisitor), does osgViewer::Viewer wait until the update traversal to let the NodeVisitor perform it's traversal? If I am in the GUI thread when I call accept(), does NodeVisitor::apply happen in the GUI thread? Or does it happen in an osgViewer thread based

Re: [osg-users] NodeVisitors and Synchronization

2008-09-30 Thread Tomlinson, Gordon
Hi You should not be doing this from the GUI thread, you should be doing this typically in the OSG app thread, so you need to have some form of messaging between the GUI and APP threads, such that you can kick off your traversals at the appropriate time Gordon

Re: [osg-users] Smoothing camera movements from HMD's input

2008-09-30 Thread Fuesz, Matthew
How fast does your HMD tracker update its orientation, and how are you retrieving these values? If you're not getting the values in realtime at least as fast as OSG is refreshing, then you would definitely have some jerky movements. And if you're not getting them this fast, then what are you

Re: [osg-users] [osg-submissions] View Dependent Shadow maps(LispSM)

2008-09-30 Thread Adrian Egli OpenSceneGraph (3D)
Hi Wojtek, i didn't get the time slot to test the lighting and the other maps again. but if we assume, that we will have a sun light, for what pssm is good (or other shadow tech.), we can easy assume that the light doesn't move with a matrix transformation, so we set the sun light at a position

Re: [osg-users] NodeVisitors and Synchronization

2008-09-30 Thread Argentieri, John-P63223
Let's forget semantics then. If I run the following code: Node.accept( NodeVisitor ); Viewer.frame(); What thread calls the NodeVisitor's various accept() methods? Or at least what stage of execution? Does the accept() call block until the NodeVisitor traverses the scene graph, or does it

Re: [osg-users] NodeVisitors and Synchronization

2008-09-30 Thread Glenn Waldron
John, Node::accept is completely synchronous. When you call accept() it will traverse immediately and return. Glenn On Tue, Sep 30, 2008 at 4:26 PM, Argentieri, John-P63223 [EMAIL PROTECTED] wrote: Let's forget semantics then. If I run the following code: Node.accept( NodeVisitor );

Re: [osg-users] NodeVisitors and Synchronization

2008-09-30 Thread Argentieri, John-P63223
Thanks, Glenn. I must have made some other kind of mistake then :( From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Glenn Waldron Sent: Tuesday, September 30, 2008 4:44 PM To: OpenSceneGraph Users Subject: Re: [osg-users] NodeVisitors and

Re: [osg-users] Smoothing camera movements from HMD's input

2008-09-30 Thread alessandro terenzi
I understand what you said. I'm experiencing with HMDs and trackers just from few days and, as far as I understood from my HMD's API, I can adjust the tracking rate and, in my example, the polling period was set to 30 msec. I didn't do anything to synch with actual rendering framerate because the

[osg-users] DatabasePager - A little confused

2008-09-30 Thread Alan Ott
Hello, After much trying and failing, I think I have a fundamental misunderstanding reagarding the DatabasePager. I have looked for examples or code snippets and it seems that there are none. So here's what I have. I have a DatabasePager object that I use for terrain. When I need a new

[osg-users] Reminder: OSG training in Austin, TX

2008-09-30 Thread Paul Martz
Hi everyone -- This is just a reminder that Bob Kuehne and I will be leading four days of OSG training in Austin, Texas, at the end of October. Please register soon if you plan to attend. For details on the courses, and to register online: http://www.skew-matrix.com/training.asp Thanks, Paul

[osg-users] connected shapes demo...

2008-09-30 Thread James Moliere
Hello, Is there a connect shapes example? For instance, I'd like to have 3 cylinders where 2 of the cylinders connected sequentially at the end of the previous cylinder. When I rotate cylinder 1, I'd like the others to rotate about cylinder 1 as though they are connected without doing any

Re: [osg-users] connected shapes demo...

2008-09-30 Thread Gordon Tomlinson
Nope there's no example that shows this, but many things are possible with by writing code __ Gordon Tomlinson [EMAIL PROTECTED] IM: [EMAIL PROTECTED] www.vis-sim.com www.gordontomlinson.com

Re: [osg-users] connected shapes demo...

2008-09-30 Thread James Moliere
Gordon, Thanks for letting me know this. Is there a concept of parent/child relationships in OSG with respect to primitive objects? ...To make the cylinder example work? Are all objects that are placed into the scene work off of global coordinates? James Gordon Tomlinson wrote: Nope

Re: [osg-users] DatabasePager - A little confused

2008-09-30 Thread Simba
Hi, I'm not sure whether I have understood your problem. But I think that if you want to use databasepager, you just have to make sure you have pagedLOD node in your models. If you do, then just use viewer.setScenedata(model.get()), so the osgViewer::Viewer will automatically do the rest.