Sky blend effect
- Nir Hasson
- OGRE Retired Team Member
- Posts: 363
- Joined: Wed Nov 05, 2008 4:40 pm
- Location: TLV - Israel
- x 2
- Contact:
Sky blend effect
Hi -
I'm using Ogre for almost two months, working on simple game I want to create.
The first thing I did was to create simple scene composed of plane and sky box.
Rendering this simple scene with no special effects results in sharp edges, the ground ends in well defined line and the sky begins from there - not so nice
http://flickcabin.com/public/view/12861
Then I decieded to implement sky blend effect using depth values as blend factor between the scene and the sky box.
The result is much better - to my opinion anyway
http://flickcabin.com/public/view/12860
P.S - I think Ogre is great rendering engine !
[Edit by Kencho]
Changed the links so that they're viewable here. Click on the images for hi-res versions.
I'm using Ogre for almost two months, working on simple game I want to create.
The first thing I did was to create simple scene composed of plane and sky box.
Rendering this simple scene with no special effects results in sharp edges, the ground ends in well defined line and the sky begins from there - not so nice
http://flickcabin.com/public/view/12861
Then I decieded to implement sky blend effect using depth values as blend factor between the scene and the sky box.
The result is much better - to my opinion anyway
http://flickcabin.com/public/view/12860
P.S - I think Ogre is great rendering engine !
[Edit by Kencho]
Changed the links so that they're viewable here. Click on the images for hi-res versions.
- Kencho
- OGRE Retired Moderator
- Posts: 4011
- Joined: Fri Sep 19, 2003 6:28 pm
- Location: Burgos, Spain
- x 2
- Contact:
- xavier
- OGRE Retired Moderator
- Posts: 9481
- Joined: Fri Feb 18, 2005 2:03 am
- Location: Dublin, CA, US
- x 22
- Kencho
- OGRE Retired Moderator
- Posts: 4011
- Joined: Fri Sep 19, 2003 6:28 pm
- Location: Burgos, Spain
- x 2
- Contact:
- Nir Hasson
- OGRE Retired Team Member
- Posts: 363
- Joined: Wed Nov 05, 2008 4:40 pm
- Location: TLV - Israel
- x 2
- Contact:
- Kencho
- OGRE Retired Moderator
- Posts: 4011
- Joined: Fri Sep 19, 2003 6:28 pm
- Location: Burgos, Spain
- x 2
- Contact:
- Ruud v A
- Gremlin
- Posts: 150
- Joined: Mon Jan 28, 2008 6:44 pm
- Location: The Netherlands
- x 5
- Contact:
- Nir Hasson
- OGRE Retired Team Member
- Posts: 363
- Joined: Wed Nov 05, 2008 4:40 pm
- Location: TLV - Israel
- x 2
- Contact:
Thanks for the suggestion but since blooming is post process effect and it affect the entire scene I didn'nt want to use it. I just wanted to achieve the "merge" effect of the horizon with the sky and I actually implemented it during the scene rendering stage using late sky rendering queue and one ZBuffer render target.Wouldn't it be better to use blooming? This way things can get transparent and I don't think that's what you want.
Thanks for the suggestion I'm sure I'll use the compositor system of Ogre in my next steps.
- Kencho
- OGRE Retired Moderator
- Posts: 4011
- Joined: Fri Sep 19, 2003 6:28 pm
- Location: Burgos, Spain
- x 2
- Contact:
- sinbad
- OGRE Retired Team Member
- Posts: 19269
- Joined: Sun Oct 06, 2002 11:19 pm
- Location: Guernsey, Channel Islands
- x 66
- Contact:
Yeah, this is a nice effect, although it adds an extra texture to your terrain materials to do it.
An alternative of course is to use something like Caelum, where the horizon colours are procedural and so you can match up the sky & distant terrain that way. Which one is best depends on your content pipeline.
An alternative of course is to use something like Caelum, where the horizon colours are procedural and so you can match up the sky & distant terrain that way. Which one is best depends on your content pipeline.
- Nir Hasson
- OGRE Retired Team Member
- Posts: 363
- Joined: Wed Nov 05, 2008 4:40 pm
- Location: TLV - Israel
- x 2
- Contact:
My first implementation was based on compositors thus it had the overhead of 3 RT - depth, scene, sky. It also caused me some problems with semi transparent objects.sinbad wrote:Yeah, this is a nice effect, although it adds an extra texture to your terrain materials to do it.
An alternative of course is to use something like Caelum, where the horizon colours are procedural and so you can match up the sky & distant terrain that way. Which one is best depends on your content pipeline.
My current implementation uses only one render target and dosen't invovles the compositor system at all.
It is done using the following steps.
1. Render the scene objects to a depth texture - using inheritence and the scheme really make it easy
2. Render the scene as ususal.
3. Render the sky box with ZPass always, alpha blend enabled and use the depth texture values as alpha values of the sky.
So basically execpt of the depth texture there is no other overhead.
I hope to I will find some other usefull stuff I can do with that depth texture.
- oddrose
- Orc
- Posts: 470
- Joined: Thu Feb 15, 2007 2:08 pm
- Location: Gothenburg, Sweden
- Contact: