Gamestudio Links
Zorro Links
Newest Posts
Free Live Data for Zorro with Paper Trading?
by dr_panther. 05/18/24 11:01
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (7th_zorro, dr_panther), 724 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
ent_decal issue #339579
08/27/10 21:02
08/27/10 21:02
Joined: Jul 2009
Posts: 96
M
mEnTaL Offline OP
Junior Member
mEnTaL  Offline OP
Junior Member
M

Joined: Jul 2009
Posts: 96
Hi, it's me with my ent_decal problems again.
So, basicly what I am trying to do is a bullet which simply makes a hole when it hits a wall. And I did it this way:

Code:
......
VECTOR trace_target;
vec_set(trace_target,vector(50,0,0)); 	
vec_rotate(trace_target, me.pan);
vec_add(trace_target, me.x);
c_trace(me.x,trace_target, IGNORE_PASSABLE | USE_POLYGON | SCAN_TEXTURE );
PARTICLE* hole = ent_decal(you,bullethole,10,random(360));  
.......


But the SCAN_TEXTURE flag causes me a lot of problems and when I remove it the decal doesn't appear : ( . So, can you tell me how to do the same thing but without using this flag.
Thx : )

Re: ent_decal issue [Re: mEnTaL] #339580
08/27/10 21:08
08/27/10 21:08
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
What problems does scan_texture cause? Because it REQUIRED to ent_decal to work.


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: ent_decal issue [Re: EvilSOB] #339581
08/27/10 21:19
08/27/10 21:19
Joined: Jul 2009
Posts: 96
M
mEnTaL Offline OP
Junior Member
mEnTaL  Offline OP
Junior Member
M

Joined: Jul 2009
Posts: 96
When I use SCAN_TEXTURE the decal somehow takes the material from the model.
This is how the decal Should look:


And this is what happens when it is put on a terrain with Multi-texture shader:


It has some kind of a black-white square frame. When the decal is on a Non-material entity this problem doesn't exist. Any ideas ?

Re: ent_decal issue [Re: mEnTaL] #339585
08/27/10 21:54
08/27/10 21:54
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
Hmmm, it appears the shader is trying to multi-testure the decals...

Try changing your decals to be 32-bit TGA rather than BMP's.
OR
Try setting the decals TRANSLUCENT flag on. "set(hole, TRANSLUCENT);"
You may need to set its alpha up to 100 too.
OR
You may need to do both TGA and TRANSLUCENT...

If this doesnt help, I would take this issue to the SHADERS forum...


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: ent_decal issue [Re: EvilSOB] #339587
08/27/10 22:00
08/27/10 22:00
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
I just found this in the manual under ent_decal
Quote:

Decals are rendered with the entity or block material and shader unless they have an own material. The decal texture can be accessed through entSkin1 in a shader. If the shader is not suited for a decal - f.i. when entSkin1 is used for a color mask on a multitexture shader, or when the alpha channel is not used for transparency - assign a decal material without a shader, such as mat_model or mat_terrain dependent on which object the decal is attached to.



So CODEWISE, I would try this...
Code:
...
c_trace(me.x,trace_target, IGNORE_PASSABLE | USE_POLYGON | SCAN_TEXTURE );
PARTICLE* hole = ent_decal(you,bullethole,10,random(360));  
if(hit.texname)   {   hole.material = mat_model;   }
else              {   hole.material = mat_terrain;   }



Last edited by EvilSOB; 08/27/10 22:05.

"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: ent_decal issue [Re: EvilSOB] #339589
08/27/10 22:18
08/27/10 22:18
Joined: Jul 2009
Posts: 96
M
mEnTaL Offline OP
Junior Member
mEnTaL  Offline OP
Junior Member
M

Joined: Jul 2009
Posts: 96
Great laugh



Thanks, man

Re: ent_decal issue [Re: mEnTaL] #339598
08/27/10 23:05
08/27/10 23:05
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
So which one was it? The materials need setting (as in my last post)?


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: ent_decal issue [Re: EvilSOB] #339603
08/27/10 23:53
08/27/10 23:53
Joined: Jul 2009
Posts: 96
M
mEnTaL Offline OP
Junior Member
mEnTaL  Offline OP
Junior Member
M

Joined: Jul 2009
Posts: 96
Yes - it is because the decal needs an own material, otherwise it extracts the material settings from the model it is put on (I think this is pretty useless 3dgs feature...)

Re: ent_decal issue [Re: mEnTaL] #339607
08/28/10 00:36
08/28/10 00:36
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
No, its necessary to my mine.

1> you have a shader that applies a lighting effect. decals inherit the light level.

2> model has a shader thet deforms its surface, decals will inherit the change.

See what I mean?


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: ent_decal issue [Re: EvilSOB] #339625
08/28/10 10:48
08/28/10 10:48
Joined: Jul 2009
Posts: 96
M
mEnTaL Offline OP
Junior Member
mEnTaL  Offline OP
Junior Member
M

Joined: Jul 2009
Posts: 96
Yes, actualy it is needed for some purposes, but if you don't know about this little detail it can break your nerves.


Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

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