Jump to content

Apply a shader to a vehicle's door?


[WR]Weed

Recommended Posts

Good Morning Community,

First of all I must say that my english isn't as good as yours, because I'm german ;)

So, now to my problem:

I know how to apply a texture-shader to a texture, but..

I wan't to apply an image on the vehicle, but only to the door.

I have an Army-faction an i want to put the Faction-sign on the faction-vehicles, on the doors..

Can anyone tell me how?

Link to comment

It is the same thing as applying a shader to any other thing. Find the texture name of the door and apply a shader to it, or you can edit the texture file (TXD) of the model and load it on the server.

By the way, you write English better than most people, don't worry :)

Link to comment
It is the same thing as applying a shader to any other thing. Find the texture name of the door and apply a shader to it, or you can edit the texture file (TXD) of the model and load it on the server.

Thank you!

But i dont want the image all around the door, only a little place of it ;)

I hope you understand what i mean :)

By the way, you write English better than most people, don't worry :)

Thank you :D

Link to comment
It is the same thing as applying a shader to any other thing. Find the texture name of the door and apply a shader to it, or you can edit the texture file (TXD) of the model and load it on the server.

Thank you!

But i dont want the image all around the door, only a little place of it ;)

I hope you understand what i mean :)

By the way, you write English better than most people, don't worry :)

Thank you :D

So, what's the problem? Just edit the door's texture and place the things where you want..

Link to comment

How about this ..

..

https://wiki.multitheftauto.com/wiki/DxCreateShader

1.Create a shader with 'layered' argument = true

That will create a shader "on top" of the vehicle texture.

https://wiki.multitheftauto.com/wiki/En ... rldTexture

2.Apply the shader only to a certain element (the 'targetElement' argument)

3.Create a texture with an alpha channel (.png is the best bet).

4. Add ' AddressU = Clamp; AddressV = Clamp; ' when declaring your sampler. , add ' AlphaBlendEnable = TRUE; DepthBias = -0.0003; AlphaRef = 1; ' in your 'pass P0 { }'

5.Try to maniputate UV's ( ' + ' and ' * ' them all texture coordinates) and rotation (if you have to - you find that in shader examples) to make the effect the way you want - (might have to make a small gui to get the proper values).

6.PROFIT ?

...or skip what i said and use https://wiki.multitheftauto.com/wiki/Dx ... rialLine3D

as mentioned before

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...