New ambient occlusion algorithm in 3DMEditor2
- zuzuf
- Administrateur - Site Admin
- Posts: 3281
- Joined: Mon Oct 30, 2006 8:49 pm
- Location: Toulouse, France
- Contact:
New ambient occlusion algorithm in 3DMEditor2
I've just done a commit so the code is now in the SVN repository. It gives good results even though it's not perfect :
It took only a few seconds to build those large light maps using a high level of details (up to 512 rays) compared to several minutes (or hours) with previous algorithm. Also it performs much better when UV mapping is correctly made (3DMEditor's auto UV mapping features currently don't give great results). This is due to the way it works:
N random directions are generated and for each one the object is rendered to an offscreen buffer using texture coordinates as color components with an orthographic camera. The buffer is read in order to compute the texels visible from infinity. At the end you get an estimation of the amount of light each texel receives from infinity .
It takes almost the same time to compute the light map for small and big models (you can even try with very big models it's still very fast). The only problem is due to rasterization : if a part of a model has a high texture density (higher than pixel density) then its texels may not be detected and this region will be darker than it should.
It took only a few seconds to build those large light maps using a high level of details (up to 512 rays) compared to several minutes (or hours) with previous algorithm. Also it performs much better when UV mapping is correctly made (3DMEditor's auto UV mapping features currently don't give great results). This is due to the way it works:
N random directions are generated and for each one the object is rendered to an offscreen buffer using texture coordinates as color components with an orthographic camera. The buffer is read in order to compute the texels visible from infinity. At the end you get an estimation of the amount of light each texel receives from infinity .
It takes almost the same time to compute the light map for small and big models (you can even try with very big models it's still very fast). The only problem is due to rasterization : if a part of a model has a high texture density (higher than pixel density) then its texels may not be detected and this region will be darker than it should.
=>;-D Penguin Powered
- Balthazar
- Moderator
- Posts: 2055
- Joined: Wed Nov 01, 2006 4:31 pm
- Location: Russian Federation
- Contact:
Re: New ambient occlusion algorithm in 3DMEditor2
Awesome... Now we need only crush bug fix
Re: New ambient occlusion algorithm in 3DMEditor2
Too tired to read topic, but, I love this modle, and, very fast in build this modle?/:^}~!
- Balthazar
- Moderator
- Posts: 2055
- Joined: Wed Nov 01, 2006 4:31 pm
- Location: Russian Federation
- Contact:
Re: New ambient occlusion algorithm in 3DMEditor2
Yeah, very beautiful models... Where are they from? Spring?
- zuzuf
- Administrateur - Site Admin
- Posts: 3281
- Joined: Mon Oct 30, 2006 8:49 pm
- Location: Toulouse, France
- Contact:
Re: New ambient occlusion algorithm in 3DMEditor2
They are from Spring, someone made those models and posted them on their forum a while ago.
I have other models too, some with UV mapping, some without. Most of them without proper texturing.
PS: I have improved a bit the ambient occlusion algorithm (a few tweaks) and added support for 3DO import
I have other models too, some with UV mapping, some without. Most of them without proper texturing.
PS: I have improved a bit the ambient occlusion algorithm (a few tweaks) and added support for 3DO import
=>;-D Penguin Powered
- zuzuf
- Administrateur - Site Admin
- Posts: 3281
- Joined: Mon Oct 30, 2006 8:49 pm
- Location: Toulouse, France
- Contact:
Re: New ambient occlusion algorithm in 3DMEditor2
I've added an improved version of the ambient occlusion algorithm for machines with support for shadow mapping and vertex/fragment programs. This version does everything on the GPU which is much faster (no matter the quality settings I always get the work done in less than a second ). Also this full-GPU version doesn't have the problem the other version has : since it does standard shadow mapping occlusion queries for all texels everything that should be lit is list properly
=>;-D Penguin Powered
Re: New ambient occlusion algorithm in 3DMEditor2
More! /:^]
Maybe we can create a ourself mod, and ask some models owner for use them...
Maybe we can create a ourself mod, and ask some models owner for use them...
- zuzuf
- Administrateur - Site Admin
- Posts: 3281
- Joined: Mon Oct 30, 2006 8:49 pm
- Location: Toulouse, France
- Contact:
Re: New ambient occlusion algorithm in 3DMEditor2
Hehe, that more or less what the free resource set is about (with goal being to make OTA in HD )
=>;-D Penguin Powered
Re: New ambient occlusion algorithm in 3DMEditor2
Infact I'm careful leading a big mod plan for multi-game..... Well, at persent there aren't a alpha version for show the goal, but it will be a TA3D/ TA mod..
Who is online
Users browsing this forum: No registered users and 9 guests