September 26 – 29 – 2012

After an honest week of focusing on my day job, I was ready to get back to work on my project.

I wish I could have worked on this during the week, but I did get the chance to think about how I wanted to go forward.  One decision I made was to switch everything from forward rendering to deferred.  Sunburn lets you do this rather easily and I’ll put out the easiest way for those technical folks in case someone is wondering how to do it.

First, I changed the content processor for all of my 3D models, content.repo ,and terrains to the deferred version.  For instance, "Model - Sunburn Lighting System" was changed to "Model - Sunburn Deferred Lighting System".  Next, I modified my sceneInterface.CreateDefaultManagers(...) code and changed RenderingSystemType.Forward to .Deferred.  Next I did a mass project find/replace on every USE statement that ended in .Forward to .Deferred.  Finally, I edited my Content.repo file and did a mass find/replace from "LightingSystemModelProcessor" to "DeferredLightingSystemModelProcessor".  After that everything came up.

Done!  If you do a search on deferred rendering, you find that it is one of many new rendering processes.  It lets you put a lot of dynamic lights in your scene.  I also wanted to use it to render water and render textures dynamically with it later on.  From what I’ve read, deferred rendering doesn’t work too well with anti-aliasing, but hopefully Sunburn adopts other methods like FXAA which does.  Or maybe one day I can modify it myself.

Another decision I made was to create a river in my terrain and to see if I can split my terrain up.  I’m pretty sure this is possible because I can create an array of terrains and coordinate them on an x/y system.  In any case, I did some major tweaking of my terrain and created a river base like so.

River with no water

The original terrain looked great, but I couldn’t put more than four textures into one terrain at a time and I wanted a riverbed mapping.  So I simplified it a little bit but I think I kept the overall look.  This will probably be a non-issue when I separate the terrains. That hill needs more hilly textures.

I spent the rest of Saturday researching how to create a river.  Once I get it fully figured out I’ll post a separate blog.  For now, here’s my river.  I’ve been switching back and forth from deferred to forward rendering but I’m still having some trouble getting it to properly reflect and look watery.  Still not too shabby.

Terrain with river take one (or 10 actually)


If anyone comes across this blog and has questions on how I did something feel free to comment and we can start a discussion.

This entry was posted in Game Development. Bookmark the permalink.

2 Responses to September 26 – 29 – 2012

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s