Re: [osg-users] OSG depth peeling and multisampling

2016-11-16 Thread Peter Bako
Thank you Sebastian for the information. It seems to be over my capabilities but I will try to make some research in this area. Thank you once more. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=69389#69389

Re: [osg-users] OSG depth peeling and multisampling

2016-11-16 Thread Peter Bako
No idea anyone? Thanks in forward -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=69383#69383 ___ osg-users mailing list osg-users@lists.openscenegraph.org

[osg-users] OSG depth peeling and multisampling

2016-09-08 Thread Peter Bako
Hi, In my application, I have implemented true transparency using the depth peeling method described in osg examples. But now I got a problem, because I want to use multisampling but this doesnt work with the depth peeling transparency implementation. Then I found out that by attaching the

[osg-users] Polygon offset for line geometries, Z-fighting of edges and triangles

2016-07-14 Thread Peter Bako
Hi, In my application, I am manipulating solid 3D models with edges represented by GL_LINES primitiveSet on an osg::Geometry. The problem is that I cannot use osg::PolygonOffset, to "highlight" the edges (to avoid dashed edges caused by Z-fighting). This was not working at all, I don't see any

Re: [osg-users] draw callbacks

2016-04-19 Thread Peter Bako
I've found the problem, Javier's code is correct. I was missing this command: Code: osg::DisplaySettings::instance()->setMinimumNumStencilBits(1); Maybe it helps someone -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=66881#66881

Re: [osg-users] draw callbacks

2016-03-30 Thread Peter Bako
Hi, I tried Javier's example, but I don't know how to modify the code, so that the stencil plane covers the "holes" on the clipped geometry. In this case the plane is renedered over the whole scene. I tried to remove the transformation and projection, then the plane was rendered on the correct

Re: [osg-users] Resetting buttonMask of GUIEvents

2014-10-09 Thread Peter Bako
Hello Robert. Thanks for the answer. It is working perfect! -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=61264#61264 ___ osg-users mailing list osg-users@lists.openscenegraph.org

[osg-users] Resetting buttonMask of GUIEvents

2014-10-08 Thread Peter Bako
Hi, What is the best way to reset the button mask (no button is pressed)? I tried to use Viewer-getEventQueue()-mouseButtonRelease(1,1,1); but this doesn't reset the button mask. The problem is that sometimes the users press more mouse buttons at the same time and release it out of the graphic

Re: [osg-users] snapshot with fixed size

2014-04-16 Thread Peter Bako
Hello Flallaur. Try to use the osgPoster example. It can create screenshots with any size. I was recently doing a very similar thing and osgPoster helped me much. I don't know how will it act with your night vision but I would definitely give it a try. Cheers, Peter -- Read

[osg-users] Text with border

2014-04-16 Thread Peter Bako
Hello! Does anyone have an idea, how to create osgText with border? for example white text with black border. I need this, because I want to make screenshots of scenes with texts but the background can be any color so the white text as I use it now, is not readable every time. My only idea is

[osg-users] Virtual simulation of CNC machine - problem with intersections and setMatrix() probably

2013-10-03 Thread Peter Bako
Hello guys, I am programming a virtual simulation of CNC milling machines. I created a model which contains the kinematics - axes with limits etc. I also implemented a function, which calculates the axis values, so that the tool follows the mouse which points to the surface of the workpiece.

Re: [osg-users] Virtual simulation of CNC machine - problem with intersections and setMatrix() probably

2013-10-03 Thread Peter Bako
Hello Alberto. I will try your suggestion with the intersection points. regarding the framework - I use .NET, Windows forms, WPF, OSG, OpenCascade and some other technologies. The graphic frame what you see is created in WPF, the graphic window of osg is rendered on a windows forms window,

Re: [osg-users] Virtual simulation of CNC machine - problem with intersections and setMatrix() probably

2013-10-03 Thread Peter Bako
Hello again. My assumptions were correct: here is a list of points Code: Point: -152.9, 216.3, -21.5 Point: -148.9, 215.4, -21.5 Point: -152.4, 214.6, -21.5 Point: -155.7, 213.7, -21.5 Point: -158.7, 212.8, -21.5 Point: -151.6, 211.9, -21.5 Point: -151.4, 211.0, -21.5 Point: -150.8, 210.2,

Re: [osg-users] Virtual simulation of CNC machine - problem with intersections and setMatrix() probably

2013-10-03 Thread Peter Bako
Hello Alberto. Actually I've found the problem. The reason, why it didn't work, was, that I was changing only the matrix of my camera manipulator. I have to change also the viewMatrix of the camera, not only the manipulator. Now IT WORKS! Thank you! -- Read this topic online

Re: [osg-users] Changing material of geodes/drawables during rendering - crash

2013-09-03 Thread Peter Bako
Thank you for your answers! It looks like it works. Peter -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=56084#56084 ___ osg-users mailing list osg-users@lists.openscenegraph.org

[osg-users] Changing material of geodes/drawables during rendering - crash

2013-08-29 Thread Peter Bako
Hello guys. What is the correct way to change materials during rendering? What callbacks should I use, update callback? Sometimes I get a crash and I assume it is becasue of changing the material. Should I use special updateCallback on every geode/geometry I am changing, or it is enough to use

[osg-users] osg::Text setText - changing text during rendering

2013-06-12 Thread Peter Bako
Hi, I have problems with changing text during rendering. I am trying to change the text in the update callback of the text node, but sometimes I get a crash (operator not incrementable) in the osg::osgText. Here is what I do in the update callback (Call the updateText() function on a

Re: [osg-users] osg::Text setText - changing text during rendering - What is the correct way to change the text in osgText::Text?

2013-06-12 Thread Peter Bako
Hello Robert and Pjotr. Actually, I was sure that the data variance is set to Dynamic. But now after a closer look I've found out that instead of text-setDataVariance(DYNAMIC); I wrote this-setDataVariance(DYNAMIC); Thanks to you I've found the problem! Have a nice day and thank you very

Re: [osg-users] HowTo use UPDATE_TO_VERSION for custom osg::Object separate from osgVersion()

2013-04-24 Thread Peter Bako
Hi Wang Yes you are right, later I've found out that I merged the serialization stuff in my local osg project and I used it. now I had to recompile it becuase I was missing some things and then I found out that its not in the 3.1.5 version or any other version. never mind... My problem is

Re: [osg-users] HowTo use UPDATE_TO_VERSION for custom osg::Object separate from osgVersion()

2013-04-18 Thread Peter Bako
Hello Wang. Recently, I downloaded osg version 3.1.5 and I found out, that my UPDATE_TO_USER_VERSION macros don't work anymore. I digged into the osg source and found out that it is not there anymore, so I searched the forum but I didn't find any reason why was it removed. I used osg 3.1.1

[osg-users] Camera manipulator zoomFactor

2013-03-21 Thread Peter Bako
Hi, Is there an easy way to invert the wheel zoom factor on TrackballCameraManipulator? I have a feeling that once I've seen a property where you can set this, and if you set it to -1, the zoom scrolling will behave opposite. I have a cameraManipulator derived from TrackballCam..Man.. the

Re: [osg-users] Camera manipulator zoomFactor

2013-03-21 Thread Peter Bako
I am sorry about the useless topic. I was searching the property on a wrong object manipulator-setWheelZoomFactor() -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=53189#53189 ___ osg-users

Re: [osg-users] Remove node runtime from another thread

2013-01-28 Thread Peter Bako
Hi, I solved my problem in this way: I have a loop, where I call the frame() method. Everytime, I want to make a change in the scene graph, I wait, until frame() is finished and then if a flag changeStructure is true, I make the change in the scene graph structure. I check this flag in every

Re: [osg-users] Sharing some screenshots of my present work :-)

2013-01-28 Thread Peter Bako
Good job! It's looking really nice! -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=52244#52244 ___ osg-users mailing list osg-users@lists.openscenegraph.org

[osg-users] Remove node runtime from another thread

2013-01-25 Thread Peter Bako
Hi, I want to remove and add a child from/to a group runtime, while rendering is running, moreover, I am doing this from a different thread. What is the thread safe way to do it? Which callback should I use, or how would you do it? If I remove the node in the update callback I get crashes. On

Re: [osg-users] Remove node runtime from another thread

2013-01-25 Thread Peter Bako
Hi robert, thank you for the reply If using an update callback you have to be careful about invalidating iterators for the thread calling the update callback. Do you have an example, where this is done? what iterators should I check? Yes, as I do it now - sometimes it crashes, and the

Re: [osg-users] LineSegmentIntersector gives incorrect results (intersections missing)

2012-11-16 Thread Peter Bako
Hello Robert. I digged a bit into the OSG source code and I found out that its a precision problem. I use big models where the vertex coordinate values are 1000. I don't know the exact process of the intersection search, but I assume that the lineSegment is clipped in the

[osg-users] Custom cursors and OSG used from .NET

2012-11-13 Thread Peter Bako
Hello! I am creating an osg scene, which is rendered to a .NET picture box on a windows forms scene. Code: void startInFormWinCpp(int wh){ //wh is a window handle HWND hwnd = (HWND)wh; baseViewer = new osgViewer::Viewer(); osg::ref_ptrosg::GraphicsContext::Traits traits = new

Re: [osg-users] LineSegmentIntersector gives incorrect results (intersections missing)

2012-10-23 Thread Peter Bako
I use the LineSegmentIntersector in my application to select planar faces. The problem is that sometimes when I click on the face facing to you (check the red Xes on the picture), I get no intersection of this face. I get only an intersection on the face which is not visible from this view -

[osg-users] LineSegmentIntersector gives incorrect results (intersections missing)

2012-10-17 Thread Peter Bako
Hi, I've got a problem with line segment intersector. Sometimes I get only one intersection (on the bootom side of the table), while I should get two. Please check the screenshot. Do you have any idea why this happens? What should I do? STLFILE.stl (ZIPPED) is attached Thank you! Cheers,

Re: [osg-users] OSG Serialization - changes on custom Classes

2012-08-21 Thread Peter Bako
Hi mr. Wang Rui. Thank you for your response. I am actually an owner of your OSG book :-). I tried your suggestion, it works, but the limitation is that we can have only 2 versions of osgb files (old format - with the schema) and the new (actual format). Does this mean that there is no way to

[osg-users] OSG Serialization - changes on custom Classes

2012-08-20 Thread Peter Bako
Hello guys, I am using OSG serialization on my custom classes derived from osg::MatrixTransform and osg::Geometry. I already use this serialization for some time, so I have many .osgb files exported on my disk, but now, I want to add some new properties to my Class and serialize them (new

Re: [osg-users] Is it possible to do boolean operations with objects (primitives)?

2012-08-20 Thread Peter Bako
Hi, This is not possible to do with native osg function. What you say, is an operation on Solid models, osg scene is mainly vertices and triangles, there is no information about volume. If you want to do this, try OpenCASCADe. It is also free, but there is a little documentation about it and

[osg-users] VS2010 64bit compile problem

2012-01-04 Thread Peter Bako
Hi, I get errors, when I try to compile my project on visual studio for 64bit platform. Before on ANYCPU configurations I had no problems. The error which I get is variable WINGDIAPI is not a type name c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h and other 150

Re: [osg-users] VS2010 64bit compile problem

2012-01-04 Thread Peter Bako
Yes, sorry, I'm using VS2010 on Windows 7 64bit Peter -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=44572#44572 ___ osg-users mailing list osg-users@lists.openscenegraph.org

Re: [osg-users] VS2010 64bit compile problem

2012-01-04 Thread Peter Bako
Hi! Thank you very much, you were right, I have to include windows.h on the very beginning. So now I am able to compile my app but now I get an error after launch :-(. The application was unable to start correctly (0xc07b). Click OK to close the application. Does anyone have an idea what

Re: [osg-users] VS2010 64bit compile problem

2012-01-04 Thread Peter Bako
Hello zonk and others! Thank you for the idea to use dependency walker, I haven't used it before. Now I found out, that x86 libraries are used at runtime instead of x64, because I forgot to put the path to x64 dlls into the %PATH% variable. Thank you very much! Peter -- Read

[osg-users] Implementing clone() on class derived from osg::Geometry and osg::MatrixTransform

2011-12-11 Thread Peter Bako
Hello guys! I have run a search over the topics, but I didn't find an answer for my question, so here it is: I have my own derived class called PiFaceGeometry, which is derived from osg::Geometry class, I use this to work with faces of solids - so I have the type of face - cylinder, plane,