1 registered members (AndrewAMD),
533
guests, and 2
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
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
OP
Serious User
|
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:
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:
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
Senior Expert
|
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.
|
|
|
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
X
|
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#Post446611Greets
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
OP
Serious User
|
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!
|
|
|
|