GameBlender texture shadows

martinsh had asked me a month ago if my texture plug-in can be used to create dynamic texture shadows in game. Currently I’m refactoring whole plug-in and I got to “render to texture” feature. So I made a simple demo of texture shadow. There is a video with shadow in action.

hehe, you already know that - you rock ashsid… :eyebrowlift:
so… how does it work? it records a black and white scene and then saves this to second tex layer of ground as ‘multiply’ blend mode?
are shadows limited to camera’s viewing angle?

edit: i really think that texture based shadows look much better in some cases: especially in open environments, they look soft. Light doesn’t cast a geometry, so they’re faster than stencil shadows.

excellent work!

nice feature ashid

Woah very cool! :evilgrin:

I agree with martinsh, the texture based shadow looks much better than some of the other shadows I’ve seen around.

is the plug in available somewhere? It looks very nice

i can’t believe my eyes , after years of crying withoud dynamic shadows , it is here !

how can we get it ?

OMG! Dude, we have been going all this time without dynamic shadows and then suddenly everyone starts making them! Ashsid, I think that it is sweet to get a somewhat transparent shadow. I am very happy. I’m still trying to pick, Blender, or CrystalSpace.

ashsid , can you make a scene like this with shadows , we will be much happier to see it

can this be applied to multiple geometrys ?

Attachments


my video card flips out and goes crazy with stencil shadows, so it’s really nice to see alternatives (heh, doom 3 looks even scarier on my comp, as the shadows go berserk)

theoretically, could one also blur these shadows, sort of a faked soft shadow effect?
I’m really going out on a limb here (I have no knowledge of this stuff) but could the texture shadow then be distorted by a parallax normal map, so it follows the normal map distortion?

will this work with an animated mesh+armature? really cool stuff man :slight_smile:

i guess with this shadow technique it is possible to make shadow even cast through alpha mapped image - tree leaves, foliage, etc. right?
edit: oh and the best feature this technique offers, that shadow casts on every corner, shape… even on player itself (from other objects), that is not possible with current scripted dynamic blender shadow technique, as far as i know…

Wow, that shadow blows away all the other shadow examples I’ve seen, thanks.:eek:

nice. moar info plz

OK, I uploaded the second video (inspired by 3DGURU) and even demo file that can anybody use. To run it you’ll need GameBlender texture plug-in (linked on the top of the page).

To create this demo I did a lot of “hacking” - you’ll see whole setup in demo file. This technique can be extended for moving light and moving camera. It should work with armature animated objects, too. Soft shadows and other advanced techniques are question of pixel shader (I think, never tested it). Shadows through alpha objects are still problem, due to long hunted and still not found error in plug-in’s renderer.

This is great!

I can see BGE in the future, having a nice little tick box for “Real time stencil shadow” so it is as easy to use as Irrlicht or Crystalspace.

Real time shadows really make a nice game :slight_smile: I think it will definitely make developers flock to the BGE.

Now if we could only find someone to fix/make a new logic system we would be ready to make some AAA titles like the big boys :slight_smile:

your work really does rock ashsid! very nice improvement :slight_smile:
Thank you for sharing it with us :slight_smile:

The second shadow example makes this look even better:D

Maybe set it up to make it as easy as possible to get shadows going with a moving camera and moving lights, maybe have it done automatically with the chosen lights?

this crazy dude ! it’s a shame blender don’t allows big scale game because its becoming a really interesting engine

Ashsid I was wondering, how many shadows can you use with this? How much does each shadow drain from the frame rate? Would it be possible to light map a full scene (+50,000 polys) in real time using this? Can you use more than one light?

it’s a shame blender don’t allows big scale game because its becoming a really interesting engine

Blender can make large scale games. The only thing that might stop you from making a large scale game is the memory leaks. And even that is being worked on.

Bender is great.

Because you’re working on them alongside Ovidiu :wink:

The BGE will have a bit more capability when this and the BPPlayer gets done, 2.50 will be a golden release for the BGE at this rate.

Ok, I finally fingered out how to install this but when I try to run the blend file it crashes. When it crashes the console window displays this:

 
imported from text buffer...