Hi,
I'm currently trying to change some map textures ingame with lua to the skybox texture.
I hope I could render the skybox on those textures.
Here is what I tried :
[CODE]Textures = {
{"maps/gm_construct_m_128/dev/dev_blendmeasure_wvt_patch", "TOOLS/TOOLSSKYBOX"},
{"DEV/DEV_MEASUREWALL01D", "TOOLS/TOOLSSKYBOX"},
}
function ApplyTextures()
for k, v in pairs(Textures) do
if v and v[1] and v[2] then
OldMat = Material(v[1])
NewMat = Material(v[2])
OldMat:SetTexture("$basetexture", NewMat:GetTexture("$basetexture"))
OldMat:SetTexture("$bumpmap", NewMat:GetTexture("$bumpmap"))
OldMat:Recompute()
NewMat:Recompute()
end
end
end
[/CODE]
Unfortunately, this isn't working. The textures are changed to that :
[url]http://steamcommunity.com/sharedfiles/filedetails/?id=581828342[/url]
Can somebody help me please ?
Somebody told me that we might can't do that. Can anyone confirm please ?
I'm pretty sure that TOOLS/TOOLSSKYBOX is used in hammer as a temporary alias. Then when the map is compiled its replaced.
[QUOTE=rtm516;49381442]I'm pretty sure that TOOLS/TOOLSSKYBOX is used in hammer as a temporary alias. Then when the map is compiled its replaced.[/QUOTE]
[CODE]print( LocalPlayer():GetEyeTrace.HitTexture )[/CODE]
returns 'TOOLS/TOOLSSKYBOX'
I don't understand how gmod/source renders the sky then
This should probably go in the "Mapping" Forum. Not developing. You are making a map.
[QUOTE=IamBrett;49384462]This should probably go in the "Mapping" Forum. Not developing. You are making a map.[/QUOTE]
Wrong, he wants to replace map materials on his map using gLua, so it belongs to both, mapping and development.
Sorry, you need to Log In to post a reply to this thread.