I started adding solid terrain and so I wanted lighting. Used SimFX sky and atmospherics but for some reason it thinks everything is hazy. Still have to sort that out.
…but it looks cool anyway. Note: I’ve exaggerated the terrain height 10x so that the normals are easier to debug:
Pro tip! mat.setBoolean(“UseMaterialColors”, true);
The joys of coding: I got the TriangleStrip code working on the first try other than that the winding was backwards (easy fix)… but then spend way too much time tracking down a missing boolean flag. Problem was that I went straight from Unshaded to ScatteredLighting… if I’d stopped at Lighting.j3md on the way I’d have found this instantly. Instead I kept think it was planet scaling, elevation, or some other weird math problem.
Edit 2: More baby steps… got a collision shape for my terrain and loaded the car from TestFancyCar.
It’s just free-wheeling right now so it rolls around a bit on its own because of gravity.
Next is to connect up some user input and add a chase camera… but that will have to be later as I need to do ‘real life’ stuff now.
Note: terrain is scaled x2 height because it’s more interesting than the mostly flat low-res terrain.