Author Topic: How to?: AO dirt collecting between different objects  (Read 5569 times)

2017-05-03, 23:08:58

steveyme

  • Active Users
  • **
  • Posts: 6
    • View Profile
Hi guys, I wonder if someone more experienced could provide a little guidance for me please? I have modelled a guitar and also some pickups, as separate objects, both with their own CoronaMTL maps. Now I want to get dirt to collect where one meets the other; where they intersect. I can see I probably need to use an AO mask, then just mask in a dirty texture, but how do I get it to span across two different objects that already have their own map reflections and glossiness? I could imagine merging the two objects, then remapping on a face by face basis one of the two maps back on, but surely there is an easier way? So many thanks, if you can help!

2017-05-04, 01:47:11
Reply #1

JoeVallard

  • Active Users
  • **
  • Posts: 131
    • View Profile
    • Joe Vallard
Create the default AO map, swap the white and black which gives you the mask for the dirt. By default AO is set to "No exclude" so where ever objects touch, it will create the AO. You'll have to play with the Distance and Color spread to get the amount your looking for (Which is where interactive rendering works great, just plug the ao into the diffuse to easily see it).

2017-05-04, 13:21:59
Reply #2

steveyme

  • Active Users
  • **
  • Posts: 6
    • View Profile
Awesome! Thanks so much - I had no idea that AO actually worked quite happily between different objects. I thought that it only worked on the geometry of a single object and its own faces. :-D I do apologise - I have have no formal 3D training and just do it for fun.

Would you mind me asking one other thing? Now that I have a black and white dirt map set as occluded colour, the dirt appears on my object as both black and white streaks. It would be ideal to have the dirt map set as a multiply layer, so only the dark stuff shows. Should I run it through a blending map, or is there something in the bitmap Output rollout to easily change? I also noted that in your email you said that for testing purposes I should put AO through as a diffuse, as if there is in fact a better place to finally have it? I was just setting my AO as diffuse as a matter of course, thinking this was good - what map slot do you think it would be better suited in? So many thanks man, I'm having great fun with this.

2017-05-04, 13:47:33
Reply #3

pokoy

  • Active Users
  • **
  • Posts: 1861
    • View Profile
I guess a better approach that allows way more control and keeps the original materials untouched would to be place your original materials in a CoronaMtl as base material, create a dirt material, put that dirt mat in each of the CoronaLayerMtls materials as a Layer and use your AO map as mask for the Layer where you've placed your dirt material. Make sure you instance both the dirt mat and the AO map so you don't have multiple places to control it:

CoronaLayerMtl 1
 Base Mtl: Original material 1
 Layer 1: Dirt material (instanced)
 Layer Mask: AO map (instanced)

CoronaLayerMtl 2
 Base Mtl: Original material 2
 Layer 1: Dirt material (instanced)
 Layer Mask: AO map (instanced)

etc...
You can also use a Composite Map as the dirt mat's mask where you can blend mutliple AO maps and noises for more convincing results.

2017-05-04, 14:47:14
Reply #4

steveyme

  • Active Users
  • **
  • Posts: 6
    • View Profile
Thanks for helping me! I admit - I have got myself a little confused, your answer is excellent but technical for me. Maybe I need to go back to basics. So to begin, I will forget about AO. What would be the best way to get my black and white dirt.jpg to appear as black colours only (multiply) on a diffuse red coronamtl? I'm sorry if this is too basic a question for this forum.

2017-05-04, 15:03:05
Reply #5

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8833
  • Let's move this topic, shall we?
    • View Profile
    • My Models
Well, if you'd mention what 3d program you're using, then someone may just slap quick example materials and upload here, so that you can download it and study how it's constructed.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2017-05-04, 15:41:45
Reply #6

steveyme

  • Active Users
  • **
  • Posts: 6
    • View Profile
3DSmax guys - thank you for your help - so much appreciated.

2017-05-04, 21:20:15
Reply #7

JoeVallard

  • Active Users
  • **
  • Posts: 131
    • View Profile
    • Joe Vallard
There really is more than one way to do it. Here is how you would do it with a Composite Map approach.

The AO is plugged into both Material's Composite and applied with a Multiple (I used color burn to better see it).

2017-05-05, 11:34:10
Reply #8

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8833
  • Let's move this topic, shall we?
    • View Profile
    • My Models
And here's another example of  usage AO in your materials. Download the scene and study how material is constructed. I didn't pay much effort to metal itself, it's just a few randomly picked colours put together to remotely resemble bronze, so don't pay much attention to that part. Instead try to understand how layered material with patina is built.

This scene requires Corona 1.6 in order to work correctly. Original dog model is licenced as public domain, so you are free to do with it whatever you want. I didn't include textures, as i'm not sure if i can do that. For patina you may want to google some general green-blueish texture and for other two, just use some B&W grunge textures.

Max 2013 scene.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2017-05-08, 16:51:15
Reply #9

steveyme

  • Active Users
  • **
  • Posts: 6
    • View Profile
Thank you so much to you both. I am writing quickly now, while at work, just to express my gratitude. I will concentrate deeply on both examples when I have time tonight to think through your examples. Romullus, thank you for even taking the trouble to use a guitar model - nice! And Jtveclipse, the example you give is stunning, just to see such a quality of render makes me laugh!

2017-05-08, 20:08:32
Reply #10

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8833
  • Let's move this topic, shall we?
    • View Profile
    • My Models
Actually it looks more like a dog to me, but you never know... ;]



And you're welcome!
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2017-05-08, 22:51:41
Reply #11

JoeVallard

  • Active Users
  • **
  • Posts: 131
    • View Profile
    • Joe Vallard
And Jtveclipse, the example you give is stunning, just to see such a quality of render makes me laugh!

Awww don't make fun of my zero effort render lol.