godotengine / godot-proposals

Godot Improvement Proposals (GIPs)
MIT License
1.17k stars 98 forks source link

Allow easy Array Mesh <-> Array Occluder translation #4406

Open mrjustaguy opened 2 years ago

mrjustaguy commented 2 years ago

Describe the project you are working on

Optimizing Game

Describe the problem or limitation you are having in your project

There Doesn't seem to be any good way of exporting meshes that are a result of simplification (like those generated by baking Occlusion models) which can have other uses in Optimization, such as efficiently reducing Shadow Triangle counts, However for that some post processing needs to be done in other tools such as blender to just slightly shrink the result to prevent shadow triangles from poking out.

If said Occluder Meshes were using Normal Array Mesh resources, it'd be possible to turn them into a mesh and use the current exporting capabilities to do this.

Describe the feature / enhancement and how it helps to overcome the problem or limitation

Convert Normal Array Mesh to Occluder Array Mesh and other way around, to help creating Occluders and using them for other optimizations (such as the Shadows example above)

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

I don't have a good idea how to expose this to the user, as there are too many possible ways that it'd make sense, and not at the same time such.. Probably the best idea would be to do it like with materials converting to shaders..

If this enhancement will not be used often, can it be worked around with a few lines of script?

Possibly by extracting the array and making a tool to turn that into a mesh and export that

Is there a reason why this should be core and not an add-on in the asset library?

Such internal format changer tools should be core.

Calinou commented 2 years ago

Related to https://github.com/godotengine/godot-proposals/issues/4316.