Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More robust normals #134

Closed
bfops opened this issue Jun 14, 2015 · 7 comments
Closed

More robust normals #134

bfops opened this issue Jun 14, 2015 · 7 comments

Comments

@bfops
Copy link
Owner

bfops commented Jun 14, 2015

Vertex normals are generated from the heightfield right now. This doesn't work for "manual" changes by the user, like voxel removal.

@bfops
Copy link
Owner Author

bfops commented Jun 14, 2015

We can keep track of the vertex normals on the fly when we generate polys, by adding the face normal to the normal at each index. There'll be artifacts at block boundaries.

@bfops
Copy link
Owner Author

bfops commented Jun 14, 2015

Fixing those artifacts could be the start of the skirt-generating code to fix mesh seams at LOD switches (#103).

@bfops
Copy link
Owner Author

bfops commented Jun 19, 2015

7f00b71 creates normals during mesh generation. It looks really terrible though. I think it's got a bug.

@bfops
Copy link
Owner Author

bfops commented Jun 19, 2015

Can debug this by rendering just the normals without lighting or color. Relates to #52.

@bfops
Copy link
Owner Author

bfops commented Jun 20, 2015

Normals shouldn't be inferred on the fly, because it takes away the ability to be specific about how they should look when creating the voxel tree (which will be important if we want to import meshes).

@bfops
Copy link
Owner Author

bfops commented Jun 21, 2015

In particular, the difference between the images below isn't algorithmic quality; it depends on preference for how sharp or rounded the terrain should look. Procworld points out in some early posts that support for both is key: we want to be able to create nice round terrain, as well as sharp features, e.g. from mesh imports, or for buildings. To do that, we need to be able to specify our normals in the voxel tree like before, instead of inferring them during polygon generation.

heightmap_normals

screenshot from 2015-06-20 18 15 42

generated_normals

@bfops
Copy link
Owner Author

bfops commented Jul 31, 2015

This is being handled specifically for specific purposes, e.g. #137

@bfops bfops closed this as completed Jul 31, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant