andrew_spn

According to the page for the Spine runtime for ThreeJS, blend modes and two color tints are not supported:

https://github.com/EsotericSoftware/spine-runtimes/tree/3.7/spine-ts

Can blend mode support be added at some point? Is there a reason it isn't supported in ThreeJS but is supported in the WebGL version? Can the way it's supported in the WebGL version be migrated to the ThreeJS runtime or will it need a different implementation?
andrew_spn
  • Posts: 2

badlogic

We can't port the WebGL version code to ThreeJS. The reason blend modes aren't fully supported is the way we need to handle materials through the ThreeJS API. We can currently only have a single material per skeleton. This is the same reason we can not support two color tints at the moment. We haven't had any requests to improve our ThreeJS support so far, which is why we haven't invested any more resources into the runtime.
User avatar
badlogic

Mario
  • Posts: 1936

andrew_spn

Thanks for the details. Does the WebGL version use the polygon batcher and render multiple meshes with a material each or do WebGL meshes just support multiple materials? I know the PIXI runtime, which I currently use, renders Spine animations with all the layers split apart. Maybe it would be possible to render Spine animations in ThreeJS with multiple meshes and have them under a Three.Group. That way they can have a different material per mesh. Does ThreeJS support multiple materials per mesh on the Mesh object?:

https://threejs.org/docs/#api/en/objects/Mesh

That class can take an array of materials. I guess those can be assigned to vertex groups? I might be able to implement this myself, what would be the best route to go for performance - multiple meshes in a group or vertex groups with multiple materials?
andrew_spn
  • Posts: 2

badlogic

I'd be awesome if you could help out with this! Performance wise I'd assume vertex groups with multiple materials to be a bit more efficient, just because you don't have additional transforms as with children of groups. I'm happy to help if you have any questions.
User avatar
badlogic

Mario
  • Posts: 1936


Return to Runtimes