atteneder / glTFast

Efficient glTF 3D import / export package for Unity
Other
1.23k stars 250 forks source link

Skinning export support. #365

Closed kyapp69 closed 1 week ago

kyapp69 commented 2 years ago

I assume that skinning won't be supported until you are less busy? Will have to take you up on the code structure mentoring. Is anyone else taking up skinning and animation? Otherwise I'll take a stab at it.

atteneder commented 2 years ago

@kyapp69 Correct, I'm focusing on quality and CI at the moment.

BlendWeights and BlendIndices of a mesh should already get exported (haven't tested it though), so it boils down to detecting SkinnedMeshRenderers and see if they have bones assigned and convert them to a proper glTF skin.

atteneder commented 2 years ago

The starting point would be here by passing the newly created skin data to m_Writer.

hth

kyapp69 commented 2 years ago

The starting point would be here by passing the newly created skin data to m_Writer.

hth

I see that a unityengine.mesh is passed in to the writer and eventually the gltf mesh schema is created during the serialization. Would it be better if the gltf skin is done in the writer also? Let me get it working first and see how to refactor. I see that the only thing to get it working is to export the skin. I'll get right on it.

Cheers Kevin

atteneder commented 2 years ago

Would it be better if the gltf skin is done in the writer also?

I think so, yes....I didn't think it through though, so no strong opinion at this point.

hierro commented 2 years ago

@kyapp69 I've been testing all possible cases to export a character with rig, then i stepped into this thread. if I can be helpful, in terms of debug and test, let me know, thank you all.

kyapp69 commented 2 years ago

@kyapp69 I've been testing all possible cases to export a character with rig, then i stepped into this thread. if I can be helpful, in terms of debug and test, let me know, thank you all.

Sure, watch this thread. I just forked it so I can do pull requests.

hierro commented 2 years ago

Sure, watch this thread. I just forked it so I can do pull requests.

Following it, and also considering to modify shaders in untiy to be fully compliant with GLTF, in example using roughness maps. There is a lot that can be done, but indeed the skin is necessary in order to have a valid export tool for interoperability. Let me know how I may help on this, thank you.

kyapp69 commented 2 years ago

Sure, watch this thread. I just forked it so I can do pull requests.

Following it, and also considering to modify shaders in untiy to be fully compliant with GLTF, in example using roughness maps. There is a lot that can be done, but indeed the skin is necessary in order to have a valid export tool for interoperability. Let me know how I may help on this, thank you.

You can take a look at my fork to do initial testing of the skinning for the time being. I have enabled legacy path exporting, as I am using that to understand the code. not surer what is missing tho. I just preliminarily tested and it seems to work.

https://github.com/kyapp69/glTFast

Not quite yet.. The bind pose is a little off.. so there's a bug.. sorry.. Still need some work.. Both path are exporting.. so now it's a matter of correctness

Hugo-Pereira commented 1 year ago

What is the status on this issue?

atteneder commented 1 year ago

@Hugo-Pereira No imminent plans to start implementing it, so definitely not happening before late Q4. Help is welcome though.

Thanks for bringing it up though. It gives me a feel on how important it is to users.

Hugo-Pereira commented 1 year ago

I'll try and tackle this. Should have a MR in the next few days.

TechInterMezzo commented 10 months ago

Are there any news on this?

w100076575 commented 4 months ago

Are there any news on this?

atteneder commented 2 months ago

The good news: It's quite high in the backlog as I try to get most PRs merged before doing some refactoring.

The bad news: I'm on parental leave until early August, so it's likely delayed for at least two months.

Sorry for the delay.

atteneder commented 1 week ago

Released in glTFast 6.8.0.