Print at Feb 4, 2026, 9:25:29 PM

Posted by Keet at Jul 28, 2023, 4:31:55 PM
Re: transparent models from walls in YafaRay, rendering fails
Check your mtl file for the wall.

You can try these basic glass definitions in the .mtl file:
newmtl Glass
illum 1
Ka 1.0 1.0 1.0
Kd 1.0 1.0 1.0
Ns 1.0
Ni 1.45
d 0.4

newmtl Glass
illum 2
Ka 1.0 1.0 1.0
Kd 1.0 1.0 1.0
Ks 0.0 0.0 0.0
Ns 1.0
Ni 1.45
d 0.4


Ka is the ambient color (R G B), i.e. the color you want you curtain to have.
You can of course keep the color you already have for Ka.

Kd is the diffuse reflect color (R G B) In Sweet Home 3D the same as Ka but you can try a different color.

illum is the illumination model.
illum 1 is the default and represents a flat model. Note that the first example doesn't have a line with Ks because the illum 1 model doesn't use specular highlights. If there's a Ks line it is ignored.
illum 2 requires the Ks line to define the specular highlights: R G B color for the highlights.

Ns is the shininess factor

Ni is the optical density, i.e. the light breaking refraction. For normal window glass this ia 1.45 ~ 1.5. For your curtain you may want a different value although it's often hard to see a difference. Keep values within the range 0.001 to 10.

d is the transparency (0.0 ~ 1.0) 70% transparent = 0.3 (1.0 = 100% opaque, the default)

The problem might be based because of the usage of a wall. To get the wave pattern the wall has multiple sections and each section has sides that show through. Try a clear glass curtain and you will see that every section end shows through the glass. You can remove those ends in Blender but it is quite a job.

Last, try the difference between a color and a texture. You might find that the texture is the problem and not the wall.

Experiment with different values because I suspect there's a difference between SunFlow and YafaRay in how they handle the material definitions during rendering.
I'm not sure if Sweet Home 3D shows the specular highlights but the photo renderer should.
----------------------------------------
Dodecagon.nl
1300+ 3D models, manuals, and projects