Re: [osg-users] How to modify the array of vertex from a Geometry object

2008-02-07 Thread Rubén López
Hi,

I think that the only thing missing is a vbo->dirty()

Regards

El jue, 07-02-2008 a las 19:31 +0100, lucas Grijander escribió:
> Thanks Rubén,
> 
> I'm trying to use VBO, but I think something is missing... I added
> this to the creation of my geometry:
> 
> myGeom->setSupportsDisplayList(false);
> myGeom->setUseDisplayList(false);
> myVertexBuffer = myGeom->getOrCreateVertexBufferObject();
> myVertexBuffer->setArray(0,&v);
> myVertexBuffer->setUsage(GL_STREAM_DRAW_ARB);
> myGeom->setUseVertexBufferObjects(true);
> 
> and then inside the callback I'm try to modify the vertex data:
> 
> osg::Vec3Array *test = dynamic_cast *>(testNx->myVertexBuffer->getArray(0));
> 
> for(int i = 0; i < numVertex; i++)
>  {
>  NxMat34 pose = listShapes.at(i)->shape->getGlobalPose(); 
> osg::Vec3f trans = osg::Vec3(pose.t.x,pose.t.y,pose.t.z);
>  
>  test->at(i) = trans;
> } 
> 
> but nothing changes in the render the object does not move. Does
> anybody know what is missing??
> 
> thanks in advance
> 
> Crisalix.
> 
> 
> 
> __
> > From: [EMAIL PROTECTED]
> > To: osg-users@lists.openscenegraph.org
> > Date: Wed, 6 Feb 2008 21:33:51 +0100
> > Subject: Re: [osg-users] How to modify the array of vertex from a
> Geometry object
> > 
> > Hi,
> > 
> > Some hints:
> > 
> > 1. Be sure that test->size() is equal to numVertex
> > 
> > 2. I don't know what the "at" method is, I couldn't find it either
> on
> > the TemplateArray class or the std::vector class. Try with the
> vector []
> > operator, ie: (*test)[i] = trans
> > 
> > 3. If you are updating the vertex data once per frame, don't use
> display
> > lists, it is the worst thing that you can ever do! It is cheaper
> even to
> > use direct mode. Use vertex buffer objects and configure the VBO
> > (getOrCreateVertexBufferObject) in streaming mode (GL_STREAM_DRAW).
> > 
> > Hope this helps.
> > 
> > Regards.
> > 
> > Rubén
> > 
> > El mié, 06-02-2008 a las 14:08 +0100, lucas Grijander escribió:
> > > Dear all,
> > > 
> > > I have to create a 3D surface, and then such surface will be
> modified during the application with several deformations. I've tried
> to create a Geometry object, then I set the VertexArray, and finally
> inside the render callback I update such vertex with the new ones. I
> got some errors during the rendering:
> > > 
> > > Warning: detected OpenGL error "value not valid" after
> RenderBin::draw(,)
> > > 
> > > Does anyone has an idea of such error? In addition, I'm sure the
> way I am accessing the vertex is not the right one, anybody knows the
> best way?
> > > 
> > > here is the code:
> > > 
> > > 
> > > //Create the 3D geometry
> > >
> -
> > > osg::Vec3Array(m*n));
> > > osg::Vec2Array& t = *(new osg::Vec2Array(m*n));
> > > osg::Vec4Array& col = *(new osg::Vec4Array(1));
> > > 
> > > col[0][0] = col[0][1] = col[0][2] = col[0][3] = 1.0f;
> > > 
> > > int index = 0;
> > > for( i = 0; i < m; i++ )
> > > {
> > > for(j = 0; j < n; j++)
> > > {
> > > v[index][0] = i;
> > > v[index][1] = 0;
> > > v[index][2] = j;
> > > 
> > > t[index][0] = (float)i/(m-1);
> > > t[index][1] = (float)j/(n-1);
> > > 
> > > index++;
> > > }
> > > }
> > > 
> > > myGeom = new osg::Geometry;
> > > 
> > > myGeom->setVertexArray( &v );
> > > myGeom->setTexCoordArray( 0, &t );
> > > 
> > > myGeom->setColorArray( &col );
> > > myGeom->setColorBinding( osg::Geometry::BIND_OVERALL );
> > > 
> > > for( i = 0; i < m-1; i++ )
> > > {
> > > osg::DrawElementsUShort* elements = new
> osg::DrawElementsUShort(osg::PrimitiveSet::TRIANGLE_STRIP);
> > > elements->reserve(m*2);
> > > for( j = 0; j < n; j++ )
> > > {
> > > elements->push_back((i+0)*n+j);
> > > elements->push_back((i+1)*n+j);
> > > }
> > > myGeom->addPrimitiveSet(elements);
> > > }
> > > 
> > > 
> > > osg::Texture2D *tex = new osg::Texture2D;
> > > 
> > > tex->setImage(osgDB::readImageFile("Images/breast.png"));
> > > 
> > > osg::StateSet *dstate = new osg::StateSet;
> > > dstate->setMode( GL_LIGHTING, osg::StateAttribute::OFF );
> > > dstate->setTextureAttributeAndModes(0, tex,
> osg::StateAttribute::ON );
> > > dstate->setTextureAttribute(0, new osg::TexEnv );
> > > 
> > > myGeom->setStateSet( dstate );
> > > 
> > > osg::Geode *geode = new osg::Geode;
> > > geode->addDrawable( myGeom );
> > > 
> > > ---
> > > 
> > > //Accessing the elements
> > > ---
> > > 
> > > osg::Vec3Array *test = dynamic_cast(myGeom->getVertexArray()); 
> > > 
> > > for(int i = 0; i < numVertex; i++)
> > > {
> > > NxMat34 pose = listShapes.at(i)->shape->getGlobalPose(); 
> > > osg::Vec3f trans = osg::Vec3(pose.t.x,pose.t.y,pose.t.z);
> > > 
> > > test->at(i) = trans;
> > > 
> > > 
> > > 
> > > } 
> > > myGeom->dirtyDisplayList();
> > > myGeom->dirtyBound();
> > > 
> > > 
> > 

Re: [osg-users] How to remove/disable a PostDrawCallback

2008-02-07 Thread Thrall, Bryan
Tobias Münch wrote on Thursday, February 07, 2008 4:26 PM:
> I'm using PostDrawCallback to make a screenshot in a realtime
> environment with CompositeViewer. Therefor I add this callback when
> user wants to make the screenshot. But after adding this callback to
> the camera, a screenshot is taken after each new frame. I just want
> to have a screenshot of the current frame and then the callback
> should be automatically removed. I can't find a method to remove the
> callback from the camera after successfully taking a screenshot.  
> 
> in the main:
> viewer->getView(viewer->getNumViews()-1)->getCamera()->setPostDrawCallback(new
> ScreenShotCallback(_twidth,_theight,filename)); 

viewer->getView(viewer->getNumViews()-1)->getCamera()->setPostDrawCallback(NULL);
 

Be sure you do this during the update phase, though, so you don't interfere 
with the cull and draw traversals.

-- 
Bryan Thrall
FlightSafety International
[EMAIL PROTECTED]
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] How to remove/disable a PostDrawCallback

2008-02-07 Thread Tobias Münch
I'm using PostDrawCallback to make a screenshot in a realtime environment
with CompositeViewer. Therefor I add this callback when user wants to make
the screenshot. But after adding this callback to the camera, a screenshot
is taken after each new frame. I just want to have a screenshot of the
current frame and then the callback should be automatically removed. I can't
find a method to remove the callback from the camera after successfully
taking a screenshot.

Who knows how to solve this problem?

The code follows:

class ScreenShotCallback: public osg::Camera::DrawCallback {

private:
double _w,_h;
char*  _filename;

public:
ScreenShotCallback(double w,double h,char* f)
{
_w = w;
_h = h;
_filename = f;
}
~ScreenShotCallback() {};

void operator() (const osg::Camera &camera) const {
osg::ref_ptr frame = new osg::Image;
frame->readPixels(0, 0, _w, _h, GL_RGB, GL_UNSIGNED_BYTE);
osgDB::writeImageFile(*frame, _filename);
}
}
};


in the main:
viewer->getView(viewer->getNumViews()-1)->getCamera()->setPostDrawCallback(new
ScreenShotCallback(_twidth,_theight,filename));
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Camera position update

2008-02-07 Thread Janusz
Dear all:

 I am running a galaxy formation visualisation with OSG. Just to 
simulate and visualize the gravitational effect of 2 closely passing 
disc-shaped galaxies.

The galaxies are simply a cloud of point sprites packed into a single geode.

While running the simulation, I need to constantly update the camera 
position to keep/track BOTH galaxies in a single viewport all the time.

What would be the best/efficient way to achieve that?

 
Regards,

Janusz Goldasz

---
[EMAIL PROTECTED]

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


[osg-users] Congratulations! OpenSceneGraph Chinese Mirror have been finished , try it.

2008-02-07 Thread FreeSouth
Hello Rebort and all :
 
  I am sorry for my poor English. I am very delight to tell every one that 
OpenSceneGraph Chinese Mirror have been finished soon, URL:www.osgChina.org 
yestoday is Chinese new year.
 
  This website have five blocks.
 
  1: The pages of www.openscenegraph.org 's wiki , absolutely in Chinese.
  2: A Chinese WIKI, it includes all the resource in China about OSG,but It 
have nothing now for collecting and finishing it may cost a very long time.
  3: The VR enterprise/Products in China. I plan this block as a display 
platform for Chinese enterprise who uses OSG.
  4: A OSG training, have been held one times successfully at 2008 Jan 15th in 
BeiJing.
  5: A bbs URL:bbs.osgChina.org in Chinese.
 
  and I want to applicate a  link at www.OpenSceneGraph.org , I don't know how 
to do it.
 
  This site have only finished a frame, it will be rich as time goes by.
 
  Thanks Rebort, and all .
 
Thank you.___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] How to modify the array of vertex from a Geometry object

2008-02-07 Thread lucas Grijander
Thanks Rubén,

I'm trying to use VBO, but I think something is missing... I added this to the 
creation of my geometry:

myGeom->setSupportsDisplayList(false);
myGeom->setUseDisplayList(false);
myVertexBuffer = myGeom->getOrCreateVertexBufferObject();
myVertexBuffer->setArray(0,&v);
myVertexBuffer->setUsage(GL_STREAM_DRAW_ARB);
myGeom->setUseVertexBufferObjects(true);

and then inside the callback I'm try to modify the vertex data:

osg::Vec3Array *test = dynamic_cast(testNx->myVertexBuffer->getArray(0));

for(int i = 0; i < numVertex; i++)
 {
 NxMat34 pose = listShapes.at(i)->shape->getGlobalPose();  
osg::Vec3f trans = osg::Vec3(pose.t.x,pose.t.y,pose.t.z);
 
 test->at(i) = trans;
}   

but nothing changes in the render the object does not move. Does anybody 
know what is missing??

thanks in advance

Crisalix.

> From: [EMAIL PROTECTED]
> To: osg-users@lists.openscenegraph.org
> Date: Wed, 6 Feb 2008 21:33:51 +0100
> Subject: Re: [osg-users] How to modify the array of vertex from a 
> Geometryobject
> 
> Hi,
> 
> Some hints:
> 
> 1. Be sure that test->size() is equal to numVertex
> 
> 2. I don't know what the "at" method is, I couldn't find it either on
> the TemplateArray class or the std::vector class. Try with the vector []
> operator, ie: (*test)[i] = trans
> 
> 3. If you are updating the vertex data once per frame, don't use display
> lists, it is the worst thing that you can ever do! It is cheaper even to
> use direct mode. Use vertex buffer objects and configure the VBO
> (getOrCreateVertexBufferObject) in streaming mode (GL_STREAM_DRAW).
> 
> Hope this helps.
> 
> Regards.
> 
> Rubén
> 
> El mié, 06-02-2008 a las 14:08 +0100, lucas Grijander escribió:
> > Dear all,
> > 
> > I have to create a 3D surface, and then such surface will be modified 
> > during the application with several deformations. I've tried to create a 
> > Geometry object, then I set the VertexArray, and finally inside the render 
> > callback I update such vertex with the new ones. I got some errors during 
> > the rendering:
> > 
> > Warning: detected OpenGL error "value not valid" after RenderBin::draw(,)
> > 
> > Does anyone has an idea of such error? In addition, I'm sure the way I am 
> > accessing the vertex is not the right one, anybody knows the best way?
> > 
> > here is the code:
> > 
> > 
> > //Create the 3D geometry
> > -
> > osg::Vec3Array(m*n));
> > osg::Vec2Array& t= *(new osg::Vec2Array(m*n));
> > osg::Vec4Array& col  = *(new osg::Vec4Array(1));
> > 
> > col[0][0] = col[0][1] = col[0][2] = col[0][3] = 1.0f;
> > 
> > int index = 0;
> > for( i = 0; i < m; i++ )
> > {
> > for(j = 0; j < n; j++)
> > {
> > v[index][0] = i;
> > v[index][1] = 0;
> > v[index][2] = j;
> > 
> > t[index][0] = (float)i/(m-1);
> > t[index][1] = (float)j/(n-1);
> > 
> > index++;
> > }
> > }
> > 
> > myGeom = new osg::Geometry;
> > 
> > myGeom->setVertexArray( &v );
> > myGeom->setTexCoordArray( 0, &t );
> > 
> > myGeom->setColorArray( &col );
> > myGeom->setColorBinding( osg::Geometry::BIND_OVERALL );
> > 
> > for( i = 0; i < m-1; i++ )
> > {
> > osg::DrawElementsUShort* elements = new 
> > osg::DrawElementsUShort(osg::PrimitiveSet::TRIANGLE_STRIP);
> > elements->reserve(m*2);
> > for( j = 0; j < n; j++ )
> > {
> > elements->push_back((i+0)*n+j);
> > elements->push_back((i+1)*n+j);
> > }
> > myGeom->addPrimitiveSet(elements);
> > }
> > 
> > 
> > osg::Texture2D *tex = new osg::Texture2D;
> > 
> > tex->setImage(osgDB::readImageFile("Images/breast.png"));
> > 
> > osg::StateSet *dstate = new osg::StateSet;
> > dstate->setMode( GL_LIGHTING, osg::StateAttribute::OFF );
> > dstate->setTextureAttributeAndModes(0, tex, osg::StateAttribute::ON );
> > dstate->setTextureAttribute(0, new osg::TexEnv );
> > 
> > myGeom->setStateSet( dstate );
> > 
> > osg::Geode *geode = new osg::Geode;
> > geode->addDrawable( myGeom );
> > 
> > ---
> > 
> > //Accessing the elements
> > ---
> > 
> > osg::Vec3Array *test = dynamic_cast(myGeom->getVertexArray());  
> > 
> > for(int i = 0; i < numVertex; i++)
> > {
> > NxMat34 pose = listShapes.at(i)->shape->getGlobalPose();  
> >osg::Vec3f trans = osg::Vec3(pose.t.x,pose.t.y,pose.t.z);
> > 
> >test->at(i) = trans;
> > 
> > 
> > 
> > }   
> > myGeom->dirtyDisplayList();
> > myGeom->dirtyBound();
> > 
> > 
> > thank you very much for your help!!!
> > 
> > Crisalix.
> > 
> > 
> > __

Re: [osg-users] X11 keyboard bug (+ fix)

2008-02-07 Thread Melchior FRANZ
* Melchior FRANZ -- Thursday 07 February 2008:
> And it works here with my patch, while first tests have shown
> that FocusOut, LeaveNotify, and KeymapNotify weren't triggered
> at all (which is suspicious). 

It was the event mask, of course. :-) UnmapNotify is sent on window
minimizing and shading, and on desktop switching, so it seemed OK
for me. But FocusOut might, indeed, be what we want. I'll check
that and submit a new patch.

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


Re: [osg-users] View matrix center

2008-02-07 Thread Jean-Sébastien Guay
Hi Paul,

Thanks for the lookAt background, very useful.

> Yep, read the code. Look for something like "getCenter" in
> MatrixManipulator, that would be a good start.
>   

I'm already going down that road. Trouble is MatrixManipulator doesn't 
have getCenter(). TrackballManipulator does, and using that works, but 
I'd prefer not to assume the manipulator will be of any particular type 
(other than the base MatrixManipulator).

I'm left with using getMatrix(), but if this is also a lookat matrix, 
I'll have the same problem... Any other leads?

Thanks,

J-S

-- 
__
Jean-Sebastien Guay[EMAIL PROTECTED]
   http://www.cm-labs.com/
http://whitestar02.webhop.org/

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


Re: [osg-users] performance fbo

2008-02-07 Thread Paul Martz
If you intend to save the results of your rendering to an osg::Image, then
FBOs probably won't give you any performance benefit over rendering to the
back buffer. In fact the additional cost of multiple BindBuffer calls per
frame might cause a performance hit with FBOs (as opposed to rendering to
the back buffer multiple times with the same rendering context, which would
be faster). The cost of copying back to the host osg::Image is the same in
either case.

FBOs are excellent for rendering into, then using that rendering as a
texture, with no intervening copy. RTT with a frame buffer requires an
intervening copy, so would be slower for that purpose.

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


> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf 
> Of nicolas martin
> Sent: Thursday, February 07, 2008 8:38 AM
> To: osg-users@lists.openscenegraph.org
> Subject: Re: [osg-users] performance fbo
> 
> Well, if I understand the way it is working, the fbo saves 
> you the time to copy from the framebuffer to a texture, but 
> you still have to transfer from the texture to main memory. 
> But if is right, then rendering to an image should be faster 
> using an fbo, even when there is only one fbo (and no 
> overhead related to binding...), but it seems the 
> performances are the same whatever the method in osgprerender.
> Anyway, when using a lot of rtts, I found that using fb is 
> really faster than using fbos, is it a problem of osg ? or 
> just normal due to the way fbos works ?
> 
> So If i plan on doing a lot of rtts, saving each render to an 
> image (in main memory), should I stick with adding a lot of 
> cameras each rendering to an osg::Image with framebuffer 
> implementation ?? or has anybody else ever tried something else ?
> 
> thanks
> 
> On 6 fév, 17:21, nicolas martin <[EMAIL PROTECTED]> wrote:
> > Well, let's say that i'm adding like 50 cameras so 
> basically 50 fbos 
> > ...
> > But as I currently don't really understand what is the need 
> for fbo, 
> > if you're about to copy the texture to an image anyway, can anyone 
> > explain it to me ???
> > I'm also really interested in understanding what is exactly 
> osg doing 
> > when it is rendering to an image ... Creating an fbo (with 
> what format 
> > for the texture ??), rendering to it, and then copying it 
> to my image 
> > ??
> >
> > thanks
> >
> > On Feb 6, 2:59 pm, "Paul Martz" <[EMAIL PROTECTED]> wrote:
> >
> > > How many fbos is "a lot"? Hundreds of BindBuffer calls 
> per frame can 
> > > not be a good thing,  perhaps that explains the performance hit.
> > >-Paul
> >
> > > > -Original Message-
> > > > From: [EMAIL PROTECTED]
> > > > [mailto:[EMAIL PROTECTED] On 
> Behalf Of 
> > > > [EMAIL PROTECTED]
> > > > Sent: Wednesday, February 06, 2008 10:42 AM
> > > > To: [EMAIL PROTECTED]
> > > > Subject: [osg-users] performance fbo
> >
> > > > Hi all,
> >
> > > > I modified the osgprerender example to add a certain number of 
> > > > cameras, doing exactly the same thing as the one that rendering 
> > > > to a texture, but made them render to a texture that is 
> not used.
> > > > So in the scene, there is the main viewer, the camera 
> that's doing 
> > > > rtt, and a lot of other cameras doing rtt for nothing.
> > > > What I've experienced is that by using the fbo 
> implementation, the 
> > > > fps is really lower than the one I get by using any of 
> the other 
> > > > implementation ...
> > > > You may ask why I'm doing this, but I want to do a lot of rtt 
> > > > saving each render to an image, so I thought that just by 
> > > > modifying the osgprerender example, it would do the trick ...
> > > > but :( Is there some kind of overhead related to using a lot of 
> > > > fbos compared to another method ??
> >
> > > > Thanks all
> > > > ___
> > > > osg-users mailing list
> > > > [EMAIL PROTECTED]
> > > >http://lists.openscenegraph.org/listinfo.cgi/osg-users-opensce
> >
> > > negraph.org
> >
> > > ___
> > > osg-users mailing list
> > > 
> [EMAIL PROTECTED]://lists.openscenegraph.
org/listinfo.cgi/osg-users-openscenegraph...
> >
> > ___
> > osg-users mailing list
> > 
> [EMAIL PROTECTED]://lists.openscenegraph.
org/listinfo.cgi/osg-users-openscenegraph...
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-opensce
negraph.org

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


Re: [osg-users] View matrix center

2008-02-07 Thread Paul Martz
> Presumably because getViewMatrixAsLookAt() doesn't do any 
> magic, it just takes the Y axis (in this case) of the matrix 
> as the view vector. This vector will be normalised (otherwise 
> the camera would do funky things), so all it can do is 
> subtract this unit vector from the eye position.

The name 'center' is probably a misnomer here, and certainly has nothing to
do with the orbital center of the manipulator.

getViewMatrixAsLookAt has its roots in the gluLookAt function. The second
parameter is a point that your eye is looking at. Of course there are
several points that your eye is looking at, all along the view vector, and
you could call gluLookAt with any one of those points and still create the
same matrix. I've always remembered the three params to gluLookAt as "look"
(the eye position), "at" (where your gaze is directed), and "up". Why the
second param is called "center" instead of "at", I don't know, probably some
kind of historical reason.

> I guess the manipulator has some notion of the point about 
> which it orbits, but I couldn't tell you what that is 
> off-hand. The header will tell you, no doubt.

Yep, read the code. Look for something like "getCenter" in
MatrixManipulator, that would be a good start.

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

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


Re: [osg-users] generation of file .exe

2008-02-07 Thread Thrall, Bryan
[EMAIL PROTECTED] wrote on Wednesday, February 06, 2008 10:08 PM:
> Hello
> 
>> 
>> - OSG can be built statically and so can be run as a single file,
>> without dependence on other .dll files
>> 
> 
> i didnt realise this could be done, any info on how to do it in vs
> 2008 c++ ??

You can build OSG static libs from source; it's one of the configuration
options in the CMake file (DYNAMIC_OPENSCENEGRAPH).

> for example can you still do it if your proggram development is done
> being linked to the precompiled dll's ?

You have to link against the static libs, not the DLLs.

> and can you do this and remove the need to install the c++ runtime
> library's on the traget machine under VS 2008 c++, or do you still
> have to do that ?

Installing the VS 2008 C++ runtime is still required on target machines
if you build your project (and OSG) against the DLL Runtime library (/MD
or /MDd). You can build against the static runtime using /MT or /MTd,
but be careful not to mix runtimes (i.e. some parts of the program built
using /MD and other built with /MT) because that can cause trouble.

-- 
Bryan Thrall
FlightSafety International
[EMAIL PROTECTED]
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] camera export and osgexp

2008-02-07 Thread Tomas Larsson
Hi,

 

I've made a scene in 3ds-max and exported the scene to osg with OsgExp. It
works fine except for that the camera is not use when running the scene.

If I open the osg file I see that the camera transformation is in there. I
load the scene like this.

 

osg::Group* root = new osg::Group();

osg::Node* model = osgDB::readNodeFile("test.osg");

root->addChild(model);

viewer.setSceneData( root );

viewer.run()

 

Is there some special care that needs to be taken to make it use the camera
in the osg file?

 

Thanks,

Tomas

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


Re: [osg-users] performance fbo

2008-02-07 Thread nicolas martin
Well, if I understand the way it is working, the fbo saves you the
time to copy from the framebuffer to a texture, but you still have to
transfer from the texture to main memory. But if is right, then
rendering to an image should be faster using an fbo, even when there
is only one fbo (and no overhead related to binding...), but it seems
the performances are the same whatever the method in osgprerender.
Anyway, when using a lot of rtts, I found that using fb is really
faster than using fbos, is it a problem of osg ? or just normal due to
the way fbos works ?

So If i plan on doing a lot of rtts, saving each render to an image
(in main memory), should I stick with adding a lot of cameras each
rendering to an osg::Image with framebuffer implementation ?? or has
anybody else ever tried something else ?

thanks

On 6 fév, 17:21, nicolas martin <[EMAIL PROTECTED]> wrote:
> Well, let's say that i'm adding like 50 cameras so basically 50
> fbos ...
> But as I currently don't really understand what is the need for fbo,
> if
> you're about to copy the texture to an image anyway, can anyone
> explain it to me ???
> I'm also really interested in understanding what is exactly osg doing
> when it is rendering to an image ... Creating an fbo (with what format
> for the texture ??), rendering to it, and then copying it to my
> image ??
>
> thanks
>
> On Feb 6, 2:59 pm, "Paul Martz" <[EMAIL PROTECTED]> wrote:
>
> > How many fbos is "a lot"? Hundreds of BindBuffer calls per frame can not be
> > a good thing,  perhaps that explains the performance hit.
> >-Paul
>
> > > -Original Message-
> > > From: [EMAIL PROTECTED]
> > > [mailto:[EMAIL PROTECTED] On Behalf
> > > Of [EMAIL PROTECTED]
> > > Sent: Wednesday, February 06, 2008 10:42 AM
> > > To: [EMAIL PROTECTED]
> > > Subject: [osg-users] performance fbo
>
> > > Hi all,
>
> > > I modified the osgprerender example to add a certain number
> > > of cameras, doing exactly the same thing as the one that > > rendering to a texture, but made them render to a texture
> > > that is not used.
> > > So in the scene, there is the main viewer, the camera that's
> > > doing rtt, and a lot of other cameras doing rtt for nothing.
> > > What I've experienced is that by using the fbo
> > > implementation, the fps is really lower than the one I get by
> > > using any of the other implementation ...
> > > You may ask why I'm doing this, but I want to do a lot of rtt
> > > saving each render to an image, so I thought that just by
> > > modifying the osgprerender example, it would do the trick ...
> > > but :( Is there some kind of overhead related to using a lot
> > > of fbos compared to another method ??
>
> > > Thanks all
> > > ___
> > > osg-users mailing list
> > > [EMAIL PROTECTED]
> > >http://lists.openscenegraph.org/listinfo.cgi/osg-users-opensce
>
> > negraph.org
>
> > ___
> > osg-users mailing list
> > [EMAIL 
> > PROTECTED]://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph...
>
> ___
> osg-users mailing list
> [EMAIL 
> PROTECTED]://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph...
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] X11 keyboard bug (+ fix)

2008-02-07 Thread Melchior FRANZ
* Melchior FRANZ -- Thursday 07 February 2008:
> I never use alt+tab,

No, wait. I use it all the time! Only it's Meta-Tab here.
And it works here with my patch, while first tests have shown
that FocusOut, LeaveNotify, and KeymapNotify weren't triggered
at all (which is suspicious). Still investigating ...

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


Re: [osg-users] View matrix center

2008-02-07 Thread John Donovan
Jean-Sébastien Guay wrote:
 > The eye point is as expected, but instead I get center = (0,-39,0).

Presumably because getViewMatrixAsLookAt() doesn't do any magic, it just takes 
the Y axis (in this case) of the matrix as the view vector. This vector will be 
normalised (otherwise the camera would do funky things), so all it can do is 
subtract this unit vector from the eye position.
I guess the manipulator has some notion of the point about which it orbits, but 
I couldn't tell you what that is off-hand. The header will tell you, no doubt.

-JD, who is pressing all the right keys, just not necessarily in the right 
order.



__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] View matrix center

2008-02-07 Thread Jean-Sébastien Guay
Hello,

A quick question about the camera view matrix.

I have a viewer which is close to the default osgviewer, with the 
default camera manipulator. I can see that at startup, the camera is at, 
say, (0,-40,0) (looking down the positive Y axis, with the +Z up 
convention). I can also see that I am orbiting around the origin (0,0,0).

So I would expect that using camera->getViewMatrixAsLookAt(eye, center, 
up) would give
eye = (0,-40,0)
center = (0,0,0)

The eye point is as expected, but instead I get center = (0,-39,0).

Why is this? Is that a result of the manipulator? Do I need to get one 
of the manipulator's properties in order to get the value I need? I 
really need both the correct eye point and the actual point the camera 
is orbiting around...

Thanks in advance,

J-S

-- 
__
Jean-Sebastien Guay[EMAIL PROTECTED]
   http://www.cm-labs.com/
http://whitestar02.webhop.org/

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


Re: [osg-users] X11 keyboard bug (+ fix)

2008-02-07 Thread Melchior FRANZ
* till busch -- Thursday 07 February 2008:
> ulrich hertlein said something about "KeymapNotify which is
> generated after every EnterNotify and FocusIn". something
> like this might be a better place? 

I never use alt+tab, so I didn't notice. Don't know yet about
KeymapNotify, but we don't want to release keys when the app
gets focus again. We want to do that already when it loses
focus. (Otherwise a stuck repeatable key might do funny things
while we are away. :-) I'll try with FocusOut, LeaveNotify,
KeymapNotify. Thanks for the hint!

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


Re: [osg-users] Transparent sphere

2008-02-07 Thread Jean-Sébastien Guay
Hi Paul,

> Probably a more interesting question is how to render the transparent sphere
> so that the back half is rendered first and the front half is rendered
> second, for proper blending.
>
> Best way to do that is to multi-parent the sphere to two Geodes. In one
> Geode cull front faces, and in the other cull back faces. Then set the
> render bin details so that the back half gets rendered before the front half
> -- and both get rendered after the opaque sphere, of course.

Nice catch, I hadn't thought of this. I generally don't use transparency 
that much, and then mostly in test programs, so I normally just accept 
what I get with artifacts and all... :-)

J-S

-- 
__
Jean-Sebastien Guay[EMAIL PROTECTED]
   http://www.cm-labs.com/
http://whitestar02.webhop.org/

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


Re: [osg-users] Win32 VS8.0 crash on exit in debugger, related to freetype

2008-02-07 Thread Jean-Sébastien Guay
Hello Thibault,

> I have tried to comment out the 2nd line, and the program exits correctly.
>   

Great! Excellent! Thanks for getting to the bottom of this!

It will be great to finally be free of this, as it would pop up each 
time I would try a test program in the debugger and displayed the stats...

Thanks again, looking forward to seeing this on osg-submissions (and in 
SVN :-) )

J-S

-- 
__
Jean-Sebastien Guay[EMAIL PROTECTED]
   http://www.cm-labs.com/
http://whitestar02.webhop.org/

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


Re: [osg-users] X11 keyboard bug (+ fix)

2008-02-07 Thread till busch
hi melchior,

i believe UmapNotify is not the right place to do this (or at least not the 
only place that you should consider). the bug also appears when changing 
focus with alt+tab (in kde).

ulrich hertlein said something about "KeymapNotify which is generated after 
every EnterNotify and FocusIn". something like this might be a better place?

regards,

-till

On Wednesday 06 February 2008, Melchior FRANZ wrote:
> Thanks to all who replied. I've now written a cleaner fix.
> The focus on modifiers was silly. After we lose all releases
> on a "window hide" event, not only modifier releases, we also
> have to fake-release all of them. What made the most sense
> to me was to maintain a keyStateMap which keeps track of
> the pressed/released state. On "UnmapNotify" all pressed
> keys are released. (I didn't mess with the current-event-state's
> modifier mask, as this is updated with the next event, anyway.)
>
> Patch attached. (I'll submit that if there are no serious
> objections.)
>
> m.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Transparent sphere

2008-02-07 Thread Paul Martz
> How can I draw a Transparent sphere?
> 
> I need to draw a sphere inside a Transparent one. 
> Can anyone tell me how to set the material and color of the 
> Transparent one.

Probably a more interesting question is how to render the transparent sphere
so that the back half is rendered first and the front half is rendered
second, for proper blending.

Best way to do that is to multi-parent the sphere to two Geodes. In one
Geode cull front faces, and in the other cull back faces. Then set the
render bin details so that the back half gets rendered before the front half
-- and both get rendered after the opaque sphere, of course.

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

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


Re: [osg-users] Win32 VS8.0 crash on exit in debugger, related to freetype

2008-02-07 Thread Thibault Genessay
Hi there,

Good news, it seems :)

On December 16, Robert committed a patch that included the following
lines in FreeTypeLibrary.cpp
if (font) font->setImplementation(0);
fontImplementation->_facade = 0;
However, they are clearly wrong (at least, when the program exits)
because after the first one is executed, fontImplementation points to
unallocated space. Thus setting the _facade to 0 creates the "memory
was modified after it was freed" error.
I have tried to comment out the 2nd line, and the program exits correctly.

As a side note, adding the
 osgDB::Registry::instance()->clearObjectCache();
suggested by Jari before the program exists (this would prevent the
problem from happening before my fix trial) does not create any memory
leak. I guess it means that the second instruction above is redundant.

I have also tested the fix in my application, and the error message at
exit went away.

I have not had the opportunity to test on Linux yet because I'm not in
synch with SVN on this platform. Could you guys try this fix in your
various environments ?


On Feb 7, 2008 2:50 PM, Jean-Sébastien Guay
<[EMAIL PROTECTED]> wrote:
> Hello Thibault,
>
> > I am using VS 2008 and Mike's DLL compiled for 7.1. I have had no
> > problem so far, so I guess the problem is inside the OSG, and not
> > exactly related to FreeType.
> >
>
> First of all, if you're using VS 2008 you really should use the 8.0
> precompiled binaries at a minimum, and I don't think we've done enough
> testing yet to even confirm if that's a good idea or not. Up until now,
> it seems fine, but it could lead to problems in the future. Ideally, we
> should have binaries for 9.0, as historically using libs/dlls compiled
> with a version of VC++ different from the one you're using to compile
> your executable would lead to weird problems/crashes. In this case it's
> too early to tell.
>

You are quite right, I should take the secure route, but as far as I
know, pure C libs have absolutely no problem being used by other
versions of the compiler.
Anyway I'll change my 3rd party libs soon, we never know what
Microsoft will do in the next version of their compiler :)

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


Re: [osg-users] Transparent sphere

2008-02-07 Thread Jean-Sébastien Guay
Hello Ahmed,
> I need to draw a sphere inside a Transparent one. 
> Can anyone tell me how to set the material and color of the Transparent one.
>   

If you're using ShapeDrawables for your spheres, you can do it like this:

// Sphere of radius 1, red and semi-transparent.
osg::ref_ptr sphere = new osg::ShapeDrawable(new 
osg::Sphere(osg::Vec3(0,0,0), 1));
sphere->setColor(1, 0, 0, 0.5);// red, with 50% opacity.
sphere->getOrCreateStateSet()->setMode(GL_BLEND, 
osg::StateAttribute::ON);  // Activate blending.
osg::ref_ptr geode = new osg::Geode;
geode->addDrawable(sphere.get());

// Sphere of radius 0.5, blue.
osg::ref_ptr sphere2 = new osg::ShapeDrawable(new 
osg::Sphere(osg::Vec3(0,0,0), 0.5));
sphere2->setColor(0, 0, 1, 1);// blue
osg::ref_ptr geode2 = new osg::Geode;
geode2->addDrawable(sphere2.get());

osg::ref_ptr root = new osg::Group;
root->addChild(geode.get());
root->addChild(geode2.get());

That should give you a semi-transparent red sphere with an opaque blue 
sphere inside. (untested...)

If you're using normal geometry, you need to set a color array with the 
opacity you want, and remember to enable blending on it too.

J-S

-- 
__
Jean-Sebastien Guay[EMAIL PROTECTED]
   http://www.cm-labs.com/
http://whitestar02.webhop.org/

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


Re: [osg-users] Win32 VS8.0 crash on exit in debugger, related to freetype

2008-02-07 Thread Jean-Sébastien Guay
Hello Thibault,

> I am using VS 2008 and Mike's DLL compiled for 7.1. I have had no
> problem so far, so I guess the problem is inside the OSG, and not
> exactly related to FreeType.
>   

First of all, if you're using VS 2008 you really should use the 8.0 
precompiled binaries at a minimum, and I don't think we've done enough 
testing yet to even confirm if that's a good idea or not. Up until now, 
it seems fine, but it could lead to problems in the future. Ideally, we 
should have binaries for 9.0, as historically using libs/dlls compiled 
with a version of VC++ different from the one you're using to compile 
your executable would lead to weird problems/crashes. In this case it's 
too early to tell.

> Adrian, you mentioned something about multi-threading earlier in this
> topic. Do you think such a program is suffer from MT problems ?
> Actually, I don't know osgDB well enough to tell.
>   

The current theory is that it's related to how OSG tries to unload the 
freetype plugin. From such a simple test case, I would say that 
multithreading is unrelated to this particular crash at exit, as no 
viewer is ever instantiated (and thus, no draw/cull/update threads fired).

Thanks for the test case, it's a step in the right direction.

J-S

-- 
__
Jean-Sebastien Guay[EMAIL PROTECTED]
   http://www.cm-labs.com/
http://whitestar02.webhop.org/

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


Re: [osg-users] intersect() methods in LineSegment (probably others)

2008-02-07 Thread Jean-Sébastien Guay
Hello Andy,

> I've submitted a change to the submission list.  Please take a look and tell 
> me if and how much it affects timing.
>   

Great, I'll try and check it out tonight and get back to you.

J-S

-- 
__
Jean-Sebastien Guay[EMAIL PROTECTED]
   http://www.cm-labs.com/
http://whitestar02.webhop.org/

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


Re: [osg-users] Win32 VS8.0 crash on exit in debugger, related to freetype

2008-02-07 Thread Thibault Genessay
Hi guys

I've updated this morning to the latest SVN, and I get an error that
looks the same as yours.
I am using VS 2008 and Mike's DLL compiled for 7.1. I have had no
problem so far, so I guess the problem is inside the OSG, and not
exactly related to FreeType.

I have tried with a very minimal program that exhibits the problem:

#include 

int main(int argc, char* argv[])
{
osg::ref_ptr font = 
osgText::readFontFile("fonts/arial.ttf");
return 0;
}

The output of the debugger follows in appendix.
With such a minimal program I guess I'll have the opportunity to
understand what is going wrong.

Adrian, you mentioned something about multi-threading earlier in this
topic. Do you think such a program is suffer from MT problems ?
Actually, I don't know osgDB well enough to tell.

I'll keep you guys informed.

Thibault



Debugger output:


'test_osg_freetype_crash_on_exit.exe': Loaded
'C:\dev\test_osg_freetype_crash_on_exit\Debug\test_osg_freetype_crash_on_exit.exe',
Symbols loaded.
'test_osg_freetype_crash_on_exit.exe': Loaded 'C:\WINDOWS\system32\ntdll.dll'
'test_osg_freetype_crash_on_exit.exe': Loaded 'C:\WINDOWS\system32\kernel32.dll'
'test_osg_freetype_crash_on_exit.exe': Loaded
'C:\dev\libs\bin\osg30-osgd.dll', Symbols loaded.
'test_osg_freetype_crash_on_exit.exe': Loaded
'C:\dev\libs\bin\ot9-OpenThreadsd.dll', Symbols loaded.
'test_osg_freetype_crash_on_exit.exe': Loaded
'C:\WINDOWS\WinSxS\x86_Microsoft.VC90.DebugCRT_1fc8b3b9a1e18e3b_9.0.21022.8_x-ww_597c3456\msvcr90d.dll'
'test_osg_freetype_crash_on_exit.exe': Loaded
'C:\WINDOWS\WinSxS\x86_Microsoft.VC90.DebugCRT_1fc8b3b9a1e18e3b_9.0.21022.8_x-ww_597c3456\msvcp90d.dll'
'test_osg_freetype_crash_on_exit.exe': Loaded 'C:\WINDOWS\system32\glu32.dll'
'test_osg_freetype_crash_on_exit.exe': Loaded 'C:\WINDOWS\system32\msvcrt.dll'
'test_osg_freetype_crash_on_exit.exe': Loaded 'C:\WINDOWS\system32\opengl32.dll'
'test_osg_freetype_crash_on_exit.exe': Loaded 'C:\WINDOWS\system32\advapi32.dll'
'test_osg_freetype_crash_on_exit.exe': Loaded 'C:\WINDOWS\system32\rpcrt4.dll'
'test_osg_freetype_crash_on_exit.exe': Loaded 'C:\WINDOWS\system32\gdi32.dll'
'test_osg_freetype_crash_on_exit.exe': Loaded 'C:\WINDOWS\system32\user32.dll'
'test_osg_freetype_crash_on_exit.exe': Loaded 'C:\WINDOWS\system32\ddraw.dll'
'test_osg_freetype_crash_on_exit.exe': Loaded 'C:\WINDOWS\system32\dciman32.dll'
'test_osg_freetype_crash_on_exit.exe': Loaded
'C:\dev\libs\bin\osg30-osgTextd.dll', Symbols loaded.
'test_osg_freetype_crash_on_exit.exe': Loaded
'C:\dev\libs\bin\osg30-osgDBd.dll', Symbols loaded.
'test_osg_freetype_crash_on_exit.exe': Loaded 'C:\WINDOWS\system32\imm32.dll'
'test_osg_freetype_crash_on_exit.exe': Loaded
'C:\dev\libs\bin\osgdb_freetyped.dll', Symbols loaded.
'test_osg_freetype_crash_on_exit.exe': Loaded
'C:\dev\libs\bin\osg30-osgUtild.dll', Symbols loaded.
HEAP[test_osg_freetype_crash_on_exit.exe]: HEAP: Free Heap block
d53940 modified at d593a8 after it was freed
Windows has triggered a breakpoint in test_osg_freetype_crash_on_exit.exe.

This may be due to a corruption of the heap, which indicates a bug in
test_osg_freetype_crash_on_exit.exe or any of the DLLs it has loaded.

This may also be due to the user pressing F12 while
test_osg_freetype_crash_on_exit.exe has focus.

The output window may have more diagnostic information.
The program '[3288] test_osg_freetype_crash_on_exit.exe: Native' has
exited with code 0 (0x0).
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osgshadowd.exe = black

2008-02-07 Thread Anders Backman
The texture is named lz.rgb and is available in the version 2.0 of
OpenSCeneGraph-Data

http://www.openscenegraph.org/downloads/data/OpenSceneGraph-Data-2.0.zip

And yes, having an algorithm depending on a texture-file that will never
change and is very very small is not a good idea.
So that sounds great.

Cheers

/Anders

On Feb 7, 2008 1:52 PM, Adrian Egli OpenSceneGraph (3D) <[EMAIL PROTECTED]>
wrote:

> Hi Anders,
>
> what pixel color has the texture? just white, if yes we should replace
> this by a "coded" texture, i am not a friend of such error source. so can
> you work out, the texture and where the texture is loaded. may you can just
> send the line, source file and the name of the texture file. i will try to
> "fix" it tomorrow.
>
> /Adegli
>
>
> 2008/2/7, Anders Backman <[EMAIL PROTECTED]>:
> >
> > oh, yes, thats right, I saw that mentioned earlier in the list, that
> > they added a small texture for getting all objects textured
> >
> > Thats the way it gets when you dont read all messages both in the
> > console and in the mailinglist
> >
> > It works now.
> >
> > Thanks!
> >
> >
> > /Anders
> >
> > On Feb 7, 2008 1:23 PM, Morné Pistorius <[EMAIL PROTECTED]>
> > wrote:
> >
> > > Just a thought - Is your OSG_FILE_PATH set up properly?  When I run it
> > > (on stable 2.2 release) the entire scene is black if osg can't find
> > > the texture images.  If OSG_FILE_PATH is set to my data directory,
> > > shadows work fine.  From your screen shots it looks like the textures
> > > aren't loaded.
> > >
> > > cheers,
> > > Morne
> > >
> > > On Feb 7, 2008 12:16 PM, Anders Backman <[EMAIL PROTECTED]> wrote:
> > > > Not black, but full of artefacts on VISTA, XP, Ubuntu (gcc)
> > > >
> > > > Screenshots found at:
> > > >
> > > > http://www.vrlab.umu.se/osg
> > > >
> > > > pssm.png --pssm
> > > > sv.png --sv
> > > > sm.png --sm
> > > >
> > > > All shadow implementations in the trunk (including --ssm) shows a
> > > very bad
> > > > result in svn for XP,VISTA, very recent drivers, GeForce8600Go,
> > > GeForce
> > > > 6800Go, and finally 8800GTX under Ubuntu.
> > > >
> > > > shadowmaps worked in the svn version from November that we used
> > > previously.
> > > >
> > > > /Anders
> > > >
> > > >
> > > >
> > > >
> > > > On Feb 7, 2008 11:37 AM, Adrian Egli OpenSceneGraph (3D) <
> > > [EMAIL PROTECTED]>
> > > > wrote:
> > > >
> > > > > What about PSSM ?
> > > > >
> > > > >
> > > > > 2008/2/7, Anders Backman <[EMAIL PROTECTED]>:
> > > > > >
> > > > > >
> > > > > >
> > > > > > Just verified this under Ubuntu with osg svn version. Same
> > > problem,
> > > > everything is black when using shadowmaps.
> > > > > >
> > > > > > /Anders
> > > > > >
> > > > > >
> > > > > >
> > > > > > On Feb 7, 2008 11:21 AM, Anders Backman <[EMAIL PROTECTED]>
> > > wrote:
> > > > > >
> > > > > > > Hi all.
> > > > > > >
> > > > > > > I just did a svn checkout of osg and build it with VS2008 in
> > > windows
> > > > Vista (and xp).
> > > > > > >
> > > > > > > On both of my machines (one vista 64bit but built in 32bit,
> > > and one xp
> > > > 32bit) the shadowed scene in osgshadowd.exe is completely black.
> > > > > > >
> > > > > > > osgshadowd --sv works but none of the --ssm or --sm
> > > > > > >
> > > > > > > ANyone seen this?
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > --
> > > > > > >
> > > > > > >
> > > > > > >
> > > 
> > > > > > > Anders Backman   Email:[EMAIL PROTECTED]
> > > > > > > HPC2N/VRlab  Phone:+46 (0)90-786 9936
> > > > > > > Umea university  Cellular: +46 (0)70-392 64 67
> > > > > > > S-901 87 UMEA SWEDEN Fax:  +46 90-786 6126
> > > > > > >   
> > > > > > > http://www.cs.umu.se/~andersb
> > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > >
> > > > > >
> > > > > > 
> > > > > > Anders Backman   Email:[EMAIL PROTECTED]
> > > > > > HPC2N/VRlab  Phone:+46 (0)90-786 9936
> > > > > > Umea university  Cellular: +46 (0)70-392 64 67
> > > > > > S-901 87 UMEA SWEDEN Fax:  +46 90-786 6126
> > > > > >   
> > > > > > http://www.cs.umu.se/~andersb
> > > > > > ___
> > > > > > osg-users mailing list
> > > > > > osg-users@lists.openscenegraph.org
> > > > > >
> > > >
> > > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > 
> > > > > Adrian Egli
> > > > > ___
> > > > > osg-users mailing list
> > > > > osg-users@lists.openscenegraph.org
> > > > >
> > > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or

Re: [osg-users] osgshadowd.exe = black

2008-02-07 Thread Adrian Egli OpenSceneGraph (3D)
Hi Anders,

what pixel color has the texture? just white, if yes we should replace this
by a "coded" texture, i am not a friend of such error source. so can you
work out, the texture and where the texture is loaded. may you can just send
the line, source file and the name of the texture file. i will try to "fix"
it tomorrow.

/Adegli

2008/2/7, Anders Backman <[EMAIL PROTECTED]>:
>
> oh, yes, thats right, I saw that mentioned earlier in the list, that they
> added a small texture for getting all objects textured
>
> Thats the way it gets when you dont read all messages both in the console
> and in the mailinglist
>
> It works now.
>
> Thanks!
>
>
> /Anders
>
> On Feb 7, 2008 1:23 PM, Morné Pistorius <[EMAIL PROTECTED]>
> wrote:
>
> > Just a thought - Is your OSG_FILE_PATH set up properly?  When I run it
> > (on stable 2.2 release) the entire scene is black if osg can't find
> > the texture images.  If OSG_FILE_PATH is set to my data directory,
> > shadows work fine.  From your screen shots it looks like the textures
> > aren't loaded.
> >
> > cheers,
> > Morne
> >
> > On Feb 7, 2008 12:16 PM, Anders Backman <[EMAIL PROTECTED]> wrote:
> > > Not black, but full of artefacts on VISTA, XP, Ubuntu (gcc)
> > >
> > > Screenshots found at:
> > >
> > > http://www.vrlab.umu.se/osg
> > >
> > > pssm.png --pssm
> > > sv.png --sv
> > > sm.png --sm
> > >
> > > All shadow implementations in the trunk (including --ssm) shows a very
> > bad
> > > result in svn for XP,VISTA, very recent drivers, GeForce8600Go,
> > GeForce
> > > 6800Go, and finally 8800GTX under Ubuntu.
> > >
> > > shadowmaps worked in the svn version from November that we used
> > previously.
> > >
> > > /Anders
> > >
> > >
> > >
> > >
> > > On Feb 7, 2008 11:37 AM, Adrian Egli OpenSceneGraph (3D) <
> > [EMAIL PROTECTED]>
> > > wrote:
> > >
> > > > What about PSSM ?
> > > >
> > > >
> > > > 2008/2/7, Anders Backman <[EMAIL PROTECTED]>:
> > > > >
> > > > >
> > > > >
> > > > > Just verified this under Ubuntu with osg svn version. Same
> > problem,
> > > everything is black when using shadowmaps.
> > > > >
> > > > > /Anders
> > > > >
> > > > >
> > > > >
> > > > > On Feb 7, 2008 11:21 AM, Anders Backman <[EMAIL PROTECTED]> wrote:
> > > > >
> > > > > > Hi all.
> > > > > >
> > > > > > I just did a svn checkout of osg and build it with VS2008 in
> > windows
> > > Vista (and xp).
> > > > > >
> > > > > > On both of my machines (one vista 64bit but built in 32bit, and
> > one xp
> > > 32bit) the shadowed scene in osgshadowd.exe is completely black.
> > > > > >
> > > > > > osgshadowd --sv works but none of the --ssm or --sm
> > > > > >
> > > > > > ANyone seen this?
> > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > >
> > > > > >
> > > > > > 
> > > > > > Anders Backman   Email:[EMAIL PROTECTED]
> > > > > > HPC2N/VRlab  Phone:+46 (0)90-786 9936
> > > > > > Umea university  Cellular: +46 (0)70-392 64 67
> > > > > > S-901 87 UMEA SWEDEN Fax:  +46 90-786 6126
> > > > > >   
> > > > > > http://www.cs.umu.se/~andersb
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > >
> > > > >
> > > > > 
> > > > > Anders Backman   Email:[EMAIL PROTECTED]
> > > > > HPC2N/VRlab  Phone:+46 (0)90-786 9936
> > > > > Umea university  Cellular: +46 (0)70-392 64 67
> > > > > S-901 87 UMEA SWEDEN Fax:  +46 90-786 6126
> > > > >   
> > > > > http://www.cs.umu.se/~andersb
> > > > > ___
> > > > > osg-users mailing list
> > > > > osg-users@lists.openscenegraph.org
> > > > >
> > >
> > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> > > > >
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > 
> > > > Adrian Egli
> > > > ___
> > > > osg-users mailing list
> > > > osg-users@lists.openscenegraph.org
> > > >
> > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> > > >
> > > >
> > >
> > >
> > >
> > > --
> > >
> > >
> > > 
> > >  Anders Backman   Email:[EMAIL PROTECTED]
> > >  HPC2N/VRlab  Phone:+46 (0)90-786 9936
> > >  Umea university  Cellular: +46 (0)70-392 64 67
> > >  S-901 87 UMEA SWEDEN Fax:  +46 90-786 6126
> > >
> > > http://www.cs.umu.se/~andersb
> > > ___
> > > osg-users mailing list
> > > osg-users@lists.openscenegraph.org
> > >
> > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> 

Re: [osg-users] osgshadowd.exe = black

2008-02-07 Thread Anders Backman
oh, yes, thats right, I saw that mentioned earlier in the list, that they
added a small texture for getting all objects textured

Thats the way it gets when you dont read all messages both in the console
and in the mailinglist

It works now.

Thanks!


/Anders

On Feb 7, 2008 1:23 PM, Morné Pistorius <[EMAIL PROTECTED]>
wrote:

> Just a thought - Is your OSG_FILE_PATH set up properly?  When I run it
> (on stable 2.2 release) the entire scene is black if osg can't find
> the texture images.  If OSG_FILE_PATH is set to my data directory,
> shadows work fine.  From your screen shots it looks like the textures
> aren't loaded.
>
> cheers,
> Morne
>
> On Feb 7, 2008 12:16 PM, Anders Backman <[EMAIL PROTECTED]> wrote:
> > Not black, but full of artefacts on VISTA, XP, Ubuntu (gcc)
> >
> > Screenshots found at:
> >
> > http://www.vrlab.umu.se/osg
> >
> > pssm.png --pssm
> > sv.png --sv
> > sm.png --sm
> >
> > All shadow implementations in the trunk (including --ssm) shows a very
> bad
> > result in svn for XP,VISTA, very recent drivers, GeForce8600Go, GeForce
> > 6800Go, and finally 8800GTX under Ubuntu.
> >
> > shadowmaps worked in the svn version from November that we used
> previously.
> >
> > /Anders
> >
> >
> >
> >
> > On Feb 7, 2008 11:37 AM, Adrian Egli OpenSceneGraph (3D) <
> [EMAIL PROTECTED]>
> > wrote:
> >
> > > What about PSSM ?
> > >
> > >
> > > 2008/2/7, Anders Backman <[EMAIL PROTECTED]>:
> > > >
> > > >
> > > >
> > > > Just verified this under Ubuntu with osg svn version. Same problem,
> > everything is black when using shadowmaps.
> > > >
> > > > /Anders
> > > >
> > > >
> > > >
> > > > On Feb 7, 2008 11:21 AM, Anders Backman <[EMAIL PROTECTED]> wrote:
> > > >
> > > > > Hi all.
> > > > >
> > > > > I just did a svn checkout of osg and build it with VS2008 in
> windows
> > Vista (and xp).
> > > > >
> > > > > On both of my machines (one vista 64bit but built in 32bit, and
> one xp
> > 32bit) the shadowed scene in osgshadowd.exe is completely black.
> > > > >
> > > > > osgshadowd --sv works but none of the --ssm or --sm
> > > > >
> > > > > ANyone seen this?
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > >
> > > > >
> > > > > 
> > > > > Anders Backman   Email:[EMAIL PROTECTED]
> > > > > HPC2N/VRlab  Phone:+46 (0)90-786 9936
> > > > > Umea university  Cellular: +46 (0)70-392 64 67
> > > > > S-901 87 UMEA SWEDEN Fax:  +46 90-786 6126
> > > > >   
> > > > > http://www.cs.umu.se/~andersb
> > > >
> > > >
> > > >
> > > > --
> > > >
> > > >
> > > > 
> > > > Anders Backman   Email:[EMAIL PROTECTED]
> > > > HPC2N/VRlab  Phone:+46 (0)90-786 9936
> > > > Umea university  Cellular: +46 (0)70-392 64 67
> > > > S-901 87 UMEA SWEDEN Fax:  +46 90-786 6126
> > > >   
> > > > http://www.cs.umu.se/~andersb
> > > > ___
> > > > osg-users mailing list
> > > > osg-users@lists.openscenegraph.org
> > > >
> >
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> > > >
> > > >
> > >
> > >
> > >
> > > --
> > > 
> > > Adrian Egli
> > > ___
> > > osg-users mailing list
> > > osg-users@lists.openscenegraph.org
> > >
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> > >
> > >
> >
> >
> >
> > --
> >
> >
> > 
> >  Anders Backman   Email:[EMAIL PROTECTED]
> >  HPC2N/VRlab  Phone:+46 (0)90-786 9936
> >  Umea university  Cellular: +46 (0)70-392 64 67
> >  S-901 87 UMEA SWEDEN Fax:  +46 90-786 6126
> >
> > http://www.cs.umu.se/~andersb
> > ___
> > 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
>



-- 



Anders Backman   Email:[EMAIL PROTECTED]
HPC2N/VRlab  Phone:+46 (0)90-786 9936
Umea university  Cellular: +46 (0)70-392 64 67
S-901 87 UMEA SWEDEN Fax:  +46 90-786 6126
  http://www.cs.umu.se/~andersb
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.op

Re: [osg-users] osgshadowd.exe = black

2008-02-07 Thread Adrian Egli OpenSceneGraph (3D)
Hi,

what texture the osg viewer is looking for, may this black shadows are
coming form the "dummy" texture trick we integrated into all shadows
technique (shaders). can you please check out, wether it works when the
texture are found. OSG_NOTIFY_LEVEL=DEBUG may helps.

/adegli

2008/2/7, Morné Pistorius <[EMAIL PROTECTED]>:
>
> Just a thought - Is your OSG_FILE_PATH set up properly?  When I run it
> (on stable 2.2 release) the entire scene is black if osg can't find
> the texture images.  If OSG_FILE_PATH is set to my data directory,
> shadows work fine.  From your screen shots it looks like the textures
> aren't loaded.
>
> cheers,
> Morne
>
> On Feb 7, 2008 12:16 PM, Anders Backman <[EMAIL PROTECTED]> wrote:
> > Not black, but full of artefacts on VISTA, XP, Ubuntu (gcc)
> >
> > Screenshots found at:
> >
> > http://www.vrlab.umu.se/osg
> >
> > pssm.png --pssm
> > sv.png --sv
> > sm.png --sm
> >
> > All shadow implementations in the trunk (including --ssm) shows a very
> bad
> > result in svn for XP,VISTA, very recent drivers, GeForce8600Go, GeForce
> > 6800Go, and finally 8800GTX under Ubuntu.
> >
> > shadowmaps worked in the svn version from November that we used
> previously.
> >
> > /Anders
> >
> >
> >
> >
> > On Feb 7, 2008 11:37 AM, Adrian Egli OpenSceneGraph (3D) <
> [EMAIL PROTECTED]>
> > wrote:
> >
> > > What about PSSM ?
> > >
> > >
> > > 2008/2/7, Anders Backman <[EMAIL PROTECTED]>:
> > > >
> > > >
> > > >
> > > > Just verified this under Ubuntu with osg svn version. Same problem,
> > everything is black when using shadowmaps.
> > > >
> > > > /Anders
> > > >
> > > >
> > > >
> > > > On Feb 7, 2008 11:21 AM, Anders Backman <[EMAIL PROTECTED]> wrote:
> > > >
> > > > > Hi all.
> > > > >
> > > > > I just did a svn checkout of osg and build it with VS2008 in
> windows
> > Vista (and xp).
> > > > >
> > > > > On both of my machines (one vista 64bit but built in 32bit, and
> one xp
> > 32bit) the shadowed scene in osgshadowd.exe is completely black.
> > > > >
> > > > > osgshadowd --sv works but none of the --ssm or --sm
> > > > >
> > > > > ANyone seen this?
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > >
> > > > >
> > > > > 
> > > > > Anders Backman   Email:[EMAIL PROTECTED]
> > > > > HPC2N/VRlab  Phone:+46 (0)90-786 9936
> > > > > Umea university  Cellular: +46 (0)70-392 64 67
> > > > > S-901 87 UMEA SWEDEN Fax:  +46 90-786 6126
> > > > >   http://www.cs.umu.se/~andersb
> > > >
> > > >
> > > >
> > > > --
> > > >
> > > >
> > > > 
> > > > Anders Backman   Email:[EMAIL PROTECTED]
> > > > HPC2N/VRlab  Phone:+46 (0)90-786 9936
> > > > Umea university  Cellular: +46 (0)70-392 64 67
> > > > S-901 87 UMEA SWEDEN Fax:  +46 90-786 6126
> > > >   http://www.cs.umu.se/~andersb
> > > > ___
> > > > osg-users mailing list
> > > > osg-users@lists.openscenegraph.org
> > > >
> >
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> > > >
> > > >
> > >
> > >
> > >
> > > --
> > > 
> > > Adrian Egli
> > > ___
> > > osg-users mailing list
> > > osg-users@lists.openscenegraph.org
> > >
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> > >
> > >
> >
> >
> >
> > --
> >
> >
> > 
> >  Anders Backman   Email:[EMAIL PROTECTED]
> >  HPC2N/VRlab  Phone:+46 (0)90-786 9936
> >  Umea university  Cellular: +46 (0)70-392 64 67
> >  S-901 87 UMEA SWEDEN Fax:  +46 90-786 6126
> >http://www.cs.umu.se/~andersb
> > ___
> > 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
>



-- 

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


Re: [osg-users] osgshadowd.exe = black

2008-02-07 Thread Morné Pistorius
Just a thought - Is your OSG_FILE_PATH set up properly?  When I run it
(on stable 2.2 release) the entire scene is black if osg can't find
the texture images.  If OSG_FILE_PATH is set to my data directory,
shadows work fine.  From your screen shots it looks like the textures
aren't loaded.

cheers,
Morne

On Feb 7, 2008 12:16 PM, Anders Backman <[EMAIL PROTECTED]> wrote:
> Not black, but full of artefacts on VISTA, XP, Ubuntu (gcc)
>
> Screenshots found at:
>
> http://www.vrlab.umu.se/osg
>
> pssm.png --pssm
> sv.png --sv
> sm.png --sm
>
> All shadow implementations in the trunk (including --ssm) shows a very bad
> result in svn for XP,VISTA, very recent drivers, GeForce8600Go, GeForce
> 6800Go, and finally 8800GTX under Ubuntu.
>
> shadowmaps worked in the svn version from November that we used previously.
>
> /Anders
>
>
>
>
> On Feb 7, 2008 11:37 AM, Adrian Egli OpenSceneGraph (3D) <[EMAIL PROTECTED]>
> wrote:
>
> > What about PSSM ?
> >
> >
> > 2008/2/7, Anders Backman <[EMAIL PROTECTED]>:
> > >
> > >
> > >
> > > Just verified this under Ubuntu with osg svn version. Same problem,
> everything is black when using shadowmaps.
> > >
> > > /Anders
> > >
> > >
> > >
> > > On Feb 7, 2008 11:21 AM, Anders Backman <[EMAIL PROTECTED]> wrote:
> > >
> > > > Hi all.
> > > >
> > > > I just did a svn checkout of osg and build it with VS2008 in windows
> Vista (and xp).
> > > >
> > > > On both of my machines (one vista 64bit but built in 32bit, and one xp
> 32bit) the shadowed scene in osgshadowd.exe is completely black.
> > > >
> > > > osgshadowd --sv works but none of the --ssm or --sm
> > > >
> > > > ANyone seen this?
> > > >
> > > >
> > > >
> > > > --
> > > >
> > > >
> > > > 
> > > > Anders Backman   Email:[EMAIL PROTECTED]
> > > > HPC2N/VRlab  Phone:+46 (0)90-786 9936
> > > > Umea university  Cellular: +46 (0)70-392 64 67
> > > > S-901 87 UMEA SWEDEN Fax:  +46 90-786 6126
> > > >   http://www.cs.umu.se/~andersb
> > >
> > >
> > >
> > > --
> > >
> > >
> > > 
> > > Anders Backman   Email:[EMAIL PROTECTED]
> > > HPC2N/VRlab  Phone:+46 (0)90-786 9936
> > > Umea university  Cellular: +46 (0)70-392 64 67
> > > S-901 87 UMEA SWEDEN Fax:  +46 90-786 6126
> > >   http://www.cs.umu.se/~andersb
> > > ___
> > > osg-users mailing list
> > > osg-users@lists.openscenegraph.org
> > >
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> > >
> > >
> >
> >
> >
> > --
> > 
> > Adrian Egli
> > ___
> > osg-users mailing list
> > osg-users@lists.openscenegraph.org
> > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> >
> >
>
>
>
> --
>
>
> 
>  Anders Backman   Email:[EMAIL PROTECTED]
>  HPC2N/VRlab  Phone:+46 (0)90-786 9936
>  Umea university  Cellular: +46 (0)70-392 64 67
>  S-901 87 UMEA SWEDEN Fax:  +46 90-786 6126
>http://www.cs.umu.se/~andersb
> ___
> 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] osgshadowd.exe = black

2008-02-07 Thread Anders Backman
Not black, but full of artefacts on VISTA, XP, Ubuntu (gcc)

Screenshots found at:

http://www.vrlab.umu.se/osg

pssm.png --pssm
sv.png --sv
sm.png --sm

All shadow implementations in the trunk (including --ssm) shows a very bad
result in svn for XP,VISTA, very recent drivers, GeForce8600Go, GeForce
6800Go, and finally 8800GTX under Ubuntu.

shadowmaps worked in the svn version from November that we used previously.

/Anders


On Feb 7, 2008 11:37 AM, Adrian Egli OpenSceneGraph (3D) <[EMAIL PROTECTED]>
wrote:

> What about PSSM ?
>
> 2008/2/7, Anders Backman <[EMAIL PROTECTED]>:
> >
> > Just verified this under Ubuntu with osg svn version. Same problem,
> > everything is black when using shadowmaps.
> >
> > /Anders
> >
> > On Feb 7, 2008 11:21 AM, Anders Backman <[EMAIL PROTECTED]> wrote:
> >
> > > Hi all.
> > >
> > > I just did a svn checkout of osg and build it with VS2008 in windows
> > > Vista (and xp).
> > >
> > > On both of my machines (one vista 64bit but built in 32bit, and one xp
> > > 32bit) the shadowed scene in osgshadowd.exe is completely black.
> > >
> > > osgshadowd --sv works but none of the --ssm or --sm
> > >
> > > ANyone seen this?
> > >
> > >
> > >
> > > --
> > >
> > >
> > > 
> > > Anders Backman   Email:[EMAIL PROTECTED]
> > > HPC2N/VRlab  Phone:+46 (0)90-786 9936
> > > Umea university  Cellular: +46 (0)70-392 64 67
> > > S-901 87 UMEA SWEDEN Fax:  +46 90-786 6126
> > >   
> > > http://www.cs.umu.se/~andersb
> >
> >
> >
> >
> > --
> >
> >
> > 
> > Anders Backman   Email:[EMAIL PROTECTED]
> > HPC2N/VRlab  Phone:+46 (0)90-786 9936
> > Umea university  Cellular: +46 (0)70-392 64 67
> > S-901 87 UMEA SWEDEN Fax:  +46 90-786 6126
> >   
> > http://www.cs.umu.se/~andersb
> >
> > ___
> > osg-users mailing list
> > osg-users@lists.openscenegraph.org
> >
> > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> >
> >
>
>
> --
> 
> Adrian Egli
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>


-- 



Anders Backman   Email:[EMAIL PROTECTED]
HPC2N/VRlab  Phone:+46 (0)90-786 9936
Umea university  Cellular: +46 (0)70-392 64 67
S-901 87 UMEA SWEDEN Fax:  +46 90-786 6126
  http://www.cs.umu.se/~andersb
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Fade effect using the osg::BlendFunc()

2008-02-07 Thread Serge Lages
Hi,

Yes you can do it with a osg::BlendFunc, just like that :

osg::BlendFunc*blendFunc = new osg::BlendFunc();
osg::BlendColor*blendColor= new osg::BlendColor(osg::Vec4(1, 1, 1, 0.0
));

blendFunc->setSource(osg::BlendFunc::CONSTANT_ALPHA);
blendFunc->setDestination(osg::BlendFunc::ONE_MINUS_CONSTANT_ALPHA);
node->getOrCreateStateSet()->setAttributeAndModes(blendFunc,
osg::StateAttribute::ON);
node->getOrCreateStateSet()->setAttributeAndModes(blendColor,
osg::StateAttribute::ON);

Then just update the blendColor's constant color (with
blendColor->setConstantColor()) by changing its alpha value.

I've done it by making a node callback which updates this value using a
simple timer.

On Feb 7, 2008 12:56 PM, Johan Johnsson <[EMAIL PROTECTED]> wrote:

> Hey all!
>
> I need a simple fade effect, is it possible to use osg::BlendFunc for
> this?
>
> osg::ref_ptr wakeBlend = new osg::BlendFunc();
> wakeBlend->setFunction(osg::BlendFunc::DST_COLOR, osg::BlendFunc::ZERO);
>
> I whould like to increase the alpha value each frame, is there any way to
> define the alpha or transparacy using this osg::BlendFunc?, its actually
> only a model i load, which i want to fade (its a common bitmap) in and out
> over 2 seconds.
>
> --
> Mr. Johan Johnsson
> AutoSim AS, Strandveien 106, 9006 Tromsø
> Visit us at http://www.autosim.no
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>



-- 
Serge Lages
http://www.tharsis-software.com
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Fade effect using the osg::BlendFunc()

2008-02-07 Thread Johan Johnsson
Hey all!

I need a simple fade effect, is it possible to use osg::BlendFunc for this?

osg::ref_ptr wakeBlend = new osg::BlendFunc();
wakeBlend->setFunction(osg::BlendFunc::DST_COLOR, osg::BlendFunc::ZERO);

I whould like to increase the alpha value each frame, is there any way to  
define the alpha or transparacy using this osg::BlendFunc?, its actually  
only a model i load, which i want to fade (its a common bitmap) in and out  
over 2 seconds.

-- 
Mr. Johan Johnsson
AutoSim AS, Strandveien 106, 9006 Tromsø
Visit us at http://www.autosim.no
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osgshadowd.exe = black

2008-02-07 Thread Adrian Egli OpenSceneGraph (3D)
What about PSSM ?

2008/2/7, Anders Backman <[EMAIL PROTECTED]>:
>
> Just verified this under Ubuntu with osg svn version. Same problem,
> everything is black when using shadowmaps.
>
> /Anders
>
> On Feb 7, 2008 11:21 AM, Anders Backman <[EMAIL PROTECTED]> wrote:
>
> > Hi all.
> >
> > I just did a svn checkout of osg and build it with VS2008 in windows
> > Vista (and xp).
> >
> > On both of my machines (one vista 64bit but built in 32bit, and one xp
> > 32bit) the shadowed scene in osgshadowd.exe is completely black.
> >
> > osgshadowd --sv works but none of the --ssm or --sm
> >
> > ANyone seen this?
> >
> >
> >
> > --
> >
> >
> > 
> > Anders Backman   Email:[EMAIL PROTECTED]
> > HPC2N/VRlab  Phone:+46 (0)90-786 9936
> > Umea university  Cellular: +46 (0)70-392 64 67
> > S-901 87 UMEA SWEDEN Fax:  +46 90-786 6126
> >   
> > http://www.cs.umu.se/~andersb
>
>
>
>
> --
>
>
> 
> Anders Backman   Email:[EMAIL PROTECTED]
> HPC2N/VRlab  Phone:+46 (0)90-786 9936
> Umea university  Cellular: +46 (0)70-392 64 67
> S-901 87 UMEA SWEDEN Fax:  +46 90-786 6126
>   
> http://www.cs.umu.se/~andersb
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>


-- 

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


Re: [osg-users] osgshadowd.exe = black

2008-02-07 Thread Anders Backman
Just verified this under Ubuntu with osg svn version. Same problem,
everything is black when using shadowmaps.

/Anders

On Feb 7, 2008 11:21 AM, Anders Backman <[EMAIL PROTECTED]> wrote:

> Hi all.
>
> I just did a svn checkout of osg and build it with VS2008 in windows Vista
> (and xp).
>
> On both of my machines (one vista 64bit but built in 32bit, and one xp
> 32bit) the shadowed scene in osgshadowd.exe is completely black.
>
> osgshadowd --sv works but none of the --ssm or --sm
>
> ANyone seen this?
>
>
>
> --
>
>
> 
> Anders Backman   Email:[EMAIL PROTECTED]
> HPC2N/VRlab  Phone:+46 (0)90-786 9936
> Umea university  Cellular: +46 (0)70-392 64 67
> S-901 87 UMEA SWEDEN Fax:  +46 90-786 6126
>   
> http://www.cs.umu.se/~andersb




-- 



Anders Backman   Email:[EMAIL PROTECTED]
HPC2N/VRlab  Phone:+46 (0)90-786 9936
Umea university  Cellular: +46 (0)70-392 64 67
S-901 87 UMEA SWEDEN Fax:  +46 90-786 6126
  http://www.cs.umu.se/~andersb
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] osgshadowd.exe = black

2008-02-07 Thread Anders Backman
Hi all.

I just did a svn checkout of osg and build it with VS2008 in windows Vista
(and xp).

On both of my machines (one vista 64bit but built in 32bit, and one xp
32bit) the shadowed scene in osgshadowd.exe is completely black.

osgshadowd --sv works but none of the --ssm or --sm

ANyone seen this?



-- 



Anders Backman   Email:[EMAIL PROTECTED]
HPC2N/VRlab  Phone:+46 (0)90-786 9936
Umea university  Cellular: +46 (0)70-392 64 67
S-901 87 UMEA SWEDEN Fax:  +46 90-786 6126
  http://www.cs.umu.se/~andersb
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] How to modify the array of vertex from a Ge ometry object

2008-02-07 Thread Alberto Luaces
El Wednesday 06 February 2008 21:33:51 Rubén López escribió:
> 2. I don't know what the "at" method is, I couldn't find it either on
> the TemplateArray class or the std::vector class. Try with the vector []
> operator, ie: (*test)[i] = trans

A minor clarification: std::vector::at() is a method similar to 
std::vector::operator[], except that it throws an exception if the code tries 
to access an element out of the bounds of the vector. So that part of the 
code should be fine, except for a slight performance slowdown.

I remember seeing that method on the Stroustrup book. Here is a reference 
(sorry, I couldn't find it on the SGI's STL site):

http://www.cplusplus.com/reference/stl/vector/at.html
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] status of osgLua or osgPython

2008-02-07 Thread Luigi Calori
I would like to use osg from one interpreted language.
I' ve tried to use osgLua under WinXP, I ' ve managed to compile it but 
no chance in running any example.
I' m really a newbie in Lua, has anyone some hints?
Have someone ever used osgLua under windows?
Is the project still active?

I' m newbie in both Lua and Python, so  either one  would be ok, is  
pythin better supported?

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