[osg-users] Texture management and shader :

2010-10-06 Thread BARRAL Adrien
Hello, I set a texture on a big plane with the following lines : Code: Image* image = osgDB::readImageFile(resources/textures/sable-jaune.bmp); Texture2D* texture = new osg::Texture2D; TexMat* tmat = new TexMat; tmat-setMatrix(Matrix::scale(100,100,1)); if (image) {

[osg-users] [osgPlugins] export from lightwave format *. IVE

2010-10-06 Thread Pierre Bixquert
Hi, there is a plugin to export from lightwave format *. IVE? someone what to do? ... Thank you! Cheers, pierre |-) -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=32426#32426 ___ osg-users

Re: [osg-users] [osgPlugins] export from lightwave format *. IVE

2010-10-06 Thread Trajce (Nick) Nikolov
you can convert .. osgconv model.lwo model.ive -Nick On Wed, Oct 6, 2010 at 2:29 AM, Pierre Bixquert pie...@japp3d.com wrote: Hi, there is a plugin to export from lightwave format *. IVE? someone what to do? ... Thank you! Cheers, pierre |-) -- Read this topic

Re: [osg-users] Texture management and shader :

2010-10-06 Thread Ulrich Hertlein
Hi Adrien, On 6/10/10 18:07 , BARRAL Adrien wrote: TexMat* tmat = new TexMat; tmat-setMatrix(Matrix::scale(100,100,1)); ... Now, I enable my shaders programs, and my texture is scaled to the plane's size (not repeated). Here is my vertex shader : Code: ... gl_TexCoord[0] =

Re: [osg-users] Texture management and shader :

2010-10-06 Thread BARRAL Adrien
Thank you very much !! That works fine, I just had to replace Code: gl_TexCoord[0] = gl_MultiTexCoord0; by Code: gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0*; Cheers, Adrien -- Read this topic online here:

[osg-users] [osgPPU] is unitTexture-setTexture expensive ?

2010-10-06 Thread Vincent Honnet
Hi, I implemented a ping pong rendering in order to reuse a texture processed by the gpu as input. But it looks very slow. I have the feeling that setTexture does something like a copy of the texture and not just a change of the texture index like in gameoflife. An idea or a better way to set

Re: [osg-users] Blender osgExport multiple animations

2010-10-06 Thread Alberto Luaces
Michail Lanam writes: Hello. How do i split animations in Blender so they can be exported as separate by osgExport? Also how do i join multiple object animations in one? Like, nathan.osg has different animations, not just one continuous animation, nor he has separate animations for each

Re: [osg-users] Box Selection Tool

2010-10-06 Thread Robert Osfield
Hi Scott, On Tue, Oct 5, 2010 at 8:41 PM, Scott Shaw scott.s...@survice.com wrote: Does anyone have a faster method of creating a box selection tool than using the PolytopeIntersector? PolytopeIntersector will be pretty efficient. Could you explain what you mean by faster? Faster to

Re: [osg-users] Blender osgExport multiple animations

2010-10-06 Thread Cedric Pinson
Hi, Here the blender file related to nathan http://hg.plopbyte.net/osgexport/raw-file/b76cc7564847/data/nathan/character.blend Maybe it will helps Cheers, Cedric On Wed, 2010-10-06 at 10:52 +0200, Alberto Luaces wrote: Michail Lanam writes: Hello. How do i split animations in Blender

Re: [osg-users] Texture management and shader :

2010-10-06 Thread BARRAL Adrien
Oups... That seems to work, but that doesn't work... In my previous post I made a syntax error in my vertex shader, so the shader was disable, that's why my texture was correctly displayed... If I well understand, gl_MultiTexCoord0 contain the per vertex texture coordinate 0 (I found that in

Re: [osg-users] Texture management and shader :

2010-10-06 Thread BARRAL Adrien
It's ok I finnaly find something that work, using the following lines : Code: gl_TexCoord[0].s = dot(gl_Vertex, gl_ObjectPlaneS[0]); gl_TexCoord[0].t = dot(gl_Vertex, gl_ObjectPlaneT[0]); End of the POST ! -- Read this topic online here:

[osg-users] texture SubloadCallback and TextureObject generating

2010-10-06 Thread Mikhail I. Izmestev
Hi all, Lets see for example Texture2D. When I use SubloadCallback then TextureObject would be generated with empty profile: code void Texture2D::apply(State state) const { [...] if (textureObject) { [...] } else if (_subloadCallback.valid()) {

Re: [osg-users] Save texture changes via fragment shader

2010-10-06 Thread Aitor Ardanza
I only found example of render to texture of the camera ... How I had to do to have multiple render targets? like: Code: fragment shader void main(void) { gl_FragData[0] = vec4(1.0, 0.0, 0.0, 1.0); gl_FragData[1] = vec4(0.4, 0.4, 0.0, 1.0); } Thank you! Cheers, Aitor

[osg-users] stereo video + object

2010-10-06 Thread Victoria Spencer
Hi, I'm trying to set a 3D side by side scene, in which I want to see video and an object (cessna.osg) for example. I've manged to create each scene in different files. I've got my 3D side by side video (by modifying osgstereoimage.cpp example) and i've also got the cessna.osg object in side

Re: [osg-users] Conceptual questions about Cameras in general, and Slave Cameras

2010-10-06 Thread Fred Smith
This is starting to sink in. Cameras declared in the scene graph are mostly fine for me now. I still have an issue with the Slave camera approach. I'm doing Render to texture right now. I would like to give it a go with a Slave camera. I don't have to define a graphics context for cameras

[osg-users] shared context and compile context

2010-10-06 Thread PCJohn
I have fallen to the problems of compile context and sharing lists (wglShareLists, glXCreateContext(x,x,true,x)). They share display lists, VBO/IBO, shaders, textures, FBO, PBO. But how is it with rendering capabilities, e.g. is OSG compile context and shared OpenGL context guaranteed to have

Re: [osg-users] Conceptual questions about Cameras in general, and Slave Cameras

2010-10-06 Thread Robert Osfield
Hi Fred, For a slave render to texture Camera you simply assign the same GraphicsWindow/GraphicsContext from the main window. The osgdistortion example illustrates this in action. Robert. On Wed, Oct 6, 2010 at 12:58 PM, Fred Smith osgfo...@tevs.eu wrote: This is starting to sink in. Cameras

Re: [osg-users] shared context and compile context

2010-10-06 Thread Robert Osfield
Hi John, I would have though WGL/GLX/OpenGL driver would produce an error if you tried to share contexts that didn't provide the same capabilities. What problems are you seeing? As a general note, compile contexts haven't proven to be particularly portable and wouldn't recommend general

Re: [osg-users] shared context and compile context

2010-10-06 Thread PCJohn
Hi Robert, I see, sharing context is not so portable... Anyway, I see them used at least for compile contexts. Does it mean that compile contexts and background compiling is not recommended to be used in general? Or at least on Linux and Windows? I had impression they are used for

Re: [osg-users] shared context and compile context

2010-10-06 Thread Robert Osfield
Hi John, On Wed, Oct 6, 2010 at 1:45 PM, PCJohn pec...@fit.vutbr.cz wrote: I see, sharing context is not so portable... I implemented them under Linux with NVidia drivers and they worked as expected, but with other drivers and other OS's reports back from the community haven't been so positive,

Re: [osg-users] Performance problem with osgTerrain

2010-10-06 Thread Robert Osfield
Hi Fabien, Such high costs when doing boundary equalization are not good news. Disabling this should be an option, placing this control into osgTerrain::Terrain would be the appropriate thing to do rather than just commenting a code path out in GeometryTechnique.cpp. It would also be good to get

Re: [osg-users] Performance problem with osgTerrain

2010-10-06 Thread Fabien Lavignotte
Hi Robert, We are testing in release build. And we have the same result on windows and linux. The high cost is a little bit surprising but i didn't have time to investigate further. So, the idea is add a flag on osgTerrain (hum set/getProcessNeigbours maybe?) Fabien -Original

Re: [osg-users] Box Selection Tool

2010-10-06 Thread Scott Shaw
Actually I figured out why the PolytopeIntersector was taking forever. Apparently the intersections it returns with getIntersections() includes redundant nodes, so I was trying to select the nodes hundreds of times. I just appended them to a list and checked if that list contained the node

Re: [osg-users] shared context and compile context

2010-10-06 Thread PCJohn
Thanks. Very answered my question. John Robert Osfield wrote: Hi John, On Wed, Oct 6, 2010 at 1:45 PM, PCJohn pec...@fit.vutbr.cz wrote: I see, sharing context is not so portable... I implemented them under Linux with NVidia drivers and they worked as expected, but with other

Re: [osg-users] Performance problem with osgTerrain

2010-10-06 Thread Robert Osfield
Hi Fabien, On Wed, Oct 6, 2010 at 2:13 PM, Fabien Lavignotte fabien.lavigno...@vegatechnologies.fr wrote: We are testing in release build. And we have the same result on windows and linux. The high cost is a little bit surprising but i didn't have time to investigate further. So, the idea

Re: [osg-users] Box Selection Tool

2010-10-06 Thread Robert Osfield
Hi Scott, On Wed, Oct 6, 2010 at 2:23 PM, Scott Shaw scott.s...@survice.com wrote: Actually I figured out why the PolytopeIntersector was taking forever.   Apparently the intersections it returns with getIntersections() includes redundant nodes, so I was trying to select the nodes hundreds of

Re: [osg-users] Creating Image from Openflight file

2010-10-06 Thread Andreas Ekstrand
Hi Geoff, Could you provide an example FLT file where the problem is shown? It would greatly improve our ability to help you. Regards, Andreas On 2010-10-05 21:57, Geoff Rhodes wrote: Hi, In looking into this a little bit more, it appears that it is not picking up a lot of the

Re: [osg-users] Blender osgExport multiple animations

2010-10-06 Thread Michail Lanam
Alberto Luaces wrote: Hi Michail, In blender, you have to create several different animations in the Action editor. As for joining/splitting existing animations, I'm not sure how to do that. Maybe you can copy several channels to other animation... -- Alberto The export works only

Re: [osg-users] Blender osgExport multiple animations

2010-10-06 Thread Cedric Pinson
Hi Alberto, Yes Ipo as Action does not works, but you should be able to export ipo assigned to object. I have added some python script in pokme to merge ipo with bones animation but after the exporter step. In blender 2.5 animation system has been refactored so I guess It will be easier to

Re: [osg-users] Save texture changes via fragment shader

2010-10-06 Thread Aitor Ardanza
I do not get it to work I follow these steps: Code: // load texture as an image imgTexture = osgDB::readImageFile(model/BAKE_OVERRIDE.jpg); // if the image is successfully loaded if (imgTexture) { imgTexture-allocateImage(3500, 3500, 1, GL_RGBA, GL_UNSIGNED_BYTE); // create a

Re: [osg-users] Blender osgExport multiple animations

2010-10-06 Thread Michail Lanam
Cedric Pinson wrote: Yes Ipo as Action does not works, but you should be able to export ipo assigned to object. I have added some python script in pokme to merge ipo with bones animation but after the exporter step. And again, suddenly, it comes to the beginning of the thread as i don't see

Re: [osg-users] Save texture changes via fragment shader

2010-10-06 Thread Frederic Bouvier
// load texture as an image imgTexture = osgDB::readImageFile(model/BAKE_OVERRIDE.jpg); // if the image is successfully loaded if (imgTexture) { imgTexture-allocateImage(3500, 3500, 1, GL_RGBA, GL_UNSIGNED_BYTE); Why are you reallocating space for an image loaded from file ?

Re: [osg-users] Blender osgExport multiple animations

2010-10-06 Thread Cedric Pinson
Hi, Back to the first question the anwser is that you can't carry multiple ipo to an object. I added extra code in pokme to manage this cases but it's specific to my pipeline. I dont remember all the details so best is to look inside pokme project. Cedric On Wed, 2010-10-06 at 18:10 +0200,

[osg-users] [Simple Threaded Occlusion queries]

2010-10-06 Thread Julien Valentin
Hi, I have wrote a framework that handle hierachic occlusion culling. It work well but because of lack of performance of waiting asynchronous occlusion query I wrote a OpenThread::Thread that handle all occlusion query Code: class ThreadOccQueries : public OpenThreads::Thread , public

[osg-users] GLU integration

2010-10-06 Thread Robert Osfield
Hi All, Yesterday I did a review of Mesa's/sgi GLU implementation to look at the practicality of merging several GLU implementation directly into the core OSG. The motivations behind are to make it possible to build the OSG with the GLU features across all GL targets - including GLES, and GL 3/4

[osg-users] How to stop threading

2010-10-06 Thread Oliver Burtchen
Hi, to debug my application I need to stop threading in update/cull traversals, better threading in osg at all. Is the following code enough, or do I need more? viewer.setThreadingModel(osgViewer::ViewerBase::SingleThreaded); while( !viewer.done() ) { ... viewer.frame(); ... } Best

Re: [osg-users] How to stop threading

2010-10-06 Thread Robert Osfield
Hi Oliver, viewer.stopThreading() stops threading and viewer.startTheading() restarts it. Robert. On Wed, Oct 6, 2010 at 6:19 PM, Oliver Burtchen o.burtc...@gmx.de wrote: Hi, to debug my application I need to stop threading in update/cull traversals, better threading in osg at all. Is the

[osg-users] transform angles in coordinates

2010-10-06 Thread Manuel Silvestre
Hi, How I transform angles (pitch,head) in coodinates (x,y) ??? I want draw a sphere and that she follow the movement of my eyes. I have the angles for simulate the value of movement of my eyes but i don´t know how transform these in x and y. Thank you! Manuel -- Read this

Re: [osg-users] Texture2D subload callback gone mad

2010-10-06 Thread Thomas Hogarth
Hi Robert, All Bit more info on this bug, well not so much a bug more be bending the OSG in funny ways :) So in the function Texture2D::apply right near the top we have // get the texture object for the current contextID. TextureObject* textureObject = getTextureObject(contextID);

[osg-users] createContext Traits issue

2010-10-06 Thread Christian Muggeridge
Hi, I'm working on a project that views osg models in a Qt window. I've stripped down the osgviewerQtWidget example built with 2.9.9 to a single, lightweight class. I have an odd problem with debug/release though. In the below code, the windowName assignment causes a crash in release, but not

Re: [osg-users] Texture2D subload callback gone mad

2010-10-06 Thread Mikhail I. Izmestev
06.10.2010 21:36, Thomas Hogarth wrote: What's happening is that I create a texture that is a power of two size up but modify with a smaller image. So then the above line detects the modify and says that our textureObject does not match the dimensions of the image and releases the texture

Re: [osg-users] createContext Traits issue

2010-10-06 Thread Jean-Sébastien Guay
Hi Christian, Has anyone ever seen this before? Did I set up my debug/release project settings incorrectly, or is this something on the osg end? Sounds like the release build of your app is using a debug compiled OSG. J-S -- __

Re: [osg-users] [osgPlugins] osgAnimation and TimelineAnimationManager

2010-10-06 Thread Garrett Cope
Hi Cedric, Thanks much, that was very helpful for debugging. Everything is working now. The problem ended up being that actions added using AddActionAt(...) to add actions at the zero frame. They seemed to be skipped so that the action is never activated. If I added a slight amount to the

Re: [osg-users] How to stop/change threading

2010-10-06 Thread Oliver Burtchen
Hi Robert, thanks for the answer. Does this mean I have to do viewer.stopThreading(); viewer.setThreadingModel(osgViewer::ViewerBase::Desired Threading Model); viewer.startTheading() to change the model, or does setThreadingModel() imply stop() and start()? Best regards, Oli Am Mittwoch, 6.

Re: [osg-users] createContext Traits issue

2010-10-06 Thread Christian Muggeridge
You were totally correct. Thank you for your help... Cheers, Christian -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=32487#32487 ___ osg-users mailing list osg-users@lists.openscenegraph.org

Re: [osg-users] Transparent image isn't?

2010-10-06 Thread Philip Tessier
Ulrich, Thanks! That was the solution. I added a setInternalTextureFormat( 0) before my allocateImage(), and that did the trick. Phil -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=32489#32489

Re: [osg-users] createContext Traits issue

2010-10-06 Thread Jean-Sébastien Guay
Hi Christian, You were totally correct. Thank you for your help... It's a classic mistake that we're starting to be really good at spotting :-) Glad you got it fixed. J-S -- __ Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com

[osg-users] Creating holes in a PagedLOD

2010-10-06 Thread range
Hello All, I'm using vpb to generate a terrain for a project I'm working on. And it is fantastic. I do have one question though, I have a need to 'cut' holes in the terrain so models can be placed on/into hillsides, or in a hole in the ground. e.g. a dam in the side of a hill. I've looked

Re: [osg-users] Creating holes in a PagedLOD

2010-10-06 Thread Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC
VPB currently does not support this functionality. There have been other developers that have proposed or even implemented solutions to provide something like this in the future. Perhaps they can chime in... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org

Re: [osg-users] GLU integration

2010-10-06 Thread Stephan Huber
Hi Robert, on OS X I get a lot of compile errors in mipmap.cpp: /Users/hudson/.hudson/jobs/osg.current/workspace/osg/src/osg/glu/libutil/mipmap.cpp:3532:0 /Users/hudson/.hudson/jobs/osg.current/workspace/osg/src/osg/glu/libutil/mipmap.cpp:3532: error: invalid conversion from 'void*' to

Re: [osg-users] [osgPlugins] osgAnimation and TimelineAnimationManager

2010-10-06 Thread Cedric Pinson
Hi Jamie, In fact the plan was to switch the frame from int to float, and to be able to configure the frame resolution. I am a bit busy to take care about that right now, so any helps is welcome. Have a try and let me know Cheers, Cedric On Wed, 2010-10-06 at 20:11 +0200, Garrett Cope wrote:

Re: [osg-users] How Camera Manipulators Work

2010-10-06 Thread Eduardo Poyart
That also has another implication. If you're making a camera manipulator that needs to modify the projection matrix, then you need to put in some other mechanism in your own code to get the projection matrix that the manipulator would calculate to the camera. Because the only thing that will

Re: [osg-users] How Camera Manipulators Work

2010-10-06 Thread Eduardo Poyart
On Wed, Oct 6, 2010 at 5:04 PM, Eduardo Poyart poy...@gmail.com wrote: That also has another implication. If you're making a camera manipulator that needs to modify the projection matrix, then you need to put in some other mechanism in your own code to get the projection matrix that the

Re: [osg-users] How Camera Manipulators Work

2010-10-06 Thread Jean-Sébastien Guay
Hi Eduardo, Ops, it's actually called CameraManipulator... but I've been thinking of it as a matrix manipulator. Anyway the suggestion is still valid. It was called MatrixManipulator until recently. That may be why you were thinking of that. But the point is that the thing that makes it

Re: [osg-users] How Camera Manipulators Work

2010-10-06 Thread Tom Pearce
J-S, I tend to agree with you - it feels like a CameraManipulator should be able to change (manipulate!) the Camera in any way. Also, thanks for catching the getMatrix vs getInverseMatrix... you're definitely correct, although I'd hope that anyone writing a CameraManipulator would implement

Re: [osg-users] How Camera Manipulators Work

2010-10-06 Thread Jean-Sébastien Guay
Hi Tom, although I'd hope that anyone writing a CameraManipulator would implement both appropriately, otherwise an interface method is messed up! :) Well yes obviously. But generally getMatrix() can just be written as return osg::Matrix::inverse(getInverseMatrix()); and you're done. Since

Re: [osg-users] Performance problem with osgTerrain

2010-10-06 Thread Christiansen, Brad
Hi, Just thought I should report that I have also come across this issue and have seen similar issues. I have also commented out the equalization code : ) I will try and make some time to code up a fix in the next few days. Cheers, Brad -Original Message- From: