|
|
Decal shadows problem
#366248
04/02/11 11:28
04/02/11 11:28
|
Joined: Jul 2004
Posts: 785 Serbia
Iglarion
OP
User
|
OP
User
Joined: Jul 2004
Posts: 785
Serbia
|
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
|
|
|
Re: Decal shadows problem
[Re: Iglarion]
#366259
04/02/11 13:47
04/02/11 13:47
|
Joined: Nov 2008
Posts: 216
jane
Member
|
Member
Joined: Nov 2008
Posts: 216
|
how you can see this works without problems http://www.imgbox.de/show/img/NTboO1gL1z.jpgEdit: ok, problem: the sprite dont react on scale_x, scale_y
Last edited by jane; 04/02/11 14:35.
|
|
|
Re: Decal shadows problem
[Re: Iglarion]
#366295
04/02/11 17:21
04/02/11 17:21
|
Joined: Nov 2008
Posts: 216
jane
Member
|
Member
Joined: Nov 2008
Posts: 216
|
the easiest way is to make a simple invisible passable cubemodel on the player position and let them create the shadow
Last edited by jane; 04/02/11 17:23.
|
|
|
Re: Decal shadows problem
[Re: Iglarion]
#366336
04/02/11 21:46
04/02/11 21:46
|
Joined: Nov 2008
Posts: 216
jane
Member
|
Member
Joined: Nov 2008
Posts: 216
|
here a pic with small and big hull, the Decalshadow remains equal. http://www.imgbox.de/show/img/zn1SgBk7e8.jpgyou have to set shadow_stencil = 4; and the player:
ENTITY* player_shadow = { type = "your_shadow_sprite.tga";}
action player()
{
set(my,SHADOW);
my.shadow = player_shadow;
}
Last edited by jane; 04/02/11 21:57.
|
|
|
Re: Decal shadows problem
[Re: jane]
#366339
04/02/11 22:26
04/02/11 22:26
|
Joined: Jul 2004
Posts: 785 Serbia
Iglarion
OP
User
|
OP
User
Joined: Jul 2004
Posts: 785
Serbia
|
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.
|
|
|
Re: Decal shadows problem
[Re: Iglarion]
#366343
04/02/11 22:53
04/02/11 22:53
|
Joined: Nov 2008
Posts: 216
jane
Member
|
Member
Joined: Nov 2008
Posts: 216
|
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
Last edited by jane; 04/02/11 23:35.
|
|
|
Re: Decal shadows problem
[Re: Benni003]
#369635
05/05/11 18:33
05/05/11 18:33
|
Joined: Jul 2004
Posts: 785 Serbia
Iglarion
OP
User
|
OP
User
Joined: Jul 2004
Posts: 785
Serbia
|
@Ratchet Benni has just answered for me  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.
|
|
|
|