Re: [osg-users] Per-view / per-camera effect control

2013-03-12 Thread Janna Terde
Hi Robert, Thank you for the reply! The approach you are proposing seems like it should work fine but the problem that I am facing is that I need to be able to do various scene graph updates for example for the mirror I need to be able to update RTT camera viewmatrix and later on it can be

Re: [osg-users] Per-view / per-camera effect control

2013-03-08 Thread Janna Terde
Hi Robert, Thank you for the quick reply! What I am trying to do is to modify the scene graph (for example modify the transformation matrix of the node or uniform of the node). I've tried doing it in the cull callback or camera pre draw callback but it seems at this point it is already too

Re: [osg-users] Per-view / per-camera effect control

2013-03-08 Thread Janna Terde
Hi Robert, This is interesting however I am not completely sure if this can solve all my problems. What I am trying to do is to create a general solution for per-view control. I have different effects which require per-view control. For example different post-effects need per-view uniforms,

[osg-users] Per-view / per-camera effect control

2013-03-07 Thread Janna Terde
Hi, I've been looking into the way to enable per-view (per-camera) control of the various visual effects. For example one of the effects is using camera position and orientation for computation of the object scale. I would like to add an object once into the scene graph, have multiple views

[osg-users] Skinning with osg / osgAnimation

2012-12-12 Thread Janna Terde
Hi, I am looking into doing hardware skinning (such as animating some cables for a example). I will provide transformation matrices for bones. So far I've found that osgAnimation provides support for hardware skinning. However I am not sure what file formats are supported for gathering

Re: [osg-users] Orbit manipulator right and middle mouse movement speed

2012-11-01 Thread Janna Terde
Hi J-S, Thank you very much for the reply! I've reworked old manipulators so they fit with the new implementation and hierarchy in osgGA. Currently I've created sub classes based on current manipulators in osgGA such as OrbitManipulator however I think it would be great to submit small

[osg-users] Orbit manipulator right and middle mouse movement speed

2012-10-24 Thread Janna Terde
Hi, I've noticed that osgGA::OrbitManipulator code for right and middle mouse movement has hard-coded values such as: Code: // doc in parent bool OrbitManipulator::performMovementMiddleMouseButton( const double eventTimeDelta, const double dx, const double dy ) { // pan model float scale =

Re: [osg-users] VBO and vertex attribute data

2012-10-04 Thread Janna Terde
Hi Sebastian, I set the vertex attribute array this way: Code: geometry-setVertexAttribArray(s_attributeIndex, m_vertexAttributes.get()); geometry-setVertexAttribBinding(s_attributeIndex, osg::Geometry::BIND_PER_VERTEX); geometry-setVertexAttribNormalize(s_attributeIndex, GL_FALSE); and

Re: [osg-users] VBO and vertex attribute data

2012-10-04 Thread Janna Terde
Btw I am using osg 2.8.3-4, not sure if it could make any difference -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=50412#50412 ___ osg-users mailing list osg-users@lists.openscenegraph.org

Re: [osg-users] VBO and vertex attribute data

2012-10-04 Thread Janna Terde
Ok I think it is working now with eometry-getVertexAttribArray(s_attributeIndex)-dirty(); Thank you :) -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=50413#50413 ___ osg-users mailing list

Re: [osg-users] VBO and vertex attribute data

2012-10-03 Thread Janna Terde
This is being done and as I mention it works fine unless I try to use vertex buffer object. so lets say code like this works: Code: geometry-setVertexAttribArray(s_attributeIndex, m_vertexAttributes.get()); geometry-setVertexAttribBinding(s_attributeIndex, osg::Geometry::BIND_PER_VERTEX);

Re: [osg-users] VBO and vertex attribute data

2012-10-03 Thread Janna Terde
Hi, I've tried to use gl_MultiTexCoord1 and do geometry-setTexCoordArray(1, secondTexCoords); instead of custom vertex attributes to pass my data and it seems to be working. Does anyone know if there is some kind of problem with using custom vertex attributes ( using methods like

[osg-users] VBO and vertex attribute data

2012-10-02 Thread Janna Terde
Hi, I am working on optimizing existing code for height field. I've enabled VBO for height field geometry which seems to make draw time faster however it seems can not retrieve vertex attribute data in the vertex shader anymore. Is there a special way of using VBO with geometry which has

Re: [osg-users] [osgOcean] osgOcean: setting main camera to RTT

2012-09-19 Thread Janna Terde
Hi, Seems to be working if I disable some effects such as glare and some underwater effects (I did not look exactly which ones are causing the problem). Cheers, Janna -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=50198#50198

[osg-users] [osgOcean] osgOcean: setting main camera to RTT

2012-09-18 Thread Janna Terde
Hi, I am trying to implement a monochrome camera in my application, which is using osg::Ocean. However I've encountered a problem related to osg::Ocean. What I am trying to do: take the main camera and set it to use Frame Buffer Object and render into texture. Then I am adding a slave camera

[osg-users] Check if a Drawable was culled or not

2012-09-11 Thread Janna Terde
Hi, I have a scene containing several mirrors but I would only like to enable RTT camera if the node representing a mirror is visible. I am trying to check if the specific Drawable was culled or not but so far I was not getting the results I wanted. Before getting into details on how I am

Re: [osg-users] Check if a Drawable was culled or not

2012-09-11 Thread Janna Terde
Hi Jeremy, I can cull the RTT camera using its cull mask or node mask however I need to know when should I do it. I would like to cull the camera when the node representing the mirror (Geode) is culled so when it is outside of the viewing frustum. This is what I am trying to do, I've tried to

Re: [osg-users] Check if a Drawable was culled or not

2012-09-11 Thread Janna Terde
Hi, I think I got it to work using Polytope like this: Code: osg::Polytope frustum; frustum.setToUnitFrustum(); frustum.transformProvidingInverse(mMainCamera-getViewMatrix() * mMainCamera-getProjectionMatrix() ); bool isNotCulled = frustum.contains(boundingBox); Cheers, Janna

Re: [osg-users] Check if a Drawable was culled or not

2012-09-11 Thread Janna Terde
Hi Farshid, Your method is interesting. Before I've tried to use isCulled from CullVisitor but I was getting inconsistent results and did not figure out why. So I've tried to manually do the test using Polytope for the frustum check and it seems to be working fine so I think I will go with it

[osg-users] Height field + planeintersector = polylines with breaks

2009-12-01 Thread Janna Terde
Hi all! I have a strange problem for which so far I could not find the cause. I am creating a height field using osg::HeightField and then I use osgUtil::PlaneIntersector in order to intersect the height field with the plane at the specific height. I get the intersection and draw polylines

Re: [osg-users] Height field + planeintersector = polylines with breaks

2009-12-01 Thread Janna Terde
Hi here is my code, Code: osg::BoundingSphere bs = mpHeightField-getBound(); //pView-getSceneData()-getBound(); for (int i = 0; i 1; i ++) {

Re: [osg-users] Height field + planeintersector = polylines with breaks

2009-12-01 Thread Janna Terde
I also tried to do similar with cow.osg and I get similar result. I have attached a screenshot Cheers, Janna -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=20703#20703 Attachments: http://forum.openscenegraph.org//files/cow_581.jpg

Re: [osg-users] Height fields implementation

2009-11-24 Thread Janna Terde
Hi Chris and Robert, Thank you very much for your replies! For now I think I will postpone using VPB. I will have a lot of different types of data and would need to see how to go around processing it into one standard. Currently I am subdividing my height map into smaller ones and rendering

Re: [osg-users] Height fields implementation

2009-11-23 Thread Janna Terde
Hi Chris, Sorry for mentioning HeightFields again. But thank you for taking your time replying! Currently I am implementing functionality using osg::Terrain::TerrainTile/HeightFieldLayer. Thanks again! Cheers, Janna -- Read this topic online here:

Re: [osg-users] Height fields implementation

2009-11-23 Thread Janna Terde
Hi! Chris, thank you for your advice! I will definitely take a look into VPB! I got some results but couple of things did not work as I expected, yet. Sorry in advanced for so many questions. When I use osg::Terrain::TerrainTile/HeightFieldLayer regardless of X/Y intervals I set while

[osg-users] Height fields implementation

2009-11-20 Thread Janna Terde
Hi, I am trying to create a height field with the decent framerate (using for example 2000 by 2000 height map). I read on this forum that using osg Height Field class in not recommended because I would have to use ShapeDrawable which will slow things down. I created a height field geometry

[osg-users] [vpb] Building terrain from the set of points (northing, easting, elevation)

2009-11-20 Thread Janna Terde
Hi all! I am looking for a toolkit which can help me to render a terrain. As an input data I have a set points (stored in a ascii file). Each point has easting, northing and elevation values. Would you suggest to use VPB for this purpose? I was looking also into osgTerrain module but did not

Re: [osg-users] [vpb] Building terrain from the set of points (northing, easting, elevation)

2009-11-20 Thread Janna Terde
Hi, just want to mention that the topic is not relevant anymore since it was approved a little bit too late! Thank you! Cheers, Janna -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=20027#20027

Re: [osg-users] Height fields implementation

2009-11-20 Thread Janna Terde
Update: I am thinking to put all the data in the same node (not column by column). I probably should be able to use indices instead of specifying vertex data over and over again (l could do it if I use openGL). Hopefully it will speed things up. However I am still wondering what else can I do