Hey guys, I was working on implementing a procedural planet following a tutorial on yt. I’m having problem figuring out how to remove some of the artifacts seen. Notice the blurred artifacts near mountains. It becomes very prominent as you zoom in to the mesh.
Code wise, there is a lot of fluff in the shared link, but mesh is generated by TerrainFace class. I’m first calculating
positions, using that to create VertexData and apply it to the mesh. I was wondering if I’m doing something wrong there. You can enable the wireframe from the UI on right top as well if that helps anything.
You can add increase resolution (vertices) from the UI as well. Increasing the resolution helps a bit, but not a lot.
Thanks for taking out your time, really appreciate it.
Live codesandbox link - quizzical-gould-g5cuq - CodeSandbox
Hey debbugging inside your code is almost impossible ;(
But if I understand correctly you are doing the vertex manipulation by yourself right? So if you want the forum to help you improve your algorithm I would recommend doing a simpler repro in the playground
Hi, thanks for taking your time. I should have separated the fluff earlier only, my bad. Have created another codesanbox link (hardcore-worker-465pn - CodeSandbox). I’m parsing the positions and indices data from a string that I imported using the logic in the fluffy code. The positions and indices are used to construct the mesh. If you zoom in on the mesh, you will see the artifact. It seems a little blurry and the wireframe/edges grids are also visible.
I’m guessing there might not be much that could be done here as it ultimately depends on the lighting/shading logic beneath.
Yes, except if the computation of the normals is wrong, I don’t see how to improve it except by increasing the resolution or modifying the lighting conditions.
Note it is easier for the community, when possible, to provide a repro in the Playground because there are some handy tools that can be used easily (like the inspector):
Using the inspector, we can see that the normals seem ok.
Cool, thanks for the reply. Would take care in future to share it in bjs playground, viewing the normal makes a lot of sense. Thanks a lot.