# Math Problem at shadow volumes

hehe… As you all know here is an other problem at my shadow volume project…i think its a math problem…
I have an freezed object. And I have a light. THen the shadow is correct. now if I try to move the object(using a rotate,translate) the shadow remains at the same place. this is correct because the actuam vertex position of the silhuette does not change. now before I draw the shadow volume I do this: glMultMatrixf(primitive->prMatrix); Now the shadow moves while the object moves but not correct.

I try to just multiply the light position with the objects matrix and then pass the resulting light position in the draw shadow volume function but the result is not correct.

anyidea what is wrong?

nah… forget it… found it… just forgot to multiply the light position with the objects matrix(inverse) when calculating silhuette…

well… not fixed it 100%. I have a little problem… the shadows behaves like the object is always at (0,0,0) of the world. If I place the object at worlds(0,0,0) the shadow is perfect. if dont place it at (0,0,0) then the shadow behaves like it is at (0,0,0). Strange… Maybe have some mistake somewere else.

what I do until now is:
get the inverse matrix of the object and multiply it with the lights position. then I pass the new light coords in the Calculate silhuette edges function.
after this I draw the shadow volumes using the new light coords.
is this way correct? or I miss something?

You must rebuild shadow volume when you moving lights or objects

Interesting, what foreigners think about Russia?

24 hours left and nothing bad posted, it`s good…
or YOU have something very bad to say?

I live in Russia - are you hate me and my country now? Tell me the truth.
Waiting…

Originally posted by C++:
I live in Russia - are you hate me and my country now? Tell me the truth.
Waiting…

I can’t believe.
I don’t think this Forums related about country
or politics…

Originally posted by C++:
I live in Russia - are you hate me and my country now? Tell me the truth.
Waiting…

Did you ever think that maybe unreal hasn’t been online for a while?

STFU and stop looking for gratification.

ooh my god! What are you saying man? I just haven’t been on line for a while. I dont hate you or your country man. I had a lot of works to do and i didnt had the time to check the forum.
peace!
I finaly fix the problem. i was moving the light into object space wrong. now I fix it and i works.
thanks anyway.