September 30 – October 2 2012

I figured out the rivers.   Realistic rivers are VERY CPU heavy.  I think I spent 16 hours trying to tweak it.  Until some genius with a lot of time on her/his/its hands figures something better out, I’m dropping reflections out.  Here are the basics:

  • Create a flat surface model.  Say, 2 triangles combined to make a square.  Put it on the ground or where you want your river.  We now have a surface.
  • Create a bunch of normal textures that are slightly different for the surface to use.
  • Create a refraction on that surface to move the pixels around and make it look pretty (some minor CPU power no big deal).
  • Create a completely flipped over version of the computational reality that is being rendered each time the screen refreshes, make it transparent, and place it on the river exactly so that it looks like a reflection as you move around the water with an inverse plane associated with it.
  • Now make two or more of these and watch your frame rate drop significantly and your laptop become very hot.
  • Oh, and your entire river has to be completely flat and even for this to work.

I hate to say it, but I may have to ixnay out part of my “vision” scene.  Or not, because I can make that scene small and independent to be unloaded as soon as its purpose is made.  In any case, reflective water has no place in terrain landscapes for this project.  Same with trees with branches that realistically flow with the wind.  However, it would have a place in small and tightly controlled environments.

I did manage to make a good looking river that I’m happy with.  I learned how to get a list of every object in the Sunburn scene and put them into my own array to play around with as I like.  For instance, I’m going to use this method to split meshes out of the models, remove them, and resubmit them with different attributes.  Why make the whole tree a collision object when the trunk will do.  I want particle effects to swirl around the wrists of the hand, etc.  I also created several components to allow me to attach objects together and do funky cool things with them. I plan on creating components that automatically turn an object into something cool when they are applied to it.

All-in-all, it was one of those long learning sessions where not much was actually done.  Next up:  Getting back to my grid terrain idea.
After that:  Fun with trees and bushes
After that:  Populating the terrain with some grass (mix of models and billboarded meshes)

If you are a Sunburn coder and want to know how to grab all of the objects in the scene let me know and I’ll reply with sample code.

Final Water Style

This is my final water style.  I will change the transparency and color based on the lighting and such but this is the gist.  I’m going to cover up some of the flaws with bridges and such.  I really don’t want to have to mess with the terrain to fix them.

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

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