Shadow Beneath a Player

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!
Post Reply
rabbit
Posts: 15
Joined: Wed Sep 02, 2009 12:39 pm
Location: Sydney, Australia

Shadow Beneath a Player

Post 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
Iyad
Posts: 140
Joined: Sat Mar 07, 2009 1:18 am
Location: Montreal, Canada

Post 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.
Last edited by Iyad on Wed Aug 18, 2010 4:57 am, edited 1 time in total.
#include <Iyad.h>
stefbuet
Competition winner
Posts: 495
Joined: Sun Dec 09, 2007 4:13 pm
Location: france

Post 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.
stefbuet
Competition winner
Posts: 495
Joined: Sun Dec 09, 2007 4:13 pm
Location: france

Post by stefbuet »

Projective texture here :
http://irrlicht.sourceforge.net/phpBB2/ ... sc&start=0

However sources are down for now.
vectorcorpse
Posts: 86
Joined: Thu Feb 14, 2008 7:30 pm
Location: Portugal

Post 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)
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post 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.
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
vectorcorpse
Posts: 86
Joined: Thu Feb 14, 2008 7:30 pm
Location: Portugal

Post 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)
burningreggae
Posts: 66
Joined: Wed Oct 04, 2006 2:07 pm

Post by burningreggae »

Uhh, yess please Blindside!
post your fixed function projective code please!
Thanks!
Burning
burningreggae
Post Reply