Skip to main content

Per-vertex graphics mode VS Per-pixel.

Going back and making some tweaks to the lighting set up I found I can get a similar result from the classic graphics mode as I can from the more modern style.

Per vertex lighting.
Can you tell the two modes apart? I can, there is definitely a better quality to the per-pixel lighting, nicer shading, better shading of unlit portions of models, better handling of normals etc... but not enough of an improvement to justify the switch maybe.

Per pixel lighting.
Per pixel lighting does have some other benefits, such as better materials handling (I can dynamically mix two texture on a single object using a mask) which can give a much better appearance to tilesets. It can also do dynamic shadows, reflective surfaces, normal maps and a whole raft of other stuff. But... I don't intend to use any of those features right now. The game is supposed to run on low end computers, I've chosen to use very low detailed art assets to help with that. Putting a normal map on a very low poly character just doesn't work. Things like reflective surfaces look great up close, but are pretty much unnoticeable at the scale of view I'm using.

So what else could per pixel lighting offer?

Per-pixel lighting.
Well for one thing per pixel lighting handles color much better. Colored lights look much more natural.

It also allows for lights to be positioned much nearer to the characters and cast light as if they are really holding a torch, instead of as if god were shining a torch down from above.

Per vertex lighting.
There's also the fact that per-vertex lighting has been discontinued in the newest version of Blender. It's no longer an option if I choose to use the most modern  features of the engine.

As I already said these features already include threaded animations (to increase speed) and in future could include other things which might be useful. What do you think? Would it be better to use per-pixel lighting knowing that it limits my audience, or keep using per vertex lighting and miss out on more modern improvements to the game engine?

Comments

  1. pixel all the way :)
    But... I think you might be missing a trick or two here.
    You say you have 8 lights. ok
    lets use the second image as it has tiles on the floor. so we can also talk in terms of tiles :)
    light 1 will be you character light - put this slightly above your main character. it light up 6 tiles, so a 6 tile area around your character will be lit, there will be fall off so lets give that another 3 tiles
    if the light is dimming refuse the light power until just the 3 tiles are lit. moving between them give a flickering look.
    Everything else is black

    now, you have 7 lights left - work in rooms. a room is the large area the character is in - or a corridor. so give is a fill light (2), this is just a lower level light but one that is more powerful? you might need 3 light here (2,3,4)
    which leaves 4 lights to play with - use these as bright lights that affect small areas with different colours as well.

    You'll need to write a light handler though

    ReplyDelete
    Replies
    1. Thanks for reading. I'm leaning more and more towards the pixel based lighting, in part because it gives much nicer results at low light levels, but also because I'm really liking the improvements to speed caused by threaded animations.

      I actually already have a light handler, I didn't explain it very well though.

      I have one light parented to the camera pointing towards the focus of the camera's view, this is low intensity and serves to provide a little light when no character is holding a torch.

      I also have 6 dynamic lights which can be warped to the same position as any light emitting objects in the scene. First I create a list of all active light sources in the game scene and then sort them in order of distance from the camera. Then I place one of my 6 lights to represent that light source. If there should be more that 6 light sources on screen at the same time, they will be ignored (but the visible area will already be really bright so you wouldn't notice). If there are less than 6 light sources then the remaining lights are set to 0.0 energy and are left out of lighting calculations.

      When placing a light I can set it's energy, and fade distance, as well as color. Each light source (a static lamp or a character holding a light emitting object has data about its energy, distance and color, so it's possible to control the lighting in the scene quite subtly without using more than 7 lights. I can also animate the lights so they flicker or pulse.
      The one remaining light I'm keeping back for now, but may be used for environmental effects such as upward cast light from lava or glowing slime in concert with controlling the main scene light.

      Delete

Post a Comment

Popular posts from this blog

Vinland 1936

What have I been up to this month?

Well you can see it in a couple of development blog videos, here, here and here.

Vinland 1936 is a game I've been working on (on and off) for about 3 years. It is somewhat based on the old Nirval interactive game, Blitzkrieg;





I hope you've played it since it is one of the best games ever!!! (IMHO)
Blitzkrieg was a real time tactics game. You didn't build a base, or spawn units. It wasn't about rushing the enemy. You got a small number of troops and vehicles that could be replenished or repaired if you had access to a supply base and the right supply trucks, but couldn't be replaced if lost. Once your vehicles were destroyed and your infantry killed you were finished. You couldn't just churn out some more from your factory and have another go at rushing the enemy guns. This made you invest a lot in each of your units. They really mattered.

It was also procedurally generated. Each mission (except for the historical missions) was…

Telling a story; Creating a Compelling Narrative.

Telling a story; Creating a Compelling Narrative. In this blog I will talk about my own recent brush with story telling and go on to talk about how tools from creative wring can help you to better author the narrative in your games, whether they have a traditional linear narrative or a procedurally generated interactive narrative.

Narrative and structure in traditional fiction  last week I started writing a story set in the world I'm developing for my game Vinland: 1936.

I hope the story will help me to flesh out my game world and develop my own expanded universe which will be a good place to set my games in the future.

After about a week of work, on and off I've progressed the story to outline stage. For each character thread I have half a dozen chapters which plot a course through the events of the story. Each thread is told from the perspective of a different character.


Actually I started writing as soon as I had my outline, but I've since gone back and deleted what …

Back to Vinland.

I'm going back to my real time tactics project, Vinland 1936.
While working on the other project I overcame the problems which were stopping me from saving/loading the game and also cleaned up the base code a lot.

After a few weeks I'm getting near the the state I was in before.


Infantry are back to their previous state, and vehicles are running OK.
This time I'm going to push ahead with mocking up the combat system though before I work any more on the vehicle builder or graphical aspects of the game.