(I'm adding some more info from a similar e-mail Lars sent to me privately.)
Lars Paukert wrote: > Hi, > > thanks for the hints again, > > this particles class is great i guess. But i don't know how to use it > propper. Do you know about any documentation, or tutorial? > -- additional stuff here -- > I have been looking for it all day in the web, i can only find some > papers where it is briefly mentioned. And the trac opensg doc doesn't > really help me, it's a developer doc. > > As an example: > > As you advised to use the ViewDirQuads, i read about this and > understand that it perfectly suits my requirements. So I have been > reading all related files in order to find out what to fill in > ->setMode(..) to get ViewDirQuads. No success :( Try OSG::Particles::ViewDirQuads. > > Am i overlooking something? It seems to me that many people know all > these details, but where from? I usually look at http://www.opensg.org/doc-1.6.0/hierarchy.html or the source (in the order of tutorials, library tests & library code). But the doxygen docs are alright for 98% of my needs. So, for the particles class: http://www.opensg.org/doc-1.6.0/classosg_1_1Particles.html > I am really lost, can you give me some advise how to initialize the > particles? Or maybe you know a good and detailed paper about it. Hm. Look at this test, it's a good example: http://opensg.cvs.sourceforge.net/*checkout*/opensg/OpenSG/Source/System/NodeCores/Drawables/Particles/testParticlesRender.cpp?revision=1.2 > this is in my constructor: > > this->pNode = Node::create(); > this->pCore = Particles::create(); > > beginEditCP(pCore); > pCore->setNumParticles(100); > pCore->setMode(2); <- is this ViewDirQuads? > endEditCP(pCore); > > beginEditCP(pNode); > pNode->setCore(pCore); > endEditCP(pNode); > > Now i get the "couldn't find drawer"-message in the console. I mean of > course it cannot work, the particle-system needs much more information > like the position of the emitter, emitting rate, emitting direction, > how are particles behaving (accelerating, etc). I think i pretty much > know the theory about particle systems, since usually i implemente > them by myself. I just can't get a clue about the syntax and usage of > many OpenSG commands. The Particles class is just a container of particle positions (& optionally colors). It does not emit anything, there's no emitter or simulation in OpenSG. So, add something to the Position field. Remove the "setNumParticles" call and use getPositions.push_back() a few times. See the testParticlesRender.cpp I linked to above. Also, you need a material for your particles. Try setting the material in the particles core to something (using setMaterial()), like the textured material you used previously. Cheers, /Marcus ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Opensg-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/opensg-users
