Author Topic: Dirt on glass  (Read 12449 times)

2015-02-21, 21:15:44

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 9149
  • Let's move this topic, shall we?
    • View Profile
    • My Models
If anyone knows how to create dirty glass material, please, share that secret with me. I need proper refracted glass, not a thin sheet, so blended material won't work, unfortunatelly :[
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2015-02-21, 22:54:35
Reply #1

Ludvik Koutny

  • VIP
  • Active Users
  • ***
  • Posts: 2557
  • Just another user
    • View Profile
    • My Portfolio

2015-02-22, 09:03:13
Reply #2

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 9149
  • Let's move this topic, shall we?
    • View Profile
    • My Models
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2015-02-22, 11:01:21
Reply #3

Ludvik Koutny

  • VIP
  • Active Users
  • ***
  • Posts: 2557
  • Just another user
    • View Profile
    • My Portfolio
Here's the scene. You can tweak the maps to make glass less transparent or reflections more rough. It's all in slate editor view.


2015-02-22, 11:06:38
Reply #4

Ludvik Koutny

  • VIP
  • Active Users
  • ***
  • Posts: 2557
  • Just another user
    • View Profile
    • My Portfolio
And try to replace attached texture with this one :)

2015-02-22, 11:18:50
Reply #5

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 9149
  • Let's move this topic, shall we?
    • View Profile
    • My Models
Thanks, but i can't open this scene, i'm on max 2014. Can you show slate editor screenshot? That shoud be enough.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2015-02-22, 11:50:18
Reply #6

Ludvik Koutny

  • VIP
  • Active Users
  • ***
  • Posts: 2557
  • Just another user
    • View Profile
    • My Portfolio
That's strange. Could have sworn i saved it as max 2014 :) Try this one:

2015-02-22, 14:30:50
Reply #7

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 9149
  • Let's move this topic, shall we?
    • View Profile
    • My Models
Yes, it works... kind of. I just wish that there'd be a way to blend refractive material with completely different one. Let's hope it'll be fixed someday. Anyhow, thank you for your help, Rawalanche.

BTW, don't know why did you put glass material into multi/sub mat - this instantly renders your mat completely wrong.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2015-02-22, 16:06:39
Reply #8

Ludvik Koutny

  • VIP
  • Active Users
  • ***
  • Posts: 2557
  • Just another user
    • View Profile
    • My Portfolio
Yes, it works... kind of. I just wish that there'd be a way to blend refractive material with completely different one. Let's hope it'll be fixed someday. Anyhow, thank you for your help, Rawalanche.

BTW, don't know why did you put glass material into multi/sub mat - this instantly renders your mat completely wrong.

Nope. The glass is dirty just from the outside of the car. On inside, it's clean. But it renders wrong, and i know why. It's a bug :)

If you did it with mental ray or vray, it would not happen :)

2015-02-22, 17:59:04
Reply #9

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 9149
  • Let's move this topic, shall we?
    • View Profile
    • My Models
I know it's a bug, that's why i created this topic in the first place :]
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2015-02-22, 20:14:48
Reply #10

Ludvik Koutny

  • VIP
  • Active Users
  • ***
  • Posts: 2557
  • Just another user
    • View Profile
    • My Portfolio
At the moment, you can workaround by using only one material, but using multiMap set to material ID. Then one material ID will be all the dirty maps, other ID will be all the clean colors. That should not mess up the refraction.

2015-02-22, 22:14:23
Reply #11

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 9149
  • Let's move this topic, shall we?
    • View Profile
    • My Models
I'll try to figure it out tomorrow, but at the moment i can't imagine how it could help o/O
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2015-02-23, 09:59:00
Reply #12

Ludvik Koutny

  • VIP
  • Active Users
  • ***
  • Posts: 2557
  • Just another user
    • View Profile
    • My Portfolio
Part of the problem is that Corona decides which volume ray is in by material. So even if you create two identical glass materials, and assign one to front face, and other one on back face, you get double volume entering interaction, instead of one entering, and one exiting. Only if both front and back face have same material, correct enter and exit will happen, so area behind the windshield won't have glass in it ;)

2015-02-23, 10:32:30
Reply #13

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 9149
  • Let's move this topic, shall we?
    • View Profile
    • My Models
Thanks for explanation. It's good to know some background of this problem, but what i really would like to know, is this fixable?
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2015-02-23, 10:43:48
Reply #14

Ludvik Koutny

  • VIP
  • Active Users
  • ***
  • Posts: 2557
  • Just another user
    • View Profile
    • My Portfolio
Damn, i though i already explained it more than well :D

Here's the scene: