Gamestudio Links
Zorro Links
Newest Posts
FXCM demo test failed
by qin. 01/13/26 13:53
Camera always moves upwards?
by NeoDumont. 01/12/26 09:39
Alpaca Plugin v1.5.2 Release
by kzhao. 01/11/26 13:42
Alpaca Plugin v1.4.0
by kzhao. 01/11/26 13:38
separating groups of 3 digits by a comma
by joe_kane. 01/11/26 00:01
MRC.c and WFO
by joe_kane. 01/10/26 23:58
BarOffset (default = 940 for daily bars?
by joe_kane. 01/10/26 23:46
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (Quad), 6,361 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
promfast, joe_kane, Namitha_NN, Syndrela, agasior
19190 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Decal problem with projection texture A8 and A7 #379479
08/03/11 08:02
08/03/11 08:02
Joined: May 2009
Posts: 5,377
Caucasus
3run Offline OP
Senior Expert
3run  Offline OP
Senior Expert

Joined: May 2009
Posts: 5,377
Caucasus
So, no one answered this in previous thread, thats why I've decided to ask it here...
I'm using modified flashlight made by XdiVo (you can find it on Wiki), and I've assigned materials to blocks and models.
And now, I'm trying to place decals on that blocks and models, but I faced problem that they aren't placed right (or may be just not visible).
I've set projection material on decals as well, thought that might help, but no luck, tried other materials as well (mtl_model etc)...
When I'm close to the walls, then I can place decals on them without any problems, but when I'm far from them, it's tricky (I get them placed very seldom)...
When I shoot to the floor, doesn't matter far or near, then I get properly placed decals... I faced this problem with both A8 and A7.
I thought the trick was to set same material to decals, but I was wrong I guess... Could you make this clear? How to place decals on models and blocks with material?


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: Decal problem with projection texture A8 and A7 [Re: 3run] #379480
08/03/11 08:27
08/03/11 08:27
Joined: Jul 2000
Posts: 28,051
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,051
Frankfurt
It is possible that decals don't work with a certain shader. For instance, when the shader uses a special vertex transformation with a different z depth, decals might become invisible.

In such a case, the decal needs a shader that takes the surface shader in consideration. For this you need to know what the surface shader does and how it affects decals. It depends on the shader - there is no schematic or automatic solution for this.

Re: Decal problem with projection texture A8 and A7 [Re: jcl] #379593
08/04/11 15:05
08/04/11 15:05
Joined: May 2009
Posts: 5,377
Caucasus
3run Offline OP
Senior Expert
3run  Offline OP
Senior Expert

Joined: May 2009
Posts: 5,377
Caucasus
Shader transforms the uv matrix to achieve the texture projection, but not the vertex itself (no shape deformation happened in the shader).
Plus from what I read from manual about decal, the shader shouldn't mess with texture1, which the shader does unfortunately.


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: Decal problem with projection texture A8 and A7 [Re: 3run] #379678
08/06/11 08:56
08/06/11 08:56
Joined: May 2009
Posts: 5,377
Caucasus
3run Offline OP
Senior Expert
3run  Offline OP
Senior Expert

Joined: May 2009
Posts: 5,377
Caucasus
So, has decal nothing to do with texture1? Or with UV matrix?!


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: Decal problem with projection texture A8 and A7 [Re: 3run] #379788
08/08/11 09:54
08/08/11 09:54
Joined: Jul 2000
Posts: 28,051
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,051
Frankfurt
No. When the decal has its own material, so that it does not use the surface material, it normally won't matter what the surface shader does. The exception is the above mentioned vertex transformation.

Re: Decal problem with projection texture A8 and A7 [Re: jcl] #379794
08/08/11 10:32
08/08/11 10:32
Joined: May 2009
Posts: 5,377
Caucasus
3run Offline OP
Senior Expert
3run  Offline OP
Senior Expert

Joined: May 2009
Posts: 5,377
Caucasus
Ohh... So what should be the fix for this? What should I do?


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: Decal problem with projection texture A8 and A7 [Re: 3run] #379815
08/08/11 14:35
08/08/11 14:35
Joined: Jul 2000
Posts: 28,051
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,051
Frankfurt
Well, if your decal does not work with your surface material, just give it another material.

Look in the example in the manual - it does exactly that. However if your decal won't work even with a normal material, you then need to look into what your surface shader does, find the reason of the problem, and fix it - for instance by writing a special shader for the decal.



Moderated by  old_bill, Tobias 

Gamestudio download | 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