Jump to content

texture replacement in map editor


eveneme

Recommended Posts

I am looking for a easy-to-use script that I could run, or an alternative map editor, that would allow me to retexture my objects live (using in-game textures only). Is there anything like that out there?

Edited by eveneme
Link to comment

if you mean you want to edit texture live on map editor i think this is a hard s*it
you want a script that can run txd and can export images from it and then you need
to make photoshop in the game and add to the map editor 
and a lot of another s*it i skipped 
in another word .. 
you need a bad ass scripter that know more than lua 

Edited by 3laa33
Link to comment

I'm not a scripter myself so I don't know, but as it's already been done long time ago in sa-mp, which makes me think it's not like a big challange (since sa-mp is pretty poor in terms of scripting). The script's called Texture Studio

w

 

4 hours ago, CodyJ(L) said:

Or you can simple as this, use shaders .- a 'bad ass' scripter that knows more than lua 

 

what do you mean?

Link to comment
  • Moderators

There is no tool that does what you want afaik.

 

But there is a tool that can help you identify the texture names:

shader_tex_names

 


Which you can use in scripts like this:

Shader

{
	pass P0
	{
		Texture[0] = gTexture;
	}
}

Script

addEventHandler( "onClientResourceStart", resourceRoot,
function ()
	local textureReplacementsTable = {
		{"bullethitsmoke", "dds" , "dxt5"},
		{"collisionsmoke", "dds" , "dxt5"},
		{"bloodpool_64", "dds" , "dxt5"}
	}
	
	for i=1,#textureReplacementsTable do
		local textureData = textureReplacementsTable[i]
		local texShader = dxCreateShader ( "shaders/texreplace.fx" )
		if texShader then
			dxSetShaderValue(texShader,"gTexture",dxCreateTexture("textures/" .. textureData[1] .. "." .. textureData[2], textureData[3]))
			engineApplyShaderToWorldTexture(texShader, textureData[1])
		end
	end
	
end)

 

 

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