[osg-users] kd tree ray tracing performance
Hi, is there any example that compares ray tracing performance in ms between kdtree and normal implementation with osg? i remember some time i found such an example and modified it, but couldnt find that code now. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=50460#50460 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Multi LOD in Multi Camera
Hi, I have a earth view loaded with map in my main scenegraph and have four widgets(windows) with each has their own camera. I mean this four window share one scenegraph. The problem is when i open this four widgets or three or two with different view distances (one is setted over zoom in one is setted over zoom out or zooming until to enable application loading different LODs) all views' maps are deteriorating and shaking just like changing between different LODs. (Is there a bug about in OSG?) Is there a way to overcome this issue without creating each views scenegraph seperately? (because of the memory status) ... Thank you! Cheers, Tolga -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=48724#48724 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Creating flare or shining star with osg
Alberto Luaces wrote: Tolga Yilmaz writes: Do not really tell me that nobody has needed such a thing in its entire life in with its graphics projects... :( Hi Tolga, what about this proposal? http://osdir.com/ml/OpenSceneGraph-Users/2012-01/msg00088.html -- Alberto ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Post generated by Mail2Forum That is not actually did what i needed, i need more bright particles and ieach particle has its own smoke trail. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=48726#48726 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Creating flare or shining star with osg
Do not really tell me that nobody has needed such a thing in its entire life in with its graphics projects... :( Tolga -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=48591#48591 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Effect Durations
that seems not work, even i set endless true but the animation soon ends. so does the duration is effectless, or i'm making a mistake on my implementation... -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=45752#45752 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] MatrixTransform derived class?
Hi, i want to derive a class from osg::MatrixTransform, is it needed to use META_Object, or META_Node macros and copy constructors? ... Thank you! Cheers, Tolga -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=45575#45575 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Rocket Animation
Hi, Finally i have made the groundwork of my rocket animation, i used a spehere until i find a rocket model :D and still, there is something that didnt get clear! Note: some codes below are taken from the osgparticleeffects example. Code: osg::AnimationPath* createAnimationPath(const osg::Vec3 center,float radius,double looptime) { // set up the animation path osg::AnimationPath* animationPath = new osg::AnimationPath; animationPath-setLoopMode(osg::AnimationPath::LOOP); int numSamples = 40; float yaw = 0.0f; float yaw_delta = 2.0f*osg::PI/((float)numSamples-1.0f); float roll = osg::inDegrees(30.0f); double time=0.0f; double time_delta = looptime/(double)numSamples; for(int i=0;inumSamples;++i) { osg::Vec3 position(center+osg::Vec3(sinf(yaw)*radius,cosf(yaw)*radius,0.0f)); osg::Quat rotation(osg::Quat(roll,osg::Vec3(0.0,1.0,0.0))*osg::Quat(-(yaw+osg::inDegrees(90.0f)),osg::Vec3(0.0,0.0,1.0))); animationPath-insert(time,osg::AnimationPath::ControlPoint(position,rotation)); yaw += yaw_delta; time += time_delta; } return animationPath; } int main(int argc, char *argv[]) { osgViewer::Viewer viewer; osg::Group * root = new osg::Group; osg::Geode *rocketModel = new osg::Geode; osg::Sphere *rocket = new osg::Sphere; /CREATE SPHERE// //rocket-setCenter(osg::Vec3f(0,0,0)); rocket-setRadius(1.1f); osg::ShapeDrawable* rocketDrawable = new osg::ShapeDrawable(rocket); rocketModel-addDrawable(rocketDrawable); //ANIMATION LOOP// float animationLength = 10.0f; float radius = 10; osg::Vec3f center(0,0,0); osg::AnimationPath* animationPath = createAnimationPath(center,radius,animationLength); const osg::BoundingSphere bs = rocketModel-getBound(); float size = radius/bs.radius()*0.15f; osg::MatrixTransform* positioned = new osg::MatrixTransform; positioned-getOrCreateStateSet()-setMode(GL_NORMALIZE, osg::StateAttribute::ON); positioned-setDataVariance(osg::Object::STATIC); positioned-setMatrix(osg::Matrix::translate(-bs.center())* osg::Matrix::scale(size,size,size)* osg::Matrix::rotate(osg::inDegrees(180.0f),0.0f,0.0f,1.0f)); osg::PositionAttitudeTransform* rocketPath = new osg::PositionAttitudeTransform; rocketPath-setDataVariance(osg::Object::DYNAMIC); rocketPath-getOrCreateStateSet()-setMode(GL_NORMALIZE, osg::StateAttribute::ON); rocketPath-setUpdateCallback(new osg::AnimationPathCallback(animationPath,0.0,0.5)); /SMOKE TRAIL osg::Vec3 position = rocket-getCenter()+ osg::Vec3f(rocket-getRadius()/2,rocket-getRadius()/2,rocket-getRadius()/2); float scale = 1000.0f * ((float)rand() / (float)RAND_MAX); float intensity = 11.0f; osgParticle::FireEffect* fire = new osgParticle::FireEffect(position, scale, intensity); osgParticle::ParticleEffect* smoke = new osgParticle::SmokeTrailEffect(position, scale, intensity); smoke-setUseLocalParticleSystem(false); fire-setUseLocalParticleSystem(false); /FINAL// rocketModel-addDrawable(fire-getParticleSystem()); rocketModel-addDrawable(smoke-getParticleSystem()); positioned-addChild(rocketModel); rocketPath-addChild(positioned); rocketPath-addChild(fire); rocketPath-addChild(smoke); root-addChild(rocketPath); viewer.setSceneData(root); return viewer.run(); } there is no problem with this, the fire and smoke effect follows the surface of sphere growing up direction. [Image: http://forum.openscenegraph.org/files/untitled_185.png ] here is my questions: 1) if i take the line Code: rocketModel-addDrawable(rocketDrawable); under the final section the fire and smoke trail effect's direction changes to down. is this a bug from osg? 2) why we had to add fire and smoke effects twice? shouldnt it enough to add these particle systems to rocket model and see vuola! it moves with it!? (i achieved to goal after several tries) 3) i also tried to wind these effects like in the example, i setwind with osg::Vec3 combinations but didn't work.? 4) i see very bad smoke effect unlike the example, i've tired optimiesed but didnt work. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=45565#45565 Attachments: http://forum.openscenegraph.org//files/untitled_455.png ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Effect Durations
Hi, I'm creating an explosion effect with it is fire and smoke trail it is ok but i want to set a duration that determines how many seconds/miliseconds this effect will be shown. Does fire smoke and explosion effect classes have such control or how we can achieve this implementation? Thank you! Cheers, Tolga -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=45509#45509 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [3rdparty] is there an osgEarth tutorial?
Jason Beverage wrote: Hi Tolga, There isn't any specific tutorial on osgEarth. We do have the documentation on osgearth.org, plenty of example applications and demonstrative .earth files in the tests directory. You can use the EarthManipulator with the setTetherNode option to attach it to a Node if you're looking to make the manipulator follow a node. Thanks, Jason On Mon, Jan 2, 2012 at 7:29 AM, Tolga Yilmaz wrote: Hi, Is there any tutorial about osgEarth? i especialy need a node track manipulator but any tutorial will be appreciated.. ... Thank you! Cheers, Tolga -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=44520#44520 ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Post generated by Mail2Forum tether node works on a single node well, however when i'm trying to collect nodes' matrixtransform under a osgGroup and then setting the tethernode as this group camera goes to (0,0,0) point (at least i think so), should i multiply the transformation martixes and add the group to this matrixnode? -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=44931#44931 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [3rdparty] is there an osgEarth tutorial?
Hi, Is there any tutorial about osgEarth? i especialy need a node track manipulator but any tutorial will be appreciated.. ... Thank you! Cheers, Tolga -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=44520#44520 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSG website unresponsive
Hi, i see the osg web site down at least once a week for one day. I' am in Ankara/TURKEY if it matters. Isn't there a permanent solution to this issue or how many times i see the web site crashed again when i need to view. my browser tries to connect for a few minutes and i get error like this: Code: Traceback (most recent call last): File /usr/lib/python2.5/site-packages/trac/web/api.py, line 339, in send_error 'text/html') File /usr/lib/python2.5/site-packages/trac/web/chrome.py, line 684, in render_template data = self.populate_data(req, data) File /usr/lib/python2.5/site-packages/trac/web/chrome.py, line 592, in populate_data d['chrome'].update(req.chrome) File /usr/lib/python2.5/site-packages/trac/web/api.py, line 168, in __getattr__ value = self.callbacks[name](self) File /usr/lib/python2.5/site-packages/trac/web/chrome.py, line 460, in prepare_request for category, name, text in contributor.get_navigation_items(req): File /usr/lib/python2.5/site-packages/trac/versioncontrol/web_ui/browser.py, line 295, in get_navigation_items if 'BROWSER_VIEW' in req.perm: File /usr/lib/python2.5/site-packages/trac/perm.py, line 523, in has_permission return self._has_permission(action, resource) File /usr/lib/python2.5/site-packages/trac/perm.py, line 537, in _has_permission check_permission(action, perm.username, resource, perm) File /usr/lib/python2.5/site-packages/trac/perm.py, line 424, in check_permission perm) File /usr/lib/python2.5/site-packages/trac/perm.py, line 282, in check_permission get_user_permissions(username) File /usr/lib/python2.5/site-packages/trac/perm.py, line 357, in get_user_permissions for perm in self.store.get_user_permissions(username): File /usr/lib/python2.5/site-packages/trac/perm.py, line 173, in get_user_permissions db = self.env.get_db_cnx() File /usr/lib/python2.5/site-packages/trac/env.py, line 257, in get_db_cnx return DatabaseManager(self).get_connection() File /usr/lib/python2.5/site-packages/trac/db/api.py, line 76, in get_connection return self._cnx_pool.get_cnx(self.timeout or None) File /usr/lib/python2.5/site-packages/trac/db/pool.py, line 109, in get_cnx % timeout) TimeoutError: Unable to get database connection within 20 seconds -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=44535#44535 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Ambient Occlusion Implementation 2 review
Really good work! Can't wait to use it in my apps...Hope to see with future releases of osg.. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=44429#44429 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Draw line in 3D screen
Hi, a simple line drawing code is below but i'm sure you want more complicated solition. Below you can update the start and end points on the fly by osgGA mouse movement. Code: osg::Vec3 sp(0,-180,120); osg::Vec3 ep(0,480,120); osg::ref_ptrGeometry beam( new osg::Geometry); osg::ref_ptrosg::Vec3Array points = new osg::Vec3Array; points-push_back(sp); points-push_back(ep); osg::ref_ptrosg::Vec4Array color = new osg::Vec4Array; color-push_back(osg::Vec4(1.0,0.0,0.0,1.0)); beam-setVertexArray(points.get()); beam-setColorArray(color.get()); beam-setColorBinding(osg::Geometry::BIND_PER_PRIMITIVE); beam-addPrimitiveSet(new osg::DrawArrays(GL_LINES,0,2)); Thank you! Cheers, Tolga -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=44430#44430 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] How to overcome trnasparency blending distortion
Hi, I just understood that the problem is about releasing the object and also other primitives that i've added into pyramidGeometry. Because reusing and updating the pyramidGeometry(i.e rotating about some axis in a simulation) each time the drawing methods were releasing and creating a new one(maybe per each frame) the object just seems distorted. So i've just controlled the pointers if they created or not and after that added the primiteves without releasing them. If anybody has the same problem i can write the wrong and true codes here ... Thank you! Cheers, Tolga -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=44402#44402 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] How to overcome trnasparency blending distortion
Hi, when i'm drawing a transparent pyramid it is ok; but while i rotating via transformation matrix this pyramid outside this updating makes distortions in the pyramid just like the triangle primitives have patterns. I tried other blending modes else than GL_BLEND and mede stateattr protected etc. but didnt work. How i can overcome this? The little code that i wrote: Code: pyramidGeometry-getOrCreateStateSet()-setMode(GL_BLEND, osg::StateAttribute::ON); pyramidGeometry-getOrCreateStateSet()-setRenderingHint(osg::StateSet::TRANSPARENT_BIN); Map3DFOVObject-addDrawable(pyramidGeometry.release()); FOVTransformMatrix-addChild(Map3DFOVObject.get()); [/code] -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=44382#44382 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] How to create flare or Shining star with OSG
Hi, I am a newbie to osg and developing a flight simulation. For some reason i have to create a chaff flare just like an F-16 throws. It should be too bright but doesnt has to lighten another objects in the scene. Smoke trail, animation path etc. and other effects are easy to do but the flaring part that i just dont have any idea. How could i do this? Thank you! Cheers, Tolga -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=44305#44305 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org