Skip to content

Superimposition textures to object #1709

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Disinterpreter opened this issue Oct 12, 2020 · 2 comments
Open

Superimposition textures to object #1709

Disinterpreter opened this issue Oct 12, 2020 · 2 comments
Labels
enhancement New feature or request

Comments

@Disinterpreter
Copy link
Member

Is your feature request related to a problem? Please describe.
We have the issue multitheftauto/amx#23 and I think we should implement this feature in MTA.

Describe the solution you'd like
In nutshell, we haven't functions that can attach the texture or text to object.

I'd like to make two functions in clientside like

dxSetTextureObject(objectid, materialindex, modelid, txdname, texturename, materialcolor)

dxSetTextureObjectText(objectid, text, materialindex = 0, materialsize = OBJECT_MATERIAL_SIZE_256x128, fontface = "Arial", fontsize = 24, bold = 1, fontcolor = 0xFFFFFFFF, backcolor = 0, textalignment = 0)

Describe alternatives you've considered
-

Additional context
https://wiki.open.mp/docs/scripting/functions/SetObjectMaterial
https://wiki.open.mp/docs/scripting/functions/SetObjectMaterialText
https://forum.gamerxserver.com/forum/samp-server-188-165-219-63-8800/questions-and-answers/tutorials/2907-object-material-tutorial-spoma

My function's names and arguments can be bad and inconvenient.
You can call it different name.

@Disinterpreter Disinterpreter added the enhancement New feature or request label Oct 12, 2020
@Pirulax
Copy link
Contributor

Pirulax commented Oct 13, 2020

engineGetModelTextures + a texture replacement shader (with color overlay if you wish)

@AlexTMjugador
Copy link
Member

AlexTMjugador commented Oct 13, 2020

I agree a shader could be the way to go, and I think it is easy to both change the texture color and the texture itself with it. However, how does SetObjectMaterialText work? Does it add a simple text texture on top of the already existing texture, which can then be drawn on existing geometry via shaders? How does it compute where the text goes? The links you provided only show how texture replacement works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants