Jump to content
Sign in to follow this  

[Invisionize.eu] Leadwerks' Blog - Roads WIP

Recommended Posts

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

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...

Important Information

W celu świadczenie usług przez nasz Serwis na najwyższym poziomie, w ramach Serwisu wykorzystujemy pliki Cookies (tzw. ciasteczka). Korzystając ze stron Serwisu IPSBEYOND.PL bez zmiany ustawień przeglądarki będą one zapisane w pamięci urządzenia. Jeżeli nie dokonacie Państwo zmiany ustawień przeglądarki internetowej to wyrażacie zgodę na zapisywanie plików Cookies.