I've been working on a script that essentially places billboard images of my choosing over the billboards of Evocity V2d. After spending some time getting the coordinates and tweeking the coordinates yesterday, I finally put up a picture with surface.DrawTexturedRect inside of a cam.3D2D. When I got the picture finally rendered, I noticed it had a wierd almost like shadowy thing covering it as I moved around. I converted the picture from a .png to a .vtf and .vmt using VTFEdit with the default settings. It doesn't return any errors at all, any idea whats wrong?
[b] My Code [/b]
[LUA] function GM:PostDrawOpaqueRenderables(drawingDepth, drawingSkybox)
if (!drawingSkybox) then
cam.Start3D(EyePos(), EyeAngles())
-- One
local position = Vector(-7847.8687, -7728.4404, 930.2415)
local angles = Angle(0, 90, 90)
local scale = 0.4375
tex = surface.GetTextureID("billboards/Billboard1")
cam.Start3D2D(position, angles, scale);
surface.SetTexture(tex)
surface.SetDrawColor(255,255,255,255)
surface.DrawTexturedRect(0, 0, 512, 256)
cam.End3D2D();
end
end
[/LUA]
[b] Pictures of the phenomenon [/b]
Don't know how to do the image thumb and that other image BB format, could someone post the codes for that?
[IMG]http://oi56.tinypic.com/33y194z.jpg[/IMG]
[IMG]http://oi55.tinypic.com/2nir2bc.jpg[/IMG]
Why are you layering a cam.Start3D2D() inside a cam.Start3D()?
And you never end your cam.Start3D() either.
Post the content's of your billboard's VMT please.
I think the shader needs to be changed.
[CODE]
"LightmappedGeneric"
{
"$basetexture" "billboards/Billboard1"
"$translucent" 1
}
[/CODE]
Contents of the .vmt file.
And yeah, I only pasted part of the code, and the cam.End3d() was omitted. I layered the cam.Start3D2D because I'm currently drawing multiple billboards(eleven in all) inside of one cam.Start3d().
Try this for a .vmt
"UnlitGeneric"
{
"$basetexture" "billboards/Billboard1"
"$nolod" 1
"$vertexalpha" 1
"$vertexcolor" 1
}
Worked, thanks man.
Sorry, you need to Log In to post a reply to this thread.