coated glass

Use this forum for general user support and related questions.
Post Reply
mick
Posts: 52
Joined: Mon May 21, 2018 7:57 pm

coated glass

Post by mick » Mon Jun 25, 2018 4:51 pm

I have a glass object partially covered with a reflective material. the reflective surface of the coating is pointing to the interior of the glass.

I model this by copying the mesh of the glass (e.g. a half sphere) for the mirror coating (the mantle of the sphere), but just with a subset of the surfaces (inverted), and inverted normals for all vertices. Is this a correct way to model it?

Should I expect any mis-calculations or artifacts from this objects of different material with aligned meshes?

Fox
Posts: 37
Joined: Sat Mar 31, 2018 11:17 am

Re: coated glass

Post by Fox » Mon Jun 25, 2018 5:15 pm

Yes i think the 2 meshes can not share same area.

User avatar
B.Y.O.B.
Developer
Posts: 1466
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: coated glass

Post by B.Y.O.B. » Mon Jun 25, 2018 6:52 pm

mick wrote:
Mon Jun 25, 2018 4:51 pm
Is this a correct way to model it?
No, you will get a lot of artifacts.

Instead, you should use the mix material.
Maybe the glossycoating material would also work in your case, but that depends how exactly the reflective surface should work.
Support LuxCoreRender project with salts and bounties

mick
Posts: 52
Joined: Mon May 21, 2018 7:57 pm

Re: coated glass

Post by mick » Thu Jun 28, 2018 8:15 pm

Instead, you should use the mix material.
How can this help? The object is partly coated, i.e. surfaces with and others without coating.

So I need to
1. make the mesh
2. calculation vertex normals
3. split coated and uncoated parts
4. invert vertex normals of coated parts
5. create multiple objects to form the hull, some of glass some of mirror (So the objects don't aline by faces but just by edges.)

Since the glass object is not closed then, I can't use volumes, right? So no absorption?

What is the effect of the backside of a mirror material? black matte, or same mirror as front side, or what else?

User avatar
B.Y.O.B.
Developer
Posts: 1466
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: coated glass

Post by B.Y.O.B. » Thu Jun 28, 2018 9:24 pm

Please show a picture of what this object should look like.
In my first answer I assumed that you meant a coating (two materials on top of each other). Now it sounds like you have some faces with material A and other with material B.

Instead of splitting the mesh into submeshes for each material, you can also use a black/white texture as input of the amount slot of the mix material.
mick wrote:
Thu Jun 28, 2018 8:15 pm
4. invert vertex normals of coated parts
I think this is not necessary.
The rest sounds correct (if you want to go the mesh-splitting route instead of mix material).
mick wrote:
Thu Jun 28, 2018 8:15 pm
Since the glass object is not closed then, I can't use volumes, right? So no absorption?
As long as all parts of the mesh form an enclosed shape, you can use volumes and get correct results.
mick wrote:
Thu Jun 28, 2018 8:15 pm
What is the effect of the backside of a mirror material? black matte, or same mirror as front side, or what else?
I would advise you to install Blender + BlendLuxCore, it can answer a question like this in seconds if you try it quickly yourself.
The answer is mirror by the way.
All opaque materials except glossy should behave the same on both sides (glossy is matte on the backside, for weird historical reasons).
Attachments
scrn_2018-06-28_23-28-50.png
mixing red glass and mirror, with checkerboard as input
scrn_2018-06-28_23-29-42.png
visualization of the checkerboard on a matte material
Support LuxCoreRender project with salts and bounties

mick
Posts: 52
Joined: Mon May 21, 2018 7:57 pm

Re: coated glass

Post by mick » Thu Jun 28, 2018 10:49 pm

Instead of splitting the mesh into submeshes for each material, you can also use a black/white texture as input of the amount slot of the mix material.
Thanks, that sounds very promising. I interpret this as a means of discrete/linear masking. I've to investigate how to create and apply such a texture. Just one question upfront: Do I have to align the texture to the faces, or can it be applied on the object without considering the actual mesh? I.e. If I have a sphere made of e.g. 10 latitudes (horizontal slices), can I define the upper 33% to be mirror and the rest glass, or do I specify by surface?
I would advise you to install Blender + BlendLuxCore
I would love to do, even having no clue about how to handle blender's overwhelming UI. But I just have macOS and a headless linux machine to run the rendering.

User avatar
B.Y.O.B.
Developer
Posts: 1466
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: coated glass

Post by B.Y.O.B. » Thu Jun 28, 2018 11:32 pm

mick wrote:
Thu Jun 28, 2018 10:49 pm
I would love to do, even having no clue about how to handle blender's overwhelming UI. But I just have macOS and a headless linux machine to run the rendering.
You could set up a Linux VM.
Yes Blender's UI may be hard to use at first, but I bet it is still better than only working with text files only.
It really helps if you can test things interactively and with helpful tooltips before coding it down into Python.
mick wrote:
Thu Jun 28, 2018 10:49 pm
Just one question upfront: Do I have to align the texture to the faces, or can it be applied on the object without considering the actual mesh? I.e. If I have a sphere made of e.g. 10 latitudes, can I define the upper 33% to be mirror and the rest glass, or do I specify by surface?
Textures can be dependent or independent from the mesh, as you require it.
For example, you can specify UV-coordinates for your mesh and use them to locate, rotate and scale your texture.
Or you can use a texture which is independent from the mesh, like I did in my example.
mick wrote:
Thu Jun 28, 2018 10:49 pm
I.e. If I have a sphere made of e.g. 10 latitudes, can I define the upper 33% to be mirror and the rest glass, or do I specify by surface?
First you need a texture that generates a sharp black/white border.
With the textures that are currently available, I would use a Blend texture as base (this generates a linear gradient black-grey-white), then put it through a Band texture with interpolation disabled (this creates a sharp black-white transition), and then you can move the whole texture with the 3D mapping settings.

Here is an example video: https://youtu.be/yUyUgaXXYeM
.blend file attached, and also the LuxCore scene files (please excuse that they are generated by the FILESAVER engine, so they are probably not very human-readable).
Attachments
mix_example.blend
(280.84 KiB) Downloaded 29 times
00001.zip
(11.56 KiB) Downloaded 16 times
Support LuxCoreRender project with salts and bounties

Post Reply