[osg-users] Using osgDB to load text files or other non-OSG files?

2012-12-06 Thread Martin Scheffler
Hi,

I would like to use the osgDB architecture to load script and xml files, 
possibly other stuff. I would like to be able to use the CURL plugin to load 
these files from the net, which means I can't simply get a path with 
osgDB::findFile and fopen that. Ideally I would like to enter a path or URL and 
somehow get a std::istream in return. 

Is reading arbitrary files through the plugin structure possible without 
writing a ReaderWriter plugin for each format and wrapping the return in an 
osg::Object? I only see very concrete methods like osgDB::Registry::readImage() 
or readNode(), not readFile() or something similar.

Thank you!

Cheers,
Martin

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





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Inherit depth buffer attachment for a child camera ?

2012-12-06 Thread Aurelien Albert
Hi,

In my scene graph, I use a main camera with FBO severals attached :

- a FBO for COLOR0
- a FBO for COLOR1
- a FBO for DEPTH

I would like to use a child camera (not slave) with :

- another FBO attached to COLOR0
- the same FBO a main camera for DEPTH buffer

Is there anyway to inherit the DEPTH buffer attachment from main camera ?


Thank you!

Cheers,
Aurelien

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





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OSG + Mesa3D

2012-12-06 Thread Mike Krus
Hi

got that, seems to work. Many thanks once again!


Mike

On 6 Dec 2012, at 03:35, Andrew Cunningham wrote:

Hi Mike,
I have put a zip of the complete build directory on DropBox.

https://dl.dropbox.com/u/82874382/Mesa-7.8.2.zip

Let me know when you get it.

Andrew

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





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Mike Krus (PhD) - Principal Software Engineer

Midland Valley Exploration
144 West George Street
Glasgow G2 2HG, UK
Tel: +44 141 332 2681
Fax: +44 141 332 6792

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Scaling while retaining the center position of the object

2012-12-06 Thread Riccardo Corsi
Hi Jonathan,

I have done something similar to what you need by writing a custom dragger
callback instead of the standard one assigned to the manipulated objects.
In my case I manually rebuild the the motion matrix to apply to the target
matrix transform, instead of getting the one that the MotionCommand
provides.

An alternative might be writing a custom dragger to dispatch a
UniformScaleCommand, which is the motion type you want, and none of the
provided manipulators sends them.
In that case you can keep using the standard callback, as the command will
provide the correct motion matrix.

Hope this helps,
Ricky


On Tue, Dec 4, 2012 at 3:15 PM, Jonathan McLaughlin jonat...@mve.comwrote:

 Hi,

 I am using a osgManipulator::TabBoxDragger with
 osgManipulator::Scale2DDraggers to scale objects within my scene.

 Currently when dragging one of the 2D Draggers the object will scale
 accordingly but the centre of the object will not stay in the same
 position. For example, if I grab the top left corner of a square and drag
 to the left, the bottom right corner will stay where it is and the rest of
 the object will move left while being rescaled.

 What I would like to happen is for the bottom right corner to move right
 at the same rate as the top left corner moves left, all the while
 maintaining the centre position of the object being scaled

 Effectively, what I want to do is scale while maintaining the proportions
 on the plane I am scaling, however cant find a way to do this.

 Hopefully my explanation is comprehensible and not too long winded. Any
 help on this would be appreciated.

 Thanks

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





 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Scaling while retaining the center position of the object

2012-12-06 Thread Jonathan McLaughlin
Hi Ricky,

Thanks for the reply. I had noticed the ScaleUniform Command and couldn't see 
any way to send it. I'll maybe give that a try.

Cheers,
Jonathan

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





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [forum] Throttling OSG

2012-12-06 Thread Torben Dannhauer
Hi,

you could change the frame scheme from CONTINUOUS to ON_DEMAND.
Or look into viewers run() function and perform the different traversal calls 
per frame manually.

Cheers,
Torben

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





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OSG Wiki - what's going on?

2012-12-06 Thread Robert Osfield
Hi All,

I haven't been able to access wiki.openscenegraph.com successfully to check
out the problems, instead just getting an internal error.  Rather than
chase these errors and clean up the wiki I've simply removed the
wiki.openscenegraph.com as Joomla can work in a similar role.  The
wiki.openscengraph.com was an experiment with MediaWiki and for it to get
polluted and produces errors suggest that it'll need more active
maintenance.  If required in the future we can come back a look at
MediaWiki as an option, for now consider the experiment terminated :-)

Robert.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] From Maya to OSH

2012-12-06 Thread Cary, Karl A.
You can look at the maya2osg project at
http://sourceforge.net/projects/maya2osg/. The problem is that it hasn't
been maintained recently. We are having the same issue and in the past
we exported or models to obj format, then converted to pfb with a custom
performer library to handle some special cases (used to use Performer
before OSG), then osgconv the pfb to an ive. I am currently taking the
code from maya2osg to hopefully go straight. I have to add in our custom
changes first though. With Maya 2011, I was able to successfully convert
some of our basic models over to ive directly as an export from Maya.
Haven't tried other versions or more complicated models yet.

-Original Message-
From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Ferran
Altarriba Bertran
Sent: Friday, November 30, 2012 12:33 PM
To: osg-users@lists.openscenegraph.org
Subject: [osg-users] From Maya to OSH

Hi,

I'm very very new to OSG, so maybe my doubts will seem quite easy to
solve for you...

the point is that I have a 3D model done in Autodesk Maya (including
materials, image textures, videotextures and animation) and I need to
export it to OSG.

I haven't found the way to do it directly from Maya (does this way
exist?), so I tried to export from Maya to OBJ+MTL and then from this to
OSG. The problem is that I can only convert the OBJ file to OSG, I don't
know how to add the MTL too.

Have u know how can I solve this? 

Thanks a million! :)

Cheers,
Ferran

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





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or
g
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Sharing culling results among multiple cameras

2012-12-06 Thread Frank Kane
Let's say I have two cameras with identical view frusta, say a main camera
and a camera for reflections that contain the same objects, only flipped.

Is there any way I can avoid incurring the overhead of culling once for
each camera, when the results will be the same for both? Basically I'd like
to have two cameras share the results from one culling pass if possible.

Thank you,

Frank Kane
Founder
Sundog Software, LLC

http://www.sundog-soft.com/

http://www.linkedin.com/pub/frank-kane/17/434/764
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Sharing culling results among multiple cameras

2012-12-06 Thread Thrall, Bryan
Frank Kane wrote on 2012-12-06: 
 Let's say I have two cameras with identical view frusta, say a main
camera
 and a camera for reflections that contain the same objects, only
flipped.

Except for in very specific situations, the objects in the reflection
camera's frustum aren't going to be the same as the main camera's. Are
you sure that this statement is true for your case?

--
Bryan Thrall
Principal Software Engineer
FlightSafety International
bryan.thr...@flightsafety.com


___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] test

2012-12-06 Thread Paul Martz

Sorry, please ignore.

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Sharing culling results among multiple cameras

2012-12-06 Thread Robert Osfield
Hi Frank,

On 6 December 2012 13:50, Frank Kane fk...@sundog-soft.com wrote:

 Let's say I have two cameras with identical view frusta, say a main camera
 and a camera for reflections that contain the same objects, only flipped.

 Is there any way I can avoid incurring the overhead of culling once for
 each camera, when the results will be the same for both? Basically I'd like
 to have two cameras share the results from one culling pass if possible.


I wouldn't recommend trying to be clever by reusing culling results as
the rendering backend is rather more sophisticated than just a list of
results - the OSG's culling traversal creates a rendering graph that stores
the projection and modelview matrices for each rendered Drawable along with
the complete state graph required to make sure the Drawable is rendered
with the correct OpenGL state.

In your case the reflection will mean that the modelview matrix will be
different for each rendered Drawable so will require a separate RenderLeaf
that binds the projection and modelview matrices to the Drawable.  This
means even though the leaves and the bulk of OpenGL state is same the
rendering graph will have to be different.  In theory you could clone the
rendering graphs and modify the duplicate and modify the modelview matrices
to achieve the required result, but this requires a pretty deep
understanding of the internals of the OSG's rendering back end is rather
more complex than one might - the complexity comes from the flexibility of
the OSG to manage dynamically multiple rendering stages and passes.  This
complexity is hidden from most users thanks to the scene graphs front end -
users just worry about RenderBin's and in scene graph osg::Camera for
render to texture effects.

Robert.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Hatch patterns

2012-12-06 Thread Glenn Waldron
osg::PolygonStipple.

Glenn Waldron / @glennwaldron



On Wed, Nov 7, 2012 at 12:49 PM, Nikos Babasakalis
nbabasaka...@gmail.comwrote:

 Hi,

 I would like to ask if there is a way for applying hatch patterns in
 closed areas e.g polygons, triangles, quads

 Thank you!

 Cheers,
 Nikos

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





 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Sharing culling results among multiple cameras

2012-12-06 Thread Frank Kane

robertosfield wrote:
 I wouldn't recommend trying to be clever by reusing culling results as the 
 rendering backend is rather more sophisticated than just a list of results 


Thanks Robert. I thought it might be more trouble than it would be worth. In a 
release build, the culling isn't too much of a hit really - there are better 
ways to speed up the reflection pass.

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





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Sharing culling results among multiple cameras

2012-12-06 Thread Aurelien Albert
Hi,

I'm intersted by this topic, because in my application, sometimes I need to 
render the same scene multiple times.

For example, I render the scene a first time to generate a regular OpenGL image.

Then I render with different shaders/textures to generate an image with 
computation results (often using a FBO and RGBA32F render target)

So, between these different image, the only modified data are the 
StateAttribute : shaders, uniforms and textures.

In this situation, is there anyway to share the culling results ? Maybe 
anyway to retrieve the RenderGraph and re-excute it ?

Thank you!

Cheers,
Aurelien

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





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Sharing culling results among multiple cameras

2012-12-06 Thread Glenn Waldron
One approach is to create a custom RenderBin. The cull pass collects
RenderLeaf objects and puts them into the bin. Each RenderLeaf contains a
single Drawable along with its modelview matrix, projection martix, and
state graph. You can tweak these properties at draw time, or even draw a
leaf multiple times (if you override the right functions in RenderBin).

I use custom RenderBins in a couple places in osgEarth - it's powerful once
you get the hang of it :)

Glenn Waldron / osgEarth.org / @glennwaldron



On Thu, Dec 6, 2012 at 5:31 PM, Aurelien Albert aurelien.alb...@alyotech.fr
 wrote:

 Hi,

 I'm intersted by this topic, because in my application, sometimes I need
 to render the same scene multiple times.

 For example, I render the scene a first time to generate a regular OpenGL
 image.

 Then I render with different shaders/textures to generate an image with
 computation results (often using a FBO and RGBA32F render target)

 So, between these different image, the only modified data are the
 StateAttribute : shaders, uniforms and textures.

 In this situation, is there anyway to share the culling results ? Maybe
 anyway to retrieve the RenderGraph and re-excute it ?

 Thank you!

 Cheers,
 Aurelien

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





 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] VirtualPlanetBuilder and the Cookbook

2012-12-06 Thread Tony Vasile
Hi,

Haven't heard anything from this post for a couple of weeks does anyone have an 
idea of what I have to do?

Thank you!

Cheers,
Tony

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





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] VirtualPlanetBuilder and the Cookbook

2012-12-06 Thread Wang Rui
Hi Tony,

Just use the .tif files. :-)

Wang Rui



2012/12/7 Tony Vasile ming...@gmail.com

 Hi,

 Haven't heard anything from this post for a couple of weeks does anyone
 have an idea of what I have to do?

 Thank you!

 Cheers,
 Tony

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





 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Drawable init method?

2012-12-06 Thread Alexandre Valdetaro
Hi,

I just figured out that i was having a lot of trouble when creating vbos inside 
a drawable because there was no opengl context set during its initialization.

After searching for a while i found out that if i initialized the vbos inside 
drawImplementation method then everything would work. There is one problem 
however, drawImplementation is const.

I ended up setting all my members to mutable and all my methods to const so i 
could make it work. And now it is working.

Isn't there a more proper way of initializing stuff inside a drawable? I would 
expect a initialize method or something like it, or a non const 
drawImplementation method.

I also tried to set the context before initializing the drawable without using 
the drawImplementation method to no avail.

Thanks a lot fellows

Cheers,
Alexandre

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





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osgFX question

2012-12-06 Thread Ulrich Hertlein
Hi Pjotr,

On 5/12/12 3:40, Pjotr Svetachov wrote:
 We recently converted our stereo viewer to cull the scene graph in parallel. 
 But now we
 are having a crash with some models that have bump mapping effects on them. 
 The crash
 happens in Effect::traverse because both threads try to add new techniques.
 
 Is there a reason this is done during the cull traversal? From my first scan 
 through
 this code it looks like this can also be done earlier, like in the 
 constructor of the
 Effect class. Or will this break other code I'm not aware off? Anyone 
 familiar with
 that piece of code who can shed some light on this issue?

My guess is that this is done later since some effects need to have a valid GL 
context in
order to decide which techniques should be used (based on detected GL features).

Cheers,
/ulrich
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] TRK plugin errors

2012-12-06 Thread Kevin Godby
Hello.

The new TRK plugin that was recently committed fails to compile.

The call to osg::swapBytes() on line 72 of
osgPlugins/trk/ReaderWriterTRK.cpp has the wrong number (and type) of
parameters.

--Kevin Godby
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org