Author Topic: Corona ambient occlusion as mask for displacement and bump?  (Read 5053 times)

2019-11-06, 10:26:13

Jak

  • Active Users
  • **
  • Posts: 63
    • View Profile
From the tests I have done it seems its not possible to use Corona AO as masks for other slots in my shaders.

Is there any other option to mask edges for other purposes using corona materials (faster way than unwrapping).

2019-11-06, 15:53:31
Reply #1

pokoy

  • Active Users
  • **
  • Posts: 1874
    • View Profile
Since AO is computed at render time it can't be used for things that need to be present before a render starts - such as displacement.
It should work for bump I guess... and it will work as mask for textures, too.
If it doesn't you can try to use the RoundedEdges map in either mode (fast/advanced), this might work. Of course it's not the same as AO but it could be helpful in your case.

2019-11-06, 16:21:44
Reply #2

Jak

  • Active Users
  • **
  • Posts: 63
    • View Profile
Since AO is computed at render time it can't be used for things that need to be present before a render starts - such as displacement.
It should work for bump I guess... and it will work as mask for textures, too.
If it doesn't you can try to use the RoundedEdges map in either mode (fast/advanced), this might work. Of course it's not the same as AO but it could be helpful in your case.

I actually dont need AO as a displacement, but as a mask, to mask out what is to be displaced and what isnt (black white etc.). I tried working AO as a mask but I dont seem to be getting any good results to be honest;
however if you say that its possible to mask out using AO I will have another go at it. Thank for your reply.

(Corona round edges wont do the trick Im afraid).

2019-11-06, 16:25:59
Reply #3

pokoy

  • Active Users
  • **
  • Posts: 1874
    • View Profile
You can't use AO in any context that needs to be present *before* the render starts, so even as a mask it would affect displacement, since it is not present when displacement is calculated it's not going to work.
AO as mask for maps however does work 100%.

2019-11-07, 07:46:23
Reply #4

GeorgeK

  • Corona Team
  • Active Users
  • ****
  • Posts: 838
  • George
    • View Profile
Jak it would be nice if you could share some screenshots of your issue. Did you try corona edge and falloff?

George Karampelas | chaos-corona.com
Chaos Corona QA Specialist | contact us

2019-11-07, 13:47:27
Reply #5

Juraj

  • Active Users
  • **
  • Posts: 4768
    • View Profile
    • studio website
Pokoy & Corona_GK gave you one alternative, RoundEdges (with big radius, and don't be afraid to use higher value for map than default 1). Pretty outside of box solution.

One with bigger control but less automatic is from Romullus, to use Vertex painting.

Most complicated is to do a second UVW channel for your mesh, do a quick random unwrap, and bake down your AO into texture for that second channel and you have your mask to drive displacement.
Please follow my new Instagram for latest projects, tips&tricks, short video tutorials and free models
Behance  Probably best updated portfolio of my work
lysfaere.com Please check the new stuff!

2019-11-07, 14:09:26
Reply #6

romullus

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

2019-11-07, 14:33:54
Reply #7

pokoy

  • Active Users
  • **
  • Posts: 1874
    • View Profile
Hopefuly upcoming Corona curvature map will solve this issue.
Oh yes, looking forward to that one!

2019-11-07, 17:35:53
Reply #8

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 12802
  • Marcin
    • View Profile
Another option: OSL maps - there is probably an AO/edge/curvature map, but no idea how/if it works as a mask.
Another option: 3ds Max data channel modifier - you can even use it to get curvature map in 3ds Max + Corona - https://knowledge.autodesk.com/support/3ds-max/learn-explore/caas/CloudHelp/cloudhelp/2017/ENU/3DSMax/files/GUID-99C5FAEC-993A-404F-BB09-B52C30679564-htm.html
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2019-11-07, 17:54:55
Reply #9

pokoy

  • Active Users
  • **
  • Posts: 1874
    • View Profile
Another option: OSL maps - there is probably an AO/edge/curvature map, but no idea how/if it works as a mask.
Another option: 3ds Max data channel modifier - you can even use it to get curvature map in 3ds Max + Corona - https://knowledge.autodesk.com/support/3ds-max/learn-explore/caas/CloudHelp/cloudhelp/2017/ENU/3DSMax/files/GUID-99C5FAEC-993A-404F-BB09-B52C30679564-htm.html
Afaik no such map in OSL because in Max OSL can't trace rays.