 Silverbow and space rain.. |
Posted - 4/15/2007 9:59:46 AM | Minas Tirith v12 release
I'm working on the release for Minas Tirith v12 ( a side project using the I-Novae engine ), so it's consuming a bit of time. I have upgraded ODE (the physics engine) from version 0.6 to 0.8, but for some reason I get strange slowdowns when some box bodies are not well placed. I must also investigate some strange crashes in ODE ( some bodies get a NaN - Not-a-number - in their positions or velocities ). It will likely keep me busy the whole next week.. and maybe more, so expect slower updates.
Silverbow
ResourceCollector has finished to model the Silverbow ( with a full set of modules, wings and fins ); while Juan has finished ( minus minute details ) to texture it. The result is looking very good IMO, especially with the latest ASEToBin shaders.

Distortion effects
I always wanted to experiment a pure graphical effect: distortion effects. A distortion effect basically renders the scene into a texture ( the "scene buffer" ), renders some distortion effects/geometry into another texture ( the "distortion button" ), and applies a shader to displace per-pixel the scene buffer by the distortion buffer.
I plan to use and abuse of this effect everywhere possible. Not exhaustively:
- heat wave effect ( on desert planets )
- heat behind thrusters ( for non-realistic settings )
- heat around suns ( for non-realistic settings )
- rain effect ( see next chapter )
- heat effect around ship ( heating due to entering an atmosphere at high speeds )
- shield effect around ship
- some weapons effects ( lasers/beams ? )
- explosion effects
- etc..
In practise, it's been extremely easy to implement in the engine, thanks to the render pipeline system. It took maybe an hour to add it.
Rain effect
Space rain ! Nah, kidding. I implemented a rain ( or more exactly, droplet ) effect in ASEToBin, and as you know, ASEToBin cannot render planets, so..
The rain effect is an application of that distortion effect I talked above. It works in camera space, by rendering tens to hundreds of droplets in a "droplet buffer". This droplet buffer is then used as the basis for the distortion ( / refraction ), and also for the lighting ( specular effect in the droplets ).
Technically, it works like this: I have a droplet buffer, initially filled with the color (128, 128, 255). This droplet buffer contains normals. I also generate droplets ( each with a position and a velocity ), updated in the CPU. Droplets merge together and grow in size when they hit each other; their velocity is also updated with some noise values each frame, to make them move more naturaly. Each frame, all the droplets are rendered into the droplet buffer with a "droplet normal map". The droplet normal map is generated from a simple gradiant bump effect and converted to a normal map:

The trick to the effect is to not clear the color buffer between each frame, and to render each droplet with alpha blending.
To simulate the "evaporation", the whole buffer is alpha-blended by a small percentage with the default color (128, 128, 255) every frame.
The result is a bit similar to ATI's Toyshop demo, but is a lot more simple to code and has a very light CPU impact.
Here's the content of the droplet buffer after a while:

On the Silverbow, here's a typical result after all the effects are applied:

The rain effect is much nicer in motion, so I created a video:
Silverbow and rain (Divx5, 23.2 MB)
| |
|
| S | M | T | W | T | F | S | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | | | | | |
OPTIONS
Track this Journal
ARCHIVES
October, 2009
August, 2009
July, 2009
May, 2009
April, 2009
March, 2009
February, 2009
January, 2009
November, 2008
October, 2008
July, 2008
June, 2008
May, 2008
April, 2008
March, 2008
January, 2008
December, 2007
November, 2007
October, 2007
September, 2007
August, 2007
July, 2007
June, 2007
May, 2007
April, 2007
March, 2007
February, 2007
January, 2007
December, 2006
November, 2006
October, 2006
September, 2006
August, 2006
July, 2006
June, 2006
May, 2006
April, 2006
March, 2006
February, 2006
January, 2006
December, 2005
November, 2005
October, 2005
September, 2005
August, 2005
July, 2005
June, 2005
May, 2005
April, 2005
March, 2005
February, 2005
January, 2005
December, 2004
October, 2004
September, 2004
August, 2004
|