Re: [osg-users] osgGA modifications for IPhone and other

2010-09-16 Thread Stephan Huber
Hi Tom, Am 14.09.10 22:05, schrieb Thomas Hogarth: Looks ace Stephan I've not had a chance to checkout your osgGA changes yet, but now I can't wait. Also nice to see it's been tested on the IPad, I've only got an IPod touch so the testing has been pretty limited. I'm getting and IPod touch

Re: [osg-users] Replacing a node on the fly

2010-09-16 Thread Dženan Zukić
Hi, It crashes even if I mark the container node as dynamic: container-setDataVariance(osg::Object::DYNAMIC); Right now the frame rate isn't so important, so I can even live with a blocking frame(), if update during cull/draw traversal is causing these crashes. Can anyone give any hints?

Re: [osg-users] Replacing a node on the fly

2010-09-16 Thread Werner Modenbach
Hi, I have the same kind of question (and problem). My application makes high dynamic calculations of a textiles under tension and other influences. During the calculation process each yarn changes its shape and I have to recalculete the geometry of each yarns node from ground up. What is the

Re: [osg-users] Replacing a node on the fly

2010-09-16 Thread Dženan Zukić
Hi, Would you mind sharing that piece of code which replaces geometry, and the way you switch to new nodes? Thank you! Cheers, Dženan -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=31661#31661

Re: [osg-users] Geometry Drawing Performance

2010-09-16 Thread Robert Osfield
HI Frank, On Wed, Sep 15, 2010 at 7:12 PM, Frank Sullivan knarf.navil...@gmail.com wrote: The 700fps is just in wireframe mode with nothing else being drawn. Eventually I'll have to put it in a scene, and apply a special shader effect to it, which could reduce the frame rate. I don't know

Re: [osg-users] Replacing a node on the fly

2010-09-16 Thread Robert Osfield
Hi Dženan, We can't really guess at what is wrong as there is too many factors in your application out with your description and code segments. Common mistakes can be using C pointers for objects that you add and remove from the scene graph, could this be a factor here?? Maybe... too many

Re: [osg-users] Replacing a node on the fly

2010-09-16 Thread Robert Osfield
Hi Werner, On Thu, Sep 16, 2010 at 8:58 AM, Werner Modenbach werner.modenb...@texion.eu wrote: I have the same kind of question (and problem). Could you start a separate thread for a separate topic, modifying geometry vertex data dynamically is very different from add/removing objects from the

Re: [osg-users] [osgPlugins] error loading an ive file with OSG 2.8.3

2010-09-16 Thread Gianni Ambrosio
OK, you are righy I didn't tell you the error detail, sorry. I would like to know if it was a known issue. I use the following code: osg::ref_ptrosg::Node node = osgDB::readNodeFile(fileFullPath); where the fullpath is a correct path pointing to an ive file. The same file that can be loaded

Re: [osg-users] Replacing a node on the fly

2010-09-16 Thread Dženan Zukić
Hi, Currently, threading model is automatic selection. What I do (and it works): I have a scene graph as in the image attached (circles are group nodes, rectangles are geodes). I create an empty geode, pass it to doWork procedure, which in turn iteratively adapts the mesh to the boundaries of

Re: [osg-users] Replacing a node on the fly

2010-09-16 Thread Dženan Zukić
Hi, I forgot to say, I have ViewerQt (adapterWidget) on the main form, scenegraph is added to it, and then doWork procedure is called. Frames are rendered when needed with QApplication::ProcessEvents(), which also calls frame(). Thank you! Cheers, Dženan -- Read this topic

[osg-users] modify 3D objects loaded from file at runtime

2010-09-16 Thread Juan Valverde
Hi, I'm working in a engineering project which is essentially a design tool. A main GUI gives the user the ability to choose let's say the geometry of some machine. It's always the same object but it can have different geometry characteristics (larger, shorter, wider, etc). Once we have the

Re: [osg-users] Replacing a node on the fly

2010-09-16 Thread Werner Modenbach
OK, Robert, from your point of view you are right. On the other hand the implementation I used is axactly this threads topic. I sayed I have to recalculate the geometry. This dynamic part of the whole scene is defined as osg::ref_ptrosg::Switch scene;// Textile fabric THis node

Re: [osg-users] Replacing a node on the fly

2010-09-16 Thread Robert Osfield
Hi Werner, If you want an answer to your specific questions start a new thread, I won't encourage you to hitch on to another thread by answering your technique questions in this thread. Robert. On Thu, Sep 16, 2010 at 10:11 AM, Werner Modenbach werner.modenb...@texion.eu wrote: OK, Robert,

Re: [osg-users] Replacing a node on the fly

2010-09-16 Thread Robert Osfield
Hi Dženan When use AdapaterWidget you'll need to set the threading model to SingleThreaded, as AdatperWidget uses GraphicsWindowEmbedded which can only work SingleThreaded due to hiding support for any context controls. There has been lots of discussion about this constraint and the reasons for

Re: [osg-users] Replacing a node on the fly

2010-09-16 Thread Dženan Zukić
Hi, A call to setThreadingModel(osgViewer::Viewer::SingleThreaded); was indeed commented out in my code. However, uncommenting it has no effect - app still crashes. But, my approach should work in general? Thank you! Cheers, Dženan -- Read this topic online here:

Re: [osg-users] Replacing a node on the fly

2010-09-16 Thread Robert Osfield
Hi Dženan, 2010/9/16 Dženan Zukić dzen...@gmail.com: A call to setThreadingModel(osgViewer::Viewer::SingleThreaded); was indeed commented out in my code. However, uncommenting it has no effect - app still crashes. But, my approach should work in general? I'm too confused by what your code

Re: [osg-users] modify 3D objects loaded from file at runtime

2010-09-16 Thread Robert Osfield
HI Juan, At present the OSG's 3ds plugin doesn't support conversion of the 3ds tracks to an OSG object. If you want support for this you'll need to dive into the code and and handling of the 3ds tracks. Our plugin is based on lib3ds which does the actually reading of the file, and then in our

[osg-users] Replacing a node on the fly (same issue, new thread)

2010-09-16 Thread Werner Modenbach
OK Robert, I still have the impression I have exactly the same case as Dženan. But if you prefer I'll open a new thread. I'm using AdapterWidget in Qt and I'm running it single threaded as Dženan does. I'm replacing a node in the scene graph by a newly created one. Here is my scene hierarchie:

Re: [osg-users] Replacing a node on the fly (same issue, new thread)

2010-09-16 Thread Robert Osfield
Hi Werner, Could you back out a bit, and introduce the problem your are tackling at a high level so that others get a picture about what you are trying to achieve, diving into what solution you've code is often premature. From what I can gather integration of the simulation code and rendering

Re: [osg-users] Replacing a node on the fly

2010-09-16 Thread Dženan Zukić
Hi, I just went through my code and replaced all plain pointers with ref_ptr that solved the crash! I even commented out the calls to threading model and data variance and it makes no difference (app doesn't crash). Thank you! Cheers, Dženan -- Read this topic online here:

Re: [osg-users] Replacing a node on the fly (same issue, new thread)

2010-09-16 Thread Dženan Zukić
Hi, Werner, it turns out that my problem was the usage of plain pointers instead of smart pointers. Cheers, Dženan -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=31682#31682 ___ osg-users mailing

Re: [osg-users] Replacing a node on the fly (same issue, new thread)

2010-09-16 Thread Werner Modenbach
OK, I'll do my best... My app is a Qt app and I'm using AdapterWidget in single threaded mode as recommended. My global scene is a switch bigScene and one child is my node scene which is also a switch. Both are permanent variables stored using osg::ref_ptr. scene has many leaves, each

Re: [osg-users] Replacing a node on the fly (same issue, new thread)

2010-09-16 Thread Robert Osfield
Hi Werner, Please stop diving into discussing a specific implementation in code. Please step back and do as I requested. Explain what you are trying to do at higher level, I asked you to do this for a reason - I can't really help properly when you dive down to low level code. Robert. On Thu,

Re: [osg-users] Replacing a node on the fly (same issue, new thread)

2010-09-16 Thread Werner Modenbach
Hmmm... OK. I want to replace an existing node of a scene by a new one. I do this by calling setNode in a switch but the scene doesn't recognize the change. On Thursday 16 September 2010 12:28:25 Robert Osfield wrote: Hi Werner, Please stop diving into discussing a specific implementation

Re: [osg-users] [osgPlugins] error loading an ive file with OSG 2.8.3

2010-09-16 Thread Gianni Ambrosio
I made a different test, executing the osgviewerQT example, using the same ive file to load as first parameter of the exe. With OSG 2.8.2 it works fine, while with OSG 2.8.3 it crashes. Here is the call stack (hoping you can understand better than me what's going on):

Re: [osg-users] Replacing a node on the fly (same issue, new thread)

2010-09-16 Thread Dženan Zukić
Hi, Are you trying to make some cloth animate in a physically-plausible way? Instead of replacing group nodes and geodes, it may be more logical to replace drawables (like my original way of doing it). Cheers, Dženan -- Read this topic online here:

Re: [osg-users] Screenshot to non OSG image

2010-09-16 Thread benedikt naessens
Robert, Basically, I want to render my scene data onto an image which is not an OSG image, but has the same structure, i.e. * 8 bits red * 8 bits green * 8 bits blue The image (memory block) contains already something (see it as a background) and thus I only want my 3D scene objects on top of

Re: [osg-users] modify 3D objects loaded from file at runtime

2010-09-16 Thread Juan Valverde
Thanks a lot for your quick response. What you said sounds too difficult to me right now, I'm kind of a newby here. I'll revisit maybe in the future. I'm gonna try rescaling the objects to get the sizes I want. To do so, I'm reading the bounding sphere of my node (which contains what I read

Re: [osg-users] Screenshot to non OSG image

2010-09-16 Thread J.P. Delport
Hi, On 16/09/10 13:53, benedikt naessens wrote: Robert, Basically, I want to render my scene data onto an image which is not an OSG image, but has the same structure, i.e. * 8 bits red * 8 bits green * 8 bits blue The image (memory block) contains already something (see it as a background)

Re: [osg-users] Replacing a node on the fly (same issue, new thread)

2010-09-16 Thread Werner Modenbach
What would be the advantage? Almost everything in the node is the drawable. I'm doing simulated fabrics by using CAD data. The kind of fabric in sports wear, swim ware, sports shoes, underwear and many technical applications. I'm heavily related to textile industry. Werner On Thursday 16

Re: [osg-users] modify 3D objects loaded from file at runtime

2010-09-16 Thread Dženan Zukić
Hi, Add a matrix transform node above it in the scenegraph, with scaling matrix. Scaling matrix has 0.75 on the main diagonal instead of 1, and other values 0. This will give you size reduction of 25%. Also you should know that you affect the display of objects (rotation, scale, position) by

Re: [osg-users] Replacing a node on the fly (same issue, new thread)

2010-09-16 Thread Dženan Zukić
Hi, Well, you might want your threads to generate drawables directly, instead of wrapping them in geodes. And, have you tried setting data variance to dynamic for your scene node? Cheers, Dženan -- Read this topic online here:

Re: [osg-users] Replacing a node on the fly (same issue, new thread)

2010-09-16 Thread Werner Modenbach
On Thursday 16 September 2010 14:25:40 DXXenan ZukiXX wrote: Hi, Well, you might want your threads to generate drawables directly, instead of wrapping them in geodes. Hmmm ??? As of my understanding the scene is built out of nodes and a geode is a node containing a geometry, i.e. triangles.

Re: [osg-users] [osgPlugins] error loading an ive file with OSG 2.8.3

2010-09-16 Thread Robert Osfield
HI Gianni, In theory the .ive plugin should be backwards compatible so 2.8.3 should be compatible with 2.8.2. I don't know what the cause might be, but the strack trace points to src/osgPlugins/ive/Image.cpp and DataInputStream.cpp so have a look at any differences 2.8.2 and 2.8.3 in these

Re: [osg-users] modify 3D objects loaded from file at runtime

2010-09-16 Thread Robert Osfield
Hi Juan, Have a look at the osganimation example as it loads and scales several different models and then places them in the scene, and transform node is used to do the scaling as per the suggestions of Dženan and Alberto. Robert. On Thu, Sep 16, 2010 at 1:10 PM, Juan Valverde

Re: [osg-users] Replacing a node on the fly (same issue, new thread)

2010-09-16 Thread Robert Osfield
On Thu, Sep 16, 2010 at 11:37 AM, Werner Modenbach werner.modenb...@texion.eu wrote: Hmmm... OK. I want to replace an existing node of a scene by a new one. I do this by calling setNode in a switch but the scene doesn't recognize the change. Argghghgh.??!!? You are still talking too low

Re: [osg-users] Replacing a node on the fly (same issue, new thread)

2010-09-16 Thread Dženan Zukić
Hi, Drawables (from which Geometry is derived) contain triangles, not geodes. http://www.openscenegraph.org/documentation/OpenSceneGraphReferenceDocs/a00185.html http://www.openscenegraph.org/documentation/OpenSceneGraphReferenceDocs/a00265.html However, it is possible that you are overseeing

Re: [osg-users] modify 3D objects loaded from file at runtime

2010-09-16 Thread Juan Valverde
Hi all, Thank you very much to you all for the support. I'm gonna check the osganimation example as Robert suggested and I'll use the matrixtransform approach as Alberto and Dženan said. I'm on it actually!!! Best regards Juan -- Read this topic online here:

[osg-users] Preparing for OpenSceneGraph-2.9.9 developer release, please test :-)

2010-09-16 Thread Robert Osfield
Hi All, My plan is to tag svn/trunk tomorrow (Friday 16th September) and make the OpenSceneGraph-2.9.9 dev release. I would appreciate testing out in the community to make sure that everything compiles and runs smoothly. If you succeed or fail could you post your results on this thread so we

Re: [osg-users] modify 3D objects loaded from file at runtime

2010-09-16 Thread Juan Valverde
Got it!!! -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=31709#31709 ___ osg-users mailing list osg-users@lists.openscenegraph.org

[osg-users] osgShadow bug ?

2010-09-16 Thread Bruno Ronzani
Hi, I've been using osgShadow for some time now, but I've recently experienced some strange things with it. I noticed that everything was working just fine when i don't use cast/receive traversal masks, but when I start dealing with them, my shadows just become ugly dark squares. Note that I

Re: [osg-users] Keypress broken since rev 11749

2010-09-16 Thread Brad Huber
JS, You're right. I believe osgviewer still works correctly. I didn't look if it uses keyup or keydown. It appears that the osg window in my app does not get the WM_CHAR messages and so the change mentioned below broke it for me. I'm looking at why this message isn't being propagated. A

Re: [osg-users] Replacing a node on the fly (same issue, new thread)

2010-09-16 Thread Werner Modenbach
Sometimes difficult to find a common language :-) My yarn objects (not osg!) are converted into osg:Geod nodes with an osg::Geometry of vertices etc. My physical calculations have nothing to do with graphics at all. It is completely outside osg. It just changes my private yarn object (not

Re: [osg-users] Keypress broken since rev 11749

2010-09-16 Thread Jean-Sébastien Guay
Hello Brad, A different question, is why is the code written this way? I mean as I understand in windows you get a WM_KEYDOWN msg for all keys and then if it is a character you later get a WM_CHAR (possible multiple depending on key repeat?) and then when the user releases the key you get a

Re: [osg-users] Replacing a node on the fly (same issue, new thread)

2010-09-16 Thread Jean-Sébastien Guay
Hi Werner, The changes are to complex to be visualized by using the old Geode and doing transforms and vertex manipulations. I don't think the changes are too complex... Why can't you just resize the vertex/normal/... arrays, and fill them with the new data? To be precise: all you would

Re: [osg-users] Preparing for OpenSceneGraph-2.9.9 developer release, please test :-)

2010-09-16 Thread Robert Osfield
Hi Dženan, I would suspect these problems are driver specific rather than an OSG bug. Do you have desktop composition enabled? If so try disabling it and then repeat the tests. Robert. 2010/9/16 DženanZukić dzen...@gmail.com: Hi, It compiles without a problem (with examples disabled). It is

Re: [osg-users] Preparing for OpenSceneGraph-2.9.9 developer release, please test :-)

2010-09-16 Thread Torben Dannhauer
Hi, please read this thread: http://forum.openscenegraph.org/viewtopic.php?t=6526highlight= more people including me have the black screen problem, it seems to be a driver issue. Thank you! Cheers, Torben -- Read this topic online here:

Re: [osg-users] Keypress broken since rev 11749

2010-09-16 Thread Vivien Delage
Hi Brad, Hi JS, I am the author of this change. I did it in order to fix an issue with dead keys that were not handled correctly. Dead keys are used for key combination. For example in French keyboard pressing '^' key then after that 'u' key should result in the character 'û'. This was not

Re: [osg-users] Preparing for OpenSceneGraph-2.9.9 developer release, please test :-)

2010-09-16 Thread Jean-Sébastien Guay
Hi Torben, Dženan, Robert, please read this thread: http://forum.openscenegraph.org/viewtopic.php?t=6526highlight= more people including me have the black screen problem, it seems to be a driver issue. Indeed, and without any solution yet. It's not annoying enough to me that I would go

Re: [osg-users] Keypress broken since rev 11749

2010-09-16 Thread Jean-Sébastien Guay
Hi Vivien, Thanks for replying, it's good to know why the change was needed. I did it in order to fix an issue with dead keys that were not handled correctly. Dead keys are used for key combination. For example in French keyboard pressing '^' key then after that 'u' key should result in the

[osg-users] Blending Multiple Texture on one triangle mesh with coordinate control

2010-09-16 Thread Brian Tse
Hi All I am very new to Open Scene Graph and please accept my apology if this is a very obvious question. Your answer is grateful appreciated. Currently, I build a triangle mesh in osg (eg. triangle mesh is a teddy bear model) I want to implement 2 texture (eg. hair.jpg and skin.jpg) Is there

[osg-users] Vec4f::asABGR - backwards?

2010-09-16 Thread Glenn Waldron
Hi folks, Tthe methods Vec4f::asABGR() and asRGBA() appear to be reversed. (That is, asABGR() returns RGBA and vice-versa.) Can someone lay another pair of eyes on them and confirm this? Glenn Waldron : Pelican Mapping : +1.703.652.4791 ___ osg-users

Re: [osg-users] Keypress broken since rev 11749

2010-09-16 Thread Brad Huber
Vivien, JS, A couple of thoughts- My app is an MFC based concoction. As such the osg window is a dialog and not a control. Apparently dialogs do not (and cannot) receive WM_CHAR messages. One work around for me is to only use keyup and not to use keydown. However I think this doesn't

Re: [osg-users] Keypress broken since rev 11749

2010-09-16 Thread Vivien Delage
Hi Brad, I totally aggree with what you said. This is also what I proposed to Robert in the submission thread. Basically the best would be to have a new event of type UnicodeCharEntered or something like this. This way we could leave the keydown and keyup events as they were and only using

Re: [osg-users] Vec4f::asABGR - backwards?

2010-09-16 Thread Mark Sciabica
Hi Glenn, I think what these functions *should* return can not be determined by the names of the functions. They return 32 bit integers and whether the low byte or the high byte corresponds to the first color channel named is not immediately obvious. Like you, my first guess would be that the

Re: [osg-users] Keypress broken since rev 11749

2010-09-16 Thread Trajce (Nick) Nikolov
Hi Brad, that is what I was expecting while reading this thread, that you have the GraphicsWindowWin32 into some framework ... You need to pass the event from MFC to the window. In your OnKeyDown you get the window handle and pass thru the event. If you need details let me know This is how I

Re: [osg-users] Vec4f::asABGR - backwards?

2010-09-16 Thread Glenn Waldron
Mark, I have to disagree with your initial statement. RGBA is a well-worn specification for byte-encoded color. It implies a specific byte order. Endianness is not relevant since it is not meant to be interpreted as an integer. If you hand me 32 bits of data and tell me it's RGBA-encoded, I

Re: [osg-users] Vec4f::asABGR - backwards?

2010-09-16 Thread Mark Sciabica
Glenn, I do agree that your interpretation feels more natural to me, but I definitely don't see it as the only possible interpretation. If you hand me four bytes of RGBA color packed into a 32 bit value, I expect the first byte to be the red channel. The question then arises, how does one

Re: [osg-users] Vec4f::asABGR - backwards?

2010-09-16 Thread Glenn Waldron
Mark, I think we can agree that maintaining backwards compatibility is important, and that the methods as written are ambiguous. I'm on board with your compromise of adding additional, more clearly named methods. If Robert is on board, of course. I guess we'll have to disagree on the endian issue

Re: [osg-users] Preparing for OpenSceneGraph-2.9.9 developer release, please test :-)

2010-09-16 Thread Wang Rui
Hi Robert, All seem to work well on my Intel E6550 + GeForce 8600, either using VS2005 or MinGW. Cheers, Wang Rui 2010/9/16 Robert Osfield robert.osfi...@gmail.com Hi All, My plan is to tag svn/trunk tomorrow (Friday 16th September) and make the OpenSceneGraph-2.9.9 dev release. I would

Re: [osg-users] Preparing for OpenSceneGraph-2.9.9 developer release, please test :-)

2010-09-16 Thread Ulrich Hertlein
Hi Robert, OS X 10.6.4, GeForce 8600M: compiles fine and the examples run fine Fedora 13, x86_64, Quadro FX 1700: compiles fine and the examples look okay, except that I'm getting the following from osgwindows: Warning Referenced::signalObserversAndDelete(,,) doing delete with

Re: [osg-users] Preparing for OpenSceneGraph-2.9.9 developer release, please test :-)

2010-09-16 Thread Ulrich Hertlein
On 17/09/10 14:40 , Ulrich Hertlein wrote: Fedora 13, x86_64, Quadro FX 1700: compiles fine and the examples look okay, except that I'm getting the following from osgwindows: Warning Referenced::signalObserversAndDelete(,,) doing delete with _refCount=4294967295 Warning: deleting still