Advanced Effects
-
- Competition winner
- Posts: 523
- Joined: Tue Jan 15, 2013 6:36 pm
Re: Advanced Effects
Been messing with the latest trunk version. Added cubemaps to my characters I still need to improve them. Finally got around to making better water and added maps to control there flow around static objects.
Re: Advanced Effects
Kewl! the lego things look sweet, and if you could implement some sort of mipmapping for the screen space reflections, you could definitely do some really nasty looking materials really quick PBR is mostly about reflection, so it is worth to try some mipmapping altogether with SSR
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
Re: Advanced Effects
Ah! Mel..You're always one step ahead! I was just starting to look at that when I found some of my old theoretical stuff on Real Time SSS, so I thought I'd
see if it works (now with inter-buffer rendering) and this is what happened.. (Ill just post some notes and screen grabs)
see if it works (now with inter-buffer rendering) and this is what happened.. (Ill just post some notes and screen grabs)
Re: Advanced Effects
The illusive "Thickness" test..
I searched it and figured that you render the object twice into two different depth buffers.
One with Polygons facing Toward the Camera (front facing) and one with Polys
facing the other direction (back facing).
Then I tried subtracting the "Back" Depths from the Front Depths.. What a mess!
(tried multiplying, averaging, adding, and eventually reversed the "minus" ops)
So I thought maybe if you have a radius around the given object which would give you Min and Max
depths for a bit of thickness which would look like the stuff on the net (the little bit there is)..
Didn't work..
I searched it and figured that you render the object twice into two different depth buffers.
One with Polygons facing Toward the Camera (front facing) and one with Polys
facing the other direction (back facing).
Then I tried subtracting the "Back" Depths from the Front Depths.. What a mess!
(tried multiplying, averaging, adding, and eventually reversed the "minus" ops)
So I thought maybe if you have a radius around the given object which would give you Min and Max
depths for a bit of thickness which would look like the stuff on the net (the little bit there is)..
Didn't work..
Re: Advanced Effects
Then I realized that unless you've got proper "Depth Peeling" or "Order Independent Transparency" some models
like the one above would always have those "loose polygons" that mess everything up!
So I looked at a model with a few less of these..
and I got..
like the one above would always have those "loose polygons" that mess everything up!
So I looked at a model with a few less of these..
and I got..
Re: Advanced Effects
So clearly subtracting one Depth from Another works, but most geometry wont make it that simple for you!
Also your MIN and MAX MUST be very close together..
Specially not when you want to do something like this..
Also your MIN and MAX MUST be very close together..
Specially not when you want to do something like this..
Re: Advanced Effects
So I went back to the "statue" and tried an old idea (my own recipe, never tested) that goes as follows..
1. Invert the normals of the Model. (make sure it has a good UV map)
2. Bake Ambient Occlusion on to the image. (tried hundreds of distance settings)
3. Invert this Baked Image.. (if you look at it you'll see why inverted normals and also inverted image)
4. Now I've got a model with what I call NIAO (Negative Inverted Ambient Occlusion)
1. Invert the normals of the Model. (make sure it has a good UV map)
2. Bake Ambient Occlusion on to the image. (tried hundreds of distance settings)
3. Invert this Baked Image.. (if you look at it you'll see why inverted normals and also inverted image)
4. Now I've got a model with what I call NIAO (Negative Inverted Ambient Occlusion)
Re: Advanced Effects
Rendering this isn't enough because generally the middle of the geometry would be "Thicker" than the rest
meaning that light would pass through the "Thin" areas near the sides easily but not near the middle of the object..
So I have another buffer containing only the "Silhoutte" of the statue and "heavily" blurred (easy enough)..
Something like this..
meaning that light would pass through the "Thin" areas near the sides easily but not near the middle of the object..
So I have another buffer containing only the "Silhoutte" of the statue and "heavily" blurred (easy enough)..
Something like this..
Re: Advanced Effects
Now I multiply the "NIAO" render with the "Blurred and Masked Silhouette" and..
Re: Advanced Effects
Now that would be nice for a single light from the back of the model. (there ain't no lights)
So I thought.. What if we have a plane between the camera position and the fragment (or object)
and then "Mirror" that Light Position on this "cam obj" plane to generate a raw diffuse value in yet another buffer
which we would then, again multiply with the last result?
I'm sure that if we had a few light treated in this way and also "vanilla" lights that act normally
one could get pretty close to good looking Real Time Sub Surface Scattering!
Here is a few ballsups just for fun..
So I thought.. What if we have a plane between the camera position and the fragment (or object)
and then "Mirror" that Light Position on this "cam obj" plane to generate a raw diffuse value in yet another buffer
which we would then, again multiply with the last result?
I'm sure that if we had a few light treated in this way and also "vanilla" lights that act normally
one could get pretty close to good looking Real Time Sub Surface Scattering!
Here is a few ballsups just for fun..
Re: Advanced Effects
Here we see why (without depth peeling and order-ind-trans) we could have problens..