Hand made shadows with jme

Hi everybody,



I want to know if someone has created shadows for their apps.



I use the jme physics and I’m asking myself how to integrate shadows with my controllers… The shadows i want would not be dynamic but a simple approximation of real shadows… So if someone wants to give some advice on that, fell free to give your ideas…



Thanks

Ken

MikeT implemented dynamic shadow volumes a while back. However it hasn’t yet gotten implemented into jME, due to some design issues. It probably will in some later release.

http://jmonkeyengine.com/jmeforum/viewtopic.php?t=1271



But from the sounds of it, you just want to make static shadows? Then this probably falls into the responsibility of map formats and editors, which has been discussed a little all over the board. Nothing is completed though :frowning:

Huh ? I posted a reply to this thread some hours ago but it’s not here… Mayb e a bug…



If you want static shadows, look into lightmaps. It works very well on all video card (it only use multi-texturing). Quake 3 was one of the first game using it and it was very good looking.



It’s pretty easy to use :



First, map a simple texture like this one :







Them add another texture slot on the same object. The lightmap texture should be modulated (or multiplicated, don’t remember) :







And you get this :







You can find a lot of useful informations in google. Give a try :slight_smile:



Chman

Thanks for the help with the lightmaps but I don’t think that will do the job for my needs…



I need a shadow for a tennis ball when I hit the ball and it flies in the air,

I want a shadow on the tennis court to help the user see the height of the ball. I’ ve already done that with j3d by offseting a black circle on the court by the distance from the ball to the ground …



ex : if the ball is 10 in y from the ground, I offset the black circle by 5 in z and 5 in x so it appears to be a shadow of the ball on the ground.



I am just not shure how to implement this kind of logic with a Ballcontroller I created to move the ball… I don’ t like the idea of managing that a part from the controller if there is a simple way i could attach it to my ball and let the controller place the shadow…





I hope it’s clear enough…



thanks…