Coder Social home page Coder Social logo

Animation plays only in master about source HOT 13 OPEN

blendervr avatar blendervr commented on July 18, 2024
Animation plays only in master

from source.

Comments (13)

jmespadero avatar jmespadero commented on July 18, 2024

Hi,
I just wanted to recall this issue, which I found is a feature-stop for many applications.
I suppose that it can be solved by the master sending the current animation
frame of each object, in the same way that it is sending its position and orientation.
Isn't it?
screenshot-split

Not sure if there any way to do this with a processor.py file...

from source.

PyrApple avatar PyrApple commented on July 18, 2024

The bug seems to be related to scene.suspend() not working on animations in BlenderVR (while it does obviously in Blender). Even in single screen mode (no slave), everything happens has if a third party was handling animation while scene is suspended.
see test file: https://dl.dropboxusercontent.com/u/67761747/anim-test.zip

from source.

jmespadero avatar jmespadero commented on July 18, 2024

Hi,
The anim-test.zip file is (almost) empty. It contains just a link to another directory.

I have trying to hack a patch for this, asking the master to send the current animation keyframe to slaves, using getSynchronizerBuffer(self) and processSynchronizerBuffer(self, buffer), but
I still have it not working.

By the way, I was suspecting that the problem was elsewhere... I was suspecting of action culling (means actions will not be played when the bounding box of the armature is outside of the camera's viewing frustum), as you can see here:
http://blenderartists.org/forum/showthread.php?392168-Pose-position-from-one-camera-rest-position-from-the-other

from source.

PyrApple avatar PyrApple commented on July 18, 2024

Interesting clue, will investigate. Meanwhile test file update: https://dl.dropboxusercontent.com/u/67761747/anim-test.zip

from source.

jmespadero avatar jmespadero commented on July 18, 2024

Hi,
I see several things not working in the anim-test.blend file (mainly, that slaves are not moving the "fingers" on the floor).

But I don't understand the issue with scene.suspend(). How do you run the test? What is the expected behavior? Is the .processor.py file doing something to launch scene.suspend() or
something else?

from source.

PyrApple avatar PyrApple commented on July 18, 2024

As you say, several things not working so there's not yet one way to run the test: the expected behavior is synchronization, the scene implement animation / color / visibility modifications in bge to test those features.
That being said, the issues highlighted are, running the scene in BlenderVR split mode:

  • slaves are not moving the "fingers" on the floor. Moving the camera (in original .blend) to position them on either master or slave screen (or in between) has an impact on their being animated.
  • cube animation continues while scene is suspended from master
  • cube animation is only half overwritten on slaves (as are finger's animation for some initial camera orientations): one can see the cube fast teleport between both animation paths (the one from the master vs the one from the slave, somehow unsync at BlenderVR start).
    Note: the scene.suspend() (triggered by spacebar or shift) is impl. in a script embedded in the .blend (executed in the .processor.py file will provoke another behavior).

from source.

dfelinto avatar dfelinto commented on July 18, 2024

One thing can help this report is trying to pin point which was the last Blender where this worked. Even better if the exactly commit could be pin pointed (via git bisect)

from source.

PyrApple avatar PyrApple commented on July 18, 2024

agreed, I'll work on that as soon as I manage to recompile blender (as I need to patch < 2.75a versions) on OSX 10.11, which somehow raises unexpected issues (or change OS).

from source.

PyrApple avatar PyrApple commented on July 18, 2024

Well, we may not have to go that deep finally.

While digging into old Blender/BlenderCAVE code, I actually compiled the current git version of Blender (2.76 - commit 2ecd67efa4aeadb442e094b795a9171149ccbab1), which solved the problem of KX_GameObject animation synchronization on Slaves. Remains to see if current 2.76 release does the job or if we have to wait for 2.77.

Regarding BL_ArmatureObject animations, removing the scene.suspend() applied on Slave nodes enables armature animations on Slaves, synchronized with Master's as it is.
This fix not being receivable as is (the suspend scene mechanism for Slaves exists for a reason - while a test on a physic simulation shows perfectly synchronized objects...), I created the fix_anim_in_slaves branch to dig in further.

from source.

jmespadero avatar jmespadero commented on July 18, 2024

That a great notice, but I have just tried blender-2.76b (the current release) and the bug is still there. We will wait for 2.77

from source.

dfelinto avatar dfelinto commented on July 18, 2024

@jmespadero you can get a daily build here: http://builder.blender.org/download

from source.

PyrApple avatar PyrApple commented on July 18, 2024

We've got a situation :)

Armature update in BlenderVR is handled in player/network/synchronizer/objects/item_armature_*.py, running a BL_ArmatureObject.update() if animation frame changed in master. Naturally, the scene.suspend() on slave nodes prevents any .update() flagged object to actually being updated.

Problem: none of the read/write properties of armatures in Blender impacting current pose have a direct effect, but rather will be "updated when the armature is updated during the graphic render" (see the BL_ArmatureChannel API page).

Solution 1: I didn't see it, a "setPose()" actually exists that, as e.g. worldTransform, acts immediately on the object without waiting for graphic render update. Everyone is happy, I'm humbled.

Solution 2: We deactivate scene.suspend() on slave nodes and think hard on what that fix will ... break.

Solution 3: We code a setPose() method in Blender code itself (fun ahead!)

from source.

jmespadero avatar jmespadero commented on July 18, 2024

I didn't see it, a "setPose()" actually exists [...]. Everyone is happy, I'm humbled.

Me too. I have been searching such feature for a time, and I haven't found it. I can't believe that feature is not available.

from source.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.