To answer the question "How do you make a 2-sided texture" :
It's the material (ie: the brush) that you apply the texture on, that can be 2-sided, the texture itself is just a bitmap with several parameters to set the matrix (the way the texture will stretch on the surface). There is also a blending parameter, but it just affect the way the texture will blend with the current pixel of the surface being rendered during the RenderWorld.
The "brush" defines the way the material is rendered : the color, the fx (which contains what you're looking for -> Fx & 16 = "disable-backface-culling"), surface blending mode, alpha (opacity), shininess (the "glowsiness" of the surface reflecting the light(s) )
; the texture of the grass
Local tex = LoadTexture("grass.jpg")
; a brush to apply the texture on
Local brush = CreateBrush()
BrushTexture brush, tex
brushFx brush, 16 ; -> disable the backface culling, so the 2 sides of the triangles of the surface this brush is applied on will be visibles.
; an object to apply the texture on
local cube = CreateCube()
PaintEntity cube, brush ; paint the entity with the created brush.
You can also skip the brush creation part and use the entity functions (which does the same thing on the entity's internal brush). Here it's essentially to understand the difference between a brush and a texture.
Not to mention : I answered the topic title question ... but I don't understand what you're asking on the first post of this topic ...
|