REQ: Ambient Occlusion

REQ: Ambient Occlusion

Discuss Lua based Spring scripts (LuaUI widgets, mission scripts, gaia scripts, mod-rules scripts, scripted keybindings, etc...)

Moderator: Moderators

User avatar
Falcrum
Posts: 149
Joined: 14 Nov 2007, 01:03

REQ: Ambient Occlusion

Post by Falcrum »

Im not sure if its possible to make real-time ambient occlusion for Spring, but this is amazing...

Image

http://www.ozone3d.net/tutorials/ambient_occlusion.php
http://www.ozone3d.net/demos_projects/s ... lusion.php

In game AO:
http://pl.youtube.com/watch?v=xsU_5bP8eGg

Other links:
http://pl.youtube.com/watch?v=eefsv8tQm ... re=related (check discription)
http://www.ogre3d.org/phpBB2/viewtopic. ... sc&start=0
http://www.gamedev.ru/code/forum?id=78742
Last edited by Falcrum on 09 Nov 2008, 12:03, edited 6 times in total.
Warlord Zsinj
Imperial Winter Developer
Posts: 3742
Joined: 24 Aug 2004, 08:59

Re: REQ: Ambient Occlusion

Post by Warlord Zsinj »

I don't think you'll find many (if any) FPS's that use ambient occlusion, let alone modern, professional RTS's.
User avatar
Falcrum
Posts: 149
Joined: 14 Nov 2007, 01:03

Re: REQ: Ambient Occlusion

Post by Falcrum »

Unreal 3 Engine
CryEngine 2
Leadwerks Engine

S.T.A.L.K.E.R.: Clear Sky
Gears of War 2
Toribash
Crysis

http://video.google.com/videoplay?docid ... 0709&hl=en
User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

Re: REQ: Ambient Occlusion

Post by lurker »

Yes, let's pull a Crysis on every unit.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: REQ: Ambient Occlusion

Post by Argh »

Uh... just looking at what was done there, it looks like a technique that would be great for a FPS- say, the inside of a room- where you have a space and light sources that are static.

It'd be absolutely useless for outdoors scenes or anything that's animated, though. You'd just have to fake it with the usual tricks. If you want this effect on your model skins... Blender can bake AO render passes. Personally, I think it's a total waste of time for RTS geometry, where you generally need stronger contrasts than you can get with AO, but whatever.
Warlord Zsinj
Imperial Winter Developer
Posts: 3742
Joined: 24 Aug 2004, 08:59

Re: REQ: Ambient Occlusion

Post by Warlord Zsinj »

You missed my point, which was that such a thing is massive overkill for an RTS. Saying that Crysis has such lighting does not mean that Spring, which doesn't even (beyond experimental levels) have bump-mapping/normal mapping and other systems that do have a significant impact on visuals, and are found in most modern RTS engines.
User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30

Re: REQ: Ambient Occlusion

Post by jK »

Image
User avatar
REVENGE
Posts: 2382
Joined: 24 Aug 2006, 06:13

Re: REQ: Ambient Occlusion

Post by REVENGE »

jK wrote:Image
:shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock:
User avatar
TheFatController
Balanced Annihilation Developer
Posts: 1177
Joined: 10 Dec 2006, 18:46

Re: REQ: Ambient Occlusion

Post by TheFatController »

Paper mache spring!
User avatar
Falcrum
Posts: 149
Joined: 14 Nov 2007, 01:03

Re: REQ: Ambient Occlusion

Post by Falcrum »

Can I see your code jk?
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Re: REQ: Ambient Occlusion

Post by KDR_11k »

Ambient occlusion is faked with tricks, I don't think any game uses AO like e.g. Blender calculates it except for baked textures.
User avatar
Falcrum
Posts: 149
Joined: 14 Nov 2007, 01:03

Re: REQ: Ambient Occlusion

Post by Falcrum »

http://pl.youtube.com/watch?v=hqCVFZq2LCg 2:20min. In FPS games its realy nice effect. Why not on RTS game ? Just try... SPring is open project.
User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30

Re: REQ: Ambient Occlusion

Post by jK »

Falcrum wrote:Can I see your code jk?
http://home.arcor.de/jkei/gfx_ssao.lua
it is everything else than finished
User avatar
Falcrum
Posts: 149
Joined: 14 Nov 2007, 01:03

Re: REQ: Ambient Occlusion

Post by Falcrum »

Wow... Realy nice :) Thx jK
User avatar
Falcrum
Posts: 149
Joined: 14 Nov 2007, 01:03

Re: REQ: Ambient Occlusion

Post by Falcrum »

http://pl.youtube.com/watch?v=exuSngXzpJA
Not realy good presentation SSAO because low quality video
SSAO OFF
http://img393.imageshack.us/my.php?imag ... 009ko6.jpg
SSAO ON
http://img361.imageshack.us/my.php?imag ... 008hu6.jpg
Warlord Zsinj
Imperial Winter Developer
Posts: 3742
Joined: 24 Aug 2004, 08:59

Re: REQ: Ambient Occlusion

Post by Warlord Zsinj »

What are the results from performance testing?

It does look better, but the difference is small enough that it would not be worth it if the performance loss is too high.

Also consider that most of the units there are still using the primitive 3do unit format, that do not use modern texturing methods. Most decently made s3o units have occlusion baked into their textures, so the difference would be considerably less.
User avatar
Falcrum
Posts: 149
Joined: 14 Nov 2007, 01:03

Re: REQ: Ambient Occlusion

Post by Falcrum »

FPS for me still same. No changes of performance :) Test yourself
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: REQ: Ambient Occlusion

Post by AF »

You can get higher quality if you switch from youtube to vimeo
User avatar
Quanto042
Basically OTA Developer
Posts: 778
Joined: 22 Feb 2006, 03:01

Re: REQ: Ambient Occlusion

Post by Quanto042 »

that is sooooo sexy, i just wish my gaming pc hadn't died. I WANT! :cry:
Hacked
Posts: 116
Joined: 15 Aug 2008, 18:06

Re: REQ: Ambient Occlusion ( already done - download =) )

Post by Hacked »

tried it, but i get this error when lua loads

[ 0] SSAO: Fragment shader failed to compile with the following errors:
ERROR: 0:8: '=' : assigning non-constant to 'const float'
ERROR: 0:9: '=' : assigning non-constant to 'const float'
ERROR: compilation errors. No code generated.
Locked

Return to “Lua Scripts”