Advanced Effects

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Mel
Competition winner
Posts: 2292
Joined: Wed May 07, 2008 11:40 am
Location: Granada, Spain

Re: Advanced Effects

Post by Mel »

Those aren't depth artifacts, the depth has precission enough, even if it is in a RGB texture, those artifacts appear because of running out of precission on the normals (thus it is advisable to do all the normal calculations in view space, and apply some tweaks to save precision, such as rendering the X and Y normal vectors to 16 bit precision, and reconstruct the Z out of them AND to tweak the input values so the range used is wider, as crytek does with their engine) You could randomize a bit the normals, so it isn't so aparent, but not much, or else, the image would appear too grainy

Also, look at this XD

https://github.com/gangliao/Order-Indep ... arency-GPU

Maybe you wanted to give it a shot later? when you're done with the solid passes? LOL
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
Vectrotek
Competition winner
Posts: 1087
Joined: Sat May 02, 2015 5:05 pm

Re: Advanced Effects

Post by Vectrotek »

Yes, the (normalized) un-range compressed normal's are now fine for me.. As for the reconstructing Z out of 16 bit X and Y, interesting,
but that would warrant working in view space which I want to avoid because specular calculation is
easier (for me) in world space.. Looking at Screen Space Reflection now (when I have time)..

Any useful links on SSR?
Vectrotek
Competition winner
Posts: 1087
Joined: Sat May 02, 2015 5:05 pm

Re: Advanced Effects

Post by Vectrotek »

Anyhow, here are some shots.. (all deferred rendering)
Image
Last edited by Vectrotek on Thu Feb 02, 2017 5:56 pm, edited 1 time in total.
Vectrotek
Competition winner
Posts: 1087
Joined: Sat May 02, 2015 5:05 pm

Re: Advanced Effects

Post by Vectrotek »

Just Specular, SSAO, and FXAA

Image
Vectrotek
Competition winner
Posts: 1087
Joined: Sat May 02, 2015 5:05 pm

Re: Advanced Effects

Post by Vectrotek »

With a much improved frame rate and more lights, more becomes possible..
Image
Vectrotek
Competition winner
Posts: 1087
Joined: Sat May 02, 2015 5:05 pm

Re: Advanced Effects

Post by Vectrotek »

Even Voxels are more feasible with Deferred Rendering..
Image

Irrlicht Rules O.K.
Mel
Competition winner
Posts: 2292
Joined: Wed May 07, 2008 11:40 am
Location: Granada, Spain

Re: Advanced Effects

Post by Mel »

To tell the truth, it is better to work on view space as much as possible, because it is centered on the origin of coordinates, so rounding errors mitigate, it is pretty much skipping any "world/model" matrix back to the perspective inverse, which makes the problem strictly a matter of the camera, and not also a matter of every involved node and GL will provide you the normals directly in view space, so you don't have to make any more calculations. As for the deferred renderer... well, let's say that with metaballs rendering, they become a screenspace problem... :)
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
Vectrotek
Competition winner
Posts: 1087
Joined: Sat May 02, 2015 5:05 pm

Re: Advanced Effects

Post by Vectrotek »

You might very well be right about keeping to view space as far as possible but
I did see one irritating thing about view space normals and that is that
when I rotate my "Actor" or 3D Object, then It's normals also rotate causing a
real headache when processing the normals with Tangents and Binormals
complicating things under deferred rendering when it comes to calculating
specularity.. But hey, there is many ways to do things! :P

Also, I just discovered that most of my Vertex programs use Matrices that I
constructed in Irrlicht when all I had to do was to use the
keyword "gl_ModelViewProjectionMatrix"!!

But then again, maybe that Irrlicht Matrix construction would be handy
when I convert to HLSL..
I don't know..
In fact the more I learn the more I realize that I know less! :lol:
Vectrotek
Competition winner
Posts: 1087
Joined: Sat May 02, 2015 5:05 pm

Re: Advanced Effects

Post by Vectrotek »

Since I've been playing with deferred rendering I've been going crazy
rendering every thing with high poly counts (not possible before)..
Image
The tires were removed because of the "16 Bit index Alias Object thing"..
Vectrotek
Competition winner
Posts: 1087
Joined: Sat May 02, 2015 5:05 pm

Re: Advanced Effects

Post by Vectrotek »

Image
Vectrotek
Competition winner
Posts: 1087
Joined: Sat May 02, 2015 5:05 pm

Re: Advanced Effects

Post by Vectrotek »

On the roll..
Image
Vectrotek
Competition winner
Posts: 1087
Joined: Sat May 02, 2015 5:05 pm

Re: Advanced Effects

Post by Vectrotek »

Image
thanhle
Posts: 325
Joined: Wed Jun 12, 2013 8:09 am

Re: Advanced Effects

Post by thanhle »

Vectrotek wrote:On the roll..
Image
Nice, almost there.
How many lights are these?

I see some of the light are not continuous between adjacent surfaces. e.g. Noted that the light doesn't continue from the collar onto his neck.

You can you create a light source rotate around a person video to see artifact.

The white marble looking dude looks great and beautiful on the eyes. You might want to put a light source or two near his arm joint to see if it project correctly.
Vectrotek
Competition winner
Posts: 1087
Joined: Sat May 02, 2015 5:05 pm

Re: Advanced Effects

Post by Vectrotek »

Mmm.. I know that I should consider the Near Plane too if I wanted it to be perfect, but
that value is usually quite small and lights further from the surface wouldn't have notable physical deviations..
(there is a slight problem with the specular calculation which I fixed and I will edit the shader code posted above)

The model has 59136 polygons! Keep in mind that the Inter Buffer rendering system is conceptual
and will be coded to be much faster once I start using GPU Indices rather than names and use GPU Assembly..

Your's is a good Idea anyway, so I took 6 lights and tested them with polygons placed at the light positions..
I was pleased.. You?



Image
Last edited by Vectrotek on Sat Feb 04, 2017 10:21 pm, edited 1 time in total.
Vectrotek
Competition winner
Posts: 1087
Joined: Sat May 02, 2015 5:05 pm

Re: Advanced Effects

Post by Vectrotek »

But.. I'll tell you this.. The Normals have to be sent (under this "World" system) as Range Compressed
because they have to be Un-Range Compressed in the shader or well have only positive normals!
Now I know that under the View system things like this could be dealt with but it is a bit more complex, I think..

In this case I'd actually prefer to render Specular Calculations NOT in Deferred shading because of all the "Domain Loss"..
For Diffuse Lighting we can get away with it but Specular highlights need to be clean and sharp..

Here is an example of what I mean..

Image
Post Reply