[osg-users] RTT and Shaders using vertex attribute aliasing

2018-03-16 Thread Paul Pocock

Hi all,

I have a simple RTT setup. works great but when I setup OSG to turn on 
the vertex attribute aliasing and allow OSG to provide gl_ inputs via 
the osg_ prefix my shader breaks. No errors. Can't even get a red colour 
on my test quad.


Can anyone see what I'm doing wrong? Can I still use glFragData?


vert:

#version 430 compatibility
layout (location = 1) in vec3 Position;
layout (location = 0) in vec2 TexCoord;


uniform mat4 osg_ModelViewMatrix;
uniform mat4 osg_ModelViewProjectionMatrix;
uniform vec4 osg_Vertex;

in float time;

void main() {

 gl_Position = osg_ModelViewProjectionMatrix * osg_Vertex;

}


frag:

//test

#version 430 compatibility
void main() {

gl_FragData[0] = vec3(1.0,0.0,0.0,0.0);

}

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


Re: [osg-users] Correct way to modify scene graph [SEC=UNCLASSIFIED]

2017-11-08 Thread Paul Pocock

Hi Russell,

I suppose setting the threading model to SingleThreaded is not an 
option, maybe set Root Node to DYNAMIC variance? I can't remember the 
actual call.


good luck,


On 09/11/17 14:49, Thamm, Russell wrote:


*UNCLASSIFIED*

Hi

I am in the process of porting an MFC application from plib to osg.

Currently, if I want to actually modify the scene graph (adding, 
deleting nodes etc) while the render thread is running I do the following:


parentNode->setNodeMask(0);

modify scene graph below parent node

parentNode->setNodeMask(~0);

This seems to work but is there a better way?

Cheers

Russell

*IMPORTANT*: This email remains the property of the Department of 
Defence and is subject to the jurisdiction of section 70 of the Crimes 
Act 1914. If you have received this email in error, you are requested 
to contact the sender and delete the email.




___
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] Lookup texture coordinate issue

2014-05-17 Thread Paul Pocock

It's sorted.My tex coordinate generation was wrong.. :P


On 17/05/14 09:50, Paul Pocock wrote:

Hi,

I have a 4x4 float texture containing positions ranging from 0 ..10.
I have a lookup float texture a 64x64x64 packed as a 2D texture 
64x4096 containing some vectors in each texel.


the 64x64x64 is packed into a 64x4096 2d image:

data[y * height + z+0] = value;
data[y * height + z+1] = value;
data[y * height + z+2] = value;
data[y * height + z+3] = value;


I wish to use the value from the 4x4 texture as a lookup into my 
64x4096 texture.
However when I try to generate texture coords to lookup into my vector 
texture I just get garbage.


Here is how I am generating tex coords:
width=64, height=4096


//get our position
vec2 texCoord = gl_TexCoord[0].xy;
vec4 position = texture2D(positions, texCoord);

//generate tex coords
float u = (float(position.x * width))/width ;
float v = float( position.y * height + position.z)/height ;

vec4 vector = texture2D(noise, vec2(u,v));

It seems correct way to index into my LUT.Does anyone know what I'm 
doing wrong?

Regards
P

___
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] Lookup texture coordinate issue

2014-05-16 Thread Paul Pocock

Hi,

I have a 4x4 float texture containing positions ranging from 0 ..10.
I have a lookup float texture a 64x64x64 packed as a 2D texture 64x4096 
containing some vectors in each texel.


the 64x64x64 is packed into a 64x4096 2d image:

data[y * height + z+0] = value;
data[y * height + z+1] = value;
data[y * height + z+2] = value;
data[y * height + z+3] = value;


I wish to use the value from the 4x4 texture as a lookup into my 64x4096 
texture.
However when I try to generate texture coords to lookup into my vector 
texture I just get garbage.


Here is how I am generating tex coords:
width=64, height=4096


//get our position
vec2 texCoord = gl_TexCoord[0].xy;
vec4 position = texture2D(positions, texCoord);

//generate tex coords
float u = (float(position.x * width))/width ;
float v = float( position.y * height + position.z)/height ;

vec4 vector = texture2D(noise, vec2(u,v));

It seems correct way to index into my LUT.Does anyone know what I'm 
doing wrong?

Regards
P

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


[osg-users] Transform Feedback

2014-04-23 Thread Paul Pocock
Hi,  Has Transform feedback been integrated into OSG? Are there any 
examples around that anyone knows about?

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


Re: [osg-users] FBO - Write to texture array using sampleBuffer

2014-04-17 Thread Paul Pocock

Had it worked out - Thanks for your reply though :)


On 17/04/14 18:14, Robert Osfield wrote:

Hi Paul,

The way to bind a texture to the output of shader is to use an FBO.

Robert,

On 19 March 2014 11:44, paul cooper paul.ta...@internode.on.net wrote:

Hi all,

I would like to use shaders - especially a sampleBuffer to write to a floating 
point texture containing data. Do I have to setup an FBO and attach it to a 
camera? Is there another way to write to a buffer using shaders besides using 
an FBO?

Regards

Paul

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





___
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 mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Question about osgmultiplerendertargets

2014-04-04 Thread Paul Pocock

Hi
Am I assuming correctly that the image and texture in createScene() is 
using COLOR_BUFFER0 that is written to by the shaders set up in 
createRTTQuad?  I tested by loading an image in createRTTQuad and 
texturing that quad_geom. I printed out data from the image and it 
always the same constant value for the whole image. I assumed my loaded 
texture would be written to the texture that was set up to render to.

Am I missing something?

Regards




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


Re: [osg-users] Question about osgmultiplerendertargets

2014-04-04 Thread Paul Pocock

Sorry my bad - it was the texure coordinates :P


On 05/04/14 09:40, Paul Pocock wrote:

Hi
Am I assuming correctly that the image and texture in createScene() is 
using COLOR_BUFFER0 that is written to by the shaders set up in 
createRTTQuad?  I tested by loading an image in createRTTQuad and 
texturing that quad_geom. I printed out data from the image and it 
always the same constant value for the whole image. I assumed my 
loaded texture would be written to the texture that was set up to 
render to.

Am I missing something?

Regards




___
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] Floating point FBO Instancing texture

2014-04-02 Thread Paul Pocock

Hi all,

I'm instancing geometry using a floating point texture containing 
worldspace positions. The position texture and instancing work. 
Resolution is constant at 1024x768



Now I'm trying to use a FBO (pre-render) to write to a position texture 
and use that in the instancing shader (It will later be used for 
updating positions)

It doesn't work..
I'm using the exact same data in the FBO texture cos I'm passing the 
original floating point texture into the fbo shader and setting 
gl_FragData[0]. The instance shaders are simple and take the FBO texture.



I am not familiar with fbo's. Should I set the RTT camera with a scene? 
is there another way to write to images using shaders without fbo's?


I'm calling dirty() on the image with a callback (not sure if necessary 
with FBO)


Have included code below for the main setup and important shader fbo pass.

Thanks for any help..
P


vertex
--


passthrough vert shader



fragment


#version 400 compatibility

uniform sampler2D positionTexture;
uniform float time;

void main(void)
{
vec4 position = texture2D(positionTexture, gl_TexCoord[0].xy);
gl_FragData[0] = position;
}



Main setup:
---

positionimage = create2DImage(Positions.tiff);
updatepositionimage = create2DImage(Positions.tiff);

//Textures used in
positionTexture = createFloatTexture(positionimage-s(), 
positionimage-t());
newPositionTexture = createFloatTexture(updatepositionimage-s(), 
updatepositionimage-t());



rttCamera = createRTTCamera( positionimage-s(), positionimage-t());
//Textures sent to the instancing shader
rttCamera-attach( osg::Camera::COLOR_BUFFER0, positionTexture );
rttCamera-attach( osg::Camera::COLOR_BUFFER1, directionTexture);


rttCamera-addChild( scene );


Creating RTT Camera:
-



osg::Camera* createRenderTTCamera( int width, int height )
{
osg::ref_ptrosg::Camera camera = new osg::Camera;
camera-setClearColor( osg::Vec4(0.5,0.5,0.5,1.0) );
camera-setClearMask( GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT );
camera-setRenderTargetImplementation( 
osg::Camera::FRAME_BUFFER_OBJECT );

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

camera-setViewport( 0, 0, width, height);


  return camera.release();
}



Creating FBO texture:
-



osg::Texture2D* createFBOFloatTexture(unsigned int width, unsigned int 
height)

{
osg::ref_ptrosg::Texture2D texture = new osg::Texture2D;
texture-setTextureSize( width, height );
texture-setDataVariance(osg::Object::DYNAMIC);
texture-setWrap(osg::Texture2D::WRAP_S, osg::Texture2D::REPEAT);
texture-setWrap(osg::Texture2D::WRAP_T, osg::Texture2D::REPEAT);
texture-setFilter(osg::Texture2D::MIN_FILTER,osg::Texture2D::NEAREST);
texture-setFilter(osg::Texture2D::MAG_FILTER,osg::Texture2D::NEAREST);
texture-setInternalFormat( GL_RGBA32F_ARB );
texture-setSourceFormat( GL_RGBA );
texture-setSourceType( GL_FLOAT );
texture-setResizeNonPowerOfTwoHint(false);
return texture.release();
}




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


[osg-users] osgShadow needs osg::LightSource?

2013-11-13 Thread Paul Pocock

Hi all,
Am just getting into osgShadow and was wondering do I have to add an 
osg::LightSource to my scene to generate shadows? Is it not possible to 
just give a Vec3 light position to ShadowMap or ShadowedScene?


Regards
Paul


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


Re: [osg-users] How to add shadows to deferred shading?

2013-10-27 Thread Paul Pocock

Hi Michael,

Great work, I ended up using osgShadow in my deferred rendering 
implementation. It would be great if we could get your work into the OSG 
as an example of deferred rendering/shadowing using GLSL.


Regards
Paul

On 27/10/13 23:09, michael kapelko wrote:

I decided to simply use more suitable geometry for shadows.
The result: http://youtu.be/-63E6SKsMo0


2013/10/27 michael kapelko korn...@gmail.com mailto:korn...@gmail.com

Hi.
I finally came up with the way to use OSG shadows in deferred
shading. Since ShadowedScene produces the result in Screen space
(same as other G-buffers), I can simply use it like a texture with
shadows in Screen space.
This is what I got: http://youtu.be/EzPe5dVwWrs

But looking at the incorrectly shadowed walls, I think I should
not simply multiply shadow color with diffuse one, but instead
check brightness and only multiply if it's high enough.

Thanks.


2013/10/25 michael kapelko korn...@gmail.com
mailto:korn...@gmail.com

Hi.
I've decided to try to take shadow map from
osgShadow::ShadowMap. I've derived own ShadowMap class to
access the shadow texture: http://goo.gl/M3o04y
I display it, but it's completely white. I tried to place the
light nearer to the moving objects (even at the same height),
but the texture is still white.
What am I doing wrong?
Thanks.


2013/10/21 michael kapelko korn...@gmail.com
mailto:korn...@gmail.com

Hi.
Can the third bug be related to different view projection
matrices? My shadow camera uses ortho.
Thanks.


2013/10/21 Marcel Pursche
marcel.purs...@student.hpi.uni-potsdam.de
mailto:marcel.purs...@student.hpi.uni-potsdam.de

Hi,

the shadow on the wall is probably created, because
the wall is outside of the shadow cameras view
frustum. How do you setup the wrapping of your depth
texture? You could fix it, if you set the mode to
clamp to border and set the border color to your far
plane. This way everything that cannot be seen from
your light source will not be shadowed(as in is
outside of the view frustum).
The shadow on your torus looks like a self shadowing
problem. You will always have some errors because of
the limited floating point precision. You should use a
small offset in your depth comparison to get rid of
this artifacts. A bit of tweaking will be necessary to
get a good value.
The last bug is indeed a bit strange. I'm not sure how
it is produced. But it is view dependent, so it must
have to do something with the view matrix of your main
camera.

Thank you!

Cheers,
Marcel

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





___
osg-users mailing list
osg-users@lists.openscenegraph.org
mailto: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 mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] osgAnimation - Seperate animations from keyframe ranges

2013-10-13 Thread Paul Pocock
Hi all - I have grouped my animations in one long sequence using 3ds 
2010 but would like to seperate these out in OSG as named seperate 
animations based on a start stop key frame value . Is this possible to 
do using osgAnimation?


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


Re: [osg-users] VPB calculating sub-tile lat/lon

2013-04-08 Thread Paul Pocock

Thanks Robert,

I found if I add the args  --cs +proj=latlong +datum=WGS84 I can store 
that info per tile. I'll see if that may get results..


Thanks again for your help


Best Regards
Paul



On 04/08/2013 06:35 PM, Robert Osfield wrote:

Hi Paul,

I haven't ever tried to work out the lat/long extents of tiles of an 
built paged database, and while VirtualPlanetBuilder (VPB) obviously 
computes these extents they aren't stored explictly with the 
osgTerrain tiles.  However, with an osgTerrain::TerrainTile based 
database (which is now the default one generated by VPB) the 
TileLocator (attached to the TerrainTile) provides the details of how 
it converts the local normalized units (0 to 1 range across the tile) 
into final coordinate frame so it'd effectively provide the means for 
computing this extents so have a look at it.


Robert.



On 8 April 2013 00:50, Paul Pocock paul.ta...@internode.on.net 
mailto:paul.ta...@internode.on.net wrote:


Hi all, I was wondering what would be the best way to get the
lat/lon extents of subtiles in Virtualplanetbuilder?  I have a
geocentric database and want to read the upper left and lower
right lat/lon of the highest LOD tiles in the quadtree. Would I
need to use the CoordinateSystemNode in some way?

Best Regards

Paul
___
osg-users mailing list
osg-users@lists.openscenegraph.org
mailto: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 mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] VPB calculating sub-tile lat/lon

2013-04-07 Thread Paul Pocock
Hi all, I was wondering what would be the best way to get the lat/lon 
extents of subtiles in Virtualplanetbuilder?  I have a geocentric 
database and want to read the upper left and lower right lat/lon of the 
highest LOD tiles in the quadtree. Would I need to use the 
CoordinateSystemNode in some way?


Best Regards

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


Re: [osg-users] Osgdem bathymetry problem

2013-01-11 Thread Paul Pocock

Thanks Sebastion -  will try when I get home..

Thanks again



On 01/11/2013 06:52 PM, Sebastian Messerschmidt wrote:

Hi Paul,

any easy workaround is to put your elevation and/or imagery into 
separate directories and use them as parameters.


cheers
Sebastian

Hi all,
I'm trying to compile blue marble terrain and bathymetry data from 
two seperate files however its always the last data entered on the 
command-line that is getting compiled. I thought anything after -d 
would contribute..  the command I'm using is:



Osgdem -d bm-bath-geo.tif bm-srtm-geo.tif -v 10. -l 6 -o world.I've

Does anyone have a suggestion or if anyone has compiled multiple data 
sources show me the correct array of commands?


Thanks
Paul
___
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::Particle in shader get/set geometry [SEC=UNCLASSIFIED]

2010-09-22 Thread Paul Pocock
Cool,  thanks Robert. May have to keep an eye on the latest dev release
page from now on.

Regards.


On 09/22/2010 06:26 PM, Robert Osfield wrote:
 Hi Paul,

 In the OpenSceneGraph-2.9.9 dev release, and svn/trunk there is work
 by Wang Rui on osgParticle this provides support for using shaders
 with particles systems, there is also an example osgparticleshader
 that will illustrate how to use it.

 Robert.

 On Wed, Sep 22, 2010 at 5:49 AM, Paul Pocock
 paul.poc...@dsto.defence.gov.au wrote:
   
 Hi -just a quick one - Im delving into osg::Particle at the moment and I
 wish to do some glsl processing on the geometry or whatever particle
 template is used. Is this trivial ? and is there a way to set/get the
 drawables in an osg Particle system?

 Regards

 IMPORTANT: This email remains the property of the Department of Defence and 
 is subject to the jurisdiction of section 70 of the Crimes Act 1914. If you 
 have received this email in error, you are requested to contact the sender 
 and delete the email.
 ___
 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 mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] osg::Particle in shader get/set geometry [SEC=UNCLASSIFIED]

2010-09-21 Thread Paul Pocock
Hi -just a quick one - Im delving into osg::Particle at the moment and I
wish to do some glsl processing on the geometry or whatever particle
template is used. Is this trivial ? and is there a way to set/get the
drawables in an osg Particle system?

Regards

IMPORTANT: This email remains the property of the Department of Defence and is 
subject to the jurisdiction of section 70 of the Crimes Act 1914. If you have 
received this email in error, you are requested to contact the sender and 
delete the email.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Compute Terrain Intersection for .flt databases[SEC=UNCLASSIFIED]

2010-09-07 Thread Paul Pocock
Thanks Robert/Shayne,  turns out I was computing HAT correctly but was
using wrong texture filtering ( I store the positions in a texture ).
thus the computed heights were displayed incorrectly in the vert shader.

Thanks again.


On 09/08/2010 12:27 AM, Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC
wrote:
 Paul,

 For HAT, you only need one point. LOS requires a start and end point. Both
 require that the points be specified in the database coordinates (i.e.
 geocentric Cartesian coordinates for round earth databases).

 I haven't worked with .flt databases but the osgSim methods appear to work
 for paged databases built by VPB...

 -Shayne

 -Original Message-
 From: osg-users-boun...@lists.openscenegraph.org
 [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Paul Pocock
 Sent: Thursday, September 02, 2010 11:06 PM
 To: osg-users@lists.openscenegraph.org
 Subject: [osg-users] Compute Terrain Intersection for .flt
 databases[SEC=UNCLASSIFIED]

 Hi - Whats the best way to get the z down intersect point onto a paged
 database. I'm getting what looks like loss of precision errors. I am not
 sure if it is because I am using  osgUtil::IntersectVisitor (Which I
 believe is deprecated?) or my lack of knowledge of
 osgSim::HeightAboveTerrain. Is it my proper understanding that I provide
 two points x,y,z (beginning and end) for HAT? Even doing this gives some
 very strange results... Is there a very basic example out there to
 achieve this? Is it a trivial problem?

 Regards
 Paul



 IMPORTANT: This email remains the property of the Department of Defence and
 is subject to the jurisdiction of section 70 of the Crimes Act 1914. If you
 have received this email in error, you are requested to contact the sender
 and delete the email.
 ___
 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 mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Compute Terrain Intersection for .flt databases [SEC=UNCLASSIFIED]

2010-09-02 Thread Paul Pocock
Hi - Whats the best way to get the z down intersect point onto a paged
database. I'm getting what looks like loss of precision errors. I am not
sure if it is because I am using  osgUtil::IntersectVisitor (Which I
believe is deprecated?) or my lack of knowledge of
osgSim::HeightAboveTerrain. Is it my proper understanding that I provide
two points x,y,z (beginning and end) for HAT? Even doing this gives some
very strange results... Is there a very basic example out there to
achieve this? Is it a trivial problem?

Regards
Paul



IMPORTANT: This email remains the property of the Department of Defence and is 
subject to the jurisdiction of section 70 of the Crimes Act 1914. If you have 
received this email in error, you are requested to contact the sender and 
delete the email.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] VBO's and geometry instancing [SEC=UNCLASSIFIED]

2010-08-03 Thread Paul Pocock
Thanks for the reply Paul, Turns out my billboarding calculations in the
vertex shader were screwing everything up. Works fine now.

Regards




On 08/03/2010 11:32 PM, Paul Martz wrote:
 Paul Pocock wrote:
 Hi,

 Are there any caveats to be mindful of when trying to implement
 instancing using VBO's?

 I'm using a static tri stored in a VBO - however I'm facing massive
 bottlenecks in the frag shader - with obvious fillrate
 issues dragging my frames down drastically.  and I can't see any obvious
 state changes that could affect this. I'm using Nvidia 8800GTX with
 latest drivers and I'm not dropping into software mode at all. Do I have
 to set up my program so I populate my vbo with texture data? or am I
 fine with the standard setup - the OSG should be able to handle that for
 me shouldn't it? 

 When you say instancing do you mean you're using the draw instanced
 feature, or you're using multiparenting?

 Because display lists are now deprecated, I use buffer objects for
 most everything these days, and never experience a fill bottleneck,
 neither with the draw instanced feature, nor with multiparenting.

 Does the problem go away when you change from using buffer objects to
 using display lists?

 Does the problem go away when you change your scene graph to render N
 copies of your object, rather than N instances?



IMPORTANT: This email remains the property of the Department of Defence and is 
subject to the jurisdiction of section 70 of the Crimes Act 1914. If you have 
received this email in error, you are requested to contact the sender and 
delete the email.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] VBO's and geometry instancing [SEC=UNCLASSIFIED]

2010-08-02 Thread Paul Pocock
Hi,

Are there any caveats to be mindful of when trying to implement
instancing using VBO's?

I'm using a static tri stored in a VBO - however I'm facing massive
bottlenecks in the frag shader - with obvious fillrate
issues dragging my frames down drastically.  and I can't see any obvious
state changes that could affect this. I'm using Nvidia 8800GTX with
latest drivers and I'm not dropping into software mode at all. Do I have
to set up my program so I populate my vbo with texture data? or am I
fine with the standard setup - the OSG should be able to handle that for
me shouldn't it? 

Regards

Paul

IMPORTANT: This email remains the property of the Department of Defence and is 
subject to the jurisdiction of section 70 of the Crimes Act 1914. If you have 
received this email in error, you are requested to contact the sender and 
delete the email.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] OSG Uniform Array Setup [SEC=UNCLASSIFIED]

2010-07-26 Thread Paul Pocock
Hi All,

I've been trying out geometry instancing however am experiencing OpenGL
errors. I'm using NV 8800GTX with
latest 256.35 Linux drivers so it should work. I am thinking it is my
set up. I have set up everything correctly
as per osgdrawinstanced example so i'm thinking it is the way I'm
passing the uniform to the shader? maybe the
use of Vec4Array? If someone could pass a casual eye over the relevant
code below and see something noticeable
 I would be grateful.

I was also wondering if it is a driver bug - if there are alternate
solutions to pass array data to
the vertex shader? - Regards

//Set up


osg::ref_ptrosg::Vec4Array m_positions = new osg::Vec4Array;

// Fill up the Array etc ... size: 10
//v-push_back(osg::Vec4(position,1.0));

osg::Uniform* centres = new osg::Uniform( centres, m_positions );
osg::Uniform* centres = new osg::Uniform();
centres-setName(centres);
centres-setType(osg::Uniform::FLOAT_VEC4);
centres-setNumElements(m_positions-size());

stateset-addUniform(centres);



  //Vertex shader

uniform vec4[10] centres;




vec3 centre = centres[gl_InstanceID].xyz;

vec3 pos = gl_Vertex + centre;

gl_Position = gl_ModelViewProjectionMatrix * vec4(pos,1.0);

IMPORTANT: This email remains the property of the Department of Defence and is 
subject to the jurisdiction of section 70 of the Crimes Act 1914. If you have 
received this email in error, you are requested to contact the sender and 
delete the email.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Reading/Writing osg::Image data [SEC=UNCLASSIFIED]

2010-06-23 Thread Paul Pocock
Thanks Ulrich, I eventually got it going, posting for reference:
Size I allocated was the issue.

Regards



Reading:
===

unsigned char* data = new unsigned char[texSize*texSize*texSize*4];
   
std::ifstream fin(filename.c_str(),std::ios::in | std::ios::binary);
   
fin.read((char*)data ,(texSize*texSize*texSize*4));

fin.close();
   
osg::ref_ptrosg::Image image = new osg::Image;
 image-setImage(texSize, texSize, texSize,4, GL_RGBA,
L_UNSIGNED_BYTE,data,osg::Image::USE_NEW_DELETE);


Writing:
=

 std::ofstream fout
(data/textures/image3d/imagedata3d_128,std::ios::app | std::ios::out |
std::ios::binary);
  
 unsigned int size = image-getTotalSizeInBytesIncludingMipmaps();
 fout.write( (char*)image-data(), size );

// Check
if ( fout.fail() )
std::coutFailed to write image-datastd::endl;
   
fout.close();





On 06/24/2010 12:21 PM, Ulrich Hertlein wrote:
 Hi Paul,

 On 23/06/10 11:53 , Paul Pocock wrote:
   
 I'm trying to write 3d texture data to file but when loading back into
 osg::Image I'm getting rubbish:

 Writing to file with 3d texture data:

 unsigned int size = image-getTotalSizeInBytesIncludingMipmaps();
 fout.write( (char*)image-data(), size );


 Reading from file:

 unsigned char* data = new unsigned char[texSize*texSize*texSize*4];
 std::ifstream fin(image3ddata2,std::ios::binary);

 fin.read((char*)data ,(sizeof(unsigned char)* 4 * texSize * texSize *
 texSize));

 osg::ref_ptrosg::Image image = new osg::Image;
 image-setImage(texSize,texSize,texSize,4, GL_RGBA,
 GL_UNSIGNED_BYTE,data, osg::Image::USE_NEW_DELETE);


 Can anyone see anything I'm doing wrong? Either Writing or Reading?
 
 I cannot spot anything obviously wrong with the code.
 Can you check if the file on disk is okay, so that either part (writing or 
 reading) can be
 ruled out?

 I'd also try to set the memory to some pattern before reading, in case the 
 file isn't
 fully read or something.

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


IMPORTANT: This email remains the property of the Department of Defence and is 
subject to the jurisdiction of section 70 of the Crimes Act 1914. If you have 
received this email in error, you are requested to contact the sender and 
delete the email.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Reading/Writing osg::Image data [SEC=UNCLASSIFIED]

2010-06-22 Thread Paul Pocock
Hi All,

I'm trying to write 3d texture data to file but when loading back into
osg::Image I'm getting rubbish:

Writing to file with 3d texture data:

unsigned int size = image-getTotalSizeInBytesIncludingMipmaps();
fout.write( (char*)image-data(), size );


Reading from file:

unsigned char* data = new unsigned char[texSize*texSize*texSize*4];
std::ifstream fin(image3ddata2,std::ios::binary);
   
fin.read((char*)data ,(sizeof(unsigned char)* 4 * texSize * texSize *
texSize));
   
osg::ref_ptrosg::Image image = new osg::Image;
image-setImage(texSize,texSize,texSize,4, GL_RGBA,
GL_UNSIGNED_BYTE,data, osg::Image::USE_NEW_DELETE);


Can anyone see anything I'm doing wrong? Either Writing or Reading?

Best Regards

Paul

IMPORTANT: This email remains the property of the Department of Defence and is 
subject to the jurisdiction of section 70 of the Crimes Act 1914. If you have 
received this email in error, you are requested to contact the sender and 
delete the email.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Sec:u Re: GPU Monitoring for OSG

2009-07-21 Thread Paul Pocock
I integrated NVPerf a while ago - I'll upload it sometime .. needs
cleaning up

IMPORTANT: This email remains the property of the Australian Defence 
Organisation and is subject to the jurisdiction of section 70 of the CRIMES ACT 
1914.  If you have received this email in error, you are requested to contact 
the sender and delete the email.

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


[osg-users] Sec:u osgEphemeris Horizon sky shading missing?

2009-07-14 Thread Paul Pocock
Hi - I'm interested in hearing from anyone who uses osgEphemeris in any
of their projects and if they have noticed that the horizon sky shading
or the light properties which bend around corners feature is now broken ?
I'm using SuSe 11.1 and Nvidia 180.51 with OSG 2.8.0, the last time I
noticed it working was with OSG 2.2.0 but haven't gone back to confirm.

Would be interested to know if this is working for others..

Best Regards
Paul


IMPORTANT: This email remains the property of the Australian Defence 
Organisation and is subject to the jurisdiction of section 70 of the CRIMES ACT 
1914.  If you have received this email in error, you are requested to contact 
the sender and delete the email.

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


[osg-users] osgViewer::Viewer Thread Handle

2009-06-29 Thread Paul Pocock
Hi Everyone,

Just a quick one,I want to set up a flag where you can assign cpu
affinity for the cull, draw, update threads.
Is there a way I can get a handle on these threads? is there a
getDrawThread method?


Best Regards
Paul

IMPORTANT: This email remains the property of the Australian Defence 
Organisation and is subject to the jurisdiction of section 70 of the CRIMES ACT 
1914.  If you have received this email in error, you are requested to contact 
the sender and delete the email.

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


Re: [osg-users] 64/32 bit ?

2009-05-20 Thread Paul Pocock
Thanks Dimi, I had done that - unfortunately by default ccmake loads all 
the 64 bit libs by default, it would be better I think if you could 
specify a flag like --Build-32bit so it will search for 32 bit libs 
(if installed) on a 64 bit machine. Would be good if it could set the 
LIB_POSTFIX to 32 which I believe will create a lib32 in install dir?  
Further investigation will tell

Thanks

Paul



dimi christop wrote:
 Hi,
 Fire up cmake . and specify in the compile and linking options the -m32 flag.
 -m32 specifies that the exe and libs should be 32 bit.

 Dimi



 - Original Message 
 From: Internode paul.ta...@internode.on.net
 To: OpenSceneGraph Users osg-users@lists.openscenegraph.org
 Sent: Wednesday, May 20, 2009 1:55:58 PM
 Subject: [osg-users] 64/32 bit ?


 How can you reliably specify a 32 bit build on a 64 bit platform in cmake? 
 Have tried but can't find any flags. Sorry should post on cmake forums.

 Best Regards
 Paul

 ___
 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

   


IMPORTANT: This email remains the property of the Australian Defence 
Organisation and is subject to the jurisdiction of section 70 of the CRIMES ACT 
1914.  If you have received this email in error, you are requested to contact 
the sender and delete the email.

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


[osg-users] osgEphemeris skyDome issue

2009-04-27 Thread Paul Pocock
Sorry for posting this here on osg-users, the osgEphemeris List is 
rather quiet.

My understanding was that the skyDome centre would always be the camera 
eye point - however
having tried  setSkyDomeCenter at init and calling it every frame the 
user can still traverse outside the skydome.
Perhaps this is normal behaviour?

Trying to set the skyDomeRadius to some massive figure just introduces 
culling problems.

Has anyone else has had this problem?

Best Regards
Paul

















IMPORTANT: This email remains the property of the Australian Defence 
Organisation and is subject to the jurisdiction of section 70 of the CRIMES ACT 
1914.  If you have received this email in error, you are requested to contact 
the sender and delete the email.

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


Re: [osg-users] graph visualization tools?

2009-03-24 Thread Paul Pocock
I had something like this  - it was crude but had functionality not 
unlike Performers graph viz tool ,however I stored relevant info in 
osg::Node, Not getting too far into implementation details - I had to 
run two nodeVisitors - One to gather info on the scenegraph and the 
other to build and display it nicely on the screen.  Pic is from an 
earlier OSG 2.1.9 version, haven't altered 2.8.0 to cater for graph 
visualization.



Paul Martz wrote:
 The tool I had for that was kind of cool because it actually used 3D
 sphereoids and osgText labels, so you could spin the resulting graphs around
 in 3-space with the cool cube mapping and it looked quite impressive.
 Unfortunately, the tool was somewhat limiting; the graphs you see in the
 book are quite simple and that's a reflection of the tool's limitations.
 Making it as general-purpose as GraphViz would've really taken a lot of
 work. What I'd really like to see is a plugin interface to GraphViz that
 would let me draw my own graph nodes, labels, and arrows.

 Paul Martz
 Skew Matrix Software LLC
 http://www.skew-matrix.com
 +1 303 859 9466

 -Original Message-
 From: osg-users-boun...@lists.openscenegraph.org
 [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Cory
 Riddell
 Sent: Tuesday, March 24, 2009 2:25 PM
 To: OpenSceneGraph Users
 Subject: [osg-users] graph visualization tools?

 I am about to write a little Python tool for myself to take an osg file,
 extract basic node information, and create a .dot file for graphviz. I want
 very simple tree diagrams like Paul Martz made in the quick start guide (he
 had green, yellow, and pink ovals for nodes).

 I'm guessing this is something that might already be floating around out
 there but I haven't been able to find it. If you know of such a tool, I
 would appreciate a link to it.

 Thanks,
 Cory Riddell
 ___
 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

   


IMPORTANT: This email remains the property of the Australian Defence 
Organisation and is subject to the jurisdiction of section 70 of the CRIMES ACT 
1914.  If you have received this email in error, you are requested to contact 
the sender and delete the email.


inline: graph.jpg___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Loading Particle Effect from file Problem

2009-02-18 Thread Paul Pocock
HI all,

I was wondering if anyone has had this problem and if so what was their 
solution.
I have a particle system loading from sn .osg file, attach it to a 
transform and add a NodeVisitor callback to the transform.
Unfortuately The Particle System does not like it.

There is an article on this here:
http://faculty.nps.edu/jasullivan/osgTutorials/osgParticleHelper.htm

The solution refered to here unfortuately does not work.

Any ideas ? would be great to load particles from an .osg file!





IMPORTANT: This email remains the property of the Australian Defence 
Organisation and is subject to the jurisdiction of section 70 of the CRIMES ACT 
1914.  If you have received this email in error, you are requested to contact 
the sender and delete the email.


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


Re: [osg-users] Another Viewer/CompositeViewer Question

2009-01-29 Thread Paul Pocock
Many Thanks again Robert ...  


Robert Osfield wrote:
 Hi Paul,

 On Thu, Jan 29, 2009 at 4:10 AM, Paul Pocock
 paul.poc...@dsto.defence.gov.au wrote:
   
 Am I to assume correctly that osgViewer::Viewer (slave cameras) as
 opposed to CompositeViewer is more appropriate for a cave or powerwall
 environment?
 

 This is correct.  Although you could have a CompositeViewer that has
 View with slaves which render a cave/powerwall, and another View that
 render in insert into it, or a side display.  All the slave
 functionaity in Viewer comes from osg::View, so it's all identical to
 what CompositeViewer can do, except the later can do one or many of
 them.

 In you case Viewer is probably sufficient for your needs, but even if
 you did end up using CompositeViewer, the apporpriate thing to do
 would still be use a View containing slave cameras for a
 cave/powerwall setup so this part wouldn't change.


   
 Do the slave cameras inherit the master cameras ProjectionMatrix/View
 Frustrum or do these need to be setup independently?
 

 The can do both.  But default the slave cameras will inherit the part
 projection and view matrix, then multiply these by the offset matrices
 that you pass in when you add slaves.  You can mix and match different
 types of slaves as well - for instance the
 osgViewer::View::setUpViewAs3DSpehericalDisplay has six RTT slave
 Camera that render to a cube map that are relative to the master
 Camera, and then one post render slave Camera that works in absolutely
 reference frame which does the final distortion correction render
 using the cube map.  The Camera::setReferanceFrame(..) method on the
 slave controls where the salve inherits the view and project matrix or
 not.

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

   


IMPORTANT: This email remains the property of the Australian Defence 
Organisation and is subject to the jurisdiction of section 70 of the CRIMES ACT 
1914.  If you have received this email in error, you are requested to contact 
the sender and delete the email.


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


Re: [osg-users] Another Viewer/CompositeViewer Question

2009-01-29 Thread Paul Pocock
So If I share a graphicsContext across all my slave cameras and update 
the main cameras Frustrum and Viewport each frame, I don't have to 
manually set the slave cameras Frustrum and Viewport as well ?  is this 
done automatically?  So if I fire off the master camera (Renderer)  Then 
the slaves will Render the same view with the same Frustrum projection 
and with the same viewport?

This question relates to using slave cameras on a cluster with osgViewer 
as the main rendering window

Regards
Paul


Robert Osfield wrote:
 Hi Paul,

 On Thu, Jan 29, 2009 at 4:10 AM, Paul Pocock
 paul.poc...@dsto.defence.gov.au wrote:
   
 Am I to assume correctly that osgViewer::Viewer (slave cameras) as
 opposed to CompositeViewer is more appropriate for a cave or powerwall
 environment?
 

 This is correct.  Although you could have a CompositeViewer that has
 View with slaves which render a cave/powerwall, and another View that
 render in insert into it, or a side display.  All the slave
 functionaity in Viewer comes from osg::View, so it's all identical to
 what CompositeViewer can do, except the later can do one or many of
 them.

 In you case Viewer is probably sufficient for your needs, but even if
 you did end up using CompositeViewer, the apporpriate thing to do
 would still be use a View containing slave cameras for a
 cave/powerwall setup so this part wouldn't change.


   
 Do the slave cameras inherit the master cameras ProjectionMatrix/View
 Frustrum or do these need to be setup independently?
 

 The can do both.  But default the slave cameras will inherit the part
 projection and view matrix, then multiply these by the offset matrices
 that you pass in when you add slaves.  You can mix and match different
 types of slaves as well - for instance the
 osgViewer::View::setUpViewAs3DSpehericalDisplay has six RTT slave
 Camera that render to a cube map that are relative to the master
 Camera, and then one post render slave Camera that works in absolutely
 reference frame which does the final distortion correction render
 using the cube map.  The Camera::setReferanceFrame(..) method on the
 slave controls where the salve inherits the view and project matrix or
 not.

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

   


IMPORTANT: This email remains the property of the Australian Defence 
Organisation and is subject to the jurisdiction of section 70 of the CRIMES ACT 
1914.  If you have received this email in error, you are requested to contact 
the sender and delete the email.


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


[osg-users] Another Viewer/CompositeViewer Question

2009-01-28 Thread Paul Pocock
Am I to assume correctly that osgViewer::Viewer (slave cameras) as 
opposed to CompositeViewer is more appropriate for a cave or powerwall 
environment?

Do the slave cameras inherit the master cameras ProjectionMatrix/View 
Frustrum or do these need to be setup independently?

Kind Regards

IMPORTANT: This email remains the property of the Australian Defence 
Organisation and is subject to the jurisdiction of section 70 of the CRIMES ACT 
1914.  If you have received this email in error, you are requested to contact 
the sender and delete the email.


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


[osg-users] osgVR - anyone using this NodeKit?

2008-11-10 Thread Paul Pocock
Is anyone using Michael Gronager's old nodekit?


IMPORTANT: This email remains the property of the Australian Defence 
Organisation and is subject to the jurisdiction of section 70 of the CRIMES ACT 
1914.  If you have received this email in error, you are requested to contact 
the sender and delete the email.


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


Re: [osg-users] osgOcean(?)

2008-11-06 Thread Paul Pocock
Hi Kim, 
I used the same 15x15 grid tiles and 64x64 using a pagedLOD system. The
FFT height maps were pre-generated. My biggest problems were seams in
the tiles and trying to introduce reflections. I handled the seam
problems between tiles by slightly overlapping them at the edges, not an
ideal solution but it served our purposes based on the amount of effort
we could put into this. I also used a distance based system so only the
fragment shader was active until you got to about 100- 200 metres away
and then the vertex shader would kick in and give form to the waves. Got
around 25 fps on a NVidia 7800, 1.8Mhz cpu

I don't know how we are going to coordinate this effort but I can put
everything I've done together and post it.


On Thu, 2008-11-06 at 17:01 +, Kim C Bale wrote:
 Right blimey, I didn't expect so much interest.
 
 In answer to J-S and Paul the actual ocean surface rendering is something I 
 find particularly interesting. There are many different approaches for this 
 (Gerstner, perlin noise, FFT etc), each of which have their own advantages 
 and disadvantages. 
 
 An idea I had a while back at the start of this project was to create a 
 nodekit designed specifically for ocean surface simulation and rendering. 
 Something similar to osgShadow, where various techniques are implemented and 
 can be chosen based on the application. So yes it would be interesting to try 
 and tie in Paul's work. This type of nodekit I think would be fairly easy to 
 design.
 
 The ocean technique I have implemented is based the FFT technique described 
 by Tessendorf in his paper Simulating Ocean Waves. It is the same algorithm 
 that was used in the film Titanic, albeit without the 5.1 billion polygons 
 they used. 
 
 The technique produces a tileable height map that can be stitched together to 
 form a large expanse of ocean water. Whilst it provides very nice looking 
 waves, the fact that it's tileable makes it rather difficult to represent 
 local interactions with the waves themselves. Unfortunately wave interactions 
 were not a requirement, so I have not taken these into account. However, 
 Tessendorf details an approach called IWave that can be used to provide 
 these. 
 
 These tiles can either be pre-computed, or computed in real-time. One 
 disadvantage of this technique is the use of Fast Fourier Transforms to 
 generate the height maps. FFTs are pretty heavy on the CPU and can be a major 
 bottleneck. However, for grid sizes of 128x128 it is still perfectly feasible 
 to generate them in real-time. The advantage of this is that you can change 
 ocean parameters wind/wave direction, gravity, depth etc on the fly. 
 Personally, I decided to pre-compute as these real-time changes were not 
 required. 
 
 In my simulation there is no coast line, you are presented with an infinite 
 plane of sea. So, I have not considered sea/coast interaction but again this 
 can be achieved with the IWave technique. 
 
 The sea surface shader is quite lengthy, largely because it needs to take 
 into account both sides of the surface. It uses cube mapping for global 
 reflections and a projective texture map for local reflections. I use a 
 series of pre-computed normal maps based on the height maps to add additional 
 detail and the colour itself is computed based on the angle at which you look 
 at the ocean surface. Finally a refraction shader is used if looking upward 
 from under the surface. The whitecaps are a bit of a cheat really, there are 
 a couple of clever ways of computing these based on the heightmap, but I 
 found that simply overlaying a foam texture where the wave peaked above a 
 certain height provided the best results in my case.
 
 So, regarding performance, I can happily run a grid of 15x15 ocean tiles 
 comprised of 64x64 height values. As the poly count gets pretty high, I use 
 GeoMipMapping to reduce the detail of tiles in the distance. Using that with 
 the pre-computed height maps I can get 55-60 fps which drops to about 
 45-50fps when I render the scene twice on a 8800 GTS. There are a number of 
 optimisations that I haven't made though. The problem with GeoMipMapping of 
 course is that detail is relative to the position of the camera. So if you 
 have multiple cameras you have to re-compute the geomipmapping for each one. 
 I was fortunate as my secondary camera is very close to my primary one so 
 that was not an issue.
 
 Aside from the ocean I have:
 
 God-rays - Created by rendering geometrically modelled rays to an FBO and 
 then blending them into the scene as a post render.
 
 2D fogging equation - a pre-computed fogging texture is used to simulate the 
 underwater fogging based on distance from surface and viewer.
 
 Depth of field - Not exclusive to underwater scenes obviously, but does a 
 nice job of creating a watery blur in the distance
 
 Wobbly screen distortion - Post render effect, similar to the effect seen in 
 BioShock, that warps the view in a watery fashion. 

[osg-users] Setting number of Cull, Draw threads

2008-11-05 Thread Paul Pocock
Just a simple question, is there a limit on the number of threads I set
for one graphics Context? Does OSG set this limit and can't be over
-ridden ?

Regards


IMPORTANT: This email remains the property of the Australian Defence 
Organisation and is subject to the jurisdiction of section 70 of the CRIMES ACT 
1914.  If you have received this email in error, you are requested to contact 
the sender and delete the email.


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


[osg-users] OSG and Chromium/VR Juggler

2008-10-30 Thread Paul Pocock
Hi, I simply want to run OSG on a PC Cluster of 9 Nodes in a Master/
0..N Slaves configuration. If people who have used either 
Chromium http://chromium.sourceforge.net/  or 
VR Juggler http://www.vrjuggler.org/   please report their experiences
with these. 

Kind Regards
Paul


IMPORTANT: This email remains the property of the Australian Defence 
Organisation and is subject to the jurisdiction of section 70 of the CRIMES ACT 
1914.  If you have received this email in error, you are requested to contact 
the sender and delete the email.


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


[osg-users] osgEXP Shader Support

2008-08-21 Thread Paul Pocock
Does osgEXP import osg shader programs ? or export 3D max shaders
applied to a model?

If not is there any plan to integrate this into osgEXP?

Kind Regards
Paul



IMPORTANT: This email remains the property of the Australian Defence 
Organisation and is subject to the jurisdiction of section 70 of the CRIMES ACT 
1914.  If you have received this email in error, you are requested to contact 
the sender and delete the email.


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


[osg-users] Projective Texture Problem: GLSL Version

2008-05-22 Thread Paul Pocock
Hi. 
I need some help on getting projective texturing working properly. Fixed
Functionality is no problem however in GLSL am having a number of
problems. I can get the texture onto my quad however I can't position it
correctly. The texture appears basically in the Middle of my plane  -
however I require it to be scaled and positioned anywhere  - in this
case it will be the wake of a ship.

I've included the basic setup of my code - with relevant sections.

Hopefully someone may see something I'm missing.

Kind Regards
Paul 





SETTING UP
///


 _group = new osg::Group;

osg::Vec3 position(1500.0f,1500.0f,0.0f);
osg::Vec3 direction( 0.0f,0.0f,-1.0f);
osg::Vec3 up(0.0f,1.0f,0.0f);


//create the _camera
_camera = new osg::Camera;

_camera-setClearMask(GL_DEPTH_BUFFER_BIT);
_camera-setClearColor(osg::Vec4(1.0f,1.0f,1.0f,1.0f));

_camera-setComputeNearFarMode(osg::Camera::DO_NOT_COMPUTE_NEAR_FAR);

// set viewport
_camera-setViewport(0,0,256,256);
   
// set the _camera to render before the main _camera.
_camera-setRenderOrder(osg::Camera::PRE_RENDER);

// tell the _camera to use OpenGL frame buffer object where
supported.

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

// attach the texture and use it as the color buffer.
_camera-attach(osg::Camera::DEPTH_BUFFER, _projectionTexture);

// add subgraph to render
//_camera-addChild(_nodeprojectedonto.get());




 _group-addChild(_camera);

osg::StateSet* stateset = _group-getOrCreateStateSet();

osg::Vec4 centerColour(0.5f,0.5f,0.5f,1.0f);
osg::Vec4 borderColour(1.0f,1.0f,1.0f,1.0f);

// set up forest _projectionTexture
_projectionTexture = new osg::Texture2D();
_projectionTexture-setImage(createForestImage(centerColour, 64));
_projectionTexture-setBorderColor(osg::Vec4(borderColour));

_projectionTexture-setWrap(osg::Texture::WRAP_S,osg::Texture::CLAMP_TO_BORDER);

_projectionTexture-setWrap(osg::Texture::WRAP_T,osg::Texture::CLAMP_TO_BORDER);

_projectionTexture-setWrap(osg::Texture::WRAP_R,osg::Texture::CLAMP_TO_BORDER);

stateset-setTextureAttributeAndModes(textureUnit,
_projectionTexture, osg::StateAttribute::ON); //TEXUNIT2

// set up tex gens
stateset-setTextureMode(textureUnit, GL_TEXTURE_GEN_S,
osg::StateAttribute::ON);
stateset-setTextureMode(textureUnit, GL_TEXTURE_GEN_T,
osg::StateAttribute::ON);
stateset-setTextureMode(textureUnit, GL_TEXTURE_GEN_R,
osg::StateAttribute::ON);
stateset-setTextureMode(textureUnit, GL_TEXTURE_GEN_Q,
osg::StateAttribute::ON);

   




osg::TexGenNode* _texgenNode = new osg::TexGenNode;
_texgenNode-setTextureUnit(textureUnit);   //TEXUNIT2
osg::TexGen* texgen = _texgenNode-getTexGen();
texgen-setMode(osg::TexGen::EYE_LINEAR );/



_group-addChild(_texgenNode);






texGenMatUniform-setUpdateCallback(new
TexGenUpdateCallback(_viewer,projection-getTexGenNode())); 
stateset-addUniform( texGenMatUniform);



//set a wake texture
stateset-setTextureAttributeAndModes(TEXUNIT2,
projection-getTexture(),osg::StateAttribute::ON);
stateset-addUniform( new osg::Uniform(PROJECTION,TEXUNIT2) );




CALLBACK
///


class TexGenUpdateCallback: public osg::Uniform::Callback
{
public:



TexGenUpdateCallback(osg::ref_ptrosgViewer::Viewer
_viewer,osg::TexGenNode* texgenNode) : viewer(_viewer),
_texgenNode(texgenNode){}

virtual void operator() ( osg::Uniform* uniform,
osg::NodeVisitor* nv )
{



if( _enabled )
{
//Camera position
//osg::Matrix  MVPT = 
(viewer-getCamera()-getProjectionMatrix() *
viewer-getCamera()-getViewMatrix()  );
//_texgenNode-getTexGen()-setMode(osg::TexGen::EYE_LINEAR);
//_texgenNode-getTexGen()-setPlanesFromMatrix(MVPT);


// compute the matrix which takes a vertex from local coords 
into
tex coords
// will use this later to specify osg::TexGen..
osg::Matrix MVP = viewer-getCamera()-getViewMatrix()
* 

viewer-getCamera()-getProjectionMatrix();

osg::Matrix MVPT = MVP *
osg::Matrix::translate(1.0,1.0,1.0) *  osg::Matrix::scale(1.0,1.0,1.0);


_texgenNode-getTexGen()-setMode(osg::TexGen::EYE_LINEAR);
_texgenNode-getTexGen()-setPlanesFromMatrix(MVPT);



uniform-set(MVPT);
//std::cerr TexGenUpdateCallback std::endl;  
}
}

private:
bool _enabled;
 

[osg-users] osgSim::OverlayNode Question

2008-05-20 Thread Paul Pocock
Hi - Can osgSim::OverlayNode be used for Decal effects, or general
projective texturing?
Are there examples where it is used in OSG?

Regards











IMPORTANT: This email remains the property of the Australian Defence 
Organisation and is subject to the jurisdiction of section 70 of the CRIMES ACT 
1914.  If you have received this email in error, you are requested to contact 
the sender and delete the email.


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


[osg-users] GLSL Setting up gl_EyePlane

2008-04-23 Thread Paul Pocock
Hi,Just a small one -
Are the gl_EyePlanes automatically setup when calling
texgen-setPlanesFromMatrix(...)?

I'm trying to replicate simple Projective texturing using glsl.

Regards





IMPORTANT: This email remains the property of the Australian Defence 
Organisation and is subject to the jurisdiction of section 70 of the CRIMES ACT 
1914.  If you have received this email in error, you are requested to contact 
the sender and delete the email.


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


Re: [osg-users] Access to osg::Image data

2008-04-17 Thread Paul Pocock

osgvolume is a perfect reference  - Thanks Robert

On Thu, 2008-04-17 at 09:15 +0100, Robert Osfield wrote:
 Hi Paul,
 
 I'm afraid there is too little code in your excerpt to guess at what
 might be wrong, what is wrong is part of the code you haven't
 included.
 
 The osgvolume example does various ops on a 3D osg::Image so I'd
 recommend review this example.
 
 Robert.
 
 On Thu, Apr 17, 2008 at 6:45 AM, Paul Pocock
 [EMAIL PROTECTED] wrote:
  I'm trying to set the individual rgba in a 3D texture - however having
   problems : Ive set up the for loops and grabbed the image ptr thus:
 
   ptr = image-data();
 
 
   for..
for ..
   for ..
 
  *(ptr++) = (GLubyte) (height);
  *(ptr++) = (GLubyte) (height);
  *(ptr) = (GLubyte) (height);
 
 
   ..but not getting the results I should - Is this how I should access the
   data form osg::Image?
 
   Kind Regards
 
   Paul
 
 
 
 
 
   IMPORTANT: This email remains the property of the Australian Defence 
  Organisation and is subject to the jurisdiction of section 70 of the CRIMES 
  ACT 1914.  If you have received this email in error, you are requested to 
  contact the sender and delete the email.
 
 
   ___
   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 mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Access to osg::Image data

2008-04-16 Thread Paul Pocock
I'm trying to set the individual rgba in a 3D texture - however having
problems : Ive set up the for loops and grabbed the image ptr thus:

ptr = image-data();


for..
  for ..
 for ..

*(ptr++) = (GLubyte) (height);
*(ptr++) = (GLubyte) (height);
*(ptr) = (GLubyte) (height);


..but not getting the results I should - Is this how I should access the
data form osg::Image?

Kind Regards

Paul





IMPORTANT: This email remains the property of the Australian Defence 
Organisation and is subject to the jurisdiction of section 70 of the CRIMES ACT 
1914.  If you have received this email in error, you are requested to contact 
the sender and delete the email.


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


Re: [osg-users] Projective Texturing in GLSL shader

2008-04-14 Thread Paul Pocock

Thanks for your help Sebastian, I'm using texgen-setPlanesFromMatrix
to set up eye-planes. I assume that's correct (looking at osgspotlight
and other examples..)


Regards

On Mon, 2008-04-14 at 08:37 +0200, Sebastian Messerschmidt wrote:
 Hi Paul,
 
 In the vertex shader try this
 vec4 ecPosition = gl_Vertex * gl_ModelViewMatrix;

 gl_TexCoord[0].s = dot(ecPosition, gl_EyePlaneS[0])  ;
 gl_TexCoord[0].t = dot(ecPosition, gl_EyePlaneT[0]) ;
 gl_TexCoord[0].p = dot(ecPosition, gl_EyePlaneR[0]);
 gl_TexCoord[0].q = 1.0;
 
 Then use the the projective sampler in the fragment shader.
 This achieves EYE_LINEAR texturing like in fixed function IIRC (don't 
 forget to setup
 the eye-Planes from the camera-matrix)
 
 cheers
 Sebastian psy Messerschmidt
 
 Paul Pocock schrieb:
  Hi, 
  I need some advice on projective texturing. I can get it going in Fixed
  Functionality - however not on the GPU.  
 
  I've set up a texGenNode and passing the matrix as a uniform to the
  shader. I'm also passing the ViewMatrix but sufficed to say I'm not
  getting the desired effect. 
 
  Any advice would be appreciated.
 
  Regards
 
 
  uniform mat4 TexGenMat;
  uniform mat4 ViewMat;
 
  [Vertex shader]
 
  vec4 positionEye =  gl_ModelViewMatrix * gl_vertex
  vec4 positionWorld = ViewMat * positionEye;
  index = TexGenMat * positionWorld;
 
  [fragment shader]
 
  vec4 ProjMapColor = texture2DProj(PROJECTION_TEXTURE, index);
 
 
  IMPORTANT: This email remains the property of the Australian Defence 
  Organisation and is subject to the jurisdiction of section 70 of the CRIMES 
  ACT 1914.  If you have received this email in error, you are requested to 
  contact the sender and delete the email.
 
 
  ___
  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 mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Projective Texturing in GLSL shader

2008-04-14 Thread Paul Pocock

Managed to achieve Projective Texturing in shader - just changed the 

gl_TexCoord[0].q = 1.0   to   dot( ecPosition,gl_EyePlaneQ[0];

so:

gl_TexCoord[0].s = dot(ecPosition, gl_EyePlaneS[0])  ;
gl_TexCoord[0].t = dot(ecPosition, gl_EyePlaneT[0]) ;
gl_TexCoord[0].p = dot(ecPosition, gl_EyePlaneR[0]);
gl_TexCoord[0].q = dot( ecPosition,gl_EyePlaneQ[0];


Thanks agian for your help


On Mon, 2008-04-14 at 08:37 +0200, Sebastian Messerschmidt wrote:
 Hi Paul,
 
 In the vertex shader try this
 vec4 ecPosition = gl_Vertex * gl_ModelViewMatrix;

 gl_TexCoord[0].s = dot(ecPosition, gl_EyePlaneS[0])  ;
 gl_TexCoord[0].t = dot(ecPosition, gl_EyePlaneT[0]) ;
 gl_TexCoord[0].p = dot(ecPosition, gl_EyePlaneR[0]);
 gl_TexCoord[0].q = 1.0;
 
 Then use the the projective sampler in the fragment shader.
 This achieves EYE_LINEAR texturing like in fixed function IIRC (don't 
 forget to setup
 the eye-Planes from the camera-matrix)
 
 cheers
 Sebastian psy Messerschmidt
 
 Paul Pocock schrieb:
  Hi, 
  I need some advice on projective texturing. I can get it going in Fixed
  Functionality - however not on the GPU.  
 
  I've set up a texGenNode and passing the matrix as a uniform to the
  shader. I'm also passing the ViewMatrix but sufficed to say I'm not
  getting the desired effect. 
 
  Any advice would be appreciated.
 
  Regards
 
 
  uniform mat4 TexGenMat;
  uniform mat4 ViewMat;
 
  [Vertex shader]
 
  vec4 positionEye =  gl_ModelViewMatrix * gl_vertex
  vec4 positionWorld = ViewMat * positionEye;
  index = TexGenMat * positionWorld;
 
  [fragment shader]
 
  vec4 ProjMapColor = texture2DProj(PROJECTION_TEXTURE, index);
 
 
  IMPORTANT: This email remains the property of the Australian Defence 
  Organisation and is subject to the jurisdiction of section 70 of the CRIMES 
  ACT 1914.  If you have received this email in error, you are requested to 
  contact the sender and delete the email.
 
 
  ___
  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 mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Projective Texturing in GLSL shader

2008-04-13 Thread Paul Pocock
Hi, 
I need some advice on projective texturing. I can get it going in Fixed
Functionality - however not on the GPU.  

I've set up a texGenNode and passing the matrix as a uniform to the
shader. I'm also passing the ViewMatrix but sufficed to say I'm not
getting the desired effect. 

Any advice would be appreciated.

Regards


uniform mat4 TexGenMat;
uniform mat4 ViewMat;

[Vertex shader]

vec4 positionEye =  gl_ModelViewMatrix * gl_vertex
vec4 positionWorld = ViewMat * positionEye;
index = TexGenMat * positionWorld;

[fragment shader]

vec4 ProjMapColor = texture2DProj(PROJECTION_TEXTURE, index);


IMPORTANT: This email remains the property of the Australian Defence 
Organisation and is subject to the jurisdiction of section 70 of the CRIMES ACT 
1914.  If you have received this email in error, you are requested to contact 
the sender and delete the email.


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


Re: [osg-users] Multi-Node?

2008-02-18 Thread Paul Pocock
How does Chromium stack up ? Its based on WireGl I believe and from what
I've heard isn't the fastest API out there - If your forwarding calls
every frame and rendering large databases in real-time wouldn't it be a
pretty heavy load on your system? 

On Tue, 2008-02-19 at 07:29 +1100, Somerville, Andrew wrote:
 Hey Paul,
 
 You might want to checkout Chromium. It can take the place of the
 OpenGL library and pipe the rendering to multiple machines without
 changing your osg code.
 
 http://en.wikipedia.org/wiki/Chromium_(software)
 
  Andy
 
 
 -Original Message- 
 From: [EMAIL PROTECTED] on behalf of Tanja 
 Paul 
 Sent: Sat 2/16/2008 6:26 PM 
 To: OpenSceneGraph Users 
 Subject: [SPAM]  Re: [osg-users] Multi-Node? 
   
 Thanks Robert - Yes I meant  multiple displays, thanks for your
 response. I  
 saw a thread a while back in regards to openProducer, cant recall it
 but I  
 believe Don was saying openProducer supported multiple channels or a
 cluster  
 of machines. Does anyone know if OpenProducer has this support.
 
 Regards.
 
 
 - Original Message -  
 From: Robert Osfield [EMAIL PROTECTED] 
 To: OpenSceneGraph Users osg-users@lists.openscenegraph.org 
 Sent: Friday, February 15, 2008 3:35 AM 
 Subject: Re: [osg-users] Multi-Node?
 
 
  Hi Paul, 
  
  When you say Multiple Nodes what exactly do you mean...  Do you
 simply 
  mean a compute by Node, or graphics card or an osg::Node object in
 the 
  scene graph... 
  
  osgViewer does support multiple threaded, multiple displays on a 
  single machine.  It doesn't directly support a cluster of machines, 
  one needs to implement this at the application level. 
  
  Robert. 
  
  On Mon, Feb 11, 2008 at 4:21 AM, Paul Pocock 
  [EMAIL PROTECTED] wrote: 
  Hi, 
I need to be able to run OpenSceneGraph on Multiple Nodes and
 was 
   wondering if OSG 2.X is able to handle a multi-channel (Gen
 locked) 
   setup?  - or does a whole lot of synchronization software have to
 be 
   written for it? 
  
   Regards 
  
  
  
  
  
  
  
  
  
  
  
   IMPORTANT: This email remains the property of the Australian
 Defence  
  Organisation and is subject to the jurisdiction of section 70 of
 the  
  CRIMES ACT 1914.  If you have received this email in error, you
 are  
  requested to contact the sender and delete the email. 
  
  
   ___ 
   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 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] Multi-Node?

2008-02-17 Thread Paul Pocock
Thanks Robert - osgcluster seems a good starting point.

Regards



On Sat, 2008-02-16 at 11:07 +, Robert Osfield wrote:
 Hi Paul,
 
 On Feb 16, 2008 11:26 PM, Tanja  Paul [EMAIL PROTECTED] wrote:
  Thanks Robert - Yes I meant  multiple displays, thanks for your response. I
  saw a thread a while back in regards to openProducer, cant recall it but I
  believe Don was saying openProducer supported multiple channels or a cluster
  of machines. Does anyone know if OpenProducer has this support.
 
 Producer only supports multiple displays on a single machine, it has
 no cluster support.
 
 osgViewer that exist in 2.x replaces osgProducer/Producer and has the
 multi threaded muiltiple display capability that Producer has plus
 extra OSG centric high level viewer classes, threading models and
 support for distortion correction.  osgVierwer like Producer doesn't
 have out of the box support cluster though.
 
 There are various ways to do clustering.  The osgcluster example is a
 very very basic example that uses UDP packets to sync the view
 matrices and frames update.   3rd party solutions like Equalizer and
 VR Juggler has cluster support and integrate with the OSG.   Lots of
 companies roll their own clustering solution too.
 
 Robert.
 
 Robert.
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


IMPORTANT: This email remains the property of the Australian Defence 
Organisation and is subject to the jurisdiction of section 70 of the CRIMES ACT 
1914.  If you have received this email in error, you are requested to contact 
the sender and delete the email.


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


[osg-users] Multi-Node?

2008-02-10 Thread Paul Pocock
Hi,
 I need to be able to run OpenSceneGraph on Multiple Nodes and was
wondering if OSG 2.X is able to handle a multi-channel (Gen locked)
setup?  - or does a whole lot of synchronization software have to be
written for it?

Regards











IMPORTANT: This email remains the property of the Australian Defence 
Organisation and is subject to the jurisdiction of section 70 of the CRIMES ACT 
1914.  If you have received this email in error, you are requested to contact 
the sender and delete the email.


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


[osg-users] OSG Design pattern

2008-01-29 Thread Paul Pocock
Hi, is there a current image file of the Design patterns used in osg?
I knew there was one around but couldn't find it.

Regards


Paul









IMPORTANT: This email remains the property of the Australian Defence 
Organisation and is subject to the jurisdiction of section 70 of the CRIMES ACT 
1914.  If you have received this email in error, you are requested to contact 
the sender and delete the email.


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


Re: [osg-users] PagedLOD node page callback

2008-01-24 Thread Paul Pocock

Hi Robert, I was wondering how you would use osg::Observer and are there
any examples. Would you construct it as

osg::observer_ptrosg::Object pagedLODObserver  ?

and catch page unloads by testing for objectDeleted() ?

On Thu, 2008-01-24 at 09:01 +, Robert Osfield wrote:
 Hi Michael,
 
 To monitor file loads you just need to assign a custom
 osdDB::Registry::ReadCallback to the Registry..
 
 To catch unloads you have two routes, add an custom osg::Observer to
 PagedLOD objects to get informed when they get deleted or to create
 your own DatabasePager subclass.
 
 Robert.
 
 On Jan 23, 2008 10:47 PM, Guerrero, Michael (CIV) [EMAIL PROTECTED] wrote:
 
 
 
 
  Hi, I'm searching for a convenient way to be alerted when a PagedLOD node
  gets either paged in or out.  Is there a preferred method of doing this?
 
 
 
  Thanks,
 
  Michael
  ___
  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


IMPORTANT: This email remains the property of the Australian Defence 
Organisation and is subject to the jurisdiction of section 70 of the CRIMES ACT 
1914.  If you have received this email in error, you are requested to contact 
the sender and delete the email.


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


[osg-users] BoundingBox Problem

2008-01-22 Thread Paul Pocock
Hi, 
Wondering if anyone from the list can help me.

 I have a 3x3 grid of tiles from a terrain database, my aim is to get an
outline representation of this 3x3 by just using lines to represent each
tile. 

My solution is the following:

osg::BoundingBox bbox ;
bbox.expandBy(node-getBound());



vertices-push_back(bbox.corner(0));
vertices-push_back(bbox.corner(1));

vertices-push_back(bbox.corner(1));
vertices-push_back(bbox.corner(3));

vertices-push_back(bbox.corner(2));
vertices-push_back(bbox.corner(3));

vertices-push_back(bbox.corner(3));
vertices-push_back(bbox.corner(2));

vertices-push_back(bbox.corner(0));
vertices-push_back(bbox.corner(2));


My problem stems from the fact that the square is way to big. I believe
it stems from the fact I'm using BoundingSphere to calculate extents.Is
there an obvious solution to this problem - To get a square that is
precisely the dimensions of the terrain tile?

Thanks in Advance

Paul





IMPORTANT: This email remains the property of the Australian Defence 
Organisation and is subject to the jurisdiction of section 70 of the CRIMES ACT 
1914.  If you have received this email in error, you are requested to contact 
the sender and delete the email.


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


[osg-users] osgPagedLOD DatabasePager

2008-01-22 Thread Paul Pocock
Hi, I have a few questions as to the functionality of the DatabasePager
and PagedLODS in general.If I am mistaken could someone please help me
out – but my Understanding of the DatabasePager is this


If we have a 4x4 grid of pagedLOD tiles We start out with osg::PagedLOD
loading tiles into the _activePagedLODList if it is within the range as
specified by setRange().


So In DatabasePager - if you start within range you get:


_activePagedLODList.size()=16

_inactivePagedLODList.size()=0


the relevant pagedLOD files then request the loading of their children
based on range? 

In regards to active/inactive PagedLODs
From a Previous Post:

“PagedLODs are registered as inactive when their frame count gets out of synch 
with the overall viewer.
Once they become inactive, their children are released.  In other words, if 
each child has an identical
bounding sphere, none of them will get freed until the lowest child is culled”

What other factors affect moving the pagedLOD's to the _inactive list?
If it is Culled?



If it is in the _inactivePagedLODList then it is no longer resident in
main memory? - (or it is up to the OS  - based on the OS policy?)





IMPORTANT: This email remains the property of the Australian Defence 
Organisation and is subject to the jurisdiction of section 70 of the CRIMES ACT 
1914.  If you have received this email in error, you are requested to contact 
the sender and delete the email.


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


[osg-users] osgconv batch processing

2008-01-15 Thread Paul Pocock
I have a number of objects I would like to convert to .ive and was
wondering if there is a way to do batch processing with osgconv?


IMPORTANT: This email remains the property of the Australian Defence 
Organisation and is subject to the jurisdiction of section 70 of the CRIMES ACT 
1914.  If you have received this email in error, you are requested to contact 
the sender and delete the email.


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


[osg-users] gDEBugger and OpenSceneGraph

2007-11-27 Thread Paul Pocock
Can all those who have tried gDEBugger

http://www.gremedy.com/gDEBuggerLinux.php?sdk

with OpenSceneGraph post their experiences. I'm running i586 suse-linux
and have had mixed results (understandably - it is in beta), namely
blank screen when running any OSG application - Performance counters
appear to be working however. Be interested to hear what experiences
others have had

Regards
Paul



IMPORTANT: This email remains the property of the Australian Defence 
Organisation and is subject to the jurisdiction of section 70 of the CRIMES ACT 
1914.  If you have received this email in error, you are requested to contact 
the sender and delete the email.


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


[osg-users] CMake Search Paths ?

2007-11-19 Thread Paul Pocock
Hi, This may be an issues with the developers of cmake but I've had a
difficult experience building OSG 2.2 official release on IRIX 6.5 using
the cmake build process. Problems namely with specifying my
own /include /lib paths.

it seems to want to ignore any arguments I pass to it , I don't think
Cmake even reads the PATH env variable . To solve this I've had to hard
code the paths in CMakeCache  and CmakeLists.txt and other areas in
order for OSG to build with the headers and libs I want. Even using the
SET command in CmakeLists.txt doesn't seem to fix the problem. It seems
to me that Cmake has a set of hardcoded directories that it will search.

Is there a simpler way to give cmake user defined search paths?


Other modules I had to alter to make cmake search the directories I
specify:

In CmakeModules/ for all search paths:

FIND_LIB /usr/nekoware/lib

/usr/freeware/lib64

FIND_INCLUDE /usr/nekoware/include

/usr/freeware/include

/src/osgPlugins/jpeg/CMakeFiles/osgdb_jpeg.dir

added: /usr/nekoware/lib/libjpeg.so


I also wonder if cmake builds osg on 64 bit platforms in 64 bit? or does
it build in 32 bit? How can you tell or know what cmake is doing?

Regards

Paul



IMPORTANT: This email remains the property of the Australian Defence 
Organisation and is subject to the jurisdiction of section 70 of the CRIMES ACT 
1914.  If you have received this email in error, you are requested to contact 
the sender and delete the email.


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


[osg-users] Statistics meaning clarification

2007-10-18 Thread Paul Pocock
In regards to osg stats I understand the following to mean:
  -
  Frame Rate  - in /Hz
  -
  Event - Event traversal
  -
  Update =96 The update thread updates a node of the scenegraph,update
  traversal performed once each frame.
  -
  Cull -time taken in milliseconds for the cull traversal thread to
  complete
  -
  Draw - ime taken in milliseconds for the draw traversal thread to
  complete
  -


  GPU -  ?

  Could someone confirm this for me ?

   Another Question:  Where has the functionality gone to dump any loaded
   scenes to .osg . you used to be able to hit the
   'o' key to perform that function - not any more.

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