Author Topic: corona distance for road markings,  (Read 558 times)

2023-06-26, 00:39:47

tom182

  • Active Users
  • **
  • Posts: 43
    • View Profile
folks, this is probably easy but how can i get different road markings to use different colours
currenty using extruded splines, want the red box to be red on the road (not white as it currently is)
the purple splines (road markings) as all fine as they are
if I need 2 coronadistance maps (1 for each colour) plugged into the the base colour of the road what maps should i plug them into before going into the base colour
Thanks

« Last Edit: 2023-06-26, 00:46:18 by tom182 »

2023-06-26, 09:14:45
Reply #1

philipbonum

  • Active Users
  • **
  • Posts: 73
    • View Profile
Hi there!

You would need two distance maps for this.
You could either blend these like you've done, but with a composite map. See attached.
Or you could do this with 3 materials, and then coronaLayeredMtl and plug the distance maps in there as masks. (I would take this approach for more control over each material)


2023-06-26, 13:25:31
Reply #2

tom182

  • Active Users
  • **
  • Posts: 43
    • View Profile
thanks for that
I'm struggling to get it to work :-(  using the setup i have
rarely use slate (old school),

2023-06-26, 14:32:30
Reply #3

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8856
  • Let's move this topic, shall we?
    • View Profile
    • My Models
Here's i did setup it for you. You should really try to start using SME as it makes complex material setup so much easier.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2023-06-26, 15:24:55
Reply #4

Aram Avetisyan

  • Corona Team
  • Active Users
  • ****
  • Posts: 561
    • View Profile
Hi,

The correct/ideal setup for this will be to use a CoronaMultiMap with GBuffer Object ID options enabled (for different colors for different objects depending on the GBuffer ID they have) plugged into CoronaDistance inside color, like in attached screenshot.
Unfortunately that is not supported yet (only the base object Gbuffer ID is considered and not the separate objects intersecting with it), and it will be reported.

What Romullus has suggested is the way to go for you.
There are other ways to do this but may change the already existing workflow of yours.

(Internal ID=1148552023)
« Last Edit: 2023-06-26, 15:35:09 by Aram Avetisyan »
Aram Avetisyan | chaos-corona.com
Chaos Corona Support Representative | contact us

2023-06-26, 15:29:01
Reply #5

tom182

  • Active Users
  • **
  • Posts: 43
    • View Profile
Here's i did setup it for you. You should really try to start using SME as it makes complex material setup so much easier.
much appreciated,
I get what you are doing but it rips the texture off the road (using Ashphalt grey 15-30 from Cosmos) :-/
thanks
T

2023-06-26, 15:36:04
Reply #6

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8856
  • Let's move this topic, shall we?
    • View Profile
    • My Models
I get what you are doing but it rips the texture off the road (using Ashphalt grey 15-30 from Cosmos) :-/
thanks
T

Not sure what you mean by that. Your scene came without textures, so i had to replace base colour bitmap with simple Corona colour node. Did you to plug it back? Is it still not working after that? Can you show some screens to see what's going on?
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2023-06-26, 16:06:39
Reply #7

tom182

  • Active Users
  • **
  • Posts: 43
    • View Profile
my mistake, i was using a coronacolour as input on the uploaded file rather than the cosmos bitmap in my orignal file, all working perfectly  now - thanks for the help -
I need to spend a couple of days on mats again ;-)