Author Topic: Opacity map with depth?  (Read 6615 times)

2019-04-16, 00:22:21

Jpjapers

  • Active Users
  • **
  • Posts: 1658
    • View Profile
Just curious. Would it be possible to implement a texture whereby the opacity map 'cutouts' can also have depth and enable a solid core to be shown?
e.g. holes drilled in veneered wood reveal the fiberboard core underneath to a user defined depth with the option of end capping?

It would mean that the geometry can stay very simple for objects that may have alot of cutouts and holes whilst being able to show some depth to the hole defined by the opacity map.
.

2019-04-16, 01:41:52
Reply #1

Njen

  • Active Users
  • **
  • Posts: 557
    • View Profile
    • Cyan Eyed
I imagine this would be possible with the OSL Parallax shader, where you could make tiny little window boxes around each hole (A cube is much more lightweight than a cylinder). Though the only thing I'm not sure about is how it would play with being rendered in Corona.
Maya example, but the technique would be same for the Max version: http://julius-ihle.de/?p=2451

2019-04-16, 10:29:45
Reply #2

Jpjapers

  • Active Users
  • **
  • Posts: 1658
    • View Profile
I imagine this would be possible with the OSL Parallax shader, where you could make tiny little window boxes around each hole (A cube is much more lightweight than a cylinder). Though the only thing I'm not sure about is how it would play with being rendered in Corona.
Maya example, but the technique would be same for the Max version: http://julius-ihle.de/?p=2451

As far as i remember OSL isnt supported yet or has that changed in dailies?

2019-04-16, 11:02:55
Reply #3

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8868
  • 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

2019-04-16, 11:16:30
Reply #4

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8868
  • Let's move this topic, shall we?
    • View Profile
    • My Models
By the way, this is already possible in Corona to some extent. With Corona distance you can get render-time booleans with pretty spectacular results. It's not very easy to setup and probably not aplicable to every scenario, but still..
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2019-04-16, 12:19:59
Reply #5

Jpjapers

  • Active Users
  • **
  • Posts: 1658
    • View Profile
By the way, this is already possible in Corona to some extent. With Corona distance you can get render-time booleans with pretty spectacular results. It's not very easy to setup and probably not aplicable to every scenario, but still..

Interesting, how is the plywood material appled inside the cutouts? Could you show a material graph?

2019-04-16, 12:33:00
Reply #6

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8868
  • Let's move this topic, shall we?
    • View Profile
    • My Models
I'm attaching scene, so you can inspect it by yourself.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2019-04-16, 12:34:18
Reply #7

Jpjapers

  • Active Users
  • **
  • Posts: 1658
    • View Profile
I'm attaching scene, so you can inspect it by yourself.

perfect thank you :)

2019-04-16, 13:35:25
Reply #8

jrgby

  • Active Users
  • **
  • Posts: 71
    • View Profile
I'm attaching scene, so you can inspect it by yourself.
Clever... and confusing! Thanks for sharing.

2019-04-16, 14:33:27
Reply #9

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8868
  • Let's move this topic, shall we?
    • View Profile
    • My Models
I'm not claiming authorship of that idea, it was already shown by someone in the forum, as soon as distance map came around. I agree that it's a bit tricky to setup and maintain this thing, that's why we are all waiting for Corona slicer :]
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2019-04-16, 14:54:36
Reply #10

Jpjapers

  • Active Users
  • **
  • Posts: 1658
    • View Profile
I'm not claiming authorship of that idea, it was already shown by someone in the forum, as soon as distance map came around. I agree that it's a bit tricky to setup and maintain this thing, that's why we are all waiting for Corona slicer :]

Yeah i think it was Maru posted something similar after doing some digging.
Corona clipper object would be awesome. Hopefully its coming seeing I put a request in 5 years ago.

2019-04-16, 15:56:12
Reply #11

bluebox

  • Active Users
  • **
  • Posts: 268
    • View Profile
I originally linked to the description of the method, then Maru made a tutorial based on that idea https://forum.corona-renderer.com/index.php?topic=8665.msg80853#msg80853

This way of doing render time booleans is super cumbersome to setup and slow to render. That is why everyone is requesting easier to setup slicer which is postponed for years now.

2019-04-17, 01:19:54
Reply #12

Jpjapers

  • Active Users
  • **
  • Posts: 1658
    • View Profile
I originally linked to the description of the method, then Maru made a tutorial based on that idea https://forum.corona-renderer.com/index.php?topic=8665.msg80853#msg80853

This way of doing render time booleans is super cumbersome to setup and slow to render. That is why everyone is requesting easier to setup slicer which is postponed for years now.
Ah thats a shame i didnt think it would affect render time that badly.

2019-04-26, 14:49:14
Reply #13

Jpjapers

  • Active Users
  • **
  • Posts: 1658
    • View Profile
So i tried this as per maru's tutorial and it didnt work
Ive attached my setup and the result.
It appears to be capping the boolean at a very small depth?

2019-04-26, 15:07:17
Reply #14

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8868
  • Let's move this topic, shall we?
    • View Profile
    • My Models
It's probably would be best to attach scene for inspection. Most likely you did some mistake here, as i see no reason for such setup not to work.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2019-04-26, 15:48:09
Reply #15

Jpjapers

  • Active Users
  • **
  • Posts: 1658
    • View Profile
It's probably would be best to attach scene for inspection. Most likely you did some mistake here, as i see no reason for such setup not to work.

Its the translucency applied to the acrylic material. I removed it and it worked fine. There are various major artefacts when using anything more complex than basic primitives however.
Ive noticed you get a really thin slice of the base object material before it changes to the inside edges. Is there a way to control the thickness of that edge?

2019-04-26, 19:45:02
Reply #16

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8868
  • Let's move this topic, shall we?
    • View Profile
    • My Models
There are various major artefacts when using anything more complex than basic primitives however.

Distance map is known to produce artifacts in some cases. If your cutter has sharp angles, you can try to add tiny amount of chamfer and see if that helps. Also try to subdivide intersecting objects - that might help also.

Ive noticed you get a really thin slice of the base object material before it changes to the inside edges. Is there a way to control the thickness of that edge?

Are you using round corners on that material? Try to remove it and see if thin line disappears.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures