Author Topic: Refraction depth?  (Read 3858 times)

2018-02-02, 00:05:17

lupaz

  • Active Users
  • **
  • Posts: 1049
    • View Profile
Hi there,

Is there a parameter for refraction depth? (maximum depth for refraction on a specific material)

I'm having very dark pixels on glass that has a strong bump on it.
I tried displacement but was the same.

I suspect that has to do with the number of rays allowed for refraction.

The glass has green absorption with Distance 1".

Any other ideas?

Thank you!

2018-02-02, 10:19:42
Reply #1

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 9278
  • Let's move this topic, shall we?
    • View Profile
    • My Models
There is global ray depth limiter render setup>performance>performance settings>max ray depth By default it's set to 25 and i don't think that you hit that limit in that scene. You can test if it's max ray depth limit that's causing issues, by going to dev/debug settings and changing exit colour from black to some bright pink one.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2018-02-02, 16:51:59
Reply #2

lupaz

  • Active Users
  • **
  • Posts: 1049
    • View Profile
Thanks.
None of those two things seem to be working.

It's easy to replicate. Here there's a box in a new scene. It has absorption 2cm and a procedural noise map in bump.

It doesn't look right, no?




2018-02-02, 16:55:50
Reply #3

PROH

  • Active Users
  • **
  • Posts: 1219
    • View Profile
What's the size of the box?

2018-02-02, 17:11:37
Reply #4

mferster

  • Active Users
  • **
  • Posts: 525
    • View Profile
I think those black bits are driven by your scattering colour. Try changing the the scatter colour to something closer to your absorption colour.

2018-02-02, 17:17:21
Reply #5

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 9278
  • Let's move this topic, shall we?
    • View Profile
    • My Models
It would be easier to inspect if you'd upload that simple scene.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2018-02-02, 18:21:55
Reply #6

TomG

  • Administrator
  • Active Users
  • *****
  • Posts: 6143
    • View Profile
I think with such a small Absorption distance, it's just repeating the absorption calculations so much in a refracted ray (it ends up passing through so much of the material) that it turns black. Since a small bump likely won't affect absorption color too much, simply doing a straight coloring of the Refraction would work better.

If you really really wanted some variation in absorption based on the bump (thought likely it really wouldn't be visible in reality), you could set a larger absorb distance, tweak that with the refraction set to white until you got some color in the bump areas (rather than going black), and mostly clear otherwise, and then tint the Refraction.

BTW, it's not specific to procedural bumps, bitmaps do the same; and displacement does too.
Tom Grimes | chaos-corona.com
Product Manager | contact us

2018-02-02, 18:25:30
Reply #7

TomG

  • Administrator
  • Active Users
  • *****
  • Posts: 6143
    • View Profile
Here's a quick sample result, and the scene, in case it fits your needs.

« Last Edit: 2018-02-02, 19:47:57 by TomG »
Tom Grimes | chaos-corona.com
Product Manager | contact us

2018-02-02, 19:47:47
Reply #8

TomG

  • Administrator
  • Active Users
  • *****
  • Posts: 6143
    • View Profile
Just realized scene was Max 2018, so here it is saved to 2015:

Tom Grimes | chaos-corona.com
Product Manager | contact us

2018-02-02, 22:00:41
Reply #9

lupaz

  • Active Users
  • **
  • Posts: 1049
    • View Profile
Thank you Tom!

Yes, as you said, it looks like it's due to small absorption distances.
On your scene, removing the refraction tint (setting it to pure refraction), and lowering the absorption amount till I get the color I want, gives the attached result.

Not that your suggestion is not good enough, but it seems to be a workaround to an actual problem. No?
I tested the scene on another render engine and this doesn't happen, no matter the absorption distance.


2018-02-02, 22:50:56
Reply #10

lupaz

  • Active Users
  • **
  • Posts: 1049
    • View Profile
I think those black bits are driven by your scattering colour. Try changing the the scatter colour to something closer to your absorption colour.

You're right. Thanks.
I need to turn on scattering in order to have color on those areas.