Gamestudio Links
Zorro Links
Newest Posts
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
Data from CSV not parsed correctly
by jcl. 04/20/24 08:32
Zorro FIX plugin - Experimental
by jcl. 04/20/24 08:30
folder management functions
by VoroneTZ. 04/17/24 06:52
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (7th_zorro, Aku_Aku, 1 invisible), 579 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, howardR, 11honza11, ccorrea, sakolin
19047 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Decal shadows problem #366248
04/02/11 11:28
04/02/11 11:28
Joined: Jul 2004
Posts: 785
Serbia
Iglarion Offline OP
User
Iglarion  Offline 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 crazy

Re: Decal shadows problem [Re: Iglarion] #366251
04/02/11 11:55
04/02/11 11:55
Joined: Nov 2008
Posts: 216
J
jane Offline
Member
jane  Offline
Member
J

Joined: Nov 2008
Posts: 216
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);
}
}

Re: Decal shadows problem [Re: jane] #366257
04/02/11 12:26
04/02/11 12:26
Joined: Jul 2004
Posts: 785
Serbia
Iglarion Offline OP
User
Iglarion  Offline OP
User

Joined: Jul 2004
Posts: 785
Serbia
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?).

Re: Decal shadows problem [Re: Iglarion] #366259
04/02/11 13:47
04/02/11 13:47
Joined: Nov 2008
Posts: 216
J
jane Offline
Member
jane  Offline
Member
J

Joined: Nov 2008
Posts: 216
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

Last edited by jane; 04/02/11 14:35.
Re: Decal shadows problem [Re: jane] #366272
04/02/11 15:10
04/02/11 15:10
Joined: Jul 2004
Posts: 785
Serbia
Iglarion Offline OP
User
Iglarion  Offline OP
User

Joined: Jul 2004
Posts: 785
Serbia
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?


Re: Decal shadows problem [Re: Iglarion] #366295
04/02/11 17:21
04/02/11 17:21
Joined: Nov 2008
Posts: 216
J
jane Offline
Member
jane  Offline
Member
J

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: jane] #366302
04/02/11 18:05
04/02/11 18:05
Joined: Jul 2004
Posts: 785
Serbia
Iglarion Offline OP
User
Iglarion  Offline OP
User

Joined: Jul 2004
Posts: 785
Serbia
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?


IGRAVISION Page - www.igravision.com
RPG project - The Battle For Forgol 92.75%
Re: Decal shadows problem [Re: Iglarion] #366336
04/02/11 21:46
04/02/11 21:46
Joined: Nov 2008
Posts: 216
J
jane Offline
Member
jane  Offline
Member
J

Joined: Nov 2008
Posts: 216
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;
}




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 Offline OP
User
Iglarion  Offline 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
J
jane Offline
Member
jane  Offline
Member
J

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.
Page 1 of 2 1 2

Moderated by  HeelX, Spirit 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1