Skip to content
This repository has been archived by the owner on Mar 28, 2019. It is now read-only.

BasicColorFactor Animation not exporting #335

Closed
vin-ni opened this issue Nov 21, 2018 · 7 comments
Closed

BasicColorFactor Animation not exporting #335

vin-ni opened this issue Nov 21, 2018 · 7 comments

Comments

@vin-ni
Copy link

vin-ni commented Nov 21, 2018

Hi,
I'm trying to animate the material color of a sphere.

Unfortunately the color of the sphere stays the same as in the first frame. Is there a different way to get the material animations going? I followed this tutorial to apply the material.

Here are two screenshots of the transformation I'm trying to achieve:
bildschirmfoto 2018-11-21 um 18 31 29
bildschirmfoto 2018-11-21 um 18 31 21

Thanks a lot!

@donmccurdy
Copy link
Contributor

Sorry, the glTF spec does not yet support animation of material properties. I think we'll get there eventually, but in the meantime the exporter can't implement it.

@emackey emackey closed this as completed Nov 22, 2018
@vin-ni
Copy link
Author

vin-ni commented Nov 22, 2018

Is there any other tool you know of I can use to achieve this?

@emackey
Copy link
Member

emackey commented Nov 22, 2018

I recall there was interest in animated materials in the past, and even an extension proposal, but those efforts seem to be on hold for now: KhronosGroup/glTF#1301 (comment)

I don't know of other formats that support it, perhaps there are some. For glTF we'd be interested in an updated or new extension proposal, but implementation could be a challenge for some engines.

@donmccurdy
Copy link
Contributor

Is there any other tool you know of I can use to achieve this?

Where and how do you need to use the result? No tool will be able to create a glTF file that achieves this, because the format doesn't allow it. Depending on where you need to use the model, another format may or may not be available.

I do think we should follow up on the extension proposal at some point though.

@vin-ni
Copy link
Author

vin-ni commented Nov 27, 2018

Just in a normal three js screne.
I haven't done that much with it yet, but wouldn't it be the same as animating position by just updating the material color?

@donmccurdy
Copy link
Contributor

donmccurdy commented Nov 27, 2018

Unfortunately, I don't think there is any model format where both (1) the format supports animated materials, and (2) the three.js loader for that format also supports it. I checked for COLLADA and FBX, anyway, perhaps there are other choices. I do expect this will arrive in glTF eventually, and at that point THREE.GLTFLoader will support it. In the meantime, if you are able, you might be able to add support to THREE.ColladaLoader with relatively little code.

It's not particularly hard to implement animation of materials in three.js, using JavaScript, but creating the data format and tooling for authoring is a bit more work. :)

@vin-ni
Copy link
Author

vin-ni commented Nov 28, 2018

Alright, I'll try that.
Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants