Page 1 of 1

Shadow Beneath a Player

Posted: Tue Aug 17, 2010 2:23 pm
by rabbit
Greetings Irrlicht community,

I would like to draw a 2d texture onto the surface beneath a player in irrlicht. How do I do it?

Any and all wisdom on this topic welcomed on this topic.

Here is a diagram to help clarify what I mean.
Image

Posted: Tue Aug 17, 2010 4:25 pm
by Iyad
You can use the IShadowVolumeSceneNode, or you can use XEffects, its much more efficient. http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=30631

You could also try to make your own shader, but it will take you much more time.

Posted: Tue Aug 17, 2010 4:32 pm
by stefbuet
You can use projective textures if you don't want to use real shadows.
An OpenGL exemple can be found on this forum, using shaders.

Posted: Thu Aug 19, 2010 11:50 am
by stefbuet
Projective texture here :
http://irrlicht.sourceforge.net/phpBB2/ ... sc&start=0

However sources are down for now.

Posted: Thu Aug 19, 2010 2:11 pm
by vectorcorpse
i think this is what u want:
http://www.opengl.org/resources/code/sa ... index.html
unfortunatly i don't see how to get this implemented in the engine
blindside showed some screenshots of a old patch of his http://irrlicht.sourceforge.net/phpBB2/ ... 13&start=0 that implemented projective texures but he never released the patch.
maybe someone more skilled on the inners of the engine than me can figure out a way to merge the opengl sample (i don't give a sh** about directx but then again if u'r considering directx u can always use shaders do get arround this)

Posted: Fri Aug 20, 2010 11:15 am
by BlindSide
vectorcorpse wrote: blindside showed some screenshots of a old patch of his http://irrlicht.sourceforge.net/phpBB2/ ... 13&start=0 that implemented projective texures but he never released the patch.
Yes sorry, as the engine kept getting updated, everytime I merged my code parts of the code kept breaking, and I was further away from finishing it everytime I sat down to work on it. I can PM you what I have but I don't know if it will be that useful.

Posted: Fri Aug 20, 2010 5:47 pm
by vectorcorpse
shure pls do (i'll try my best to help) :) don't take it has a attack. i only think that if u release a patch let's say for irrlicht 1.3 or 1.4 in a post, even if u don't get the time to update the patch, there is a good change someone else can fix it for newer versions or at least someone may sugest or provide code and/or solutions u can use, and either way u'll still get the well deserved credit has this is a powerfull feature (at least i think so) for low end graphics (my laptop only supports opengl 1.4 and some computers that support shader model 2 and up sometimes don't have the processing power for high level graphics), 3d looks terrible with no shadows, and there are also other uses for projective textures, like light simulation or fun things like and animated shadow that moves diferentely than the model that was supposed to generate it (ex: peter pan self conscious running shadow)

Posted: Thu Sep 09, 2010 4:33 pm
by burningreggae
Uhh, yess please Blindside!
post your fixed function projective code please!
Thanks!
Burning