Print at Dec 19, 2025, 5:25:46 AM View all posts in this thread on one page
Posted by Keet at Jul 12, 2023, 5:32:09 PM
One way mirror window
For those who don't follow the French forum. There was a question about a privacy film stuck on window.
In other words: a one way window, from the inside it's glass but from the outside it works as a mirror.
That's actually very simple:

test.obj
mtllib test.mtl
g bottom_1
usemtl Border
v 767.1781 255.0 2795.346
v 817.1781 255.0 2795.346
v 817.1781 255.0 2796.346
v 767.1781 255.0 2796.346
vt 0.0 0.0 0
vt 1.0 0.0 0
vt 1.0 1.0 0
vt 0.0 1.0 0
vn 0.0 -1.0 0.0
f 1/1/1 2/2/1 3/3/1
f 1/1/1 3/3/1 4/4/1
g top_2
usemtl Border
v 767.1781 355.0 2795.346
v 767.1781 355.0 2796.346
v 817.1781 355.0 2796.346
v 817.1781 355.0 2795.346
vn 0.0 1.0 0.0
f 5/4/2 6/1/2 7/2/2
f 5/4/2 7/2/2 8/3/2
g left_3
usemtl Border
vn -1.0 0.0 0
f 1/1/3 4/2/3 6/3/3
f 1/1/3 6/3/3 5/4/3
g right_4
usemtl Border
vn 1.0 0.0 -0
f 2/2/4 8/3/4 7/4/4
f 2/2/4 7/4/4 3/1/4
g back_5
usemtl Glass
vn -0 0.0 -1.0
f 1/2/5 5/3/5 8/4/5
f 1/2/5 8/4/5 2/1/5
g sweethome3d_window_mirror_6
usemtl Mirror
vn 0 0.0 1.0
f 3/2/6 7/3/6 6/4/6
f 3/2/6 6/4/6 4/1/6



test.mtl
newmtl Border
illum 2
Ka 0.4 0.4 0.4
Kd 1.0 1.0 1.0
Ks 0.3 0.3 0.3
Ns 60.0

newmtl Glass
illum 1
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.39999998

newmtl Mirror
illum 2
Ka 0.2 0.2 0.2
Kd 1.0 1.0 1.0
Ks 1.0 1.0 1.0
Ns 128.0
map_Kd Mirror.jpeg


This was created using a box and changing the back to glass and the front to a mirror. The image in the mtl file is just the image from the Sweethome3D textures but any color should work too.
----------------------------------------
Dodecagon.nl
1300+ 3D models, manuals, and projects

Posted by Keet at Jul 20, 2023, 1:00:03 PM
Re: One way mirror window
For all who want to understand what happens with the combination of glass and mirror in the example I presented.

You first have to understand the faces (sides) of a box. A face has only one side. This means you can see it only from one side. From the other side it is like there is nothing. You could create a window privacy film by just texturing the front as a mirror and make the other sides invisible. After export/import you will have a 'real' film since it has no depth. You could stick this to an existing window. Adjust the transparency of the mirror if you want it to be a little glass-like transparent. (The d parameter in the mtl file.)

The obj and mtl file I presented still has all sides where the back face for the inside is made glass and the front face is made a mirror (with no transparency). The border sides are left as borders. The result is that from the back side you are looking through glass and from the front side you are looking at a mirror.

Luckily we often have multiple options in Sweethome3D. In this case the option of using only a single face as a film has the advantage that you can stick it to any existing window to achieve the same effect. The option with combined glass and mirror sides is perfect if you are custom creating your windows. In that case you could make the borders glass too if you want.

In the original French post bdfd explained with images what I forgot: you can only see some effects when creating a photo and only in the higher rendering modes.
----------------------------------------
Dodecagon.nl
1300+ 3D models, manuals, and projects

Posted by Josep_M at Sep 5, 2024, 11:54:35 PM
confused   Re: One way mirror window
Is this object (a glass that acts as a mirror in one way and acts as a window in the other way) available in any free library?
I would like to use it to darken some interior rooms that don't have windows, without sunlight coming in from above.
Thanks!