Teardown-Issue-Tracker-Maintainers / Teardown-Issue-Tracker

A public repo for the community to track issues/bugs/feature requests in Teardown.
12 stars 5 forks source link

[Feature/Bug?] Compound should try to remain original index of voxels #159

Open Please-Pick-a-Name opened 2 years ago

Please-Pick-a-Name commented 2 years ago

Is your feature request related to a problem (if not, explain why you think this feature should be added)? Please describe.

Well it is now related to a problem im have been having, when using compound for a vehicle shape, the special lights index gets broken I later found out that when using compound, the game collect all the color used in the vox shape and dump them in the 255 pallet, from 1 to 255, which make sense, but no longer when dealing with vehicles cause for the vehicles lights to work properly, the index 6, 7, 8 needs to be correctly corresponding with the emit voxel, and most vehicles dont have 5 different kind of glass material voxels, so when using compound, the voxel index get messed up and the lights no longer works properly

Describe the solution you'd like

im really not sure how it is done currently, but perhaps when compounding voxels, tries to remain the original index of all voxels, and if theres connflict then the one comes later gets put aside untill all non-conflicting index voxels is placed down, then place down the ones with conflicting index in the spare indexs slots... (pure voxbox colors (that isnt done via reading a vox file) should be placed last also)

Describe alternatives you've considered

maybe just try to keep the voxel with index 6, 7, 8 at their original index. but my gut tells me this might cause something to be much more unfriendlier to set up if the voxel is well all in a index they isnt originally at, some potential feature that hasnt come out yet perhaps

Additional context

No response

tuxedolabs commented 2 years ago

You are correct, indices are packed and may be swizzled around in a compound, which will mess up vehicle indices. I'm not sure there is a strong use case for preserving them since vehicles are usually modelled in MagicaVoxel as a single shape.

Please-Pick-a-Name commented 2 years ago

well...

115