09th / YABEE

Export models from the Blender to Panda3D game engine
MIT License
107 stars 39 forks source link

Feature suggestion: Alpha-values in vertex-colours, and additional vertex layers #36

Open ArsThaumaturgis opened 6 years ago

ArsThaumaturgis commented 6 years ago

(As far as I see, GitHub doesn't seem to allow pull requests for specific commits. So I hope that it's okay that I'm simply creating issues for my commits, and linking to them to reference the changes. >_<)

This commit includes two changes that I feel are somewhat similar, and somewhat connected.

The first change allows the user to export vertex colours with an alpha channel. Since Blender doesn't (as far as I'm aware) support vertex-colours with an alpha channel, this is done by adding a second layer of vertex-colours in Blender, with the "red" channel being interpreted as the "alpha" channel.

The second allows YABEE to export layers from the third onwards (as the second is used as described above) as "aux" layers.

(A quick note: I've used British English in naming the resultant shader-input. I imagine that it would make sense to change this to match the Panda's convention if the changes are accepted.)

Commit reference: https://github.com/ArsThaumaturgis/YABEE/commit/39e2abfb8e750af57c72f793a138557992c84ba0

ArsThaumaturgis commented 6 years ago

It occurs to me that it makes sense to link the relevant "pull request" here: https://github.com/ArsThaumaturgis/YABEE/pull/2

(Note that it was made in my own fork in order to isolate the changes. My apologies if there was a better way to do so, given that I had already made the commits when I came to do this! ^^;)