
Very neat omni-directional mapping approach. Has a little more "warping" then the regular dual-paraboloid, but only requires a single pass!
http://www.youtube.com/watch?v=WnNOMTDmYTg
K
Moderator: Moderators
That's one of the reasons I've always been in favor of stencil-based shadows, although they have their downsides as well ( can be quite slow to compute ).jph_wacheski wrote:This looks great, well apart from the shadows being rather pixelated, however that seems to be sort of standard in many real-time settings (PS3 games are often awful in this way).
Wonderful visualizationsjph_wacheski wrote:I did recently see this and wonder how he achieves such smooth shadows in a real-time setup.
Agreed, it's too complicated right now. Personally, I'd just go with the light functionality build-in OpenGL, but as quoted ..jph_wacheski wrote:ZGE desperately need lighting w/ shadows. I have no idea how to write such a glsl shader or set it up to work in the engine. Nor do I particularly want to know (I don't want to build an engine, just make interesting stuff using an engine). I would like to simply turn the lighting on in the editor, and set up the parameters for the scene or lighting situation. Perhaps we need a set of standard lighting shaders to this end?
.. Ville doesn't agreeVilleK wrote:A light component is slightly more problematic as it would use OpenGL built-in lighting model but this is deprecated as of GL 3+/ES. And I would rather not introduce more deprecated GL-calls until we have decided a path to the newer GL-models.
Code: Select all
24
-2 0.2 -0.2
2 0.2 -0.2
2 0.2 0.2
-2 0.2 0.2
-2 -0.2 -0.2
2 -0.2 -0.2
2 -0.2 0.2
-2 -0.2 0.2
-0.2 2 -0.2
0.2 2 -0.2
0.2 2 0.2
-0.2 2 0.2
-0.2 -2 -0.2
0.2 -2 -0.2
0.2 -2 0.2
-0.2 -2 0.2
-0.2 0.2 -2
0.2 0.2 -2
0.2 0.2 2
-0.2 0.2 2
-0.2 -0.2 -2
0.2 -0.2 -2
0.2 -0.2 2
-0.2 -0.2 2
36
1 3 2 0 1 0 0 1 0 0 1 0
1 4 3 0 1 0 0 1 0 0 1 0
5 6 7 0 -1 0 0 -1 0 0 -1 0
5 7 8 0 -1 0 0 -1 0 0 -1 0
5 4 1 -1 0 0 -1 0 0 -1 0 0
5 8 4 -1 0 0 -1 0 0 -1 0 0
3 6 2 1 0 0 1 0 0 1 0 0
3 7 6 1 0 0 1 0 0 1 0 0
5 1 2 0 0 -1 0 0 -1 0 0 -1
5 2 6 0 0 -1 0 0 -1 0 0 -1
3 4 8 0 0 1 0 0 1 0 0 1
3 8 7 0 0 1 0 0 1 0 0 1
9 11 10 0 1 0 0 1 0 0 1 0
9 12 11 0 1 0 0 1 0 0 1 0
13 14 15 0 -1 0 0 -1 0 0 -1 0
13 15 16 0 -1 0 0 -1 0 0 -1 0
13 12 9 -1 0 0 -1 0 0 -1 0 0
13 16 12 -1 0 0 -1 0 0 -1 0 0
11 14 10 1 0 0 1 0 0 1 0 0
11 15 14 1 0 0 1 0 0 1 0 0
13 9 10 0 0 -1 0 0 -1 0 0 -1
13 10 14 0 0 -1 0 0 -1 0 0 -1
11 12 16 0 0 1 0 0 1 0 0 1
11 16 15 0 0 1 0 0 1 0 0 1
17 19 18 0 1 0 0 1 0 0 1 0
17 20 19 0 1 0 0 1 0 0 1 0
21 22 23 0 -1 0 0 -1 0 0 -1 0
21 23 24 0 -1 0 0 -1 0 0 -1 0
21 20 17 -1 0 0 -1 0 0 -1 0 0
21 24 20 -1 0 0 -1 0 0 -1 0 0
19 22 18 1 0 0 1 0 0 1 0 0
19 23 22 1 0 0 1 0 0 1 0 0
21 17 18 0 0 -1 0 0 -1 0 0 -1
21 18 22 0 0 -1 0 0 -1 0 0 -1
19 20 24 0 0 1 0 0 1 0 0 1
19 24 23 0 0 1 0 0 1 0 0 1
Did you destroy the window context and created a new one that does explicitly request a stencil buffer? Otherwise it won't work on all systems ( just like the Accumulation Buffer ).StevenM wrote:I was able to get the exact example working very easily by practically wrapping the entire code in a DLL - at least I know it works
I didn't even consider shadow maps - mostly because for some reason I just didn't they worked in real time with animation - but if it's an option that is fast enough - I'll look into.Doing shadow-map based shadows is a much better fit for ZGE, and can be done entirely using components ( no OpenGL calls necessary ).
Kjell you've always had your own ways of doing thingsKjell wrote:Now, personally I've stopped using the build-in Mesh components quite some time ago
Yea, for static meshes i use display lists ( deprecated, i know ) .. which have similar performance as static VBOs.VilleK wrote:You mean you only use direct opengl-calls instead? Good for experimentations I guess but what about high-poly models?
They are fine for what they are, but regarding stencil volumes .. if you for example only want to extrude¹ the faces that are facing a light ( which is a common optimization ), when using a Mesh component there's no way to get rid of the faces ( and vertices ) that don't² Of course these days a streaming element buffer, or a geometry shader might be even better ..VilleK wrote:And what do you consider to be the main weaknesses of the Mesh-components?
Ok - thanks for heads up - I'll try not to get too worked up. Shadows seem to be one of the most difficult problems with OpenGL. I've seen a lot people venting frustration about it in other forums. Shame though - shadows are so essential. This is something that the Khronos Group should have addressed long ago.VilleK wrote:I will read up on the literature I've got on shadow techniques and evaluate different options here.
Don't burn yourself out Steven. I'm convinced shadows are needed in ZGE, we just need to find the best suited technique.