BastiaanOlij / gdprocmesh

A procedural mesh generator for Godot build as a GDNative plugin
MIT License
120 stars 13 forks source link

Adding Fast Quadric Mesh Simplification support #25

Closed BastiaanOlij closed 6 years ago

BastiaanOlij commented 6 years ago

Working on implementing this really cool piece of tech: https://github.com/sp4cerat/Fast-Quadric-Mesh-Simplification

This takes in a mesh, optimizes the vertices and faces to a reduction factor and gives you a resulting mesh. Note that due to the way meshes are loaded into Godot multi material meshes will always have seam issues. But in combination with game optimization turning a mesh into a single material mesh with all textures baked into one this will be a powerful automatic LOD tool.

Lots of work left to be done. Need to remove duplicate vertices to solve seam issues. Have to add texture coordinates, etc.

BastiaanOlij commented 6 years ago

UVs and seams work fine now, last thing to do is normals :)

BastiaanOlij commented 6 years ago

OK I have normals and tangents working though tangents seem inverted somehow (or maybe they are wrong on the source object). I think it's time to merge this