Jump to content

[Help] Paintjob system


Recommended Posts

Hello,

I'm planning to write a paintjob system. I already have a theory, and some of the work is already done, but I'm not sure that I'm doing it right.

I involved the following stuff:
- shader, engineApplyShaderToWorldTexture (on vehicle)
- element data (for vehicle)
- png files (the paintjobs)
- render target + dxDrawImage

When you select a paintjob (on client side, gui menu) it triggers a server side event (client sends the vehicle and the paintjob's id to server) Then server side sets an element data for the vehicle, the data is the paintjob's id. After that it triggers a client side event for all players, where the script applies the shader on the vehicle, creates a render target and uses dxdrawimage with on client render to draw the image/paintjob. It gets the paintjob's id by the vehicle's element data.

Is this a correct method, or it's a mess? This is my first project that involves shaders, etc, i'm new in this. Will there be performance loss? how much?
 

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...