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 » 06 Nov 2008, 02:53

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.
0 x

Warlord Zsinj
Imperial Winter Developer
Posts: 3742
Joined: 24 Aug 2004, 08:59

Re: REQ: Ambient Occlusion

Post by Warlord Zsinj » 06 Nov 2008, 03:42

I don't think you'll find many (if any) FPS's that use ambient occlusion, let alone modern, professional RTS's.
0 x

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

Re: REQ: Ambient Occlusion

Post by Falcrum » 06 Nov 2008, 03:57

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
0 x

User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

Re: REQ: Ambient Occlusion

Post by lurker » 06 Nov 2008, 04:07

Yes, let's pull a Crysis on every unit.
0 x

User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: REQ: Ambient Occlusion

Post by Argh » 06 Nov 2008, 05:32

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.
0 x

Warlord Zsinj
Imperial Winter Developer
Posts: 3742
Joined: 24 Aug 2004, 08:59

Re: REQ: Ambient Occlusion

Post by Warlord Zsinj » 06 Nov 2008, 06:27

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.
0 x

User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30

Re: REQ: Ambient Occlusion

Post by jK » 06 Nov 2008, 06:57

Image
0 x

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

Re: REQ: Ambient Occlusion

Post by REVENGE » 06 Nov 2008, 07:31

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:
0 x

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

Re: REQ: Ambient Occlusion

Post by TheFatController » 06 Nov 2008, 09:40

Paper mache spring!
0 x

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

Re: REQ: Ambient Occlusion

Post by Falcrum » 06 Nov 2008, 14:52

Can I see your code jk?
0 x

User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Re: REQ: Ambient Occlusion

Post by KDR_11k » 07 Nov 2008, 17:27

Ambient occlusion is faked with tricks, I don't think any game uses AO like e.g. Blender calculates it except for baked textures.
0 x

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

Re: REQ: Ambient Occlusion

Post by Falcrum » 07 Nov 2008, 20:25

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.
0 x

User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30

Re: REQ: Ambient Occlusion

Post by jK » 07 Nov 2008, 20:41

Falcrum wrote:Can I see your code jk?
http://home.arcor.de/jkei/gfx_ssao.lua
it is everything else than finished
0 x

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

Re: REQ: Ambient Occlusion

Post by Falcrum » 07 Nov 2008, 21:31

Wow... Realy nice :) Thx jK
0 x

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

Re: REQ: Ambient Occlusion

Post by Falcrum » 08 Nov 2008, 00:16

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
0 x

Warlord Zsinj
Imperial Winter Developer
Posts: 3742
Joined: 24 Aug 2004, 08:59

Re: REQ: Ambient Occlusion

Post by Warlord Zsinj » 08 Nov 2008, 03:41

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.
0 x

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

Re: REQ: Ambient Occlusion

Post by Falcrum » 08 Nov 2008, 14:08

FPS for me still same. No changes of performance :) Test yourself
0 x

User avatar
AF
AI Developer
Posts: 20669
Joined: 14 Sep 2004, 11:32

Re: REQ: Ambient Occlusion

Post by AF » 08 Nov 2008, 18:35

You can get higher quality if you switch from youtube to vimeo
0 x

User avatar
Quanto042
Basically OTA Developer
Posts: 778
Joined: 22 Feb 2006, 03:01

Re: REQ: Ambient Occlusion

Post by Quanto042 » 08 Nov 2008, 23:20

that is sooooo sexy, i just wish my gaming pc hadn't died. I WANT! :cry:
0 x

Hacked
Posts: 116
Joined: 15 Aug 2008, 18:06

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

Post by Hacked » 09 Nov 2008, 02:59

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.
0 x

Locked

Return to “Lua Scripts”