Fractured State is an urban combat real time strategy game that takes place in the pseudo diesel/steam punk decay of the nation of Laperia. It features simultaneous interior and exterior combat to power building-to-building fights, cover and flanking, and weapon accuracy modelling and reloading.

Post news Report RSS Nothing to see here - everything's Normal

Making our terrains nice and smooth and....normal.

Posted by on

Now that painting and deformation are working well I decided to play around with some aesthetic stuff. I put some actual texture sheets together so the terrain looks like a terrain and not just a huge grid of numbered squares. I also set up some lighting. Ultimately – I’d like for the light settings to be user controlled and on a per map basis but this is ok for right now.

More mesh deformation

Well – that certainly doesn’t look very convincing. This is because Unity makes some assumptions about how your mesh should be lit and sets up the normals in such a manner that it creates hard edges. Terrains in Fractured State store their data in mesh chunks (as described in previous, wonderfully written blog entries). Those chunks store vertex data per face. This means that while the terrain appears seamless there are actually up to 4 vertices with identical positions overlapping each other. The out-of-the-box normals calculation is based, roughly, on the direction the triangle is facing. You can see the side effect more clearly in this shot. The faces to the left are oriented more towards the sun light and are creating a hard edge despite the fact that they visually share points with faces on the right side of the hill.

More mesh deformation

What I did to resolve this was write my own algorithm for calculating normals. Basically it takes the average of the existing normal data for all vertices with shared positions and assigns the result back to those vertices. Here’s the resulting smoothed mesh.

More mesh deformation

I think I’m going to take a break from doing the terrain stuff for a bit and work on a cleaner implementation for switching between mods and loading mods in addition to the base Fractured State code.

Don't forget you can read my blog at FracturedState.net and if you're feeling particularly saucy you can follow me on Twitter @ThisIsKelso.

Have any feedback on the terrain features thus far? Have an idea or something you're dying to see included in an RTS map editor? Leave a comment!

Comments
ExoticTofu
ExoticTofu

This needs more publicity. Tracking.

Reply Good karma Bad karma+1 vote
willyTHERAVEGER
willyTHERAVEGER

im already tracking and have been since the first screenshot :3

Reply Good karma Bad karma+1 vote
Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.

Follow Report Profile
Icon
Fractured State
Platforms
Windows, Mac, Linux
Developer & Publisher
Mechanical Monocle
Engine
Unity
Contact
Send Message
Release date
Game watch
Follow
News
Browse
News
New
Post news
Report
Report
Share
Related Games
Fractured State
Fractured State Real Time Strategy
Related Engines
Unity
Unity Commercial
Related Groups
Mechanical Monocle
Mechanical Monocle Developer & Publisher