Author Topic: HDR Lighting  (Read 21800 times)

2014-09-05, 05:28:16

NikSN

  • Active Users
  • **
  • Posts: 5
    • View Profile
I'ev recently downloaded the public build of corona for C4D and I have to say I'm extremely impressed! It's fantastic and thank you to the developers for working on this. I've been looking at 3DS Max tutorials to try and figure how it works, but there is one thing I just can't figure out how to do in Cinema 4D: HDR Lighting. Does anyone know the proper way to set up HDR Lighting in C4D Corona? I imagine I'm just missing something very simple.

2014-09-05, 05:33:29
Reply #1

pBarrelas

  • Active Users
  • **
  • Posts: 82
    • View Profile
I'm also happy with the type of results I'm getting so far, although I only tested some clay renders. I didn't had the time to test HDRI lighting yet but did you tried the default C4D method?

2014-09-05, 06:58:07
Reply #2

NikSN

  • Active Users
  • **
  • Posts: 5
    • View Profile
Hi, by default method do you mean just a luminance texture on a sky object? I tried that and it didn't seem to work for me, but I might have screwed up somewhere.

2014-09-05, 07:58:28
Reply #3

tomislavn

  • Active Users
  • **
  • Posts: 708
  • Lightbringer
    • View Profile
    • My 3docean Portolio
You can check my iPhone render in the gallery (C4D Corona).. I have used HDR lightning only.

I have set it up like I would do normally. Create Sky object, create Corona Material. In Corona Material assign HDR map to diffuse slot and make sure it is a spherical projection. Apply the map to Sky object. Tweak Exposure or Offset of the bitmap as you need.

I am not sure that this is the right way to do it, but it works :)

I have also tried with Emission slot instead of diffuse, in corona material, but it doesn't work. Neither it works with standard c4d material and luminance channel.

Maybe we can get some official answers here.
My 3d stock portfolio - http://3docean.net/user/tomislavn

2014-09-05, 10:42:53
Reply #4

pBarrelas

  • Active Users
  • **
  • Posts: 82
    • View Profile
I have also tried with Emission slot instead of diffuse, in corona material, but it doesn't work. Neither it works with standard c4d material and luminance channel.
Maybe we can get some official answers here.

The way you light a scene using an HDRI, using standard materials is through the Luminance channel, not the diffuse.
Apparently in Corona materials is through the Diffuse channel. Thanks for sharing your experience.

2014-09-05, 10:47:05
Reply #5

tomislavn

  • Active Users
  • **
  • Posts: 708
  • Lightbringer
    • View Profile
    • My 3docean Portolio
I have also tried with Emission slot instead of diffuse, in corona material, but it doesn't work. Neither it works with standard c4d material and luminance channel.
Maybe we can get some official answers here.

The way you light a scene using an HDRI, using standard materials is through the Luminance channel, not the diffuse.
Apparently in Corona materials is through the Diffuse channel. Thanks for sharing your experience.

Yeah sorry, I made an error with the first sentence. What I actually meant with "default way" was the part that I marked in bold.

Anytime :)
Regards, Tom
My 3d stock portfolio - http://3docean.net/user/tomislavn

2014-09-05, 14:38:18
Reply #6

NikSN

  • Active Users
  • **
  • Posts: 5
    • View Profile
Thanks so much for the help :)

2014-09-05, 14:41:24
Reply #7

tomislavn

  • Active Users
  • **
  • Posts: 708
  • Lightbringer
    • View Profile
    • My 3docean Portolio
Thanks so much for the help :)

You are very welcome :)
My 3d stock portfolio - http://3docean.net/user/tomislavn

2014-09-09, 20:44:50
Reply #8

hanuman007

  • Active Users
  • **
  • Posts: 7
    • View Profile
hdri still doesnt work for me... so sould i use Sky object from corona? with Corona Material - in this material I should set up luminanance with hdr map? or could you post some simple sample test scene? it will be the best I think

NOTE: Sorry now I find this topic with sample scene and its clear ( https://forum.corona-renderer.com/index.php/topic,5141.0.html )

corona mat in classic cinema sky... and hdri in diffuse slot
« Last Edit: 2014-09-09, 21:15:31 by hanuman007 »

2014-09-09, 21:11:47
Reply #9

tomislavn

  • Active Users
  • **
  • Posts: 708
  • Lightbringer
    • View Profile
    • My 3docean Portolio
hdri still doesnt work for me... so sould i use Sky object from corona? with Corona Material - in this material I should set up luminanance with hdr map? or could you post some simple sample test scene? it will be the best I think

Corona sky with corona material, and in corona material's diffuse channel use hdr.
My 3d stock portfolio - http://3docean.net/user/tomislavn

2014-10-03, 17:50:26
Reply #10

fla

  • Active Users
  • **
  • Posts: 82
    • View Profile
    • VISARD
Hi guys,

any experience with adjusting rotation of HDR map on sky object? I've tried rotating the whole sky object + rotating only the texture, neither works. Shadows stay orientated in the same directions no matter what I do.

thanks
matej

2014-10-03, 20:47:10
Reply #11

mp5gosu

  • Active Users
  • **
  • Posts: 152
    • View Profile
Rotating the sky object works for me.

2014-10-03, 23:29:56
Reply #12

fla

  • Active Users
  • **
  • Posts: 82
    • View Profile
    • VISARD
Are you sure?
I have a simple interior scene and there is no change when I rotate it....hmm.

Another thing: in vRay you would adjust gamma if you'd like sharper shadows when using HDRi. Do you use c4d "Filter" in order to adjust the gamma or do you get sharper shadows in another way? Actually there seems to be a setting in Luminance channel in Corona material .. .but I'm not sure if I should use Luminance channel at all, as some of you suggest ?

thanks
matej

2014-10-04, 00:18:47
Reply #13

mp5gosu

  • Active Users
  • **
  • Posts: 152
    • View Profile
Well, maybe the 1.1 did some changes to the sky handling couldn't test it yet.
Sharp shadows: Adjusting the color profile is a dirty hack which leads to false results. Try using either high quality HDRIs or use light sources synced to light areas.

Last but not least: It doesn't matter whether you use luminance or diffuse channel. If there's no texture in the luminance channel or it is deactivated, diffuse' channel texture will be used for sky lighting. However, for better workflow reasons you should stick to luminance, as it is more logical.

2014-10-04, 08:37:28
Reply #14

tomislavn

  • Active Users
  • **
  • Posts: 708
  • Lightbringer
    • View Profile
    • My 3docean Portolio
Last but not least: It doesn't matter whether you use luminance or diffuse channel. If there's no texture in the luminance channel or it is deactivated, diffuse' channel texture will be used for sky lighting. However, for better workflow reasons you should stick to luminance, as it is more logical.

As far as I know, Corona material in c4d doesn't work with HDR in luminance channel - only diffuse. Might've changed in 1.1...
My 3d stock portfolio - http://3docean.net/user/tomislavn

2014-10-04, 09:30:58
Reply #15

fla

  • Active Users
  • **
  • Posts: 82
    • View Profile
    • VISARD
@mp5gosu: peter guthrie and berntrand are changing gamma (or is it gain?) for quite some time now, based on their blog reports. So i the rest of the community. So I don't see anything wrong with it, results are great and so is the workflow (no need of positioning the sun to fir the HDR). But I wouldn't change anything besides gamma(gain) though!

@tomislavn: in does work in luminance channel in 1.1 if I'm not mistaken. Will try it out later.

cheers to both!
matej

2014-10-04, 12:32:53
Reply #16

mp5gosu

  • Active Users
  • **
  • Posts: 152
    • View Profile
@mp5gosu: peter guthrie and berntrand are changing gamma (or is it gain?) for quite some time now, based on their blog reports. So i the rest of the community. So I don't see anything wrong with it, results are great and so is the workflow (no need of positioning the sun to fir the HDR). But I wouldn't change anything besides gamma(gain) though!

As soon as you start adjusting HDR Gamma, you are manipulating the way they HDR lighting is cast. Let's assume an optimal, perfectly ranged HDR, with overcast sky. When using this as GI Source, you will get soft shadows. Now if you want hard shadows and you're using HDR Gamma, here are 2 points to consider: Overcast sky never creates sharp shadows. (To that point, you never want to deal with HDR gamma, but replace the HDRI with one where the sun is visible to achieve sharp shadows).
Secondly, if you decide to create sharp shadows adjusting the HDR Gamma, you have to keep in mind, that you do a curve manipulation which lead to results that highly differ from what it should be and what looks good. (I.e. crunching midtones, killing dark areas, etc.)
Btw: Good HDRIs always have linear color space and should be treatened like that.

But I have to admit, if you're using really low quality (low range or LDR) HDRIs, HDR gamma could make sense and helps to improve your image.
But in general, you should stick to high quality HDRIs, probably buy some good ones. Then you will not run into any shadow and accuracy issues most likely.

Oh and by the way: It's not entirely wrong. It's still up to the artist, to gain a decent style of lighting. Boosting shadows and bright areas can be done with gamma, but can also be done in post, with FULL flexibility.
« Last Edit: 2014-10-04, 12:42:00 by mp5gosu »

2014-10-04, 13:44:58
Reply #17

fla

  • Active Users
  • **
  • Posts: 82
    • View Profile
    • VISARD
I agree on everything you've sad mp5gosu.
I use HQ PG HDRI images but there is still a need to make small adjustments in gama (somwehere in between 0.75 - 1) in order to get exactlly the right sharpness you want. Even if you use sunny-day HDRI. Offcourse there are alternatives (using sun or direct light) but they are a bit time consuming, but certainly doable.
I don't want to impose my method as the right one, I'm just saying there are HQ 3D artists that use this method and this is why I would love to recreate it in Corona too. I'm a vRay user ATM.
Here's his blog post about the issue: http://bertrand-benoit.com/blog/2010/02/27/on-hdr-lighting/
You could find Peter Gutrhrie's post on his blog too.

cheers
m


2014-10-05, 12:00:58
Reply #18

Rhodesy

  • Active Users
  • **
  • Posts: 496
    • View Profile
Can't you adjust this just using a c4d filter shader with the hdri loaded in?

2017-02-08, 11:14:52
Reply #19

chae

  • Active Users
  • **
  • Posts: 5
    • View Profile
Rotating the sky object works for me.

Unfortunately using the latest version for CD4, the rotating sky object doesn't work for me, what I found easier to do was select everything in the scene but the sky object & rotate those, check the render and shadows move as expected...not ideal but a quick work-around

Just testing the render engine and comparing it to Thea Render which I've been using for a wee while now...certainly a lot faster (I think) and love some of the features including the denoise...just got to get use to working with the materials in a different UI, though the Thea material selection UI is real nice, would be good to see something like that instead of going up to the contents browser, finding material then dragging it into the materials area...or am I missing something :)

Oh yes and the only dislike so far is seeing all those wonderful 3DMax material libraries for Corona and we can't use them at all without having to convert them :(

2017-02-08, 14:50:38
Reply #20

TomG

  • Corona Team
  • Active Users
  • ****
  • Posts: 4031
    • View Profile
On rotating an HDRI, the Offset U in the material tag would be used:

Let me know if that is not working for anybody!

2017-02-09, 05:02:30
Reply #21

chae

  • Active Users
  • **
  • Posts: 5
    • View Profile
Perfect - Thank you :)

Spoke too soon...When I modify the Offset U I can see the HDR rotating in the CD4 Viewport, but when I hit render in Corona the viewport shows the HDR in the 0 degree position/default loading...so what I see in the CD4 viewport HDR wise is not the same as the VFB...I've even hit refresh and erase several times re-rotated the HDR and yet the VFB shows no movement.
« Last Edit: 2017-02-09, 05:18:08 by chae »

2017-02-09, 14:45:55
Reply #22

TomG

  • Corona Team
  • Active Users
  • ****
  • Posts: 4031
    • View Profile
Hmm, not sure on the cause of that, all is working here - the set up is a Sky object, with a Corona Material applied, with the HDRI in the Diffuse slot? Just checked in a simple new scene, and the update happens in the viewport, the C4D picture viewer, the rendered viewport and the Corona VFB. Also works if I set keyframes. Can you share the scene, or a simplified version of it?

2017-02-09, 20:31:17
Reply #23

chae

  • Active Users
  • **
  • Posts: 5
    • View Profile
Hi Yah Tom,

Just prior to knocking off for the night yesterday, I uninstalled Corona, reinstalled then pulled up the model I was working on. The model had already been rendered prior in Thea, so what I did was remove all materials, camera settings etc etc and started with a bare model, applied a general corona diffuse material to everything, recreated the sky as per movie and now everything's working as expected !!!

So not sure if it was the reinstall, or something carrying over from Thea but what I'll do is pull up some more models I've worked on and see what happens.

Thanks for getting back so quick :)

2017-02-09, 20:45:09
Reply #24

TomG

  • Corona Team
  • Active Users
  • ****
  • Posts: 4031
    • View Profile
Glad to hear all is working now! NP too, just glad it helped resolve it!

2017-02-10, 22:00:34
Reply #25

sht

  • Active Users
  • **
  • Posts: 66
    • View Profile
why don't you just rotate the sky object. It's much more intuitive to me.

2017-02-15, 05:11:42
Reply #26

arail

  • Active Users
  • **
  • Posts: 7
    • View Profile
Thanks for that video - real helpful, real clear.
I'd like to see 50 videos like that - each 5 to 10 minutes long. A list that a user could access and get a quick primer on a subject when needed.

2017-02-19, 02:08:49
Reply #27

mrittman

  • Active Users
  • **
  • Posts: 240
    • View Profile
    • www.mattrittman.com
Is there a way to adjust the HUE value of an HDR map? I have an HDR map I like, but would like to remove some of the green that it contains.

2017-02-19, 16:50:29
Reply #28

Nejc Kilar

  • Corona Team
  • Active Users
  • ****
  • Posts: 1058
    • View Profile
    • My personal website
Is there a way to adjust the HUE value of an HDR map? I have an HDR map I like, but would like to remove some of the green that it contains.

Put it into a "filter". You know, click the arrow by the name -> filter :)

Hope thats whats you meant.