Skocz do zawartości
Zaloguj się, aby obserwować

[] Leadwerks' Blog - Roads WIP

Polecane posty

This is what I was talking about. I just got the texture mapping working. (That was hard!)

Here you can see the road is split along the terrain edges, and aligns PERFECTLY to the terrain, as if it was cut right out of the terrain. There is no need to have a slightly raised surface, and there is never any z-fighting.


This was written entirely in Lua (except for the surface slice routine)! The script updates one segment at a time each loop, so you can edit without waiting for the road to build. It's pretty fast, but a little too slow to update completely every time you move a road. With the staggered updating, it takes 1-2 seconds to build roads. They took this same approach in Crysis Sandbox.

Here you can see the texture mapping. The UV mapping has to be performed after the mesh is constructed. The mesh in the shot above originally had no UV coordinates, and I had to figure out how to map them! I had a few failed attempts, but finally figured out how. There's no alpha blending on the edges at the moment, but I assure you the road here is completely flush with the terrain.


You can read about one of the problems I ran into and solved here.

Zobacz Artykuł w pełnej wersji

Udostępnij ten post

Link to postu
Udostępnij na innych stronach

Bądź aktywny! Zaloguj się lub utwórz konto

Tylko zarejestrowani użytkownicy mogą komentować zawartość tej strony

Zaloguj się, aby obserwować  

  • Kto przegląda   0 użytkowników

    Brak zalogowanych użytkowników przeglądających tę stronę.


Ważne informacje

Kontynuując przeglądanie strony, wyrażasz zgodę na używanie przez nas plików cookies.