View previous topic :: View next topic |
Author |
Message |
Sweenie DeleD PRO user
Joined: 05 May 2006 Posts: 14
|
|
Back to top |
|
|
Paul-Jan Site Admin
Joined: 08 Aug 2004 Posts: 3066 Location: Lage Zwaluwe
|
Posted: Sat May 06, 2006 9:37 am Post subject: |
|
|
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 . |
|
Back to top |
|
|
Sweenie DeleD PRO user
Joined: 05 May 2006 Posts: 14
|
Posted: Tue Jun 27, 2006 12:07 pm Post subject: |
|
|
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 |
|
|
Jeroen Site Admin
Joined: 07 Aug 2004 Posts: 5332 Location: The Netherlands
|
Posted: Tue Jun 27, 2006 12:38 pm Post subject: |
|
|
Thanks for the pic! It really shows what is possible with ambient occlusion. Great stuff! |
|
Back to top |
|
|
Paul-Jan Site Admin
Joined: 08 Aug 2004 Posts: 3066 Location: Lage Zwaluwe
|
Posted: Tue Jun 27, 2006 6:02 pm Post subject: |
|
|
Looks like an excellent job to me! 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 |
|
|
Daaark DeleD PRO user
Joined: 01 Sep 2004 Posts: 2696 Location: Ottawa, Canada
|
Posted: Tue Jun 27, 2006 8:47 pm Post subject: |
|
|
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 |
|
|
Mr.Fletcher DeleD PRO user
Joined: 07 Aug 2004 Posts: 1772 Location: Germany
|
Posted: Tue Jun 27, 2006 9:31 pm Post subject: |
|
|
Very nice
I would like to see that blended together with textures! _________________ Behold! The DeleD Wiki! Please help us expanding it
DeleD on IRC |
|
Back to top |
|
|
Sweenie DeleD PRO user
Joined: 05 May 2006 Posts: 14
|
Posted: Wed Jun 28, 2006 7:14 am Post subject: |
|
|
Thanks for you comments
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...
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 |
|
|
Nocturn DeleD PRO user
Joined: 08 Aug 2004 Posts: 635
|
Posted: Wed Jun 28, 2006 7:48 am Post subject: |
|
|
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 ...btw i'm a messy housekeeper too (; |
|
Back to top |
|
|
Sweenie DeleD PRO user
Joined: 05 May 2006 Posts: 14
|
Posted: Wed Jun 28, 2006 7:55 am Post subject: |
|
|
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 |
|
|
Mr.Fletcher DeleD PRO user
Joined: 07 Aug 2004 Posts: 1772 Location: Germany
|
Posted: Wed Jun 28, 2006 9:27 am Post subject: |
|
|
...this looks soo great _________________ Behold! The DeleD Wiki! Please help us expanding it
DeleD on IRC |
|
Back to top |
|
|
|