Victor's Devblog

If you are interested to receive those weekly articles as a newsletter, poke me offline! Automated subscription is disabled because of bots...

Otherwise, Atom feed is here!

Not a lot of visually appealing progress this week.

Code Cleanup

I had almost 2000 lines of mess for extruding road profiles. Adding transition generation on top was making it worse, so I re-wrote quite a lot (with the knowledge now acquired of what could be reused or not for other types of road features). Now it's much neater with a single function to rule them all (extrudes a single road section along a path, but from a source offset to a target offset).

Road Transitions

Now it was time for road transitions. Similarly to last week, matching profile sections between source and target road profiles can be extruded normally (I smoothly transition the lateral/vertical offset so it matches source and target profiles at both ends).

For the unmatched part, the idea is to extrude only the ground (not fixtures like fences) but after creating "fake" vertices so that each ground vertex of the source profiles matches a ground vertex of the target profile. In the image below, "real" ground vertices of the road profiles are filled with colors while fake vertices have white background.

And here it is in video:

I'm not too sure yet what I will do about the hard texture transition. I don't want to blend the transition since each texture will represent a specific driving surface and I want it to be clear what the player is driving on (gameplay first), yet I may have to add sort of a decal to hide the hard transition (imagine a metal plate spanning the width of the road).

Additionally there are some bugs around surface normals that I will have to tackle. TBD.

Road Junctions

I thought I had something working but it's actually very buggy...

...which I had no time to fix it this Sunday, I was desoldering the key switches of my old broken keyboard to complete my amazing birthday present.