Decal shadows problem

Posted By: Iglarion

Decal shadows problem - 04/02/11 11:28

I have a problem with the decal shadows if i use an animated scene, which in itself has the frames that slightly deviate from the central position in the MED, or coming out of its initial position, then shadow size follow new hull size of my current player frame. The example, I have a shield in my player model that at some point a player can throw and hit the enemy.
After this, the size of the player shadow get a new size, which is proportional to the size of hull my attack animation scene.
Here is picture where we can see my problem:

http://img820.imageshack.us/i/shadowproblem.jpg/

For the size of the collision hull in my player code i use FAT flag = OFF and NARROW = ON.

How to call a deacal shadow size only from the first frame all the time, i think then it would not have this problem?

Sorry about my bad english crazy
Posted By: jane

Re: Decal shadows problem - 04/02/11 11:55

for the decal-shadow use a sprite

ENTITY* player_shadow = { type = "your_shadow_sprite.tga";}

action player()
{
set(my,SHADOW);
my.shadow = player_shadow;
while(1)
{
player_shadow.scale_x = 0.5;
player_shadow.scale_y = player_shadow.scale_x;
wait(1);
}
}
Posted By: Iglarion

Re: Decal shadows problem - 04/02/11 12:26

Thank you Jane for replay.
But this wont work, decal shadow again call default shadow sprite from A8 folder, and i again have same problems. I really hate new decal shadow system in A8 (or i missed something?).
Posted By: jane

Re: Decal shadows problem - 04/02/11 13:47

how you can see this works without problems

http://www.imgbox.de/show/img/NTboO1gL1z.jpg


Edit:

ok, problem: the sprite dont react on scale_x, scale_y
Posted By: Iglarion

Re: Decal shadows problem - 04/02/11 15:10

Yes I'm wrong when i said that it reloads the shadow sprite from defuult folder A8, sprite has changed but had no effect on scale_x/y and then i was think that default sprite is load.
There must be some way to keep whole time scale x/y of my shadow sprite?

Posted By: jane

Re: Decal shadows problem - 04/02/11 17:21

the easiest way is to make a simple invisible passable cubemodel on the player position and let them create the shadow
Posted By: Iglarion

Re: Decal shadows problem - 04/02/11 18:05

Yes Jane, i thinking about this and also about make my own shadow code, but why... i still cant belive that there are no other options for this...

Maybe JCL have some solution?
Posted By: jane

Re: Decal shadows problem - 04/02/11 21:46

here a pic with small and big hull, the Decalshadow remains equal.

http://www.imgbox.de/show/img/zn1SgBk7e8.jpg

you have to set shadow_stencil = 4;

and the player:

Code:
ENTITY* player_shadow = { type = "your_shadow_sprite.tga";}

action player()
{
set(my,SHADOW);
my.shadow = player_shadow;
}



Posted By: Iglarion

Re: Decal shadows problem - 04/02/11 22:26

Hi Jane,
problem is i cant set stencil shadow this will >KILL< frame rate in my big levels, and this is reason why i need decal shadows.
My hull not changed after i play attack animation, only sprite scale x/y:

http://img8.imageshack.us/i/shadowproblem2.jpg/

I do not know how decal shadow take size for my player, but if i have frames like in first picture from MED, then shadow sprite get scale of this frame - distance of the player to the final point where ends flying of shild.


Posted By: jane

Re: Decal shadows problem - 04/02/11 22:53

All models with "Shadow -Flag" must assigned a sprite, than "shadow_stencil = 4;" has no influence on the frame rate

with shadow_stencil = 0; is the same effect.

use my.shadow = player_shadow;

and the scale of decal is permanent


Posted By: Iglarion

Re: Decal shadows problem - 04/04/11 17:58

Thank you Jane very much for your time, but this also wont work. About second solution - attach invisible model to player, this also wont work beasuse invisible models cant cast shadow.

I also try delate shild from my player model and i attach shild troungt code, to one bone, like new model but i have same problem.

Ok, my next questions is:
1. Of which things precisely depends the scale x/y of my shadow sprite?
2. How resize sprite for decal shadows on one entity?
Posted By: jane

Re: Decal shadows problem - 04/05/11 11:58

you got a PM with a altrnative Decal-Shadows-Version while deactivated dynamic shadows ( shadow_stencil = -1; ), with lite-c works fine, i hope it work with c-script.
Posted By: Iglarion

Re: Decal shadows problem - 04/06/11 15:08

Thank you Jane for PM!

Please can we return only to the decal shadows. I already have some other options make my own shadow code in style old Z-buffer shadows, but i only want to know did in my chase i can use decal shadow or not?
Posted By: Iglarion

Re: Decal shadows problem - 04/07/11 22:40

Only to say problem solved when i back on version A8.03.2. Looks like a bug in decal shadows. I only can report this in bug section.
Posted By: Benni003

Re: Decal shadows problem - 05/04/11 15:45

I have also this problem.
I need to make the decal shadows smaller. But if I use scale it's not working.
Does anyone know how it works? It's very important....
Posted By: ratchet

Re: Decal shadows problem - 05/05/11 12:35

@Iglarion :

Why not using a simple rounded blob under the player ,
with the DECAL system ?

This the way used for performance , even in some AAA Games on PC.
Posted By: Benni003

Re: Decal shadows problem - 05/05/11 13:10

Yes, I can do it, but why we have the decal shadows when we can't use them ( scale them) ??
Posted By: Iglarion

Re: Decal shadows problem - 05/05/11 18:33

@Ratchet
Benni has just answered for me laugh

Anyway, now i do not have this problem, and for every problem there is more solution, but i hate when something is so simple - become so complcated...
Like Benni say if A8 have decal shadows we want use decal shadows - without any problem in any situation.
Posted By: Benni003

Re: Decal shadows problem - 05/07/11 15:21

Please JCL,
make the decal shadows good working!
© 2024 lite-C Forums