Sky blend effect

A place to show off your latest screenshots and for people to comment on them. Only start a new thread here if you have some nice images to show off!
Post Reply
User avatar
Nir Hasson
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 363
Joined: Wed Nov 05, 2008 4:40 pm
Location: TLV - Israel
x 2
Contact:

Sky blend effect

Post by Nir Hasson »

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 :cry:
Image
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 :D
Image
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.
User avatar
Kencho
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 4011
Joined: Fri Sep 19, 2003 6:28 pm
Location: Burgos, Spain
x 2
Contact:

Post by Kencho »

Looking good and useful :)
Image
bharling
Gremlin
Posts: 166
Joined: Fri Jun 30, 2006 1:04 pm

Post by bharling »

Kencho, I cant see the images at all here now! :cry:
Was here
User avatar
xavier
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 9481
Joined: Fri Feb 18, 2005 2:03 am
Location: Dublin, CA, US
x 22

Post by xavier »

Ditto, and the links invite me to log in to FlickCabin...
Do you need help? What have you tried?

Image

Angels can fly because they take themselves lightly.
User avatar
Kencho
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 4011
Joined: Fri Sep 19, 2003 6:28 pm
Location: Burgos, Spain
x 2
Contact:

Post by Kencho »

Restored the links as they were in the original post. There shouldn't be any problem now. It's quite odd though :?
Image
User avatar
Nir Hasson
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 363
Joined: Wed Nov 05, 2008 4:40 pm
Location: TLV - Israel
x 2
Contact:

Post by Nir Hasson »

Thanks Kencho -

It is strange - but it works now :D
tourist
Gnoblar
Posts: 9
Joined: Wed Jun 11, 2008 7:52 pm

Post by tourist »

wow!
thanks a lot!
Great work!
User avatar
Kencho
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 4011
Joined: Fri Sep 19, 2003 6:28 pm
Location: Burgos, Spain
x 2
Contact:

Post by Kencho »

Nir Hasson wrote:Thanks Kencho -

It is strange - but it works now :D
LOL now it isn't working for me. Seems flickcabin has a really odd image hotlinking policy. Consider using imageshack or photobucket in the future ;)
Image
User avatar
Ruud v A
Gremlin
Posts: 150
Joined: Mon Jan 28, 2008 6:44 pm
Location: The Netherlands
x 5
Contact:

Post by Ruud v A »

Wouldn't it be better to use blooming? This way things can get transparent and I don't think that's what you want.
User avatar
Nir Hasson
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 363
Joined: Wed Nov 05, 2008 4:40 pm
Location: TLV - Israel
x 2
Contact:

Post by Nir Hasson »

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 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.
Thanks for the suggestion I'm sure I'll use the compositor system of Ogre in my next steps.
User avatar
Kencho
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 4011
Joined: Fri Sep 19, 2003 6:28 pm
Location: Burgos, Spain
x 2
Contact:

Post by Kencho »

Blooming? That's a totally different thing. A bloom effect produces a kind of "misted up glass" visualization. This technique deals with removing the far Z clipping issues by gradually blending the far objects with the actual sky/background image.
Image
User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19269
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 66
Contact:

Post by sinbad »

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.
User avatar
Nir Hasson
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 363
Joined: Wed Nov 05, 2008 4:40 pm
Location: TLV - Israel
x 2
Contact:

Post by Nir Hasson »

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 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.
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 :D
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.
User avatar
oddrose
Orc
Posts: 470
Joined: Thu Feb 15, 2007 2:08 pm
Location: Gothenburg, Sweden
Contact:

Post by oddrose »

looks great! I am a bit curious of how it acts in a more complex scene.:)
newbguy
Gnoblar
Posts: 21
Joined: Wed Apr 30, 2008 11:17 am

Post by newbguy »

oddrose wrote:looks great! I am a bit curious of how it acts in a more complex scene.:)
+1
Dastgir
Gnoblar
Posts: 2
Joined: Sun Nov 23, 2008 2:33 pm

Post by Dastgir »

seam nice effect . Hope yyou make an integration with Caelum
Post Reply