Re: [osg-users] ccmake question

2011-06-09 Thread Dženan Zukić
Hi, You can make an additional CMake variable and add it to libraries. This means when your app is configured, the user has to provide a path to that library. HTH, Dženan -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=40262#40262

Re: [osg-users] Sharing vertex and normal buffer with another library

2011-02-22 Thread Dženan Zukić
Hi, That file only contains function prototypes (of functions which exist in cpp files). Cheers, Dženan -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=36993#36993 ___ osg-users mailing list

Re: [osg-users] Better debug visualization in Visual Studio

2010-10-22 Thread Dženan Zukić
Hi, have you tried it? Opinions, experience? Cheers, Dženan -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=32971#32971 ___ osg-users mailing list osg-users@lists.openscenegraph.org

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

2010-09-27 Thread Dženan Zukić
Check the discussion from the beginning, it is indicated that nVidia's drivers are to blame. Cheers, Dženan -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=32101#32101 ___ osg-users mailing list

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

2010-09-17 Thread Dženan Zukić
Hi, At least you are running downhill :) Have a good time! Cheers, Dženan -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=31785#31785 ___ osg-users mailing list osg-users@lists.openscenegraph.org

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 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] 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

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 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 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] 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 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

[osg-users] Replacing a node on the fly

2010-09-15 Thread Dženan Zukić
Hi, What is a proper way to replace a node in some loop and have the changes immediately visible? This code works: Code: void doWork(osg::ref_ptrosg::Geode geode, ...) //empty geode passed { loop { //make modifications geode-removeDrawables(0,

Re: [osg-users] Rotate camera around the scene in osgViewer - simple way?

2010-08-31 Thread Dženan Zukić
Hi, Thanks for suggestion. I played with it a bit, but with no success. Anyway, I have debugged the code this procedure was supposed to test, so no need to spend more time on it. Cheers, Dženan -- Read this topic online here:

Re: [osg-users] Rotate camera around the scene in osgViewer - simple way?

2010-08-30 Thread Dženan Zukić
Hi, Thanks for sharing, but I did not modify the frame loop of the viewer, and the following code in Qt on-click event handler does not produce rotation: Code: mainForm.vis-setSceneData(my_object); osg::Vec3 achse(0.1, 0.2, 0.974); osg::Matrixd myRotationMatrix;

Re: [osg-users] Rotate camera around the scene in osgViewer - simple way?

2010-08-30 Thread Dženan Zukić
Hi, I can tell you immediately that I gave up on this :D Cheers, Dženan -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=31152#31152 ___ osg-users mailing list osg-users@lists.openscenegraph.org

[osg-users] Rotate camera around the scene in osgViewer - simple way?

2010-08-27 Thread Dženan Zukić
Hi, Is there a simple way to programmatically set rotation of a model in osgViewer? [code]myViewer-setSceneData(fancyObject); myViewer-run();[/code] After this code, the object is displayed statically in the window. To get it to rotate, the user must click and pull the object in the desired

Re: [osg-users] Rotate camera around the scene in osgViewer - simple way?

2010-08-27 Thread Dženan Zukić
Hi, Well I was sort of hoping I could get away without constructing camera matrix, as it involves a bit of computation. If there is no quick and easy way to do it, I will just have to skip it (it is not that important for my project, as it is for debugging purposes). Thank you! Cheers,

[osg-users] Vec3 does not pass properly by value, only by reference?

2010-08-25 Thread Dženan Zukić
Hi, Is osg::Vec3 class supposed to be passable only by reference and not by value? If yes, why? Thank you! Cheers, Dženan -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=31039#31039 ___ osg-users

Re: [osg-users] Vec3 does not pass properly by value, only by reference?

2010-08-25 Thread Dženan Zukić
Hi, Today (again) I am experiencing problems passing it by value. After some testing it turns out it is only displayed wrongly in Visual Studio 2008 debugger - the code works properly in spite junk shown by the debugger. Thank you! Cheers, Dženan -- Read this topic online

[osg-users] Transparent polygons render view angle dependent

2010-08-17 Thread Dženan Zukić
Hi, I have a scene shown in osgViewer. Scene contains opaque and translucent polygons. Translucent polygons render significantly differently depending on the angle of viewing. Attachments show this. Color of the problematic polygons is Vec4(0.55,0.60,0.55,0.3). The whole scene consists of

Re: [osg-users] Transparent polygons render view angle dependent

2010-08-17 Thread Dženan Zukić
Hi, There is no quick fix - very useful information. Doing proper sorting of millions of triangles coming out of marching cubes algorithm is not the right way to do it due to performance reasons. Although it would give a proper rendering (more important with more complex datasets than this).

Re: [osg-users] Alpha channel in framebuffer?

2010-08-16 Thread Dženan Zukić
Hi, I have AdapterWidget embedded in my Qt main window. Instance of it is called vis. This is the relevant code: Code: MainWindow::MainWindow(QWidget *parent) :QMainWindow(parent) { setupUi(this); osg::ref_ptrosgGA::KeySwitchMatrixManipulator keyswitchManipulator = new

Re: [osg-users] Alpha channel in framebuffer?

2010-08-16 Thread Dženan Zukić
Hi, I changed the window creation code, but the resulting png still has alpha=1. Code: AdapterWidget::AdapterWidget( QWidget * parent, const char * name, const QGLWidget * shareWidget, WindowFlags f) :QGLWidget(parent, shareWidget, f) { osg::ref_ptrosg::DisplaySettings

Re: [osg-users] Alpha channel in framebuffer?

2010-08-16 Thread Dženan Zukić
Hi, I found the solution now. The only change needed was in the main window constructor: Code: MainWindow::MainWindow(QWidget *parent) :QMainWindow(parent) { QGLFormat f; f.setAlpha( true ); //enables alpha channel for this format QGLFormat::setDefaultFormat( f ); //set it as

Re: [osg-users] Visual Studio 2010 3rd Party

2010-08-12 Thread Dženan Zukić
Hi, Yes, there is an interest in x64 binaries for VS2010. To build most of them for 2008 x64 took me a few days (windows versions of the libraries were all pre-configured for x32, and they required a bit of tinkering). I would like to avoid it this time (if possible). Also, most people

Re: [osg-users] Making objects transparent without using textures at all

2010-07-22 Thread Dženan Zukić
Hi, Examples that come with the OSG source code? Cheers, Dženan -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=30186#30186 ___ osg-users mailing list osg-users@lists.openscenegraph.org

Re: [osg-users] VS 2010 and OSG v2.8.3?

2010-07-22 Thread Dženan Zukić
Hi, I just compile-tested OSG 2.8.3 with VS2010, x64 target. It has build errors (full log attached). Furthermore, I cannot switch to VS2010 because Qt doesn't support it at the moment. Cheers, Dženan -- Read this topic online here:

Re: [osg-users] VS 2010 and OSG v2.8.3?

2010-07-22 Thread Dženan Zukić
Hi, Thanks for the tips, they may come in handy once Qt 4.7 is out and I start migrating to VS2010, and new version of OSG which includes those includes is not published. Thank you! Cheers, Dženan -- Read this topic online here:

Re: [osg-users] osgVolume volume rendering ?

2010-07-19 Thread Dženan Zukić
Hi, Hehe, now that you have succeeded at getting something, you start to get into the problematics of volume rendering. Namely, to get a nice visual representation, you have to provide a suitable transfer function. The example uses some hard-coded transfer function (osgVolume supports only 1D

Re: [osg-users] osgVolume volume rendering ?

2010-07-17 Thread Dženan Zukić
Hi, I don't think osg's data folder has anything to do with it. I just took a look, and realized .pvm format is compressed. You can get gzipped datasets from volvis.org, for example this 256x256x256 dataset: http://www.gris.uni-tuebingen.de/edu/areas/scivis/volren/datasets/data/bonsai.raw.gz

Re: [osg-users] osgVolume volume rendering ?

2010-07-17 Thread Dženan Zukić
Hi, The command you used on linux should also work on windows. Don't have time to investigate that right now, but you manged to get it to work, in some way. Cheers, Dženan -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=30097#30097

Re: [osg-users] osgVolume volume rendering ?

2010-07-17 Thread Dženan Zukić
Hi, I don't know which version of GDCM osg is using, or how well is it integrated. You could check out ITK library (http://itk.org), it has an example (called DicomReadImageWrite or similar) which can read dicom images and convert them to other formats - I recommend .mha, because its header

Re: [osg-users] osgVolume volume rendering ?

2010-07-12 Thread Dženan Zukić
Hi, I have a working osgVolume used in my program - I use it as a preliminary visualization. Since it has only 1D transfer function support, and does not combine with polygonal models, in later stage I replace it with isosurface+polygonal model. My version is basically a simplified osgVolume

[osg-users] Numeric instability with Vec3f

2010-06-28 Thread Dženan Zukić
Hi, The following code occasionally leaves p with NaN value: [code]double cosFi=vec1*vec2/(vec1.length()*vec2.length()); //cosine of angle between vectors p+=acos(cosFi)*...;[/code] Due to numerical round-off errors it would rarely occur that cosFi1 (something like 1.0002534), and acos would

Re: [osg-users] Numeric instability with Vec3f

2010-06-28 Thread Dženan Zukić
Hi, No, I didn't. When I have more time I will try it. Btw, this occurs only once every few million iterations - but has a high chance of occurring in large meshes. Thank you! Cheers, Dženan -- Read this topic online here:

Re: [osg-users] Telemetry Data (Motion Data) supported Free Game?

2010-05-25 Thread Dženan Zukić
Hi, Maybe you should look among university research projects, because if someone has motion capture equipment, it is not very likely they will use it to make open-source games :D Cheers, Dženan -- Read this topic online here:

Re: [osg-users] write then read - mesh gets changed

2010-05-22 Thread Dženan Zukić
Hi, There was a screenshot attached. I don't know whether it got removed by my edits of the post, or for some other reason, but the differences are such that the objects don't even overlap. I don't have that image at home (where I am at the moment), but I will attach it again on Tuesday.

Re: [osg-users] write then read - mesh gets changed

2010-05-22 Thread Dženan Zukić
Hi, I did write out the complete scene into an OSG file, and I analyzed it, and it seems that the only unaffected coordinate is X (Y and Z coordinates get screwed up). The only reason that comes to mind is that there is matrix transform in the scene graph. Not above these nodes though - grp

[osg-users] write then read - mesh gets changed

2010-05-21 Thread Dženan Zukić
Hi, I have the following code: Code: osg::ref_ptrGeode geode=qe2osg(qe); objWriteCell(qe, temp.obj); grp-addChild(osgDB::readNodeFile(temp.obj)); grp-addChild(geode); and it produces the attached result. The yellow object is geode (code below assigns yellow color), while the node is gray (no

Re: [osg-users] write then read - mesh gets changed

2010-05-21 Thread Dženan Zukić
Hi, Well thanks for narrowing things down (that means I am not immediately affected by this). If I have some time to do more tests with this, I might try Inventor format (because OSG's native format is not widely supported). But I have noticed (by looking at a dump of scene graph) that during

Re: [osg-users] osgVolume write isosurface to mesh file

2010-05-19 Thread Dženan Zukić
Hi, If you are looking for fast isosurface generation, take a look at this thread: http://forum.openscenegraph.org/viewtopic.php?t=5655 If that is what you need, I can give you the missing pieces of code (slightly modified HPMC library). Code is for nVidia GPUs (ATI's approach to Transform

Re: [osg-users] OBJ export of Shapes, any progress or workarounds?

2010-05-10 Thread Dženan Zukić
Hi, I checked out trunk version of it, but I cannot find documentation on how to use it. I tried adding this to my CMakeLists.txt: Code: #find_package(osgWorks COMPONENTS libosgworks) find_package(osgWorks) include_directories(${OSGWORKS_INCLUDE_DIRS}) Code: Configuring my project in CMake

Re: [osg-users] OBJ export of Shapes, any progress or workarounds?

2010-05-10 Thread Dženan Zukić
Hi, osgBulltet provides file FindOSGWorks.cmake which solves the problem. Thank you! Cheers, Dženan -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=27714#27714 ___ osg-users mailing list

Re: [osg-users] OBJ export of Shapes, any progress or workarounds?

2010-05-08 Thread Dženan Zukić
Hi, Thanks, I will look into it. Cheers, Dženan -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=27682#27682 ___ osg-users mailing list osg-users@lists.openscenegraph.org

Re: [osg-users] Sharing vertex and normal buffer with another library

2010-05-05 Thread Dženan Zukić
Hi, Thank you for taking interest in my problem. a) Of course I add geodes to the tree, I just thought that is not an interesting part of the code. [code]rest=marchingCubesGPU(visualizing, highTh, lowTh); osg::ref_ptrGroup grp=new osg::Group; grp-addChild(rest); //isosurface grp-addChild(vert);

Re: [osg-users] Memory problem

2010-05-05 Thread Dženan Zukić
Hi, Surround your code with [code] [/code] tags, because like this it is completely obfuscated. Cheers, Dženan -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=27551#27551 ___ osg-users mailing

[osg-users] Sharing vertex and normal buffer with another library

2010-04-30 Thread Dženan Zukić
Hi, I am using HPMC library (http://www.sintef.no/Projectweb/Heterogeneous-Computing/Research-Topics/Marching-Cubes-using-Histogram-Pyramids/) to do isosurface extraction. Currently I do it like this: 1)create buffers for vertices and normals 2)have this lib fill it with data (lib is meant to

[osg-users] Is osgVolume being improved?

2010-04-29 Thread Dženan Zukić
Hi, When osgVolume was being introduced last year, plans to support mixing it with polygonal data have been announced. Is there any progress in this, or other improvements in osgVolume (maybe support for 2D transfer function)? What are the current plans regarding osgVolume? Cheers, Dženan

Re: [osg-users] Is osgVolume being improved?

2010-04-29 Thread Dženan Zukić
Hi, Is there any time frame for reaching the decision? Cheers, Dženan -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=27436#27436 ___ osg-users mailing list osg-users@lists.openscenegraph.org

[osg-users] [forum] Old archive

2009-09-02 Thread Dženan Zukić
Hi, I was reading a thread: http://www.mail-archive.com/osg-us...@openscenegraph.net/msg11931.html and this message contained a link: http://openscenegraph.org/archiver/osg-users/2006-October/0756.html However, this link is no longer valid. Are those old messages available, in if yes, how can

[osg-users] Cryptic png plugin loading error resolved

2009-09-02 Thread Dženan Zukić
Hi, While debugging a project today, I came to realize that 3rd party bin folder has to be in the path. If it is not, png plugin does not load, and within osg-using project you have no warning of this. Tracing the execution led me to failure of LoadLibrary from Windows API. I created a new