Replacing a Map Texture with a Transparent Texture
5 replies, posted
For the past hour I've been attempting to replace a maps texture with my own to make the walls transparent.
[lua]
local noDrawTex = CreateMaterial("NoDrawTex", "UnlitGeneric", {
["$basetexture"] = "vgui/black",
["$translucent"] = 1,
["$alpha"] = 0
})
-- GM_CONSTRUCT/CONSTRUCT_CONCRETE_GROUND
-- GM_CONSTRUCT/CONSTRUCT_CONCRETE_FLOOR
-- BUILDING_TEMPLATE/ROOF_TEMPLATE001A
Material("BUILDING_TEMPLATE/ROOF_TEMPLATE001A"):SetTexture("$basetexture", noDrawTex:GetTexture("$basetexture"))
Material("BUILDING_TEMPLATE/ROOF_TEMPLATE001A"):SetTexture("$bumpmap", noDrawTex:GetTexture("$basetexture"))
[/lua]
This is the the result that I don't want:
[img_thumb]http://puu.sh/6l8ma.jpg[/img_thumb]
How can I make the material transparent?
"Make the walls transparent", yet you replace floor texture.
You are using incorrect shader for one.
[QUOTE=Robotboy655;43543305]You are using incorrect shader for one.[/QUOTE]
Give an example then?
I did have a vtf earlier with a fully transparent effect and when I applied it, it still did the same thing as vgui/black.
VertexLitGeneric
[editline]15th January 2014[/editline]
Then you do $vertexalpha 1 and $vertexcolor 1 and maybe something will show up.
[QUOTE=Robotboy655;43543655]VertexLitGeneric
[editline]15th January 2014[/editline]
Then you do $vertexalpha 1 and $vertexcolor 1 and maybe something will show up.[/QUOTE]
Tried what you said and I still have the same thing.
I also did "Material("BUILDING_TEMPLATE/ROOF_TEMPLATE001A"):SetFloat("$alpha", 0)" and that made the texture clear, but I could see the 3d skybox.
I'm just going to assume that I need my own custom map to do this.
Sorry, you need to Log In to post a reply to this thread.