Delgine 3D Tools & Content DeleD Community Edition
Forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Ambient Occlusion

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    DeleD Community Edition Forum Index -> DeleD Feature Requests
View previous topic :: View next topic  
Author Message
Sweenie
DeleD PRO user


Joined: 05 May 2006
Posts: 14

PostPosted: Fri May 05, 2006 2:08 pm    Post subject: Ambient Occlusion Reply with quote

Do you have any plans on adding Ambient Occlusion to the lightmapper?
It's a great way to give the scene/level a more "realistic" look.
Quiet easy to implement aswell, alot easier than radiosity anyway. Wink

Combined with a directional light you can get awesome looking outdoor scenery(it looks great for indoors as well).

I'm sure you know all about it but I'll provide some links anyway. Smile

And by the way, great product you have here.
It's the best tool I bought for a long time.

http://www-viz.tamu.edu/students/bmoyer/617/ambocc/
http://en.wikipedia.org/wiki/Ambient_occlusion
http://www.cs.unc.edu/~coombe/research/ao/
Back to top
View user's profile Send private message Visit poster's website
Paul-Jan
Site Admin


Joined: 08 Aug 2004
Posts: 3066
Location: Lage Zwaluwe

PostPosted: Sat May 06, 2006 9:37 am    Post subject: Reply with quote

Hi Sweenie,

Welcome to these forums, and thanks a lot for that very informative post.

The plans are to implement at least some form of (semi-)global illumination into the lightmapper in the future, and ambient occlusion is a good candidate indeed, because it is relatively simple to implement and offers good quality lighting (even though it isn't truely global). Performance is probably not too good, but as the lightmap is relatively low-resolution (compared to raytracing every pixel of an image), that might not be much of an issue.

Ideas like this one are more than welcome, please keep 'm coming Very Happy.
Back to top
View user's profile Send private message Visit poster's website
Sweenie
DeleD PRO user


Joined: 05 May 2006
Posts: 14

PostPosted: Tue Jun 27, 2006 12:07 pm    Post subject: Reply with quote

The last weeks I've been obsessed with ambient occlusion and gave a go at trying to make a lightmapper with ao support myself.

I'm fairly satisfied with the results so far and just wanted to show what a "Deled model" looks like with ao applied.

It produces alot of artifacts, but it's still in an early stage.

This model only has the lightmap texture applied.
It's dark because it's supposed to be a nighttime scene.

Back to top
View user's profile Send private message Visit poster's website
Jeroen
Site Admin


Joined: 07 Aug 2004
Posts: 5332
Location: The Netherlands

PostPosted: Tue Jun 27, 2006 12:38 pm    Post subject: Reply with quote

Thanks for the pic! It really shows what is possible with ambient occlusion. Great stuff! Very Happy
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Paul-Jan
Site Admin


Joined: 08 Aug 2004
Posts: 3066
Location: Lage Zwaluwe

PostPosted: Tue Jun 27, 2006 6:02 pm    Post subject: Reply with quote

Looks like an excellent job to me! Very Happy I have done some early experiments with AO myself in the past, and I must say these results of yours look amazing (I remember having a lot more visible artifacts than I can see in this picture). What are your rendering times?

Care to share your code at some point, or would you rather keep the implementation to yourself?
Back to top
View user's profile Send private message Visit poster's website
Daaark
DeleD PRO user


Joined: 01 Sep 2004
Posts: 2696
Location: Ottawa, Canada

PostPosted: Tue Jun 27, 2006 8:47 pm    Post subject: Reply with quote

That looks awesome.

I don't see any artifacts? Only small things where they are expected because the author of that map didn't delete the hidden surfaces. You make that house look very soft, even though it's hard and all 90 degree edges almost. I would like to see this thing with rounded objects.

1 more time, that looks awesome.
_________________
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Mr.Fletcher
DeleD PRO user


Joined: 07 Aug 2004
Posts: 1772
Location: Germany

PostPosted: Tue Jun 27, 2006 9:31 pm    Post subject: Reply with quote

Very nice Smile
I would like to see that blended together with textures!
_________________
Behold! The DeleD Wiki! Please help us expanding it Smile
DeleD on IRC
Back to top
View user's profile Send private message
Sweenie
DeleD PRO user


Joined: 05 May 2006
Posts: 14

PostPosted: Wed Jun 28, 2006 7:14 am    Post subject: Reply with quote

Thanks for you comments Very Happy

Regarding rendertimes...
I never timed the rendering of the cottage but I did some new renders instead...

1 directional light and AO with 32 samples, took 41 seconds

---> lightmap

1 directional light and AO with 32 samples, took 113 seconds

---> lightmap

Rendered using a p4 3.2Ghz with 1gb ram.

The AO code is very unoptimized though so I expect greater performance after some optimizations. Currently I'm doing a couple of Crossproducts, several calls to sinf and cosf and two squareroots(ouch!)...

Regarding sourcecode...
I will gladly share all of my sourcecode, just need to clean it up a bit first...
I'm a messy housekeeper... Wink

Regarding textured model...
Until now I wasn't preserving materalinfo when importing the mesh, but I will implement that any day now...
Back to top
View user's profile Send private message Visit poster's website
Nocturn
DeleD PRO user


Joined: 08 Aug 2004
Posts: 635

PostPosted: Wed Jun 28, 2006 7:48 am    Post subject: Reply with quote

Hi there Sweenie,

These Shots really looking good. Liked always Ambient Occlusion. It gives the Levels / Models a much more Softer & Realistic Look. Thanks for sharing with us Wink ...btw i'm a messy housekeeper too (;
Back to top
View user's profile Send private message
Sweenie
DeleD PRO user


Joined: 05 May 2006
Posts: 14

PostPosted: Wed Jun 28, 2006 7:55 am    Post subject: Reply with quote

Here is one more...

the warehouse model...

Took 250 secs with AO only.
23280 vertices and 12714 triangles.
approx. 786000 pixels to render x 32 = about 25 million raycasts.
about 0.01 ms per ray.

This model should have been split into several lightmaps though...

the shots...
http://www.svenberra.net/whouse1.jpg
http://www.svenberra.net/whouse2.jpg
http://www.svenberra.net/whouse3.jpg
http://www.svenberra.net/whouse4.jpg
http://www.svenberra.net/whousemap.jpg

Sadly though, "naughty" geometry like T-junctions and overlapping faces really become quite visible.
However, when combined with a texture it becomes less visible.

Also note that the blurpass is to be updated.
Currently I'm just doing an ordinary averaging of neighbour pixels, but I think a gaussian blur(or better yet a selective gaussian blur) would make it look better.

I'm also working on a method to smudge the seams between the texturecharts...
Back to top
View user's profile Send private message Visit poster's website
Mr.Fletcher
DeleD PRO user


Joined: 07 Aug 2004
Posts: 1772
Location: Germany

PostPosted: Wed Jun 28, 2006 9:27 am    Post subject: Reply with quote

...this looks soo great Very Happy
_________________
Behold! The DeleD Wiki! Please help us expanding it Smile
DeleD on IRC
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    DeleD Community Edition Forum Index -> DeleD Feature Requests All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum