coated glass

Use this forum for general user support and related questions.
Forum rules
Please upload a testscene that allows developers to reproduce the problem, and attach some images.
Post Reply
mick
Posts: 80
Joined: Mon May 21, 2018 7:57 pm

coated glass

Post by mick »

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: 437
Joined: Sat Mar 31, 2018 11:17 am

Re: coated glass

Post by Fox »

Yes i think the 2 meshes can not share same area.
User avatar
B.Y.O.B.
Developer
Developer
Posts: 4146
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: coated glass

Post by B.Y.O.B. »

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.
mick
Posts: 80
Joined: Mon May 21, 2018 7:57 pm

Re: coated glass

Post by mick »

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
Developer
Posts: 4146
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: coated glass

Post by B.Y.O.B. »

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
mixing red glass and mirror, with checkerboard as input
mixing red glass and mirror, with checkerboard as input
visualization of the checkerboard on a matte material
visualization of the checkerboard on a matte material
mick
Posts: 80
Joined: Mon May 21, 2018 7:57 pm

Re: coated glass

Post by mick »

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
Developer
Posts: 4146
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: coated glass

Post by B.Y.O.B. »

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 175 times
00001.zip
(11.56 KiB) Downloaded 172 times
Post Reply