Re: [osg-users] Save optimized scene (Big loading time, openflight)

2013-04-05 Thread Sergey Bud
2 robertosfield.

No, release build. 


robertosfield wrote:
 
 HI Sergey,
 
 Are you doing your tests with a debug build?
 
 Robert.
 
 



2 ledocc (David Callu)

Thanks, will try but i am kinda fixed with OpenFlight. 

 
 Hi Sergey
 
 I'm not familiarized with OpenFlight loader,
 
 But you could use osgconv to convert your model from flt to osgb.
 Then use the osgb version in your application. This way, you use an optimized
 scene and read the native osg format when you load the model that will speed 
 up the read process.
 
 HTH
 David 


Can anybody, please, give me some advice on optimizing AND saving scenegraphs? 
I found out that different options of optimizations are only usefull with some 
others. Also I'm starting to think that some sorts of optimizations cannot be 
saved. Is it true? What should I read on using osgUtil::Optimizer or maybe 
somebody can explain it to me? :)

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





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


Re: [osg-users] Save optimized scene (Big loading time, openflight)

2013-04-05 Thread Trajce Nikolov NICK
Hi Sergey,

I found the ive format to perform the best with combination of using S3TC
textures. Try using this:

osgconv --compressed-dxt5 master.flt master.ive ... You will see big
difference in loading and rendering time

Cheers,
Nick






On Fri, Apr 5, 2013 at 10:44 AM, Sebastian Messerschmidt 
sebastian.messerschm...@gmx.de wrote:

 Hello Sergey,

 Can you elaborate what you mean by fixed to flt? Does this mean that you
 need OpenFlight as target format?
 I found OpenFlight terribly slow to load and rolled my own converter to
 make it paged, optimized etc., but you'll need to stick to osgb for this,
 as the flt-format simply does not support all features.
 Also I guess the OpenFlight exporter is not fully fledged, so it is more
 aiming to translate as much information from the scenegraph as possible,
 instead of being optimized towards writing a performance-optimzed flt.
 Another hint that I can give you, is to look which options are supported
 by the importer/exporter, there might be some room for optimization/faster
 loading.

 In general: If you have structured databases (e.g. more the one flight, a
 master, possibly some externals) optimizing per element can give you some
 advantages.

 cheers
 Sebastian

  2 robertosfield.

 No, release build.


 robertosfield wrote:

 HI Sergey,

 Are you doing your tests with a debug build?

 Robert.




 2 ledocc (David Callu)

 Thanks, will try but i am kinda fixed with OpenFlight.

  Hi Sergey

 I'm not familiarized with OpenFlight loader,

 But you could use osgconv to convert your model from flt to osgb.
 Then use the osgb version in your application. This way, you use an
 optimized
 scene and read the native osg format when you load the model that will
 speed up the read process.

 HTH
 David


 Can anybody, please, give me some advice on optimizing AND saving
 scenegraphs? I found out that different options of optimizations are only
 usefull with some others. Also I'm starting to think that some sorts of
 optimizations cannot be saved. Is it true? What should I read on using
 osgUtil::Optimizer or maybe somebody can explain it to me? :)

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





 __**_
 osg-users mailing list
 osg-users@lists.**openscenegraph.org osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.**org/listinfo.cgi/osg-users-**
 openscenegraph.orghttp://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


 __**_
 osg-users mailing list
 osg-users@lists.**openscenegraph.org osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.**org/listinfo.cgi/osg-users-**
 openscenegraph.orghttp://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org




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


[osg-users] 2 Cameras rendering in one PBO or FBO

2013-04-05 Thread Werner Modenbach
Hi,

I'm now experimenting for a very long while and I can't get things working.
I have one camera doing a statick wallpaper background and the main scene 
camera.
When assigning camera 1 to do PRE_Render mode and setting the clear mask to 
just deph clearing everything looks fine on the screen.

Now I need the same to render into a PBO or FBO.
Unfortunately I can't get the same result as on the screen.
Either it is the image of cam 1 or cam 2 but never both like on the screen. Why?
I played arround with render bins etc. but without success.
Even If I just modifying the 2 cams from the working screen setup by setting:

Code:
cam1-setRenderTargetImplementation(osg::Camera::FRAME_BUFFER_OBJECT);
cam1-detach( osg::Camera::COLOR_BUFFER );
cam1-attach( osg::Camera::COLOR_BUFFER, fbImage.get(), 0, 0);
camera-setClearMask(GL_DEPTH_BUFFER_BIT );




and the same with the cam 2 (except the clear mask) it just shows the output of 
cam2.

Any explanations here? Any help is very welcome.


Thank you!

Cheers,
Werner

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





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


Re: [osg-users] 2 Cameras rendering in one PBO or FBO

2013-04-05 Thread Sebastian Messerschmidt

Hello Werner,

You are not providing enough info to give you an exact answer,
but I guess you are trying to blend the result of two camera passes into 
one FBO.
Simply set up two pre-render cams and enable blending for the second 
one, that should do the trick.


Unfortunately you didn't really explain what your second camera is 
rendering, so I can only guess, that you are trying to mix foreground 
with background.


cheers
Sebastian


Hi,

I'm now experimenting for a very long while and I can't get things working.
I have one camera doing a statick wallpaper background and the main scene 
camera.
When assigning camera 1 to do PRE_Render mode and setting the clear mask to 
just deph clearing everything looks fine on the screen.

Now I need the same to render into a PBO or FBO.
Unfortunately I can't get the same result as on the screen.
Either it is the image of cam 1 or cam 2 but never both like on the screen. Why?
I played arround with render bins etc. but without success.
Even If I just modifying the 2 cams from the working screen setup by setting:
 
Code:

cam1-setRenderTargetImplementation(osg::Camera::FRAME_BUFFER_OBJECT);
cam1-detach( osg::Camera::COLOR_BUFFER );
cam1-attach( osg::Camera::COLOR_BUFFER, fbImage.get(), 0, 0);
camera-setClearMask(GL_DEPTH_BUFFER_BIT );




and the same with the cam 2 (except the clear mask) it just shows the output of 
cam2.

Any explanations here? Any help is very welcome.


Thank you!

Cheers,
Werner

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





___
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] 2 Cameras rendering in one PBO or FBO

2013-04-05 Thread Werner Modenbach
Hi Sebastian,

thanks for the really quick reply.

cam1 is renderung a textured quad as static wallpaper and it's renderOrder is 
set to PRE_RENDER.
cam 2 is rendering a normal scene (i.e. the cow) an its clear mask is set to 
just GL_DEPTH_BUFFER_BIT.
This way cam2 doesn't destroy the background rendered by cam1.
On the screen it works perfect.
But as soon as I create a framebuffer or pixelbuffer object an set it as render 
targets to both cams it seems like the buffer is cleared before cam2 does it's 
work.

Thank you!

Cheers,
Werner

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





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


Re: [osg-users] 2 Cameras rendering in one PBO or FBO

2013-04-05 Thread Sebastian Messerschmidt

Hi,

have you tried to set the render order explicitly on the cameras?
Do you get a valid result if you are rendering cam2 only?
Do they really bind the same texture?


Hi Sebastian,

thanks for the really quick reply.

cam1 is renderung a textured quad as static wallpaper and it's renderOrder is 
set to PRE_RENDER.
cam 2 is rendering a normal scene (i.e. the cow) an its clear mask is set to 
just GL_DEPTH_BUFFER_BIT.
This way cam2 doesn't destroy the background rendered by cam1.
On the screen it works perfect.
But as soon as I create a framebuffer or pixelbuffer object an set it as render 
targets to both cams it seems like the buffer is cleared before cam2 does it's 
work.

Thank you!

Cheers,
Werner

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





___
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] OSGDisneyland

2013-04-05 Thread Robert Osfield
Hi John,

If I read you correctly, you've booked the OSG BOF session for this year's
Siggraph.  If so then may I thank you :-)


We'll have to come up with some fun Dinsey related demos :-)

Robert.


On 5 April 2013 00:43, John Richardson richa...@spawar.navy.mil wrote:

 Problem: OSGDisneyland library does not exist.

 ** **

 This is causing a BIG problem since we cannot show off the new OSG
 Disneyland capabilities at the 

 ** **

 OSG SIGGRAPH BOF in JULY 2013

 ** **

 *Birds of a Feather Session Title: *Openscenegraph BOF

 *Date*: Wednesday, July 24, 2013

 *Location*: Anaheim Convention Center   

 *Time*: 10:00 – 11:00 AM

 *Room Name*: *Room will be provided six weeks prior to conference. *

 *Room Setup*:  Theater

 ** **

 Note: Just checking to see if people read such posts…. J

 ** **

 Next Note: Will delurk next week with some more details and call for
 participation. Anaheim Convention Center  is across the street from
 Disneyland….!

 ** **

 John F. Richardson

 ___
 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] 2 Cameras rendering in one PBO or FBO

2013-04-05 Thread Werner Modenbach
Hi,

here is my setup:



Code:

// Get the scene camera (cam1)
osg::ref_ptrosg::Camera camera = view-getCamera();
// get the wallpaper camera (cam2)
osg::ref_ptrosg::Camera localWallpaperCamera = wallpaperCamera.get();
osg::ref_ptrosg::Image image = new osg::Image;
osg::ref_ptrosg::Image fbImage = new osg::Image;
fbImage-allocateImage(width,height,1,GL_RGBA,GL_UNSIGNED_BYTE, 1);
camera-setRenderTargetImplementation(osg::Camera::FRAME_BUFFER_OBJECT);
camera-attach( osg::Camera::COLOR_BUFFER, fbImage.get(), 0, 0);
camera-setClearMask( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );

if (hasWallpaper()) {

localWallpaperCamera-setRenderTargetImplementation(osg::Camera::FRAME_BUFFER_OBJECT);
localWallpaperCamera-attach( osg::Camera::COLOR_BUFFER, fbImage.get(), 0, 
0);
localWallpaperCamera-setClearMask( GL_COLOR_BUFFER_BIT | 
GL_DEPTH_BUFFER_BIT );
camera-setClearMask(GL_DEPTH_BUFFER_BIT );
}
view-frame();
image = fbImage.get();





cam2 is a slave of the view - addSlave(cam2)
This is just a shortened version[/code]

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





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


[osg-users] [osgCompute] Find statistics (min, max, mean, stddev) using NPP or alternative of RTT/FBO

2013-04-05 Thread Ethan Fahy
I have a setup very similar to osgRTTDemo.  In order for my CUDA kernel to do 
any work, I must first gather some basic statistics about the floating point 
values in the FBO.  I need, min, max, mean, stddev, and eventually a histogram. 
 These are all parallel reduction problems and the standard CUDA examples has a 
whitepaper on optimized parallel reduction algorithms.  However, I would prefer 
to use the built-in NPP functions that are able to gather those statistics for 
me.  

Since the values in the FBO are changing every frame I need to recalculate the 
statistics on a per-frame basis.  In osgRTTDemo, the launch() function within 
TexFilter is where the CUDA kernel is called on a per-frame calculation.  Is 
this where I should try to also implement an NPP statistics call?

I found this thread:
http://stackoverflow.com/questions/12480821/how-to-use-cuda-nppnvidia-performance-primitives-on-opengl-textures

that says that NPP needs a cuda device pointer in order to get those 
statistics; am I able to retrieve the cuda device pointer from a 
osgCuda::Texture2d object?

I think I may have jumped in too deep with this CUDA stuff and may just need to 
go back and teach myself CUDA from the beginning, but any advice is appreciated 
as I slog my way through this problem.  Thanks.

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





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


Re: [osg-users] 2 Cameras rendering in one PBO or FBO

2013-04-05 Thread Sebastian Messerschmidt

Somehow this looks strange and overcomplicated.
I'm even unsure if this is supposed to work at all.
In order to do the RTT thingy you should setup two cameras which render 
to the texture and the viewer should simply render a fullscreen quad 
with this texture.


i.e.
ViewerCam
|
|-Cam1 (RenderTarget1)
|   |---your background
|
|-Cam2 (RenderTarget1)
||---your Model
|-FullScreenQuad (with RenderTarget1's texture)
Take a look at osgprerender example.


Hi,

here is my setup:



Code:

// Get the scene camera (cam1)
osg::ref_ptrosg::Camera camera = view-getCamera();
// get the wallpaper camera (cam2)
osg::ref_ptrosg::Camera localWallpaperCamera = wallpaperCamera.get();
osg::ref_ptrosg::Image image = new osg::Image;
osg::ref_ptrosg::Image fbImage = new osg::Image;
fbImage-allocateImage(width,height,1,GL_RGBA,GL_UNSIGNED_BYTE, 1);
camera-setRenderTargetImplementation(osg::Camera::FRAME_BUFFER_OBJECT);
camera-attach( osg::Camera::COLOR_BUFFER, fbImage.get(), 0, 0);
camera-setClearMask( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );

if (hasWallpaper()) {
 
localWallpaperCamera-setRenderTargetImplementation(osg::Camera::FRAME_BUFFER_OBJECT);
 localWallpaperCamera-attach( osg::Camera::COLOR_BUFFER, fbImage.get(), 0, 
0);
 localWallpaperCamera-setClearMask( GL_COLOR_BUFFER_BIT | 
GL_DEPTH_BUFFER_BIT );
 camera-setClearMask(GL_DEPTH_BUFFER_BIT );
}
view-frame();
image = fbImage.get();





cam2 is a slave of the view - addSlave(cam2)
This is just a shortened version[/code]

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





___
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] OSGDisneyland

2013-04-05 Thread Paul Martz
Anaheim this year, eh? Wow, that brings back memories. First SIGGRAPH I
attended was Anaheim, 1987, back when 1m lines/sec was a big deal...
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org