[osg-users] reflect vector ?

2010-02-16 Thread Sebastien Nerig
Hi, Do any functions exist to compute reflected matrix or reflected vector against a plane ? Thank you! Cheers, Sebastien -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=24214#24214 ___ osg-users

Re: [osg-users] reflect vector ?

2010-02-16 Thread Sebastien Nerig
Hi Julien, Thanks for your answer, but I am looking for precompute function in osg, not in glsl. Someting like osg::Vec3 R = osgUtil::reflect(osg::Vec3(...), N), same for matrix. Cheers, Sebastien -- Read this topic online here:

Re: [osg-users] reflect vector ?

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

Re: [osg-users] dynamic cube map

2010-02-10 Thread Sebastien Nerig
Hi thank you Nick I found your discussion about osgprerenderCubeMap I did a search on dynamic cube map but I didn't find anything. Thank you! Cheers, Sebastien -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=23906#23906

Re: [osg-users] dynamic cube map

2010-02-10 Thread Sebastien Nerig
Hi Nick, ok I did have a look at the osgPrerenderCubeMap code and at you thread about mixing a static 2D texture and a dynamic cube map into a shader. btw your version with Code: { osg::Uniform* u = new osg::Uniform(osg::Uniform::SAMPLER_CUBE,cubeMapUnit); u-set(unit);

Re: [osg-users] dynamic cube map

2010-02-10 Thread Sebastien Nerig
Hi Nick, Well the changes are minors. I just wanted to change de reflector from the sphere to the bottom plane (or box). here is my reflector function, I changed the sphere to a box geode, ie the bottom plane/box. Code: osg::NodePathcreateReflector() { osg::PositionAttitudeTransform*

Re: [osg-users] dynamic cube map

2010-02-10 Thread Sebastien Nerig
mmm I dont think it will work. I would like to make reflection into object that are not always plane. Sebastien -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=23932#23932 ___ osg-users mailing list

[osg-users] dynamic cube map

2010-02-09 Thread Sebastien Nerig
Hi, I am trying to make a dynamic cube with osg. The idea is to render into a cube map the +X, -X, +Y, -Y, +Z and -Z view from the camera view point at each frame. Then the cube map is textured on a reflector surface (a plane) within a shader. I would like to see other objects (sphere, cube)

Re: [osg-users] [osgPPU] osgPPU cube map sample

2010-02-08 Thread Sebastien Nerig
Hi again art It seems that you maybe have a bug in the cube sample when I launch the app, the yellow color (cube nb 5) is never displayed on the central sphere. can you confirm ? Another question I did have a look at your code and I do not understant what is the cube texture unit for ? Does it

Re: [osg-users] [osgPPU] osgPPU cube map sample

2010-02-05 Thread Sebastien Nerig
Hi, Thank you for the explanation Sebastien -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=23712#23712 ___ osg-users mailing list osg-users@lists.openscenegraph.org

[osg-users] bad screen identifier

2010-02-05 Thread Sebastien Nerig
Hi, When I launch my osg app this morning, I've got this error while creating the graphic context : Win32WindowingSystem::getScreenInformation() - The screen identifier on the Win32 platform must always use display number 0. Value received was 15 Error: [screen #0]

[osg-users] [osgPPU] osgPPU cube map sample

2010-02-04 Thread Sebastien Nerig
Hi, I would like to know what is the aim of the cube map sample. When I launch this sample, I've got some satellite objects that are moving arround a bigger sphere, this sphere seems to be mapped with an envmap made of 6 colors (red, green etc...). But the envmap is not dynamic (ie the

Re: [osg-users] [osgPPU] osgPPU cube map sample

2010-02-04 Thread Sebastien Nerig
Hi, Well I had a look in the code shader, you set gl_fragColor with a color depending on the face index osgppu_CubeMapFace. The corresponding update code is in void UnitInOut::init() method. That's why the bigger sphere holds colors. But the samplerCube input is unused in this sample, why ? Is

Re: [osg-users] dependancies with Visual2005 SP2

2010-01-22 Thread Sebastien Nerig
Hi jean-sebastien thank you for your answer My mistake, I use visual 2005 sorry. It seems that no SP2 exists, you are right again. I saw version 2.0.50727 SP2 in the visual2005 about box. But I guess it is the .Net Framework version ... sorry again ! Anyway, that does not explain my problem. If

[osg-users] dependancies with Visual2005 SP2

2010-01-21 Thread Sebastien Nerig
Hi, I am running on Visual 2008 SP2 with osg 2.8.2 I have just downloaded osg binaries for visual 2005 SP1 and I have this message when I launch my app in debug mode : The application failed to initialized properly (0xc0150002). Click on OK to terminate the application. Well I guess that does

Re: [osg-users] dependancies with Visual2005 SP2

2010-01-21 Thread Sebastien Nerig
Hi, well I have my solution, I changed the link compile option for the project plugin ive. I changed the zlib1d.lib dependancy to zlib1.lib. I now use the release version of zlib and that works. Do you think it is the only solution ? Thank you! Cheers, Sebastien -- Read this

Re: [osg-users] [osgPPU] no results with osgPPU

2010-01-07 Thread Sebastien Nerig
Hi Arts and have a happy new year Ok so I have decided to make a simple stand alone application to test what you said : create a new camera as a child of the main camera, the child camera will be the FBO camera for the PPU processor here is a part of my code : Code: void

Re: [osg-users] [osgPPU] no results with osgPPU

2009-12-15 Thread Sebastien Nerig
Hi Art, I will try to add a camera node as a child of the main camera. I will also try to disable the main camera callback Thank you! Cheers, Sebastien -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=21492#21492

[osg-users] ReflectionMapGenerator

2009-12-15 Thread Sebastien Nerig
Hi, What is the use of ReflectionMapGenerator class ? I didn't find any example. How can we use it ? What is this class for ? Thank you! Cheers, Sebastien -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=21493#21493

Re: [osg-users] [osgPPU] no results with osgPPU

2009-12-10 Thread Sebastien Nerig
Hi Art, thx for your answer Sure you can know what the host application is doing, and unfortunately neither am I ... But I am trying to understant what is modified by the application, that's why I need some help... I have check in debug mode the run time passes throught the Unit::traverse

Re: [osg-users] [osgPPU] no results with osgPPU

2009-12-10 Thread Sebastien Nerig
Hi Art, With the graph you propose, I have the back screen, I have checked and the scene graph is correct, I didn't forget to attach any nodes, so I do not understand. By modifying directly the main camera,I did it too, and I have the scene with no osgPPU (no resambled scene) like I explained

[osg-users] [osgPPU] no results with osgPPU

2009-12-09 Thread Sebastien Nerig
Hi, In my application, I just add this code on the init part : Code: osg::ref_ptrosg::Texture2D texture = new osg::Texture2D; texture-setTextureSize(width, height); texture-setFilter(osg::Texture2D::MIN_FILTER, osg::Texture2D::LINEAR); texture-setFilter(osg::Texture2D::MAG_FILTER,

Re: [osg-users] [osgPPU] no results with osgPPU

2009-12-09 Thread Sebastien Nerig
Hi, I tried with FRAME_BUFFER_OBJECT but I have the same result (ie no results ^^) But I think I have to explain my program context. In fact, I am developping a plugin for a closed application (I do not have the source of this application); within this plugin I have an access to the root scene

[osg-users] multiple pixel shaders for one program ?

2009-11-30 Thread Sebastien Nerig
Hi, I would like to know if it is possible to do that : Code: osg::Program* program = new osg::Program; osg::Shader* shader = new osg::Shader(osg::Shader::FRAGMENT); shader-loadShaderSourceFromFile(main.frag); program-addShader(shader); osg::Shader* shader1 = new

Re: [osg-users] multiple pixel shaders for one program ?

2009-11-30 Thread Sebastien Nerig
Hi robert thx for your answer Ok I tried what you said, but I still have a pb. I made a shader common.frag with a basic fog function Code: uniform vec3 fogColor; uniform float fogDensity; vec3 fog(in vec3 color) { const float LOG2 = 1.442695; float z = gl_FragCoord.z / gl_FragCoord.w;

Re: [osg-users] multiple pixel shaders for one program ?

2009-11-30 Thread Sebastien Nerig
you right ! Thank you! Cheers, Sebastien -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=20585#20585 ___ osg-users mailing list osg-users@lists.openscenegraph.org

Re: [osg-users] memory leak in osg 2.8.2 ?

2009-10-19 Thread Sebastien Nerig
Hi Chris, thx for your answer and your trick ! :) but it is the same for me... struct TheEnd { ~TheEnd() { _CrtDumpMemoryLeaks(); } }; TheEnd theEnd; int _tmain(int argc, _TCHAR* argv[]) { osg::ref_ptr osg::Group gr; return 0; } Detected memory

Re: [osg-users] memory leak in osg 2.8.2 ?

2009-10-16 Thread Sebastien Nerig
Hi Bryan, ok thx for your answer (even if I do not understand the 1st part of your message?) I did some research on the forum before posting, but maybe it wasn't enought. Thank you! Cheers, Sebastien -- Read this topic online here:

[osg-users] memory leak in osg 2.8.2 ?

2009-10-09 Thread Sebastien Nerig
Hi, I take an osg example (I tried with the osgTeapot example project), then I add the command Code: viewer.run(); _CrtDumpMemoryLeaks(); return 0; at the end of the main function. (it dumps all the memory blocks in the debug heap when a memory leak has occurred) I launch it in debug mode,

Re: [osg-users] [3rdparty] change ocean height

2009-10-02 Thread Sebastien Nerig
Hi, haha ok thx for your answer and bug fix JS, I will try Well I did apologize because it seems that I am the only one to use the osgOcean height features and I do not use to have people working for me ! :p I tried to correct myself but you were too fast ^^ well thanks anyway Sebastien

Re: [osg-users] [3rdparty] change ocean height

2009-10-01 Thread Sebastien Nerig
Hi JS ok I have updated osgOcean from the trunk and tried the new setOceanSurfaceHeight function. It is working well. Except that I have no node reflections in the water ? Did you try it ? In my 1st pic you can see the ocean and a cow at altitude 0, the reflection is great. [Image:

Re: [osg-users] [3rdparty] change ocean height

2009-10-01 Thread Sebastien Nerig
Hi all, Thanks for your rapidity !! So I have updated and tested with my scene, when the cow is at 150 and the ocean at 100, it works well (the reflection is hard to see but it is here !) [Image: http://img246.imageshack.us/img246/9285/sanstitre1yg.jpg ] But ... really sorry again... there is

Re: [osg-users] [3rdparty] change ocean height

2009-09-30 Thread Sebastien Nerig
Hi Jean-S├ębastien, ok thanks a lot for yours answers, I will work on it et keep in touch Thank you again Sebastien -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=17745#17745 ___ osg-users mailing

Re: [osg-users] [3rdparty] change ocean height

2009-09-29 Thread Sebastien Nerig
Hi Jean Sebastien I am sorry to bother you but did you work or are you still plannning to work on the aspect we talked in this thread ? Thank you Sebastien -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=17710#17710

Re: [osg-users] [osgPPU] resize osgPPU

2009-09-24 Thread Sebastien Nerig
Hi, no you are right, nothing is wrong, but I was just thinking the new viewport will automatically set the new camera aspect ratio I did it and that works good now here is my code Code: osg::ref_ptrosg::Viewport vp = new osg::Viewport(0, 0, width, height); double fovy; double aspect; double

[osg-users] [osgPPU] resize osgPPU

2009-09-23 Thread Sebastien Nerig
Hi, simple question, is there a way to resize the osgPPU viewport in real time ? Thanks Cheers, Sebastien -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=17574#17574 ___ osg-users mailing list

Re: [osg-users] FBO OpenGL Error with new nVidia Driver

2009-09-15 Thread Sebastien Nerig
Hi Robert Well, if I have asked something to this forum, this is because I have already investigated and I have found no solutions by myself. I just wanted to know if someone else has accountered this problem and if a solution has been found - I think a forum is for sharing problems and

Re: [osg-users] FBO OpenGL Error with new nVidia Driver

2009-09-15 Thread Sebastien Nerig
Hi JP, mm there is no reason, it is the version I have dowloaded when I started to work with OSG. I will try to get 2.8.8 and get back. Thank you! Sebastien -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=17367#17367

Re: [osg-users] FBO OpenGL Error with new nVidia Driver

2009-09-15 Thread Sebastien Nerig
Hi, Like Kim also said, I think the error is more likely in the driver than in OSG. Upgrading to OSG 2.8.2 won't hurt though :) I don't use Windows, but I've seen some utility to help you get rid of NVidia driver cruft on you machine before you install a new driver. I think experimenting

Re: [osg-users] FBO OpenGL Error with new nVidia Driver

2009-09-14 Thread Sebastien Nerig
Hi, I am making a little up to this thread because I have the same problem as Kim. I use OSG 2.8, under windows XP and my graphic card is NVIDIA GeForce 8800 GTX. [Image: http://img147.imageshack.us/img147/3131/errorxk.jpg ] It appears each time I do a pre render renderig pass. It is very

[osg-users] multi render pass with different materials

2009-09-08 Thread Sebastien Nerig
Hi, Here is my problem, I use 2 passes to render a frame. On the 1st pass, I render the whole scenegraph into a texture with a material A on a node N. On the 2nd pass, I render the whole scene graph again and I use the texture from the 1st pass into a shader to render same node N with a

Re: [osg-users] [3rdparty] osgOcean : Integration into existing Database / Application

2009-09-03 Thread Sebastien Nerig
Hi all I would like to update this post to know if there is a way to integrate osgOcean material (and shader) to an existing surface like it was mentioned ? Thanks Cheers, Sebastien -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=16996#16996

[osg-users] [3rdparty] change ocean height

2009-09-03 Thread Sebastien Nerig
Hi, I would like to know if there is a way to change the ocean surface height. All the objects of my scene are located at a 100 altitude on the Z axis while the ocean is a 0. Thank you Cheers, Sebastien -- Read this topic online here:

Re: [osg-users] [3rdparty] change ocean height

2009-09-03 Thread Sebastien Nerig
Hi JS bad luck for me ! ^^ anyway thanks for your answer and have nice holidays :) sebastien -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=17004#17004 ___ osg-users mailing list

Re: [osg-users] [3rdparty] osgOcean : Integration into existing Database / Application

2009-09-03 Thread Sebastien Nerig
Hi, I was talking about rivers and lakes, and I had my answer. Thanks Sebastien -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=17005#17005 ___ osg-users mailing list

Re: [osg-users] getParentalNodePaths() or getWorldMatrices() assert on deallocation in debug mode

2009-09-02 Thread Sebastien Nerig
Hi Robert Ok I understood and I have already read some posts on the bad use of release / debug libraries I have checked and I do use debug osg librairies in debug mode and release osg lib in release mode. I think I am going to compile osg and check again... Thanks for your usefull help

Re: [osg-users] getParentalNodePaths() or getWorldMatrices() assert on deallocation in debug mode

2009-09-01 Thread Sebastien Nerig
Hi again, I still have this problem... when I use this code, Code: { osg::MatrixList matrixList = geode-getWorldMatrices(); } A memory assert fails with visual 2009 in debug mode. It is like a bad pointer has been passed in Do I use this function on a bad way ? Does anyone have any ideas ?

Re: [osg-users] getParentalNodePaths() or getWorldMatrices() assert on deallocation in debug mode

2009-09-01 Thread Sebastien Nerig
Hi The geode pointer is valid And I have the same problem with visual 2008... the assert fails while deallocating the matrix list (on the last bracket) the assert is this one : windows has triggered a breakpoint in visualApp.exe this may due to a corruption of the heap and the assert

Re: [osg-users] getParentalNodePaths() or getWorldMatrices() assert on deallocation in debug mode

2009-09-01 Thread Sebastien Nerig
Hi Ulrich no it is just a pointer inside a visitor. here is a part of my code void CPrintSceneGraphVisitor::apply(osg::Node node) { osg::Geode* geode = dynamic_castosg::Geode*( node); if(geode) { osg::MatrixList matrixList = geode-getWorldMatrices(); const

Re: [osg-users] getParentalNodePaths() or getWorldMatrices() assert on deallocation in debug mode

2009-09-01 Thread Sebastien Nerig
Hi robert, thanks for your answer But are you sure you are talking about an assert while deallocating memory of an osg matrix list (my case) ?? I found this on osg-user http://lists.openscenegraph.org/htdig.cgi/osg-users-openscenegraph.org/2009-May/027347.html, it talks about performance while

Re: [osg-users] get texture from ive file

2009-07-02 Thread Sebastien Nerig
Thanks a lot ! I did some research on google but I didn't find this post ! sorry for the message Cheers, Sebastien -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=14807#14807 ___ osg-users mailing

Re: [osg-users] get texture from scene a frame n-1, n-2, n-3 ...

2009-06-30 Thread Sebastien Nerig
yes, I am actually working on storing the texture. But I think I have some implementation problem for the moment. I was just wondering if a scenegraph approch was possible. thx for your answer sebastien -- Read this topic online here:

Re: [osg-users] get texture from scene a frame n-1, n-2, n-3 ...

2009-06-30 Thread Sebastien Nerig
Exactly what I did ! (before reading your message !) and that works great At start, I didn't think about the switch node and I made a add/remove camera's node mechanism, but I had lots of seg fault problem. the switch node is perfect thank you so much all for your reactivity! sebastien

Re: [osg-users] [3rdparty] cannot run examples on osgNV

2009-06-23 Thread Sebastien Nerig
ok that works I have just copied my 2.2 version of cg.dll and cgGL.dll into my debug/release directories I think I have another version of theses dll on my computer, I have to check my path environment variable thx to you -- Read this topic online here:

[osg-users] [3rdparty] cannot run examples on osgNV

2009-06-22 Thread Sebastien Nerig
Hi, I've just downloaded osnNV 0.6.2, compiled it, and tried to run osgNVCg1 example. When I execute the sample, a dialog box says that message : the cgGetParametersBufferOffset function cannot be find in cg.dll Do I have a bad version of CG on my computer ?? My CG.dll version seems to be

Re: [osg-users] change the current state set in real time for a multipass renderer

2009-06-09 Thread Sebastien Nerig
understood! Thank you! Sebastien -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=13762#13762 ___ osg-users mailing list osg-users@lists.openscenegraph.org

[osg-users] change the current state set in real time for a multipass renderer

2009-06-05 Thread Sebastien Nerig
Hi all, Is there a way to change the current state set in real time ? I am actually working on a multi pass render scene which contains one geode. on the 1st pass, I would like to have a specific state set for my geode, and on the 2nd pass, I would like to set another state set for my geode.