Hello Volker, On 08/14/2012 11:16 AM, Volker Settgast wrote: > concerning the skinning-with-cluster problem: > > I found out, that some changes to the Ogre skinning mesh take place while > rendering. So the extra rendering for the shadow map triggers the update, > but leaving out the shadow stage will not update the skinning correctly. As > an example I added the following lines in the displayCB method to > character.cpp from the advanced examples: > > [...] > OSG::FrameHandler::the()->frame(currT); > > //OSG::commitChangesAndClear(); // do not clear > changes now, cluster needs changes, right? (let's pretend that the render > call is done on a clusterwindow) > OSG::Thread::getCurrentChangeList()->commitChanges(); > > g->mgr->idle (); > g->mgr->redraw(); > > //OSG::Thread::getCurrentChangeList()->clear(); // not working, because > no commit is done, skinning mesh will not move > OSG::commitChangesAndClear(); // working for > client, but still not working for servers, though > > [...] > So, the skeleton joints move correctly (rendermode 1 shows that), but the > skinning is doing some update which is triggered with the rendering. Could > this update be moved to another place?
hmm, not sure how difficult it is to move it to a different place. The idea was that this transfers data to the GPU (by setting uniforms) so it seemed to make sense to do it from rendering. It seems that on the server side the data for the skinning algorithm is not marked as invalid correctly and so the uniforms are not updated. So the test on line 246 of GPUSkinningAlgo: else if(data->getDataValid() == false) { // update uniforms } is not taken. Can you check if on the servers {CPU,GPU}SkinningAlgorithm::skeletonChanged() is called and does the data->setDataValid(false) call? Thinking some more about this, even if the call to data->setDataValid(false) never happens the servers should still get updated data. However, if your application calls OSG::commitChangesAndClear() after rendering, all changes that were done as part of rendering are lost - the only safe time to clear the changelist is immediately after transmitting it, but the ClusterWindow lumps the transmit together with rendering so that it is difficult for the app to clear the CL at the right time. It seems ClusterWindow should have an option (default: true) that controls if it clears the changelist after transmitting it. > (I hope the developer of the Ogre-Skinning node is still reading this...) yup, still here ;) Cheers, Carsten ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Opensg-users mailing list Opensg-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensg-users