Gamestudio Links
Zorro Links
Newest Posts
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Data from CSV not parsed correctly
by EternallyCurious. 04/20/24 21:39
M1 Oversampling
by 11honza11. 04/20/24 20:57
Scripts not found
by juergen_wue. 04/20/24 18:51
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
folder management functions
by VoroneTZ. 04/17/24 06:52
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 533 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, howardR, 11honza11, ccorrea, sakolin
19047 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Ent_Decal on bone animated models, leaving non-updated decals #462721
10/22/16 22:31
10/22/16 22:31
Joined: Apr 2002
Posts: 1,246
ny
jumpman Offline OP
Serious User
jumpman  Offline OP
Serious User

Joined: Apr 2002
Posts: 1,246
ny
Hi, I am using A8 Pro 8.47. I have a youtube video on the bottom as well.

I am placing a blood TGA file onto an animated model entity using the ent_decal code from the manual, but I am running into a glitch. Once in a while, part of the decal will not update, which makes decal polygons float in the air, while the model is animated.

here is the ent_decal code:
Code:
particle_mode = 4;

...

result=c_trace(camera.x,cam_mouse_screen.x,IGNORE_ME|IGNORE_PASSABLE|ACTIVATE_SHOOT|IGNORE_CONTENT|SCAN_TEXTURE|USE_POLYGON); 	
	

 if (HIT_TARGET) // target hit?
{
         	
if(you==NULL)
{

         	
PARTICLE* p = ent_decal(NULL,test_decal,217+random(3),random(360)); // place a random sized decal at the hit entity 
            p.lifespan = 160;   // remove decal after 100 seconds
            	
}


else

{
				 
PARTICLE* p = ent_decal(you,test_decal,217+random(3),random(360)); // place a random sized decal at the hit entity 
            p.lifespan = 160;   // remove decal after 100 seconds	
				}
 
            
             
         }




Here is the animated entity code:
Code:
action test_animate_simple()
 {
 	
 
 var animsa;
 	
 	while(1)
 	{
 		
 		
 	ent_animate(me,"run",animsa, ANM_CYCLE);
 		animsa+=5*time_step;
 		animsa%=100;
 		
 		
 		wait(1);
 	}
 	
 	
 	
 	
}



Video Example
[video:youtube]https://www.youtube.com/watch?v=0_kLlK1RXFo[/video]

Re: Ent_Decal on bone animated models, leaving non-updated decals [Re: jumpman] #462726
10/23/16 09:34
10/23/16 09:34
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
Well, it works perfectly fine for me (with both bone/vertex animated models).
Here is an example for you:
Download link

Best regards.


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: Ent_Decal on bone animated models, leaving non-updated decals [Re: 3run] #462728
10/23/16 11:34
10/23/16 11:34
Joined: Jul 2008
Posts: 2,107
Germany
rayp Offline

X
rayp  Offline

X

Joined: Jul 2008
Posts: 2,107
Germany
It does not work if you use different meshes with entaninatefrom.

But without entanimatefrom and one mesh it works correct like 3run said

This bug is known by jcl. I found it. But it seams to complex to remove.

Here u can read more
http://www.opserver.de/ubb7/ubbthreads.php?ubb=showflat&Number=446611#Post446611

Greets

Last edited by rayp; 10/23/16 11:37.

Acknex umgibt uns...zwischen Dir, mir, dem Stein dort...
"Hey Griswold ... where u gonna put a tree that big ?"
1998 i married my loved wife ... Sheeva from Mortal Kombat, not Evil-Lyn as might have been expected
rayp.flags |= UNTOUCHABLE;
Re: Ent_Decal on bone animated models, leaving non-updated decals [Re: rayp] #462733
10/23/16 19:47
10/23/16 19:47
Joined: Apr 2002
Posts: 1,246
ny
jumpman Offline OP
Serious User
jumpman  Offline OP
Serious User

Joined: Apr 2002
Posts: 1,246
ny
Hi friends!

@Rayp, Im not using entanimatefrom, but thank you!

@3run Ive played your test level, and ran it with my own model, and it works on your level!

After some tinkering, Ive noticed that if I set the decal to a very large size, say 500, it will cause parts of the decal to float. If I set it to around 150, the decals never glitch. I think it may be an oversize decal problem, if the decal is too big, it exceeds the model bounds(??) and doesnt update these decal polygons. I am not sure though.

" PARTICLE* p = ent_decal(you,test_decal,150,random(360));"

that seems to work!

3run, you can replicate this effect in your test level, by setting the decal size to 800! Then youll see an albiet cool effect, but glitch nontheless!

Re: Ent_Decal on bone animated models, leaving non-updated decals [Re: jumpman] #462735
10/23/16 20:00
10/23/16 20:00
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
Yep, it looks like some sort of oversizing glitch, but it only happens with one of the models. Here how it looks like:


Greets.


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: Ent_Decal on bone animated models, leaving non-updated decals [Re: 3run] #462738
10/23/16 22:11
10/23/16 22:11
Joined: Apr 2002
Posts: 1,246
ny
jumpman Offline OP
Serious User
jumpman  Offline OP
Serious User

Joined: Apr 2002
Posts: 1,246
ny
hmmm, it does it for both models in my copy of your test level.....

Re: Ent_Decal on bone animated models, leaving non-updated decals [Re: jumpman] #462739
10/23/16 22:22
10/23/16 22:22
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
Well, the screen above says opposite grin Anyway, I would recommend you to avoid using such huge numbers like 800 etc for setting sizes... Setting size to 1 means it's actual size 1:1 (as far as I understood), so it's better to have sprites with good resolution and avoid using huge numbers to scale them up. Don't provoke Acknex, you'll end up with unexplainable errors and bugs grin

Greets!


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: Ent_Decal on bone animated models, leaving non-updated decals [Re: 3run] #462740
10/23/16 23:50
10/23/16 23:50
Joined: Apr 2002
Posts: 1,246
ny
jumpman Offline OP
Serious User
jumpman  Offline OP
Serious User

Joined: Apr 2002
Posts: 1,246
ny
LOL will do 3run, thank you friend!

Re: Ent_Decal on bone animated models, leaving non-updated decals [Re: jumpman] #462833
10/31/16 11:01
10/31/16 11:01
Joined: Jul 2000
Posts: 27,982
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,982
Frankfurt
I suppose that it is a rounding error due to the extremely large scale. Avoid large scale factors.


Moderated by  jcl, Nems, Spirit, Tobias 

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