[osg-users] multipass prerender to texture

2010-02-16 Thread Julien Valentin
 Hello,
 I would like to make a prerender camera that loop over the rendering of
its
 son's geometries until an event happens and then display the result as a
 texture with the main camera..

 mainloop(){
   while(condition){
tex=prerender_camera.draw() //render to texture using fbo
  }
  maincamera.draw()  //render the main scene using texture tex
 }

 (The condition depends on the post draw opengl state : an occlusion
 query..  )
 I have try a few tricks without success

here's my code:




//Setup prerendercamera
// clearing
_Camera-setClearMask(GL_DEPTH_BUFFER_BIT);

// projection and view
_Camera-setProjectionMatrix(osg::Matrix::ortho2D(0,1,0,1));
_Camera-setReferenceFrame(osg::Transform::ABSOLUTE_RF);
_Camera-setViewMatrix(osg::Matrix::identity());

// viewport
_Camera-setViewport(0, 0, _TextureWidth, _TextureHeight);

_Camera-setRenderOrder(osg::Camera::PRE_RENDER);

_Camera-setRenderTargetImplementation(osg::Camera::FRAME_BUFFER_OBJECT);

_Camera-attach(osg::Camera::BufferComponent(osg::Camera::COLOR_BUFFER),
_OutTexture.get());

_camera-addchild(prerenderscene); //prerenderscene is a occlusion query
node

//mainscene has a state set that use OutTexture
mainscene-addChild(_Camera);


I would like:
1) to draw Scene from _Camera
2)test number of fragment drawn with an occlusionquery
3)test my condition  and loop to 1) if it's wrong
4)if true draw mainscene using resulting OutTexture
 Can you help me for this?.

May I use a recursive Renderstage a postDrawCallback
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] reflect vector ?

2010-02-16 Thread Sebastien Nerig
Hi,

Do any functions exist to compute reflected matrix or reflected vector against 
a plane ?

Thank you!

Cheers,
Sebastien

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





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


[osg-users] reflect vector ?

2010-02-16 Thread Julien Valentin
inGLSL

R = reflect(-L, N)
where
N : normal vector
L: light vector

It give from scratch:
From scratch:
R = 2 * ( N dot L) * N - L

-- Forwarded message --
From: Sebastien Nerig overse...@hotmail.com
Date: Feb 16, 10:07 am
Subject: reflect vector ?
To: OpenSceneGraph Users


Hi,

Do any functions exist to compute reflected matrix or reflected vector
against a plane ?

Thank you!

Cheers,
Sebastien

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

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


Re: [osg-users] reflect vector ?

2010-02-16 Thread Sebastien Nerig
Hi Julien,

Thanks for your answer, but I am looking for precompute function in osg, not in 
glsl.
Someting like osg::Vec3 R = osgUtil::reflect(osg::Vec3(...), N), same for 
matrix.

Cheers,
Sebastien

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





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


Re: [osg-users] PagedLOD usage??

2010-02-16 Thread Ufuk
Hi Chris,
Thank you so much for your help. i was just thinking about writing my own
pagedLOD mechanism.
it works really nice now.

thanks again :)

On Mon, Feb 15, 2010 at 6:09 PM, Chris 'Xenon' Hanson
xe...@alphapixel.comwrote:

 On 2/15/2010 6:25 AM, Ufuk wrote:
  do you think i miss something? should i use PagedLOD for my purpose or i
  should implement something different??*

   PagedLOD should do the trick for you.

  Often, you will put in the first LOD as already-leaded, and leave its
 filename blank.
 Then, add the higher LODs without using addChild -- you don't want to add a
 Node, you just
 want to fill out the filename and ranges in the PagedLOD perRangeData. The
 DatabasePager
 will load them for you when needed.

  If you want the first LOD loaded for you, do not create and add a blank
 Node as you are
 doing here. Just add a perRangeData to the PagedLOD node, and start the
 main OSG program
 loop running. Make sure you are using something derived from osgViewer and
 that you have
 all the DatabasePager bits hooked up properly or background loading won't
 work.

 --
 Chris 'Xenon' Hanson, omo sanza lettere  Xenon
 AlphaPixel.com
 PixelSense Landsat processing now available!
 http://www.alphapixel.com/demos/
 There is no Truth. There is only Perception. To Perceive is to Exist. -
 Xen
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org




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


[osg-users] reflect vector ?

2010-02-16 Thread Julien Valentin
As I give you the algo, you can make your own function...no?!

-- Forwarded message --
From: Sebastien Nerig overse...@hotmail.com
Date: Feb 16, 10:36 am
Subject: reflect vector ?
To: OpenSceneGraph Users


Hi Julien,

Thanks for your answer, but I am looking for precompute function in osg, not
in glsl.
Someting like osg::Vec3 R = osgUtil::reflect(osg::Vec3(...), N), same for
matrix.

Cheers,
Sebastien

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

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


Re: [osg-users] reflect vector ?

2010-02-16 Thread Sebastien Nerig
Hi,

Sure, and I knew the math before you helped me, but I was just wondering if 
something was already existing in osg. Computing reflection (and refraction) 
vectors/matrces are pretty usefull now. I was wondering if osg had a reflect 
function into utils libs or elsewhere, but now I guess it does not.

Sebastien

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





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


[osg-users] osg-users Digest, Vol 32, Issue 33

2010-02-16 Thread Julien Valentin
Thanks a lot

-- Forwarded message --
From: J.P. Delport jpdelp...@csir.co.za
Date: Feb 16, 7:33 am
Subject: osg-users Digest, Vol 32, Issue 33
To: OpenSceneGraph Users


Also see this:
http://thread.gmane.org/gmane.comp.graphics.openscenegraph.user/50502



J.P. Delport wrote:
 Hi,

 use this as a starting point and look at the thread referenced there as
 well.

http://thread.gmane.org/gmane.comp.graphics.openscenegraph.user/49423

 jp

 Julien Valentin wrote:
 Hello,
 I would like to make a prerender camera that loop over the rendering
 of its son's geometries until an event happens and then display the
 result as a texture with the main camera..

 mainloop(){
   while(condition){
tex=prerender_camera.draw() //render to texture using fbo
  }
  maincamera.draw()  //render the main scene using texture tex
 }

 (The condition depends on the post draw opengl state : an occlusion
 query..  )
 I have try a few tricks without success
 Can you help me for this?.

 

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

--
This message is subject to the CSIR's copyright terms and conditions, e-mail
legal notice, and implemented Open Document Format (ODF) standard.
The full disclaimer details can be found athttp://
www.csir.co.za/disclaimer.html.

This message has been scanned for viruses and dangerous content by
MailScanner,
and is believed to be clean.  MailScanner thanks Transtec Computers for
their support.

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


[osg-users] Survey: Is there interest for an OSG Users Group at ITEC or I/ITSEC?

2010-02-16 Thread Brett Wiesner

Hey everyone,

I know a lot of OSG users are building things in the ModSim space and I 
know that two of the bigger industry conferences are ITEC (Europe) and 
I/ITSEC (USA). I was wondering how many people from this list go to 
either of those and if there is any interest in a OSG Users Group 
meeting? I was thinking it would be a great opportunity to meet other 
OSG users. Perhaps everyone can speak a little about what they are 
building with OSG and share some of their experiences.


So, the questions are:

1) Do you go to ITEC and/ or I/ITSEC? (Please specify which one)

2) Would you go to a OSG Users Group Meeting?

Thanks,
Brett Wiesner

--
Product Manager, VR-Vantage
OSG Based Battlefield Information Station, Desktop IG and SDK
http://www.VR-Vantage.com 


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


Re: [osg-users] PagedLOD usage??

2010-02-16 Thread Adrian Lindberg
I can't seem to get a hang of this. Still new to OSG.

So what I gather I shouldn't use addChild but simply setup setFileName() and 
setRange()? Then the PagedLOD will take care of the rest?

Also, what do I need to setup for the DatabasePager that isn't supplied by 
osgViewer? If I sub-class which parts do I want to replace?

Is there any tutorial for this? The PagedLOD example doesn't do any of it with 
a viewer but simply preps the data.

Slightly confused...

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





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


Re: [osg-users] PagedLOD usage??

2010-02-16 Thread Chris 'Xenon' Hanson
On 2/16/2010 8:35 AM, Adrian Lindberg wrote:
 I can't seem to get a hang of this. Still new to OSG.
 So what I gather I shouldn't use addChild but simply setup setFileName() and 
 setRange()? Then the PagedLOD will take care of the rest?

  Yes. Make sure the file for the child exists on disk, then fill the names and 
ranges.

 Also, what do I need to setup for the DatabasePager that isn't supplied by 
 osgViewer? If I sub-class which parts do I want to replace?

  I think basic osgViewer has all the magic you need. But if you go rolling 
your own
viewer, you need to make sure to replicate what it does.

 Is there any tutorial for this? The PagedLOD example doesn't do any of it 
 with a viewer but simply preps the data.

  The PagedLOD example is not a great learning tool, it is for converting an 
LOD-based
database to PagedLOD. Which, now that I think of it, might be useful for you.


-- 
Chris 'Xenon' Hanson, omo sanza lettere  Xenon AlphaPixel.com
PixelSense Landsat processing now available! http://www.alphapixel.com/demos/
There is no Truth. There is only Perception. To Perceive is to Exist. - Xen
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] PagedLOD usage??

2010-02-16 Thread Robert Osfield
On Tue, Feb 16, 2010 at 3:54 PM, Chris 'Xenon' Hanson
xe...@alphapixel.com wrote:
 Is there any tutorial for this? The PagedLOD example doesn't do any of it 
 with a viewer but simply preps the data.

  The PagedLOD example is not a great learning tool, it is for converting an 
 LOD-based
 database to PagedLOD. Which, now that I think of it, might be useful for you.

The osgphotoalbum does a bit creative use of PageLOD and a psuedo
plugin to provide a dynamic geometry creation and image loading
system.

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


Re: [osg-users] PagedLOD usage??

2010-02-16 Thread Alberto Luaces
Hi,

Adrian Lindberg writes:

 I can't seem to get a hang of this. Still new to OSG.

 So what I gather I shouldn't use addChild but simply setup setFileName() and 
 setRange()? Then the PagedLOD will take care of the rest?

 Also, what do I need to setup for the DatabasePager that isn't supplied by 
 osgViewer? If I sub-class which parts do I want to replace?

 Is there any tutorial for this? The PagedLOD example doesn't do any of it 
 with a viewer but simply preps the data.

 Slightly confused...

I recall some good post about converting a LOD database to a PagedLOD
one. Maybe it is useful to you:

http://www.mail-archive.com/osg-us...@openscenegraph.net/msg06723.html

Regards,

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


Re: [osg-users] PagedLOD usage??

2010-02-16 Thread Adrian Lindberg
I see, so the DatabasePager works even if I don't subclass osgViewer, I was 
getting worried there.

Well seems like my bounding volumes are misplaced and that's why I'm not 
getting anything on the screen...

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





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


Re: [osg-users] Survey: Is there interest for an OSG Users Group at ITEC or I/ITSEC?

2010-02-16 Thread Jean-Sébastien Guay

Hi Brett,


I know a lot of OSG users are building things in the ModSim space and I
know that two of the bigger industry conferences are ITEC (Europe) and
I/ITSEC (USA). I was wondering how many people from this list go to
either of those and if there is any interest in a OSG Users Group
meeting? I was thinking it would be a great opportunity to meet other
OSG users. Perhaps everyone can speak a little about what they are
building with OSG and share some of their experiences.

So, the questions are:

1) Do you go to ITEC and/ or I/ITSEC? (Please specify which one)


We'll be at both ITEC and I/ITSEC. Not me, but our VP of Business 
Development, Arnold Free, will be there.



2) Would you go to a OSG Users Group Meeting?


Arnold would attend, sure, and he could talk about some of the things 
we've been working on. We're going to have a nice demo on the show floor 
as well if people would like to check it out. :-)


J-S
--
__
Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com
   http://www.cm-labs.com/
http://whitestar02.webhop.org/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Trilinear vs Bilinear

2010-02-16 Thread Guy Volckaert
Ok. I have a little more information for you guys. 

Just to recap the situation: When I run using Bilinear, I get 30 Hz. When I run 
using Trilinear, I get 60Hz.

During my investigation, I noticed that their are actually 2 bilinear modes: 
LINEAR and LINEAR_MIPMAP_NEAREST. LINEAR does not include any mipmaps, whereas 
LINEAR_MIPMAP_NEAREST will include mipmaps.

As a test, I modified my texture attribute visitor to replace LINEAR by 
LINEAR_MIPMAP_NEAREST. Now, the performance is similar to using Trilinear.

It seems that the graphics card does not like using Bilinear textures without 
the mipmaps.

Does anyone know why?

Regards,

Cheers,
Guy

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





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


Re: [osg-users] Trilinear vs Bilinear

2010-02-16 Thread Paul Martz

Guy Volckaert wrote:
Ok. I have a little more information for you guys. 


Just to recap the situation: When I run using Bilinear, I get 30 Hz. When I run 
using Trilinear, I get 60Hz.

During my investigation, I noticed that their are actually 2 bilinear modes: 
LINEAR and LINEAR_MIPMAP_NEAREST. LINEAR does not include any mipmaps, whereas 
LINEAR_MIPMAP_NEAREST will include mipmaps.

As a test, I modified my texture attribute visitor to replace LINEAR by 
LINEAR_MIPMAP_NEAREST. Now, the performance is similar to using Trilinear.

It seems that the graphics card does not like using Bilinear textures without 
the mipmaps.

Does anyone know why?


How big is the base level of your texture, and how big is the on-screen 
rendering? If you use LINEAR but you're minifying, this will produce 
poorer cache results than if you used a mipmap filter (and thus loaded a 
smaller texture into the cache).

   -Paul

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


Re: [osg-users] [ANN] OSG Virtual Planets, the core of gvSIG3D.

2010-02-16 Thread Allen Saucier
Hi Rafa,

 I understand your previous message.  Honestly, I did not think that using the 
default java as installed through the synaptic manager was different from Sun 
Java.  

So, here is what I have done:
1. I have installed Sun Java version 6
2. I have setup my environment variables
3. I downloaded the source code again and started with a fresh install
4. I have removed the OLD .m2 directory
5. I am using the CMakeList.txt file you directed me to use
6. I am running as my local account and not root
7. I have included my entire output from my latest attempt.
8. I have tried to use the binaries and the run-Examples.sh brings up a window 
but when I click on any example, the application crashes
9. I downloaded and I am using the osgvp-2.2.0-SNAPSHOT-src  source code
10. I am using the command: mvn install -Dmaven.test.skip=true

Here are my environment vars:

#env | grep OSG
OSG_INCLUDE=/usr/local/include
OSG_BIN=/usr/local/bin
OSGGTKMM_INCLUDE=/usr/local/include/osgGtkmm-0.1
OSG_FILE_PATH=/media/numenor/OpenSceneGraph-2.8.1/OpenSceneGraph-Data-2.6.0
OSG_LIB=/usr/local/lib
OSG_DIR=/usr/local/include:/usr/local/bin:/usr/local/lib
OSGGTKMM_LIB_ROOT=/usr/local/lib
OSG_ROOT=/usr/local
OSGGTKMM_ROOT=/usr/local/include

#env | grep JAVA
JAVA_HOME=/usr/lib/jvm/java-6-sun
JAVA_INCLUDE_PATH2=/usr/lib/jvm/java-6-sun/include/linux/
JAVA_INCLUDE_PATH=/usr/lib/jvm/java-6-sun/include/

#env | grep GDAL
GDAL_LIBRARY=/usr/lib
GDAL_INCLUDE_DIR=/usr/include/gdal
GDAL_BIN=/usr/bin
GDAL_DIR=/usr/include/gdal:/usr/bin:/usr/lib

## jogl info ( Loaded onto system via synatic manager )
libjogl-java-doc
libjogl-java
libjogl-jni

ERROR: ( and this error is repeated for several different modules )
Configuring done
 [exec] CMake Warning at CMakeModules/OSGVPMacros.cmake:9 (ADD_LIBRARY):
 [exec]   Cannot generate a safe runtime search path for target osgvpcore 
because
 [exec]   there is a cycle in the constraint graph:

 [exec] dir 0 is [/home/allen/.depman/lib]
 [exec]   dir 1 must precede it due to runtime library 
[libOpenThreads.so.11]
 [exec] dir 1 is [/usr/local/lib]
 [exec]   dir 0 must precede it due to runtime library [libosg.so.55]

 [exec]   Some of these libraries may not be found correctly.
 [exec] Call Stack (most recent call first):
 [exec]   src/osgvpcore/CMakeLists.txt:35 (SETUP_CORELIB)

It appears that the JAVA_INCLUDE_PATH and JAVA_INCLUDE_PATH2, however, have 
been recognized by CMake, which is nice.  But I am truly at a loss as to how to 
get your package to compile under Ubuntu 9.0.4 as these new errors are 
completely different from what I was receiving.

I have made sure that osg has GDAL support; I believe I am using the correct 
jogl; and I do have GDAL installed.

I am very happy that you are using Ubuntu.  Could you possibly tell me what 
else I am over looking?  I believe I have followed every thing that you have 
stated thus far.  I have double checked the README.txt file as well as our 
notes here and I do not see anything that I am doing wrong.



Best regards,
Allen

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




Attachments: 
http://forum.openscenegraph.org//files/mavenoutput6_408.txt


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


[osg-users] monitoring OpenGL memory usage

2010-02-16 Thread Cory Riddell
I'm getting the infamous Warning: detected OpenGL error 'out of memory'
after RenderBin::draw(,) message.

Any advice on handling this? My scene isn't very big (maybe 150,000
vertices) and my machine has 3 GB of RAM. Do you monitor or profile
memory usage to dynamically tune your application's display? If I knew
when I was getting close to exhausting the OpenGL pool, I could
re-tesselate to come up with lower resolution models.

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


Re: [osg-users] Survey: Is there interest for an OSG Users Group at ITEC or I/ITSEC?

2010-02-16 Thread Brett Wiesner

J-S,

That's great! I've been meaning to talk to you guys about a possible 
VR-Vantage/ Vortex integration. I'll be sure to talk to Arnold at ITEC.


Thanks,
Brett

Jean-Sébastien Guay wrote:

Hi Brett,


I know a lot of OSG users are building things in the ModSim space and I
know that two of the bigger industry conferences are ITEC (Europe) and
I/ITSEC (USA). I was wondering how many people from this list go to
either of those and if there is any interest in a OSG Users Group
meeting? I was thinking it would be a great opportunity to meet other
OSG users. Perhaps everyone can speak a little about what they are
building with OSG and share some of their experiences.

So, the questions are:

1) Do you go to ITEC and/ or I/ITSEC? (Please specify which one)


We'll be at both ITEC and I/ITSEC. Not me, but our VP of Business 
Development, Arnold Free, will be there.



2) Would you go to a OSG Users Group Meeting?


Arnold would attend, sure, and he could talk about some of the things 
we've been working on. We're going to have a nice demo on the show 
floor as well if people would like to check it out. :-)


J-S



--
Product Manager, VR-Vantage
OSG Based Battlefield Information Station, Desktop IG and SDK
http://www.VR-Vantage.com 


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


Re: [osg-users] [osgOcean] osgOcean Geometry

2010-02-16 Thread Paul Palumbo

  A little while ago I wrote some test cases which 
  removed this huge vertex array and replaced it with a single high 
  resolution ocean tile which is then instanced for each tile in the 
  ocean surface. The different resolution tiles are then supported 
  simply by modifying the primitives and positioning the tiles using a 
  vertex shader. Since all of the high resolution tiles are precomputed, 
  updating the animation of the ocean surface is simply a matter of 
  changing the pointer to the next frames vertex array for each of the 
  tile primitives.
 

Do I understand this correctly? Only the high resolution vertices will be 
used and the geometry will simply reference the appropriate subset of vertices 
based on the level of detail? Therefore, only 1 OceanTile object would be 
needed (for the highest level) and the other levels-of-detail wouldn't be 
needed. Then the MipmapGeometry::updatePrimitives call would just update the 
geometry to references the appropriate high-level vertices based on the 
current resolution.  

I assume the same would be true for the Normals where only the normals for the 
high resolution would be used. Your TilePrimitives example kind of brushes over 
the Normals and the existing OceanTile::computeNormals seems to be resolution 
dependent.

Do I have this correct? Just trying to understand what you are planning.

Thanks
Paul P.

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





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


Re: [osg-users] [osgPlugins] Can't export OSG to 3DS in 2.9.6 and can't build osgIntrospection Lib

2010-02-16 Thread Zsolt Babák
Hi,

I have the same problem with 2.9.6 and 3ds write.

I export 3d data from a CAD software in ive format into a lot of relatively 
small files.
And after that i combine the needed parts by reading in the ives and writing 
them out into a single ive. So with ive format this process works without a 
glitch.

However I've been asked to provide a combined 3ds file too. (OSG 3DS write 
support came in time :)).

However the same process ends with an exception with the big 3ds file. The 
interesting part is that I can write the small ives one by one into 3ds, I just 
can't make a big 3ds from them (the biggest 3ds I was able to produce was 
around 42 megs) (the big ive file for this model is 62 M).

I'm just building a debug version of osg to get some sort of info back from the 
crash. Although I don't really know visual studio...

Is it possible that I hit a hard limit in 3ds ? (eg: 32768 max geometries) 

Cheers,
Zsolt.

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





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


[osg-users] Pentium 4 ht vs. Core Duo - (My Mundane Observation of the day) Any Ideas?

2010-02-16 Thread David Glenn
Hi, Sorry to trouble you on this, but I have to ask someone - to support my 
hypothesis on this issue!

I'm running Red Hat Enterprise 5.1 using a Gforce 8600 card using the latest 
driver from nvidia (119.52). 

I know that P4 stuff is old school and Performer is very old school! 
And there is most likely nobody else in the world that is being forced 
to do this but me, however here we go:

Up until a month ago I've been using a system that uses Core Duo system (until 
it cashed) and I was running a program that was running performer and basically 
the same program using OSG. Both where working normally - naturally OSG was 
working better than performer! 

Now, I'm running a P4 system (only deference is the CPU and double the memory) 
and the OSG using the same graphics card and the OSG version of my project is 
running happy but the version running Performer has slowed to a crawl when they 
run together.  

I ran top and found that OSG is taking up most of the CPU time making me think 
that OSG runs better on the Core Duo than the P4. My understanding from someone 
is that the P4 is not exactly a twin core but a single core using threading to 
behave as a two core system and the Core Duo is a true twin core system, hence 
OSG behaves better using the Core Duo! 

One idea that was brought up to me was to move up to a Quadro graphic card. 
Someone at PNY told me that it's the only card that works best under Linux for 
OGL.  

I know I'm going to get the Why are you doing this reaction, but that is the 
requirements! The user will be able to run Performer and OSG at the same time! 
The best answer I can come up with is use Core Duo or better but that means 
dumping 64 boxes! 

 :-*  Any ideas out there?
... 

Thank you!

Cheers,
D Glenn


D Glenn

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





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


Re: [osg-users] Survey: Is there interest for an OSG Users Group at ITEC or I/ITSEC?

2010-02-16 Thread David Glenn
Well, it would give me a good reason to go to I/ITSEC. It's hard to convince my 
handlers to let me to go anyplace beyond Los Angeles at a whim – money || time 
being tight for traval!

Hay are they any LA users groups out there?

Yes, I would go if I was given the chance!
...


D Glenn

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





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


Re: [osg-users] osgviewerwx for wxWidgets 2.9.0+

2010-02-16 Thread R Fritz
OSGCanvas subclasses wxGLCanvas.  Would the OSGCanvas constructor 
perhaps be the place to look?


On 2010-02-16 08:04:23 -0800, Rizzen said:


Hi,

I really need up with making osgviewerWX work with up coming 3.0 release
(currently 2.9.1) in first half of 2010.

I am completely confused on where to create the required wxGLContext in
the osgviewerWX source. I looked at the 3 wxWidgets OpenGL samples, yet
I am still very confused. Each one seems to do the implementation
differently, thus don't know which implementation is best for osgviewerWX.

I appreciate any help in getting osgviewerWX to work with wxWidgets 2.9.1.

Thanx in advance
Rizzen




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


Re: [osg-users] osgviewerwx for wxWidgets 2.9.0+

2010-02-16 Thread Charles Cossé
I have some wx-osg code on my website that might help ... it's under project
G4OSG @ www.asymptopia.org ...

On Tue, Feb 16, 2010 at 4:04 PM, Rizzen riz...@darkstar.co.za wrote:

 Hi,

 I really need up with making osgviewerWX work with up coming 3.0 release
 (currently 2.9.1) in first half of 2010.

 I am completely confused on where to create the required wxGLContext in
 the osgviewerWX source. I looked at the 3 wxWidgets OpenGL samples, yet
 I am still very confused. Each one seems to do the implementation
 differently, thus don't know which implementation is best for osgviewerWX.

 I appreciate any help in getting osgviewerWX to work with wxWidgets 2.9.1.

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




-- 
AsymptopiaSoftware|softw...@thelimit
 http://www.asymptopia.org
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] monitoring OpenGL memory usage

2010-02-16 Thread Paul Martz
OpenGL can generate this error if it runs out of memory for any reason, 
either GPU or host RAM. This means the problem isn't necessarily caused 
by graphics. If you've nearly exhausted system RAM in your simulation or 
GUI or whatever, and there's not enough host RAM left to process even 
the simplest of OpenGL calls, then you get GL_OUT_OF_MEMORY.


If you're on 32bit Windows, you're limited to 2GB of memory per process, 
so first thing to do would be to look at your process size.


If that looks normal, then using something like GLIntercept / GLTrace / 
BuGLe / whatever will tell you which OpenGL command is triggering the 
error, which may or may not shed some light on the issue. I believe 
there's also a way to have OSG call glGetError() during every 
StateAttribute::apply(), which would give you more fine grained error 
checking, but is really no substitute for a tool like GLIntercept.

   -Paul



Cory Riddell wrote:

I'm getting the infamous Warning: detected OpenGL error 'out of memory'
after RenderBin::draw(,) message.

Any advice on handling this? My scene isn't very big (maybe 150,000
vertices) and my machine has 3 GB of RAM. Do you monitor or profile
memory usage to dynamically tune your application's display? If I knew
when I was getting close to exhausting the OpenGL pool, I could
re-tesselate to come up with lower resolution models.

Cory
___
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] OSG - QT

2010-02-16 Thread David Glenn

fausto wrote:
 Hi Robert, all,
 I've read a post (I think started by Robert, but I cannot find the link 
 anymore) of some months ago that proposed a development aimed to improve the 
 osg-Qt integration. 
 Is there anything being done on this subject?
 
 Thanks.
 
 Fausto
 
  --
 Post generated by Mail2Forum


That would be something I would have liked to looked at also. 

As for me I converted the OSGQt widget code that they did for the QTviewer and 
made a class that I could add to a frame on any qt dialog and it worked fine 
for me. 
The only change I made is that I have to make over time is that have a 15 ms 
delay on the timer for qt version 4.5.2 and higher (other than the 5 ms delay - 
I think). 
I guess that QT need this otherwise I get funny behavior on some of the 
built-in dialogs - the change is also in the OSG 2.8.1 code (Robert may know 
better than I why it there)!

I also had to change and echo some of the QT mouse functions to be visible to 
OSG. 

Oh Yea! a can also set it up so it makes an stand-alone window. The only thing 
that it can't do is fill the screen, but I don't need that for now - I'm sure 
that there is an easy way to do that! 

Other than that, It all works fine for me!


D Glenn - Join the Navy and See the World ... from your Desk!

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





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


Re: [osg-users] Two rotations on an object?

2010-02-16 Thread Jason Daly

Ernie Smethurst wrote:

Code:

PositionAttitudeTransform *rotate_planetFive = new PositionAttitudeTransform;
rotate_planetFive-addChild( geode_planetFive );
rotate_planetFive-setUpdateCallback( new 
AnimationPathCallback(osg::Vec3(0,0,0), osg::Z_AXIS, inDegrees(45.0f)) ); //ROTATE 
AROUND THE SUN
Vec3 central_point = primitive_planetFive-getCenter(); //GET THE CURRENT 
LOCATION OF THE CIRCLE WHILST IS ROTATES
rotate_planetFive-setUpdateCallback( new 
AnimationPathCallback(osg::Vec3(central_point), osg::Z_AXIS, inDegrees(45.0f)) );



But that doesnt work, it only applies the second setUpdateCallback() when i 
need both to run.

Sorry if it seems I am posting excessively, I just get a little bit obsessive 
when I cant get the coding correct, Apologies.
  


Of course it does.  You replace your first update callback on one 
transform with a second.  As I said before, you need three transforms 
here.  A rotate, followed by a translate, followed by another rotate.  
Since you're using PAT's, one of them can handle two transforms (one 
rotate and one translate, which is what you have now), but you'll  need 
a second transform to do the other rotation.


As I said in my previous message, in a scene graph like OSG, you combine 
rotations by using the graph's hierarchy.  What you should have is your 
planet's geometry as a child of a PAT doing a rotation, which itself is 
a child of another PAT doing the other rotation and the translation.  
The final PAT should be attached to the root of the scene.


--J

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


Re: [osg-users] Survey: Is there interest for an OSG Users Group atITEC or I/ITSEC?

2010-02-16 Thread Jason Daly

Brett Wiesner wrote:

Hey everyone,

I know a lot of OSG users are building things in the ModSim space and I 
know that two of the bigger industry conferences are ITEC (Europe) and 
I/ITSEC (USA). I was wondering how many people from this list go to 
either of those and if there is any interest in a OSG Users Group 
meeting? I was thinking it would be a great opportunity to meet other 
OSG users. Perhaps everyone can speak a little about what they are 
building with OSG and share some of their experiences.


So, the questions are:

1) Do you go to ITEC and/ or I/ITSEC? (Please specify which one)
  


I'll be at I/ITSEC.



2) Would you go to a OSG Users Group Meeting?
  


Absolutely!

--J

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


Re: [osg-users] Pentium 4 ht vs. Core Duo - (My Mundane Observation ofthe day) Any Ideas?

2010-02-16 Thread Jason Daly

David Glenn wrote:

Hi, Sorry to trouble you on this, but I have to ask someone - to support my 
hypothesis on this issue!

I'm running Red Hat Enterprise 5.1 using a Gforce 8600 card using the latest driver from nvidia (119.52). 

I know that P4 stuff is old school and Performer is very old school! 
And there is most likely nobody else in the world that is being forced 
to do this but me, however here we go:


Up until a month ago I've been using a system that uses Core Duo system (until it cashed) and I was running a program that was running performer and basically the same program using OSG. Both where working normally - naturally OSG was working better than performer! 

Now, I'm running a P4 system (only deference is the CPU and double the memory) and the OSG using the same graphics card and the OSG version of my project is running happy but the version running Performer has slowed to a crawl when they run together.  

I ran top and found that OSG is taking up most of the CPU time making me think that OSG runs better on the Core Duo than the P4. My understanding from someone is that the P4 is not exactly a twin core but a single core using threading to behave as a two core system and the Core Duo is a true twin core system, hence OSG behaves better using the Core Duo! 

One idea that was brought up to me was to move up to a Quadro graphic card. Someone at PNY told me that it's the only card that works best under Linux for OGL.  

I know I'm going to get the Why are you doing this reaction, but that is the requirements! The user will be able to run Performer and OSG at the same time! The best answer I can come up with is use Core Duo or better but that means dumping 64 boxes! 
  



I'd make sure both the OSG and Performer apps are running 
single-threaded/single process (PFMP_APPCULLDRAW).


You can set the environment variable OSG_THREADING to SingleThreaded 
to handle the OSG app.  I couldn't find an equivalent for Performer, so 
you might have to edit the code and change/add the call to 
pfMultiprocess(PFMP_APPCULLDRAW).


Also, I remember having issues with an Nvidia driver running multiple 
contexts before.  What happens on that machine if you just run two 
copies of either program (or two copies of glxgears, for that matter).  
You can try turning off Vsync (set the __GL_SYNC_TO_VBLANK environment 
variable to 0), as I remember this helping to work around it.


I don't think getting a Quadro will help you with this problem (that's 
just PNY trying to sell you more expensive cards).  NVIDIA's Linux 
support is way better than anyone else's, for both GeForce and Quadro.


--J

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


Re: [osg-users] !Present3D GUI

2010-02-16 Thread Bruce Wheaton
On Feb 14, 2010, at 4:31, Robert Osfield robert.osfi...@gmail.com  
wrote:



Hi Bruce,

On Fri, Feb 12, 2010 at 5:49 PM, Bruce Wheaton  
br...@spearmorgan.com wrote:
The Present3D wiki asks for contributors. If it would be acceptable  
for a

GUI to be written in juce then



I'm not familiar with Juce.  Why Juce rather than other GUI toolkits?


No reason. Qt may be better. Last time I evaluated it, I found it  
counter-intuitive, cheesy looking (results) and crazy expensive - juce  
seemed the exact opposite. I'm working in juce and would be willing to  
make a version to share.


W.r.t license Present3D is GPL, while osgPresentation and the p3d
plugin that provide the bulk f the functionality are OSGPL.


I'll have to look at which parts are GPL, whether the rest is usuable  
without it.


I terms of functionality Present3D itself my plans has been to
refactor osgPresentation to provide a better object model and then
scripting on top of this, and have GUI elements that sit on top of
this for create/editing presentation objects.  The GUI elements would
be a mix of fully 3D elements using osgWidget/osgManipulator and 2D
elements such as file browsers.  Present3D is used extensively as
immersive (stereo) presentation tool, so being able to stay in fully
immersive (i.e. not 2D elements at all) is important when fine tuning
a presentation.


3d GUI is great, but my intended audience is way different - 3d on a  
large flat single screen for a medium to large passive audience. The  
creators of presentations would be working mainly in existing 2d  
tools, only dropping into 3D to make the final composition, and for  
sufficiently long periods that 3d would have to be optional in the  
interface.



I would use an offshoot of the code commerically.


If we can get the osgPresentation layer right and avoid too much
deviation ontop of this hopefully we'd be able to have a family of
presentation tools that would be pretty compatible with each other.
If some of these are commercial then great, especially if they can
drive forward the osgPresentation layer and provide better tools for
generating content.


It sounds like we have two tools but one format would work. I'll look  
through the example doc and source code when I get a chance.


Bruce



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


Re: [osg-users] Pentium 4 ht vs. Core Duo - (My Mundane Observation ofthe day) Any Ideas?

2010-02-16 Thread J.P. Delport

Hi,

Jason Daly wrote:

David Glenn wrote:


I know I'm going to get the Why are you doing this reaction, but that 
is the requirements! The user will be able to run Performer and OSG at 
the same time! The best answer I can come up with is use Core Duo or 
better but that means dumping 64 boxes!   



I'd make sure both the OSG and Performer apps are running 
single-threaded/single process (PFMP_APPCULLDRAW).


You can set the environment variable OSG_THREADING to SingleThreaded 
to handle the OSG app.  I couldn't find an equivalent for Performer, so 
you might have to edit the code and change/add the call to 
pfMultiprocess(PFMP_APPCULLDRAW).


Also, I remember having issues with an Nvidia driver running multiple 
contexts before.  What happens on that machine if you just run two 
copies of either program (or two copies of glxgears, for that matter).  
You can try turning off Vsync (set the __GL_SYNC_TO_VBLANK environment 
variable to 0), as I remember this helping to work around it.


I don't think getting a Quadro will help you with this problem (that's 
just PNY trying to sell you more expensive cards).  NVIDIA's Linux 
support is way better than anyone else's, for both GeForce and Quadro.


you can also try fiddling with the cpu affinity of the OSG threads. 
AFAIK in single threaded mode OSG would take CPU0 for rendering and move 
the databasepager to CPU1.


See this:
http://thread.gmane.org/gmane.comp.graphics.openscenegraph.user/52734

Also grep the OSG code for setProcessorAffinity.

jp



--J

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



--
This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. 
The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html.


This message has been scanned for viruses and dangerous content by MailScanner, 
and is believed to be clean.  MailScanner thanks Transtec Computers for their support.


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


Re: [osg-users] monitoring OpenGL memory usage

2010-02-16 Thread J.P. Delport

Hi,

Paul Martz wrote:
OpenGL can generate this error if it runs out of memory for any reason, 
either GPU or host RAM. This means the problem isn't necessarily caused 
by graphics. If you've nearly exhausted system RAM in your simulation or 
GUI or whatever, and there's not enough host RAM left to process even 
the simplest of OpenGL calls, then you get GL_OUT_OF_MEMORY.


If you're on 32bit Windows, you're limited to 2GB of memory per process, 
so first thing to do would be to look at your process size.


If that looks normal, then using something like GLIntercept / GLTrace / 
BuGLe / whatever will tell you which OpenGL command is triggering the 
error, which may or may not shed some light on the issue. I believe 
there's also a way to have OSG call glGetError() during every 
StateAttribute::apply(), which would give you more fine grained error 
checking, but is really no substitute for a tool like GLIntercept.

   -Paul


you can also try glsldevil for call trace
http://www.vis.uni-stuttgart.de/glsldevil/

or maybe play with the new *POOL* variables in OSG, e.g. 
OSG_TEXTURE_POOL_SIZE.


jp





Cory Riddell wrote:

I'm getting the infamous Warning: detected OpenGL error 'out of memory'
after RenderBin::draw(,) message.

Any advice on handling this? My scene isn't very big (maybe 150,000
vertices) and my machine has 3 GB of RAM. Do you monitor or profile
memory usage to dynamically tune your application's display? If I knew
when I was getting close to exhausting the OpenGL pool, I could
re-tesselate to come up with lower resolution models.

Cory
___
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



--
This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. 
The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html.


This message has been scanned for viruses and dangerous content by MailScanner, 
and is believed to be clean.  MailScanner thanks Transtec Computers for their support.


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