Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Blender path support #1919

Closed
wants to merge 4 commits into
from

Conversation

2 participants
Contributor

Druidhawk commented May 14, 2012

This request adds a new field to the JSON file exported by Blender, "moveTargets", which contains the location of an object during animation.

This pull also includes an example blender file which has a cube following a path over time. Exporting this with the modified exporter will generate a file containing "moveTargets" content.

I really don't know threejs well enough to create and example which demos the obj movement. Perhaps soon.

Owner

mrdoob commented May 15, 2012

Uhm, is this moving the vertices instead of the object location?

Contributor

Druidhawk commented May 15, 2012

Nope, around line 1075 it dumps the position from the object's matrix and stores it in the 'moves' collection. So the actual vertex position would need to be the location plus the vertex location. I use a java based scene graph were I have a transform group which holds a shape and places it at a location, the shape holds vertex locations the final position is done for me. would threejs need to sum the location and vertex position?

Owner

mrdoob commented May 15, 2012

Uhm, if you don't mind I'll hold on to this one for a bit. I need to take a look at both the geometry format and the scene format. Right now I've them out of control :S

Contributor

Druidhawk commented May 15, 2012

I am cool with that, this something i wanted to add for future development, your call when to actually add. In my game I will have swooping cameras, moving people, etc. Using blender to calculate positions simplifies things.

Owner

mrdoob commented May 15, 2012

For sure. This is definitely the way to go. It's more about the naming of things that I want to have a think about.

@mrdoob mrdoob closed this Jan 12, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment