Faked AO
2 posters
Page 1 of 1
Faked AO
I've just had another interesting thought regarding the faked AO i'm using.
Currently i do it through average light values of the 4 blocks immediately touching a vertex as discussed in another thread.
While pondering the lighting as it is affected by the slopes i am working on it struck me that the internal corners can have AO added in the 'crease' by just adding a vertex darkening factor. I know it's an internal corner of sorts, so needs to be darkened, i don't need to a fancy averaging to do this.
Then it occurred to me that if i was drawing the cube faces from the point of view of an empty block rather than a full block (i currently draw the faces pointing out of a full block, rather than the faces pointing into an empty block if you can follow that). I would know in advance where the darker corner's lie and be able to darken those corners by the correct amount. In fact, i would be able to change the orientation of the triangles so that the darkening worked better.
Just a thought, don't know if it will end up as anything.
So, anyone out there working on their own engine. Do you draw the faces off a solid block or do you draw the faces surrounding an empty block?
Currently i do it through average light values of the 4 blocks immediately touching a vertex as discussed in another thread.
While pondering the lighting as it is affected by the slopes i am working on it struck me that the internal corners can have AO added in the 'crease' by just adding a vertex darkening factor. I know it's an internal corner of sorts, so needs to be darkened, i don't need to a fancy averaging to do this.
Then it occurred to me that if i was drawing the cube faces from the point of view of an empty block rather than a full block (i currently draw the faces pointing out of a full block, rather than the faces pointing into an empty block if you can follow that). I would know in advance where the darker corner's lie and be able to darken those corners by the correct amount. In fact, i would be able to change the orientation of the triangles so that the darkening worked better.
Just a thought, don't know if it will end up as anything.
So, anyone out there working on their own engine. Do you draw the faces off a solid block or do you draw the faces surrounding an empty block?
Slaihne- Posts : 264
Join date : 2011-03-17
Age : 56
Re: Faked AO
'lo !
By empty, you mean "Air block" ?
To see if a face mesh must be constructed, I based the test from a not "Air" block. So basicaly doing the faces pointing outsides of the inspected block.
But I don't follow you on the advantage to do the faces draw check the other way arround (from Empty block). In the end, you have in those two cases a block VS a neightboor block.
By empty, you mean "Air block" ?
To see if a face mesh must be constructed, I based the test from a not "Air" block. So basicaly doing the faces pointing outsides of the inspected block.
But I don't follow you on the advantage to do the faces draw check the other way arround (from Empty block). In the end, you have in those two cases a block VS a neightboor block.
S33m3- Posts : 54
Join date : 2011-03-23
Re: Faked AO
If you approach it from the point of view of the empty block, you get the faces that 'wrap' the space. This is enough information to do fake AO. IE, you can tell where the corners and L joins are.
If you approach it from the point of view of a solid block then you only get one of the faces ( a single one in each direction) that wrap any given space. Thus you don't have enough data to do fake AO without looking at neighbour blocks. Hence why i do my fake AO as a side effect of a lighting 'average'.
On a 2d situation, drawing from the POV of an empty block (1) i can get...
I----I
I----I 1
I----X----I
I----I----I
I----I----I
I can see the corner in the bottom left, so i know it needs darkened (Point X)
Now, from the POV of a full block 1
I----I
I--1-I
I----X----I
I----I-2--I
I----I----I
I also need the information from block 2 before i can create the fake AO (the top face of block 2 to be precise).
I draw my blocks the same way as yourself S33m3, from the POV of a solid block. I'm not sure if it's an advantage to draw them from the POV of the AIR block. But i do feel there could be one.
If you approach it from the point of view of a solid block then you only get one of the faces ( a single one in each direction) that wrap any given space. Thus you don't have enough data to do fake AO without looking at neighbour blocks. Hence why i do my fake AO as a side effect of a lighting 'average'.
On a 2d situation, drawing from the POV of an empty block (1) i can get...
I----I
I----I 1
I----X----I
I----I----I
I----I----I
I can see the corner in the bottom left, so i know it needs darkened (Point X)
Now, from the POV of a full block 1
I----I
I--1-I
I----X----I
I----I-2--I
I----I----I
I also need the information from block 2 before i can create the fake AO (the top face of block 2 to be precise).
I draw my blocks the same way as yourself S33m3, from the POV of a solid block. I'm not sure if it's an advantage to draw them from the POV of the AIR block. But i do feel there could be one.
Slaihne- Posts : 264
Join date : 2011-03-17
Age : 56
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|
Fri Jul 01, 2016 7:25 am by croxxx
» Source?
Thu Jul 12, 2012 9:55 am by raistlinthewiz
» Version Available (Take 2)
Sat Jun 09, 2012 3:23 am by kamild1996
» Terrain Rendering Bug
Thu May 17, 2012 8:07 am by sackboy789
» Mystery Block!
Thu Mar 29, 2012 4:42 am by Corvin73
» Your procedural tree/plant seeding technique?
Sat Mar 24, 2012 3:10 am by Slaihne
» Voxeliq project
Wed Mar 07, 2012 4:25 am by raistlinthewiz
» What is a Tech-Test?
Wed Jan 18, 2012 12:32 pm by joeydmars
» Images
Fri Jan 06, 2012 6:02 am by croxxx