Phone Backpanel Shader

Hi,

anyone has an idea how to accurately recreate this kind of rainbow multiple reflections within the shader?
I’m only interested in how to really create it within the shader, NO FAKES PLS.
2 layers, one glass cover and one base panel.

I just wonder what is the effect that is causing this and which way would you recommend to recreate this kind of effect?
So they seem to appear around the main highlight when it reaches a certain brightness and are offsetted ghost reflections of the original highlight but broken up into different spectral colors.
V-Ray or Corona, both fine, thx… :slight_smile:

Hello,

now that might be a “fake” but I’m not entirely certain what you include in that definition. If you observe reflections with an offset - you recreate reflections with an offset that and should not be considered fake. Here’s my proposition: you can layer as many reflective layers as the VrayBlendMtl allows you - each with different filter colors, glossiness values, anisotropy etc. and give them fully controllable offset by connecting a linear gradient as bump map. By doing so you set a constant slope for the entire surface which will offset your reflection. The offset amount would be then controlled via the bump multiplier for each layer. Check out my short vid in the link below, you can see the setup there. The main highlights are produced by a single spherical light, everything else is filled by an HDRI. Most layered reflections have strong anisotropy which I think is present in your example. I hope that helps. You can certainly get quite different results by tweaking the anisotropy angle, the gradient angle, reflection colors and so on:

https://drive.google.com/file/d/1kmh…ew?usp=sharing

As for what causes this behaviour, it could be anything from sets of microscopic particles / facets with fixed orientation angles to some complex refraction phenomena…

Greetings,
A.

Hehe that’s pretty good.

Sort of what I was thinking. I’ll post my test tomorrow. I tried with dispersion and anisotropy and got a result quite close but only one band of colour separations.
The odd thing is that it worked only with certain coloured hdr maps, not with b/w ones or regular plane lights.

Isn’t it possible that that material is in reality multiple coats with different ior values? Hence the various widths of the separate bands…
Intriguing :slight_smile:

@aandronov Oh that’s so cool, exactly what I was looking for! Never thought about using a ramp in the bump to offset the reflections :sunglasses:
So you basically just apply a planar UV on the whole phone and the white part of the gradient would be at the top and the black part would be at the bottom?
Just if I count the rainbow lines in the left phone for example I would need to make a lot of layers in the BlendMtl.

@fixeighted I am not really sure, I just got those blurry pictures as a reference. And they were saying something about that was being laser-cut or something like this whatever that means. In the CAD it is 2 layers, one glasscover and one base layer.

@JonasNoll

Yes, I used simple planar mapping and adjusted the gradient direction to control the offset direction. I had to tweak the anisotropy direction as well, btw. it’s always better to use a separate UV layout in another channel to guide anisotropy direction instead of using the built-in object-space X Y Z axes. Adding low-frequency noise to the gradient might produce interesting effects as well - didn’t test that, but maybe it will result in slightly curved reflections if they are needed.

And yes, you may need to stack quite a few reflections… I didn’t test putting a VrayBlend in another VrayBlend, but perhaps it will work… at the cost of rendertime of course. Glad this was useful to you!

Greetings,
A.

This is what I got. This uses 'warm office from hdri haven…many others just don’t have the same result, or really very little result, so that could use some figuring out.
This seems to replicate the effect however, though of course could be further tweaked.
It’s a base blue with 3 coats using dispersion with tweaked IOR creating the offsets.
Scene: https://www.dropbox.com/s/f5tb1h3e0d…SCENT.max?dl=0
2020 Dropbox - Error - Simplify your life

@fixeighted
​​​​​​​[quote=“fixeighted, post:6, topic:101130, username:fixeighted”]

Scene: https://www.dropbox.com/s/f5tb1h3e0d…SCENT.max?dl=0
[/quote]

Can you please save it as .max 2020 as well? I’d like to check it out too.

Thanks

Greetings,
A.

I have a feeling that whilst it looks as if it’s working properly it really isn’t. The colours are coming from the hdr, which has some abherration going on in the lights. That’s why it doesn’t show when using other maps :frowning:
I’m stumped for the moment but it’s going somewhat in the right direction…

Hi, @fixeighted

Thanks for the upload. I see you layered refractive materials with different IORs on top, but the reflection offset cannot be controlled that way. The dispersion has no effect as well. It happens so because there’s nothing refraction rays can be traced against. The BlendMtl only combines the shading effects on a single, thin surface, whereas if we’d really like to offset the reflections of the underlying layer via top layer refraction, we must create a “real” blend with different, physically existing surfaces. That way there will be a volume where refraction rays can propagate in another direction, and in that case dispersion will work too. Anyways, this is impractical for @JonasNoll 's scenario, because tinting the different refraction layers will tint the underlying material globally. Dispersion is also hard to control, you’ll be forced to use extremely low numbers with no prominent effect.
Aside from that, the thin-film shader you applied works really nice to introduce even more sophisticated color variations.

Vid: https://drive.google.com/file/d/1lGF…ew?usp=sharing

Greetings,
A.

Yeah I’ve just realised my error…I put it down to tiredness…I had a shower and suddenly realised what I was doing wrong LOL
So the material was showing the dispersion because the blend was incorrect. Silly really but that’s what happens sometimes.
I thought the dispersion was sort of working, though to get the colour compression so tight is tough, even though that is what must be happening in reality don’t you think?
And you’re correct I think, that there needs to be geometry to represent each coat…at least that’s what I’ll attempt to see if it makes a difference - it should.
Anyway, this is an entertaining little challenge and hope it gets someone somewhere in whatever way :slight_smile:

Some good progress using a base model and a coat model. I’ve used a 3 layer blend of 3 different ior with dispersion.
It now appears to be doing the job quite nicely I think - multiplying the reflections accordingly and splitting the prismatics.
What it’s not doing without cheating is properly multiplying the refractions - maybe I’ll figure it out but meanwhile here is the file
for fun :slight_smile:

@fixeighted Awesome thank you for your fille! I will check out how you approached it to see what’s happening, the result looks quite similar to the effect posted, at least from this angle and with this HDRI. I will see if in my case with a studio lighting setup will also work :slight_smile:

You’re welcome - it was fun :slight_smile:
I was wrong about the hdr…had lots of the setup all wrong initially. It works with all lights now - the bright one at the bottom is a plane, the rest hdr.
The modelling is extremely basic in this file, so there are artifacts where the geomtry almost intersects, though that can be finessed of course.
Maybe someone else have an idea on how to improve on it but I think it got the basics worked out. Gave me a headache I know :stuck_out_tongue:

maybe something simpler would work. example lit by white dome. changing thickness in the TexThinFilm creates changing colors. iridescence.


Possibly, but you’d need to try it on a phone to see if it behaved correctly, as the reference images.
I’m out of time to test more at the moment.

fixeighted: Checked out your file, thanks again!, I think it’s kind of working, in some cases in my situation. I had some situation where it looked exactly like the effect from the reference with those rainbow patterns, and then I changed a little bit about lighting are shading and it totally changed the look again. It’s super sensitive to the hdri and the scene. So I personally prefer the first approach with the gradient in the bump because that is just so efficient and controllable! Somehow the material previews in compact Material Editor in the new V-Ray also crashes my Max all the time because it tries to calculate the dispersion in the previews swatches, only way to not make it crash is to enable the classic material swatches for me. Did you also run into this problem or is that hardware specific for me? It basically freezes like 10 minutes to load the preview of the BlendMaterial with the 3 abbe enabled layers…
aandronov: I think that approach really works quite well in my case. In the end I found the easiest way would be to make one BlendMtl for one rainbow pattern that only contains 3 Layers with red, green and blue reflection, all slightly offsetted with the gradient ramp trick to create one rainbow. Then create a new blend mtl and load this rainbow gradient in multiple layers and offset all of them with an addition BumpMtl on top of each layer where you can position each rainbow seperately. Like this its actually no big problem to create lots of rainbows and they are all instanced to the same base rainbow BlendMtl! :slight_smile:
piotrus3333: Cool, I will check that out, so far never used this PluginNodeTex, seems interesting. But my guess it is just a falloff ramp with different colors depending on the viewing angle, so it would just tint the existing reflections but not really offset these multiple rainbow reflections around my main one. But would need to try out.

just follow real life optics. easier that way in this case.
bit of info about the node:
https://docs.chaosgroup.com/m/mobile…n#page/7145142

edit: you did ask for no-fake approach after all.

Yes Jonas, that material is a massive preview headache LOL. It doesn’t crash on my machine, so maybe just hardware related. It does take a few mins to update though, which is why I added the instanced separate materials that are a bit quicker, if you have that blend material hidden.
I did try it with different lighting and it seemed to work fine - I will have another look in a while. Meanwhile I’d love to see what you achieved with the bump setup :slight_smile:

Piotrous - I did try with the film shader but it just wasn’t giving those multiple dynamic reflections/refractions, as Jonas noted.
Please share if you have managed to get it to work in this way.

What I tried to do was to imagine the real surface and I believe it may be made of several bonded layers, each with a different ior, that interact with the base layer.
Without a physical sample it’s impossible to say in which conditions the effect is most prominent or even what triggers it.

Ok, I agree with you Piotrus :slight_smile:
Thin film works well and seems to give the desired result after a bit of fiddling.
At least it is the simplest and quickest method and works in any conditions as far as I can tell.

That looks cool, is that with this thin film? How were you able to get those parallel lines? Or is this combined with the other approach with the bump in the gradient?
In my testing I wasn’t able to get these parallel lines, so would like to know if I’m missing something. For me it seems to be just generating random colors based on different thickness values where I could map for example a falloff inside. So in case that was done with the thinfilm would be curious to know how.
Sorry, I got nothing to show as of now as the client later specifically requested to not include this effect, so I ended up not having do do it. :roll_eyes: