The LK3D logo, with a blurred lightmaped cornell box behind it LK3D: GMod Rendering Library
Released on: (Mandrill Maze)
Last Update:


What is LK3D?

LK3D is a sub-par GMod rendering library, which is abstracted from the normal world
With it, you can render way more interesting graphics without needing to fiddle with Mesh objects

Have you used it for anything?

Currently, the only released project which uses LK3D is Mandrill Maze
Including unreleased / unfinished projects, it is used for Deep Dive and Point Of No Return

What makes LK3D unique?

The only thing that makes LK3D unique is how distinct it is from the stock GMod rendering
The plethora of extra features also contribute to it, aslong with it's capacity to create procedural textures, albeit a bit broken currently

Can i see a snippet of LK3D code?

Sure! Here's an example of a simple scene being drawn to an RT!

-- Basic LK3D render to RT
-- This assumes LK3D was already loaded

-- Create the universe
local univGame = LK3D.NewUniverse("universe_LK3DBasic")

-- we push the universe to add stuff to it
LK3D.PushUniverse(univGame)
	-- we add a cube and set a few parameters
	LK3D.AddObjectToUniverse("cube", "cube_nuv")
	LK3D.SetObjectPosAng("cube", Vector(0, 0, 0), Angle(0, 0, 0))
	LK3D.SetObjectScale("cube", Vector(1, 1, 1))
	LK3D.SetObjectMat("cube", "checker")
	LK3D.SetObjectFlag("cube", "NO_SHADING", false)
	LK3D.SetObjectFlag("cube", "NO_LIGHTING", true)
	LK3D.SetObjectFlag("cube", "CONSTANT", true)
LK3D.PopUniverse()

-- now draw

-- make the RT we want to draw to
local rtRender = GetRenderTarget("RTRender_LK3DBasic", 512, 512)


-- set up renderer
LK3D.SetCamFOV(90)
LK3D.SetRenderer(LK3D_RENDER_HARD)
LK3D.SetCamPos(Vector(-4, 0, 0)) -- Move the camera back so we can see the cube

LK3D.PushUniverse(univGame) -- push the universe we want to render 
LK3D.PushRenderTarget(rtRender) -- push the RT we want to render to
	LK3D.RenderClear(32, 64, 96) -- clear to a nice colour, also clearing depth
	LK3D.RenderActiveUniverse() -- render
LK3D.PopRenderTarget() -- pop all previously pushed
LK3D.PopUniverse()

Can i see screenshots?

Yes! These are taken from various LK3D gamemodes

The mandrill maze Deep Dive, Wall spray painted Deep Dive, View of the control panel Point Of No Return, A cornell box Point Of No Return, The main menu Point Of No Return, The wrong map snow road

Where can i find a download?

You can download the source code on GitHub
Currently, the only released gamemode that uses LK3D is Mandrill Maze