More outdoor lighting, and starting the game

Right now I’m at a point where I can see art becoming a more important thing to consider. I might resort to making some of my own models, and get re-acquainted with modeling tools. I used to work with Maya at school but now it has to be Blender or nothing.

But there are a few tweaks I did with the directional lighting- in particular, the way the ambient term gets added now contributes to the shadow more directly instead adding it in the final step where the base textures are blended with the lighting render target. This while I can still manage to stay a bit shy of the instruction limit of the very heavy directional light shader (oh boy, will this be fun trying to squeeze this in a single pass shader in forward rendering). Just as notable, I managed to push back the far bounds of the shadow cascade blends, which means you get crisp shadows at a longer viewing distance! Here is how it looks after a few blending tweaks.

screen24-1

The plant models you see here are provided by BKcore. He does some pretty awesome work of his own so I suggest giving his site a look (It almost makes me want to try 3D in web browsers). These in particular are very good in pushing what the shadow renderer can do. And if you’re not a fan of crisp shadows, you can increase the kernel size to spread the samples more.

Guess it’s also time for a new video so here it is. The latest build of the engine in progress. Activate your HD buttons for an optimal experience.

Oh yeah, there’s a game….

I’ve also officially begun work on the game, by which I mean I created a new project and called it “OffroadRacing”. Right now it is nothing more than some of the assets copied over and getting some cameras and physics set up. The physics aren’t working with the rendering yet- I can make entity bodies and update them, but they’re not bound to the models. It’s proving to be more tricky than I thought, because of how instancing is set up in my engine and I probably want to make it possible for each instance to have its own rigid body.

The world scene hierarchy is as follows: Scene -> Model -> Mesh -> Instance. A scene has all unique models, with unique names, models have multiple meshes that have their own world matrix (for independent movement) and each mesh can have multiple instances of it. The reason I instance by mesh and not by model is because that’s where each separate vertex buffer is stored, and also because larger models with many meshes can be culled more finely.

However, for a program outside of the engine scope, accessing a specific instance of a mesh is still cumbersome to do. The instances aren’t treated as particles, so I still want a good degree of control for moving and modifying them. They are only treated as batches for rendering. I am considering making MeshInstance a more high-level class, something where you can hold a reference to the more important objects and use a string to name them. Maybe the player wouldn’t care whether his vehicle is kicking up “Rock_523” or mowing down “Grass_118” but for level creation it will work in a pinch for setting up physics to various objects.

Once I can get some cubes to rain down on the ground, I will get into testing out static bodies and then perhaps finally some kinematic action going down. From there I will shift to making more personalized levels to travel through. Add some triangle picking for placing objects as a start.

Here’s my list of the more important things to work on:

Racing game

  • EVERYTHING!!! (but especially starting on the physics)
  • A rudimentary level editor, will not have a very visual interface at first
  • Navigable physical body, just to move the camera for now

Engine

  • Easier manipulation of mesh instances
  • Object picking
  • Forward rendering
  • Impostor/billboard drawing
  • Easier-to-configure shaders

By the way I need to reorganize the categories of my posts. Basically everything here is related to XNA in some way. But I don’t have too many categories to start with so I don’t really need sub-categories that don’t make sense. Anyways, that’s all for now.

Advertisements

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s