I made a go at writing a script to subdivide an arbitrary landscape mesh into a grid in the playground below. Some problems I encountered:
- stitching artifacts that show the borders of each grid piece
- malformed geometry [Update: fixed]
Please note that the original model uses a normal map file that’s 300+ MB; it will take a few minutes to load.
1st attempt: https://playground.babylonjs.com/#HQBU7K#164
2nd (fixed geometry): https://playground.babylonjs.com/#HQBU7K#168
3rd better UV mapping: https://playground.babylonjs.com/#HQBU7K#172
(also less visible seams)
I was wondering if this has already been solved by one or some combination of the methods babylon js already provides. If not, any tips?
Update/Conclusion:
I think most people will be able to directly make use of this script -
https://playground.babylonjs.com/#HQBU7K#172