Monday 23 January 2012

Advanced Lighting

I have been thinking about ways to implement more dynamic lighting.

My previous system required each model to be rendered a second time, where only the transparent areas of the texture would be saved.  (This Render Target is then passed to the Gausian Blur shaders)  The old system also arbitrarily set a specific color, and a fixed intensity for any alpha value.  Since only lights were saved, the old system also was quite buggy if there was a light behind an object.

I am using textures where you can specify the light color, and the parts of the "light" that are brighter (Lamps in head lights, LED truck lights, etc)  Here is a test for this implementation:




 Basic implementation of Advanced Lighting

Now the model is only rendered once.  The entire scene's alpha values are saved into the main Render Target, then a new shader isolates the transparent areas, and then saturates and brightens these light sources depending on the input values.  (Brightness and Saturation should be stored in each model for individual light animations and effects... this may be tricky to implement)  I have made a few different sample lights simply by increasing the opacity in certain areas.

When the initial scene is blended with the blurred light map, the transparent light sources are desaturated and become completely opaque.  This gives a good effect that the lights are "off" when the light intensity is set to 0.  
Further work is still needed for this system. 

Saturday 21 January 2012

Initial Steam and Land Alteration

I have worked further on the smoke (Exhaust) particle system. Implemented durational size and alpha change, all particles are initialized with random velocity and initial size.

 Train Test, better exhaust smoke.


I have started the implementation for a basic steam system.  Similar to the smoke exhaust, but I would like it to be more constant and voluminous.  I still have a lot to work on with this system, but this is a decent start.

In this video I am also using a basic land alteration technique, simple desaturating the land underneath the smoke over time to simulate the effect of pollutants such as fly ash and soot.

Video captured with hyper cam, fraps not working.
Untextured Model rendered with basic XNA model drawing.

Sunday 15 January 2012

Initial Light Bloom and Smoke

 
Video from project test


Light Bloom
By adapting and simplifying the code of the Bloom Sample from Microsoft XNA resources,
http://create.msdn.com/en-US/education/catalog/sample/bloom

I have been able to achieve a desired Light Bloom Effect.  I am using a small, 3 pixel kernel size to preserve the light effect, from farther distances.  This still produces an adequate result and will save time versus using the original 15 kernel size.  The filtering process uses seperable Gausian filtering via GPU.  The result is combined with the original scene.

As of now light emitters are defined by transparency in the texture.  Models are rendered first normally, then a second pass renders only the light spots, which is then passed through the filtering process.



Smoke
Using the point sprite system in Riemer's XNA tutorial,
http://www.riemers.net/eng/Tutorials/XNA/Csharp/Series2/Point_sprites.php
I have been able to implement a simple exhaust system.  I will be adapting his code to suit my needs, and use a custom vertex system that will allow the smoke particles to increase in size, and to become more transparent.

Saturday 7 January 2012

Project Plan

Objective:
I plan to create and implement simple real time graphics systems for artistic visualizations of industrial aesthetics. This engine will be used to push forward Computer Graphics further into the realms of Environmentalism and Visual Art.

Butte, Montana: source of inspiration.


Purpose:
The main purpose of this project is to produce an efficient and dynamic Graphics Engine that can be used to for video games, simulations, or educational programs to raise awareness about the impacts large scale industry has on the environment.  Compiling various systems into a collaborative whole will also give me essential experience for serious projects, and will help me develop a unique and artistic style with Computer Graphics.

 
Goals:
With this project I plan to study and create my own graphics systems for various effects of industrial operations.  These mainly deal with methods of pollution, but also imply the implementation of unified general aesthetics.  All these systems should be as simple as possible and very efficient, this will free up processing time for the rest of the program. 

I have compiled a video that shows examples of the following systems:

 Video footage mine own, except from Youtube sources:
http://www.youtube.com/watch?v=HkrH-KYJ-Q4
http://www.youtube.com/watch?v=ba7ZBplVcys
http://www.youtube.com/watch?v=0SCVD44ybTo


(In order of approximated complexity)
Light Bloom- Strong and piercing light sources on machines
            -Define Light Emitters, use separable bloom filters

Smoke-  Combustion Exhaust from machines and factories dissipating into the atmosphere
            -Particle System, emitters/point sprites

Steam- Thicker and longer lasting exhaust from factory smoke stacks
            -Particle System, emitters/point sprites

Land Alteration- Interactive land map that is physically modified when affected by machines or by exhaust
            -Land Grid, height modifications, hue/saturation transformations

Dirt Movement- Falling dirt from machines to the ground
            -Independent objects with semi transparent animated textures

Water Pollution- Dirt and pollutants mixing with clean water
            -Interactive water grid, simple fluid motion texture blending


Implementation:
All these systems will be present in a functional 3D environment that the user can move a camera through to explore an industrial wasteland.  This project will be coded in C# using XNA.  I will be using mostly custom HLSL shaders for my effects.


In this map there are 3 main components which implement the project's graphic systems.

Factory - Produces smoke and steam, and is dumping waste into the river
Coal Train - Runs across the map pumping exhaust into the air, leaving a trail waste behind it
Excavators - Continuously dig away at the hill side and dump the dirt onto the ground.


This project is to be completed by the end of the 2012 Spring Semester 


Starting Point:
I have already made a 3D map editor, I will adapt this system to accommodate this projects needs, I will also add some new features.
 
 
I also have some raw models to work with... I will also be finalizing these, and developing systems for movement and animation.