Gazi Alankus | 1 May 2006 14:25
Picon

Re: Re: Transparent subtrees

I'm glad I didn't start coding what I said.
Thank you SO much! It works:)

-Gazi

On 01/05/06, Paul Melis <p.e.c.melis@...> wrote:
> You don't have to change every stateset in the subtree. You can have a
> stateset that only contains the attribute you want to override that is
> set on a parent of your subtree.
>
> E.g. (c++ peusdo-code)
>
> m = osg.Material();
> m.setAlpha(osg::Material::FRONT_AND_BACK, /*desired alpha*/ 0.5);
>
> ss = osg.StateSet();
> // override alpha setting of downstream nodes (statesets)
> ss.setAttribute(m, osg::StateSet::OVERRIDE);
>
> g = osg.Group()
> g.setStateSet(ss)
> g.addChild(<subtree>)
>
> Paul
>
>
> Gazi Alankus wrote:
>
> > Let me answer my own question for future reference,
> >
(Continue reading)

Robert Osfield | 1 May 2006 14:51
Picon

Re: A pointer problem

Hi,

I'm afriad you haven't provided enough info to gleen what might be
wrong.  I suggest you add extra debug information into your code to
track which objects are being created and assigned, this might help
point to what you've done wrong.

Robert.

On 5/1/06, X.Shang@...
<X.Shang@...> wrote:
> Hi guys:
>
> I loaded many models created in 3D studio Max at one time. When I pick up
> one of the models, I add a pointer of new class on the selected model. The
> following is the code:
>
> for(osg::Node::ParentList::iterator itr=parentList.begin();
>                             itr!=parentList.end();
>                             ++itr)
> {
> CMixer* pMixer = dynamic_cast <CMixer*> ((*itr)->getUserData());
> if(!pMixer)
> {
>    pMixer = new CMixer;
>    pMixer->setUserData(new CMixer);
> }
> (*itr)->addChild(pMixer);
> }
>
(Continue reading)

Roderick Kennedy | 1 May 2006 15:54

RE: vehicle dynamics

Hello Toygar,

Are you looking for a vehicle dynamics framework for your steering,
gear, etc., or is it a rigid body motion system you need? ODE will work
for rigid bodies, it has the advantage of being free.

Regards,
Roderick

-----Original Message-----
From: osg-users-bounces@...
[mailto:osg-users-bounces@...] On Behalf Of
Toygar Abak
Sent: 01 May 2006 10:09
To: osg users
Subject: [osg-users] vehicle dynamics

Hi,
Which engines do you suggest for vehicle dynamics to use with OSG for a
driving simulation of a family car in a city environment?
We'll use our own steering, gear, brake, and other controls to drive
car.

regards,
toygar

--

-- 

A. Toygar Abak
Simulation Engineer
(Continue reading)

Patrik Stellmann | 1 May 2006 15:56
Picon

Re: scene graph behaves chaotic/non-deterministic (missing synchronization?)

Hi Robert,

Thanx for your help again. I'm really sorry - I hate questions that can 
be answered with a "look in the FAQ" but this problem was so weired that 
I didn't expect to find something.

However, I missed to set a ContextID resulting in nodes and states 
beeing used at the wrong place (e.g. a wheel-model beeing used as the 
chassis...). Now everything (regarding this problem) works fine! :-)

Patrik

_______________________________________________
osg-users mailing list
osg-users@...
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Patrik Stellmann | 1 May 2006 16:10
Picon

realize shadow by projecting scene graph on the ground plane

Hi again,

I want to realize a shadow by projecting all nodes on the ground plane 
using a dark transparent "material". I already managed this in an older 
version of my application without OpenSceneGraph using OpenGL directly.
My question now is, how do I manage to let my "shadow-node" (a 
MatrixTransform with the complete scene as child and a StateSet with 
overiding attributes) beeing rendered after the opaque and before the 
transparent list?
Another question regarding this matter: some nodes should not have a 
shadow. I'd guess that the NodeMask would do a nice job to keep some 
objects from beeing rendered in the shadow-sub-graph but I have only a 
single CullVisitor for the complete SceneView(?), so how can I set two 
different NodeMasks for the CullVisitor - one for the shadow-Sub-grpah 
and one for the actual scene?

Thanx in advance!

Patrik
_______________________________________________
osg-users mailing list
osg-users@...
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Robert Osfield | 1 May 2006 16:21
Picon

Re: realize shadow by projecting scene graph on the ground plane

Hi Patick,

With stencil buffer shadow effects like you are talking are probably
best realised with something like the same scheme of render bin as
used in the osgreflect example - this also use stencil buffer.

Robert.

On 5/1/06, Patrik Stellmann <stellmann@...> wrote:
> Hi again,
>
> I want to realize a shadow by projecting all nodes on the ground plane
> using a dark transparent "material". I already managed this in an older
> version of my application without OpenSceneGraph using OpenGL directly.
> My question now is, how do I manage to let my "shadow-node" (a
> MatrixTransform with the complete scene as child and a StateSet with
> overiding attributes) beeing rendered after the opaque and before the
> transparent list?
> Another question regarding this matter: some nodes should not have a
> shadow. I'd guess that the NodeMask would do a nice job to keep some
> objects from beeing rendered in the shadow-sub-graph but I have only a
> single CullVisitor for the complete SceneView(?), so how can I set two
> different NodeMasks for the CullVisitor - one for the shadow-Sub-grpah
> and one for the actual scene?
>
> Thanx in advance!
>
> Patrik
> _______________________________________________
> osg-users mailing list
(Continue reading)

Toygar Abak | 1 May 2006 16:24

Re: vehicle dynamics

I need a good API or SDK to use in a driving simulator. The input 
controls will be done by our own designed car controls. I'm also looking 
for a simple traffic simulator to add cars into environment.

So I've 3D road/city database (openflight) and hardware and I'm looking 
for car dynamics and traffic simulator.

regards,
toygar

Roderick Kennedy wrote:
> Hello Toygar,
>
> Are you looking for a vehicle dynamics framework for your steering,
> gear, etc., or is it a rigid body motion system you need? ODE will work
> for rigid bodies, it has the advantage of being free.
>
> Regards,
> Roderick
>
> -----Original Message-----
> From: osg-users-bounces@...
> [mailto:osg-users-bounces@...] On Behalf Of
Toygar Abak
> Sent: 01 May 2006 10:09
> To: osg users
> Subject: [osg-users] vehicle dynamics
>
> Hi,
> Which engines do you suggest for vehicle dynamics to use with OSG for a
(Continue reading)

Mike Seltzer | 1 May 2006 18:03
Picon
Favicon

Referencing within Paged LODs

Hey there.  I'm attempting to use PagedLODs to improve
performance on visualizing a large forested terrain. 
My problem is twofold:

1) I would like the databasePager to use absolute file
references, rather than relative.  Right now, I'm
ending up with errors of "can't find
C:\Documents...\debug\C:\Documents..."

2) When I generate cells of trees, I reference a
singular tree geometry that is instanced multiple
(hundreds of) times.  When I peeked in the .osg files
that were generated, however, I realized that the tree
node was generated once for every page.  Is there a
way I can reference geometries within a page?

--M.

"I have made about 23 films, 24 films, and this is, I think, without a doubt, the most... recent..."
--Arnold Schwarzenegger, while filming Collateral Damage

"Someone once told me that time was a predator that stalked us all our lives. I rather believe that time is a
companion who goes with us on the journey and reminds us to cherish every moment, because it will never come
again. What we leave behind is not as important as how we've lived."
--Patrick Stewart in Star Trek, Generations
_______________________________________________
osg-users mailing list
osg-users@...
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/
(Continue reading)

Robert Osfield | 1 May 2006 18:25
Picon

Re: Referencing within Paged LODs

On 5/1/06, Mike Seltzer <skull256@...> wrote:
> Hey there.  I'm attempting to use PagedLODs to improve
> performance on visualizing a large forested terrain.
> My problem is twofold:
>
> 1) I would like the databasePager to use absolute file
> references, rather than relative.  Right now, I'm
> ending up with errors of "can't find
> C:\Documents...\debug\C:\Documents..."

Personally I find the forcing absolute paths a real maintance and
portability problem.  Bare in mind the OSG just attempts to read a
filename as is, then goes a looks a the filepaths set up in
osgDB::setDataFilePaths.  Perhaps just setting the later will get you
the ordering of search paths which are appropriate for your project.

> 2) When I generate cells of trees, I reference a
> singular tree geometry that is instanced multiple
> (hundreds of) times.  When I peeked in the .osg files
> that were generated, however, I realized that the tree
> node was generated once for every page.  Is there a
> way I can reference geometries within a page?

The .ive and .osg file formats are not designed around sharing
external objects, they only can share withing a single .osg or .ive. 
Using an external file reference within these is one way around this -
if you set up the cache in osgDB::Registry.

The other route would be to use a custom loader that shader and built
the forest on demand - this is how I'd tackle it.
(Continue reading)

Edgar Ellis | 1 May 2006 20:13
Favicon

Re: osgTerrain elevation accuracy

I have run into a similar problem recently.

When generating a paged database using using georeferenced data, the 
results were slightly off and in some cases with visible "lines" across 
tiles at the same level.

Looking at the output from DataSet::SourceData::readHeightField I found 
something similar to:
copying from 0 0 63 63
             to     0 0 64 64
Causing gdal to scale the heightfield, resulting in a row and column of 
duplicate values and the "lines".

I have traced (at least part) of my problem to rounding in the extents 
(a BoundingBox with single precision float values), since my 
georeferenced data had a large offset and a fine resolution.

Also a question about osgDem, is it meant to reproduce the original 
heightfield exactly at the finest resolution? (eg without simplification 
and ignoring duplicate values at tile edges, is there a 1-to-1 mapping 
from the heightfield 'pixels' to the vertices from the finest resolution 
tiles in the paged database)

- Edgar

Jason Beverage wrote:
> Hi OSG'ers,
>
> I've recently moved our application over from using a very basic, custom terrain rendering method to
using paged databases generated from osgTerrain and it has allowed us to get much larger and more detailed
(Continue reading)


Gmane