[osg-users] Synchronize animations between different computers

2014-06-16 Thread Harald Müller
Hi, Currently I am playing around with distributed rendering, for that I need to synchronize Animations between 2 or more computers. So the easiest way to achieve that is to synchronize animations with a server time. E.g. if the servers says it is time X, I set the animation on each computer to

[osg-users] Synchronize animations between different computers

2014-06-16 Thread Harald Müller
Hi, Currently I am playing around with distributed rendering, for that I need to synchronize Animations between 2 or more computers. So the easiest way to achieve that is to synchronize animations with a server time. E.g. if the servers says it is time X, I set the animation on each computer t

Re: [osg-users] Synchronize animations between different computers

2014-06-17 Thread Harald Müller
I also tried to set a FramStamp: Code: void MyCallback::operator()(osg::Node* node, osg::NodeVisitor* nv) { ... osg::FrameStamp* fsMod = new osg::FrameStamp(); fsMod->setFrameNumber(10); fsMod->setReferenceTime(10); fsMod->setSimulationTime(10); nv->setFrameStamp(fsMod); ... } but this doesn'

Re: [osg-users] Synchronize animations between different computers

2014-06-17 Thread Robert Osfield
Hi Harald, The OSG uses an osg::FrameStamp object to provide control over timing related features, this object has a SimulationTime and ReferenceTime parameters. The SimulationTime is the time used by animation codes, while the ReferenceTime is actual time since the start of viewer's time stamp w

Re: [osg-users] Synchronize animations between different computers

2014-06-17 Thread Harald Müller
Thanks! Hmmm I think the SimulationTime and the ReferenceTime doesn't help me do solve this problem ... What I am searching for is function to jump e.g. to the middle of the animation. Example: - Client A starts animation X - Client A hast 40% finished of animation X - Server sends control

Re: [osg-users] Synchronize animations between different computers

2014-06-17 Thread Robert Osfield
Hi Harald, With a cluster you would dispatch the SimulationTime from the master to all the slaves so that they use the master's SimulationTime, so if it's simulation time jumps then so till will the slaves. Robert. On 17 June 2014 18:32, Harald Müller wrote: > Thanks! > > Hmmm I think the Simu

Re: [osg-users] Synchronize animations between different computers

2014-06-17 Thread Harald Müller
Hi Robert, of course you're right, but the problem is the SimulationTime has nothing to do with the progress of the animation ... :O So if I start a Client 5 Seconds later, and it gets Server-Time 5000 the animation doesn't start at time 5 Sec, it starts from the beginning ... To take your exa

Re: [osg-users] Synchronize animations between different computers

2014-06-17 Thread Trajce Nikolov NICK
Hi Harald, have a look at the osgcluster example. You can see there syncing of viewers across machines based on the simulation time Nick On Tue, Jun 17, 2014 at 9:22 PM, Harald Müller wrote: > Hi Robert, > > of course you're right, but the problem is the SimulationTime has nothing > to do wit

Re: [osg-users] Synchronize animations between different computers

2014-06-18 Thread Pjotr Svetachov
With our distributed rendering setup we don't let the master run till all the clients are connected. From there we send the master's FrameStamp (so frame number, reference time, simulation time and just in case also the calender time) to all the slaves every frame. To manage animations the maste

Re: [osg-users] Synchronize animations between different computers

2014-06-19 Thread David Heitbrink
Just to give you some perspective, the way we do this at were I work is we use hardware frame lock. We have a single computer that is responsible for generating our frame data (i.e. object position and animation state), this in turn is broadcast out to all our render nodes. Each frame is tagged

Re: [osg-users] Synchronize animations between different computers

2014-06-19 Thread Harald Müller
Thanks for the answers! finally it works; the solution is simple: this->setTimeOffset(ServerTime); Of course I tried this at the beginning, but the animation stoped whenever I called setTimeOffset, the problem was that the TimeOffset doesn't work in combination with AnimationPath::NO_LOOPIN