Put a .vtf on a screen.

I want to put a .vtf on a screen, like this:


Any ideas?

Well you could hex the model and then modify the texture. I don’t know how to make a sent that displays stuff or vtf files but you can check on the wiki, it sure is there.

Wasen’t what I was looking for. Any other ideas?

I could see it working if you took something like the Wiremod screen and used its method of painting ui onto a mesh. Just replace the black background with a texture, if its at all possible.

You use cam.3d2d to draw the texture in 3d space

Make an entity use

Im still learning cam.3d2d but i believe thats what that picture is doing


Look at the cl_init.lua file in the Youtube Player entity (found here). It uses 3D2D to draw on the monitor you want, so I’d look at that.

Its not using 2D3D its using this

ENT.Author = “bekka”

ENT.ClassName = “td_s_welcome”
ENT.PrintName = “Tower Defense Lobby Welcome Screen”

ENT.Model = “models/props/cs_office/tv_plasma.mdl”

if (SERVER) then

function ENT:Initialize()
	self.Entity:SetUseType( SIMPLE_USE )


if (CLIENT) then
surface.CreateFont( “Arial”, 64, 700, true, false, “ScreenTitle” )

local tcol = Color( 0, 110, 200 )

function ENT:Initialize()
	pc_screen.Create( self.Entity )
	local screen = pc_screen.Get( self.Entity )
	screen:SetConfig( "plasma_screen" )
	screen:SetDrawCursor( false )
	local pn = screen:GetPanel()
	self.Panel = pn
	local ent = self
	function pn:Paint( x, y, w, h )
		ent:PaintPanel( x, y, w, h )

function ENT:PaintPanel( x, y, w, h )
	surface.SetDrawColor( 0, 0, 0, 255 )
	surface.DrawRect( x, y, w, h )
	draw.SimpleText("Welcome to the lobby", "ScreenTitle", x+(w*0.90), y+(h*0.05), tcol, TEXT_ALIGN_RIGHT, TEXT_ALIGN_TOP )
	draw.SimpleText("enjoy your stay!", "ScreenTitle", x+(w*0.80), y+(h*0.20), tcol, TEXT_ALIGN_RIGHT, TEXT_ALIGN_TOP )

function ENT:Draw()
	local screen = pc_screen.Get( self.Entity )
	if (screen:IsValid()) then screen:Paint() end

function ENT:Think()
	local pn = self.Panel
	if (pn && pn:IsValid()) then pn:CompleteThink() end
	local screen = pc_screen.Get( self.Entity )
	screen.ShouldAcceptMouseInput = false



ENT:PaintPanel() must be some kind of custom hook. Not entirely sure.

It Allows you to draw on the screen.

Yes I asked they use custom stuff from pc mod 3 (not yet released to the public), on those servers, but the base behind that is 3d2d.

It’s tower defence, thomasfn made tower defence and pcmod, so it’s custom