Author Topic: How to do a rainbow  (Read 1988 times)

2017-08-30, 04:38:17

jorari71

  • Active Users
  • **
  • Posts: 83
    • View Profile
Hello friends.

I was wondering how to do a rainbow like in the photos of reference: reference1 and reference2.

The settings of my rainbow material are: material_settings.

And the result till now are: results_till_now.

I would like to reach the fading in the external borders of the rainbow. I tried with a falloff map in the transparency slot but didn't work.

I would like as a plus the look of plumbing self_illumination although I understand that it is more usual with a plumbic sky (dark clouds and low environmental illumination).

Thanks in advance.


2017-08-30, 05:20:47
Reply #1

JoeVallard

  • Active Users
  • **
  • Posts: 103
    • View Profile
    • Joe Vallard
Check the attachments.
Just make a long narrow plane, add a bend modifier.
Use a rainbow gradient or texture to assign to a Corona Light Material, depending on your scene brightness youll have to adjust the intensity of it.
Plug a gradient into the opacity slot, a Photoshop made one may do better than 3ds maxs gradient ramp.
Dont collapse the plane or covert it to editable poly, then you can easily just adjust the size of the rainbow whenever.

2017-08-30, 09:05:06
Reply #2

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 5724
  • Let's move this topic, shall we?
    • View Profile
    • My Models
I would add it in photoshop. Can't see any benefits of doing it in 3d.
I'm not Corona Team member. Everything i say, is my personal opinion only.

2017-08-30, 14:35:54
Reply #3

jorari71

  • Active Users
  • **
  • Posts: 83
    • View Profile
Is the "rainbow.jpg" a render of yours Joe Vallard?.

In case of yes, it's a really good approach.

Thanks in advance.

2017-08-30, 20:57:36
Reply #4

JoeVallard

  • Active Users
  • **
  • Posts: 103
    • View Profile
    • Joe Vallard
Is the "rainbow.jpg" a render of yours Joe Vallard?.

In case of yes, it's a really good approach.

Thanks in advance.

Yes it is a render, but as Romullus said, photoshop would probably be much better to use. More so if your only doing a still. A rainbow has more than just the color gradient that fades on the outsides. They also have this mist/haze around them as well.

2017-08-31, 03:49:33
Reply #5

jorari71

  • Active Users
  • **
  • Posts: 83
    • View Profile
Hello and thanks for your help JoeVallard.  :) :) :)

Please let me ask for your help once again:

I don't know how I can get one fading which allows the rainbow to disappear in the water.
And now thanks to your tweaks, I can get the fading in the external borders.

I don't know how to combine both fadings, the one of the external borders (thanks to you JoeVallard) and the original one which I don't know NOW how to obtain that, because I have copied all the settings from the material and I don't know why I can't get it. I think it must depend on and older UVWMAP modifier I applied and erased (after thousand of tests) and I lost the method.

I attach the original rainbow (the bigger one and in the external side) and the new rainbow (in the internal side) inside of the same render.

My goal was the combination of both fadings. Any idea?

2017-08-31, 10:37:15
Reply #6

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 5724
  • Let's move this topic, shall we?
    • View Profile
    • My Models
You just need to combine both gradients in the Composite or CoronaMix nodes with multiply blending mode. If you'll choose latter option, make sure that perform mixing ib sRGB is unchecked.
I'm not Corona Team member. Everything i say, is my personal opinion only.

2017-08-31, 10:44:20
Reply #7

tomislavn

  • Active Users
  • **
  • Posts: 693
  • Lightbringer
    • View Profile
    • My 3docean Portolio
I came here for ponies :o
My 3d stock portfolio - http://3docean.net/user/tomislavn

2017-08-31, 10:56:32
Reply #8

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 5724
  • Let's move this topic, shall we?
    • View Profile
    • My Models
Hehe, i even tried to do sky darkening that usually can be observed with rainbow phenomena :] Blending could be better, but i think it's because max's gradient works in sRGB by default.
I'm not Corona Team member. Everything i say, is my personal opinion only.

2017-08-31, 12:22:32
Reply #9

jorari71

  • Active Users
  • **
  • Posts: 83
    • View Profile
Hello!.

Thank you very much Ramullus!!. :) :) :)

I never used the Corona's mix map native option and it works like a carm!.

It is really important for me because of the needing of manipulate the rainbows in this project. This is the main feature here.

Thank you very much all.

Best regards.

2017-08-31, 12:40:19
Reply #10

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 5724
  • Let's move this topic, shall we?
    • View Profile
    • My Models
Glad to help you!

There's nothing wrong with making it in 3D, if done right it won't affect render speed at all. It's just that photoshop method gives you more freedom. But if doing it in renderer works better for you, then use it and don't worry a slightest :]
I'm not Corona Team member. Everything i say, is my personal opinion only.

2017-08-31, 14:10:25
Reply #11

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 9036
  • Marcin
    • View Profile
When I saw this thread, I actually tried making a rainbow using tiny drops of water and Corona's new dispersion, but failed.
Challenge accepted, anyone? ;)

2017-08-31, 14:17:17
Reply #12

jorari71

  • Active Users
  • **
  • Posts: 83
    • View Profile
Interesting challenge but I have to deal first with my clients...Really exigent and detalists.

2017-08-31, 16:43:59
Reply #13

pokoy

  • Active Users
  • **
  • Posts: 1409
    • View Profile
If I may add to the conversation, especially since it needs to look realistic, the rainbow colors aren't a simple gradient across all color hues in PS, there's a lot more going on due to scattering and interference. For the 'correct' colors, have a look at some examples here:
http://www.atoptics.co.uk/rainbows/bowims.htm
http://www.atoptics.co.uk/rainbows/supers.htm
And the 'ideal' rainbow simulated by special software, maybe useful to get some colors for the picker:
http://www.atoptics.co.uk/rainbows/airysim.htm
A nice gradient for repro also in this wikipedia article:
https://en.wikipedia.org/wiki/Rainbow

I'd do it in post so you have all the controls without the need to re-render, it's really hard to get the colors and the opactiy right.

2017-08-31, 17:25:18
Reply #14

jorari71

  • Active Users
  • **
  • Posts: 83
    • View Profile
Thanks Pokoy, because I've spent hours trying to get the right color spectrum, which is not always the same and with the same width for each color.

This is where takes action the diffraction of each bubble as your article explains. And yes, these milibubbles can't be seen because of natural interpolation of the human eyes.

This could be the definitive solution, although I'm still waiting the opinion of my client.

I'll let you know what do my client think.

Thanks Pokoy. :)