hyomin Posted October 24, 2015 Share Posted October 24, 2015 Is it possible to import more then one skin on one model? (Ex. add Spitfire and IL-10 on rustler to devide team) I hope it is possible i was searching it almost a day please give me the answer Link to comment
BluntZ Posted October 24, 2015 Share Posted October 24, 2015 Yes you can use shaders. Link to comment
hyomin Posted October 24, 2015 Author Share Posted October 24, 2015 Yes you can use shaders. THANKS!! Can you give me a little example or wiki link I couldn't find that on wiki I just started mta modding, have no clue Link to comment
TAPL Posted October 24, 2015 Share Posted October 24, 2015 Only txd is possible, dff not possible. With your skill level, this really out of your reach. Link to comment
hyomin Posted October 24, 2015 Author Share Posted October 24, 2015 Only txd is possible, dff not possible. With your skill level, this really out of your reach. Thanks, I guess I'll have to paint it myself Link to comment
Saml1er Posted October 24, 2015 Share Posted October 24, 2015 I wrote a simple script which loads txd and replaces textures using shaders. Right now I'm going to sleep, in morning I'll post it here. Here it is: addEventHandler( "onClientResourceStart", resourceRoot, function() local txd = engineLoadTXD ( "main.txd" ) engineImportTXD ( txd, 12990) t_shader, tec = dxCreateShader ( "uv_scripted.fx" ) -- Create texture and add to shader if t_shader then local myTexture = dxCreateTexture ( "example.png" ); dxSetShaderValue ( t_shader, "CUSTOMTEX0", myTexture ); else return outputChatBox ("Failed to create shader!") end local x,y,z = getElementPosition ( localPlayer ) local obj = createObject (12990,x+5,y+5,z ) -- create the object engineApplyShaderToWorldTexture ( t_shader, "wall2", obj ) end ) NOTE: This is just an example. I didn't include the dff file which is a custom object and it has a texture named "wall2". This example won't work because I have not included the dff file so replace this: engineApplyShaderToWorldTexture ( t_shader, "wall2", obj ) to engineApplyShaderToWorldTexture ( t_shader, "sw_jetty", obj ) -- this is the default txd name of this object If you're wondering if that's the case then you won't be able to use a txd file? the answer is no, YOU CAN USE IT only if you use the same TXD name for the image as default ones. If default txd name of the object is sw_jetty then you must name it to sw_jetty in txd file which you will create in TXD workshop. Remember wall2 is the texture name I used in the main.txd file If you're not loading a custom txd file but you simply want to replace the texture with a png or jpg texture then check objects ide ( txd and dff names) here: https://wiki.multitheftauto.com/wiki/IDE_List If you want try without using the main.txd file then simply remove wall2 form second arguement replace it with this: sw_jetty This is how it should look like: engineApplyShaderToWorldTexture ( t_shader, "sw_jetty", obj ) Also remember that image you are going to insert in txd file, its size should be 256x256 or 512x512 otherwise txd file will not work You can make your own txd file using TXD workshop, I bet you will find lots of tutorials in youtube for TXD workshop especially for MTA I uploaded the resource to mediafire. You can download it here: http://www.mediafire.com/download/ox08p ... tatest.rar EDIT: I forgot to add these lines in the resource but I hope you understand how it works. local txd = engineLoadTXD ( "main.txd" ) engineImportTXD ( txd, 12990) Link to comment
BluntZ Posted October 27, 2015 Share Posted October 27, 2015 Yes you can use shaders. THANKS!! Can you give me a little example or wiki link I couldn't find that on wiki I just started mta modding, have no clue You're welcome Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now