Page 1 of 1

Simple SDL example to render bricks or checkboard?

Posted: Thu Jan 03, 2019 5:21 am
by skibud2
I am trying to generate a scene with a texture of bricks mapped onto a background using the LuxCore SDL. For some reason the texture is not rendering. I am doing:

scene.textures.brick.type = brick
scene.textures.brick.brickwidth = 0.03
scene.textures.brick.brickheight = 0.01

scene.materials.wall.type = matte
scene.materials.wall.kd = 1.0 0.0 0.0
scene.materials.wall.normaltex = brick

I have also tried the checkboard pattern. Can someone point me in the right direction?

Thanks,

Mike

Re: Simple SDL example to render bricks or checkboard?

Posted: Thu Jan 03, 2019 8:18 am
by B.Y.O.B.
I think you have to use "bumptex" instead of "normaltex", the latter is only for tangent space normal maps.

Re: Simple SDL example to render bricks or checkboard?

Posted: Sun Jan 06, 2019 9:02 pm
by skibud2
I needed to add the line:

scene.textures.brick.mapping.type = "globalmapping3d"

The way I debugged this was using blender. Blender has an option to output a scene file for debugging!