Blokworld
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Faked AO

2 posters

Go down

Faked AO Empty Faked AO

Post by Slaihne Thu May 19, 2011 4:05 am

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?
Slaihne
Slaihne

Posts : 264
Join date : 2011-03-17
Age : 56

Back to top Go down

Faked AO Empty Re: Faked AO

Post by S33m3 Thu May 19, 2011 7:03 am

'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.


S33m3

Posts : 54
Join date : 2011-03-23

Back to top Go down

Faked AO Empty Re: Faked AO

Post by Slaihne Thu May 19, 2011 7:23 am

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.
Slaihne
Slaihne

Posts : 264
Join date : 2011-03-17
Age : 56

Back to top Go down

Faked AO Empty Re: Faked AO

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum