Crist-JRoger
|
|
« Reply #90 on: November 24, 2015, 08:26:54 AM » |
|
Shadows fix.Mandelbulb. 1. FudgeFactor=1 2. FudgeFactor=0.4 3. Fixed shadows, FudgeFactor=0.4
AO fix works not so good as would like.
|
|
|
Logged
|
|
|
|
Crist-JRoger
|
|
« Reply #91 on: November 24, 2015, 10:44:43 AM » |
|
Now i will try to show what i want to fix in AO. 1. Image with AO=0. Hard shadows=1, camlight=1 2. AO=1. We see that effect added on full scene. 3. "Fixed" AO. AO still works in shadows. In lighted area AO works too but slower than picture #2 upd.: Better result when i deleted ao from hitColor=lighting(... ... ao) and added ambientOcclusion to diffuse in vec3 lighting. Sombody who knows math, please help to write well-working code
|
|
« Last Edit: November 24, 2015, 02:02:55 PM by Crist-JRoger »
|
Logged
|
|
|
|
knighty
Fractal Iambus
Posts: 819
|
|
« Reply #92 on: November 24, 2015, 02:24:08 PM » |
|
It's good to know that things are moving forward! Good work team! ;o) @Crist-JRoger: I thought that that AO issue was solved... The implemented AO is really really a hack so don't expect that it works like real AO because: - It assumes that DE is perfect or almost perfect. By perfect I mean that the magnitude of it's gradient is equal to 1. By almost perfect that the magnitude of it's gradient is <=1. This may not be always the case Which will give the AO a wiered look. - It works by chooting a shadow-like ray in the normal direction at the shaded point: this will also give some odd looking AO (for non convex objects). A workaround would be to use multiple directions around the normal (say... cosine weighted hemispherial samples just like what is done in path tracing). In the 8th version, The AO only affect the "ambiant" light. So why the AO effect still appeares? This is because ambiant light is too intense. In real world, direct light value is much bigger than the diffused one. In order to get "correct" results one have to use tone mapping (in Post tab, give ToneMapping a value 2,3 or 4 not 1 or 5) while giving a big value the spot light and reducing exposure. I hope this will help.
|
|
|
Logged
|
|
|
|
3dickulus
|
|
« Reply #93 on: November 24, 2015, 03:05:04 PM » |
|
nicely done! speaking of post, there are 2 image sized arrays from DE that should be available to buffershader, Depth (GL) Alpha (.w) , surely these can be exploited. buffershader compiles to about 208 lines of GPU asm so there is over 10000 lines of unused code space there.
|
|
« Last Edit: November 24, 2015, 03:26:11 PM by 3dickulus »
|
Logged
|
|
|
|
Crist-JRoger
|
|
« Reply #94 on: November 24, 2015, 03:40:48 PM » |
|
Knighty, things are moving very slowly )))) And i don't forget about ao bugs, i just accepted this. Your explanation about basic is very interesting and so very unclear for me. Ok, i agree with you that AO in frag is not real AO. But can we make AO approximated to real? I added AO to diffuse and it looks better. I just want to have more various ways for manipulations with scene. I always use spotlight and ambient light together. So, after that do post with tone mapping and bloom. Not for erasing disadvantages but for improving.
|
|
|
Logged
|
|
|
|
knighty
Fractal Iambus
Posts: 819
|
|
« Reply #95 on: November 24, 2015, 04:41:36 PM » |
|
But can we make AO approximated to real?
Yes. By using multiple directions around the normal. The same is true for soft shadows. So, after that do post with tone mapping and bloom. Not for erasing disadvantages but for improving.
I think it's better to choose a tone mapping method, setting lights intensities then do the coloring in that order. This is just the same as when using a 3D rendering software (do lighting before texturing). @:3dickulus: Ah! If only fragmentarium supported multiple targets rendering.
|
|
|
Logged
|
|
|
|
|
3dickulus
|
|
« Reply #97 on: November 25, 2015, 01:51:00 AM » |
|
@knighty we are using one shader to generate an image and a second shader for post processing, so... a few textures, of the appropriate format, could be attached to the FBO and written with information like surface normals, depth, color, shadow mask, real 3d coords, whatever is needed, etc. and handed to the second shader for further 3D processing and then on to final image processing seems logical to me, but I'm afraid I lack the math chops and a deeper understanding of GLSL to know exactly what might be possible... just a thought http://gamedev.stackexchange.com/questions/59194/multiple-render-targets-multiple-fragment-shaders. @Crist-JRoger the light play in the cave looks really good
|
|
|
Logged
|
|
|
|
Crist-JRoger
|
|
« Reply #98 on: November 30, 2015, 07:01:36 PM » |
|
I have some banding artifacts on the floor when used spotlight or background when use gradient. They are not so visible, but there is! And sometimes it reduces the quality, looks like low-quality jpeg I think that need to apply dithering or little smooth, maybe it's a lack of accuracy of calculations... Any ideas?
|
|
|
Logged
|
|
|
|
Crist-JRoger
|
|
« Reply #99 on: November 30, 2015, 10:37:29 PM » |
|
testing last changes in AO model camlight, spotlight, ao and hard shadows
|
|
|
Logged
|
|
|
|
knighty
Fractal Iambus
Posts: 819
|
|
« Reply #100 on: December 01, 2015, 09:30:18 PM » |
|
Beautiful renderings.
|
|
|
Logged
|
|
|
|
Crist-JRoger
|
|
« Reply #101 on: December 04, 2015, 08:25:28 PM » |
|
I replaced floor to terrain in DE-Kn2, so it works...more or less Need help because my code is incorrect, i have problems with lighting:
|
|
|
Logged
|
|
|
|
knighty
Fractal Iambus
Posts: 819
|
|
« Reply #102 on: December 11, 2015, 05:21:10 PM » |
|
It looks like you forgot to compute the normal of the terrain.
|
|
|
Logged
|
|
|
|
Crist-JRoger
|
|
« Reply #103 on: December 14, 2015, 01:38:18 PM » |
|
It looks like you forgot to compute the normal of the terrain.
How? Can you look on this?
|
|
|
Logged
|
|
|
|
knighty
Fractal Iambus
Posts: 819
|
|
« Reply #104 on: December 15, 2015, 11:10:49 AM » |
|
Fast and ugly solution attached.
|
|
|
Logged
|
|
|
|
|