Eldemarkki / Marching-Cubes-Terrain

Marching Cubes terrain implementation in Unity using the Job System and the Burst compiler
MIT License
562 stars 80 forks source link

Project Structure #29

Closed HellGate94 closed 4 years ago

HellGate94 commented 4 years ago

with your latest commit of async chunks you also changed some things to be generic and imo its not a good change. in fact the whole thing is in a need of a whole new structure that also allows for better control and faster feature integration such as smooth mesh normals.

a lot of the things should be moved from "Example" into the main engine and settings. also separating some components into replaceable monobehaviours instead of generics should be better.

i sent you a privete message on reddit about discussing it if you are interested

Eldemarkki commented 4 years ago

True, very true. The "Examples" folder has kind of just become a dump for everything, because back when this project was started, it wasn't even supposed to be a voxel terrain engine. I haven't gotten around to changing it, but now that you brought it up I will do it soon when I have the time.

Could you elaborate more about why the async changes are bad (and specifically what is), and I'll see what I can do about it?

HellGate94 commented 4 years ago

main thing is to have a common entry point such as VoxelWorld for pretty much all interactions such as editing, getting data, etc. it will redirect the calls to its sub components.

also having a VoxelDataStore that handels all the data things that the VoxelWorld redirects to it. including a function to get all the data in a box. this will be used by the MarchingCubesMesher (or maybe even other meshers) to get the data insted of accessing the chunk array itself. this allows for smooth normals by simply increasing the query box by 1 voxel to have the data it needs.

Eldemarkki commented 4 years ago

Merged