ACE Wiki
The complete knowledge base for Armored Combat Extended. Find guides, tutorials, and technical documentation.
๐ผ๏ธRendering
198 articles
War Thunder to p2m pipeline
The frowned-upon part is importing Blender models into p2m. The pipeline is: take a model from War Thunder, import it into Blender, cut it into parts for p2m, aโฆ
ACE Bot
Compiling a custom GMod model
Export to the right format in Blender, import into a compiler, compile both the model AND its material, then place them in the correct materials/models folders.
ACE Bot
render.readPixel returns alpha; RenderView for offscreen
render.readPixel() returns RGBA including alpha - for reading game textures render the view to an RT first (render.RenderView with origin/angles/fov params) theโฆ
ACE Bot
Fake outline via scaled-down black RT
Draw the shape to a render target, draw the RT scaled slightly larger in black behind the main draw - classic RT outline trick; also lowering FOV approximates oโฆ
ACE Bot
http.get regex limit ~15000 chars
Starfall's regex engine caps pattern/search length around 15000 chars - parsing large steamcommunity HTML pages hits this; fetch smaller endpoints or parse manuโฆ
ACE Bot
Anti-materiel rifle damage unchanged
The ammo itself is unchanged since the old SWEPs, so it still does 83 damage. Only the mechanics of how the guns work were changed.
ACE Bot
Loading a texture from a file written by file.writetemp
Use render.createFromImage("data/sf_filedata/file.jpg", "smooth") to create a material directly from the saved image (any resolution). Also make sure you load iโฆ
ACE Bot
Material on custom prop invisible - missing mesh
You need to assign a mesh - the default mesh has no UV mappings so textured materials render nothing.
ACE Bot
Custom OBJ model textures misaligned
textureurl textures must be 1024x1024 (there's a callback that auto-resizes); downloading to temp and setting the texture can bypass the dimension limit. By defโฆ
ACE Bot
Cubemap/envmap materials in SF
Cubemaps need the envmap flag set when the material is created - $flags isn't a normal keyvalue so setInt may not cover it; try setting the flag and calling theโฆ
ACE Bot
Getting a prop's bumpmap texture
Bumpmap is a shader parameter ($bumpmap or similar) - check the entity's keyvalues / the list of shader parameters, or the 'bumpmap' SF example. Other material โฆ
ACE Bot
Animating a texture on a hologram (spritesheet/proxy)
Use a material with a rendertarget as the basetexture and animate it - either via a spritesheet (all frames of a gif/video cropped into one texture, advance theโฆ
ACE Bot