Download

Online

Gallery

Blog

  Index  | Recent Threads  | List Attachments  | Search
 Welcome Guest  |  Register  |  Login
Login Name  Password
 

Sweet Home 3D Forum



No member browsing this thread
Thread Status: Active
Total posts in this thread: 2
[ Jump to Last Post ]
Post new Thread
Author
Previous Thread This topic has been viewed 804 times and has 1 reply Next Thread
Keet
Advanced Member
Member's Avatar

Netherlands
Joined: Apr 8, 2022
Post Count: 790
Status: Offline
Reply to this Post  Reply with Quote 
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.
[Jul 12, 2023, 5:32:09 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Keet
Advanced Member
Member's Avatar

Netherlands
Joined: Apr 8, 2022
Post Count: 790
Status: Offline
Reply to this Post  Reply with Quote 
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.
[Jul 20, 2023, 1:00:03 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
[ Jump to Last Post ]
Show Printable Version of Thread  Post new Thread

    Get Sweet Home 3D at SourceForge.net. Fast, secure and Free Open Source software downloads
   
© Copyright 2006-2024 eTeks - All rights reserved