Chaos Corona Forum

Chaos Corona for Cinema 4D => [C4D] General Discussion => Topic started by: NikSN on 2014-09-05, 05:28:16

Title: HDR Lighting
Post by: NikSN on 2014-09-05, 05:28:16
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.
Title: Re: HDR Lighting
Post by: pBarrelas on 2014-09-05, 05:33:29
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?
Title: Re: HDR Lighting
Post by: NikSN on 2014-09-05, 06:58:07
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.
Title: Re: HDR Lighting
Post by: tomislavn on 2014-09-05, 07:58:28
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.
Title: Re: HDR Lighting
Post by: pBarrelas on 2014-09-05, 10:42:53
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.
Title: Re: HDR Lighting
Post by: tomislavn on 2014-09-05, 10:47:05
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
Title: Re: HDR Lighting
Post by: NikSN on 2014-09-05, 14:38:18
Thanks so much for the help :)
Title: Re: HDR Lighting
Post by: tomislavn on 2014-09-05, 14:41:24
Thanks so much for the help :)

You are very welcome :)
Title: Re: HDR Lighting
Post by: hanuman007 on 2014-09-09, 20:44:50
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
Title: Re: HDR Lighting
Post by: tomislavn on 2014-09-09, 21:11:47
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.
Title: Re: HDR Lighting
Post by: fla on 2014-10-03, 17:50:26
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
Title: Re: HDR Lighting
Post by: mp5gosu on 2014-10-03, 20:47:10
Rotating the sky object works for me.
Title: Re: HDR Lighting
Post by: fla on 2014-10-03, 23:29:56
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
Title: Re: HDR Lighting
Post by: mp5gosu on 2014-10-04, 00:18:47
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.
Title: Re: HDR Lighting
Post by: tomislavn on 2014-10-04, 08:37:28
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...
Title: Re: HDR Lighting
Post by: fla on 2014-10-04, 09:30:58
@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
Title: Re: HDR Lighting
Post by: mp5gosu on 2014-10-04, 12:32:53
@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.
Title: Re: HDR Lighting
Post by: fla on 2014-10-04, 13:44:58
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

Title: Re: HDR Lighting
Post by: Rhodesy on 2014-10-05, 12:00:58
Can't you adjust this just using a c4d filter shader with the hdri loaded in?
Title: Re: HDR Lighting
Post by: chae on 2017-02-08, 11:14:52
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 :(
Title: Re: HDR Lighting
Post by: TomG on 2017-02-08, 14:50:38
On rotating an HDRI, the Offset U in the material tag would be used:

Let me know if that is not working for anybody!
Title: Re: HDR Lighting
Post by: chae on 2017-02-09, 05:02:30
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.
Title: Re: HDR Lighting
Post by: TomG on 2017-02-09, 14:45:55
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?
Title: Re: HDR Lighting
Post by: chae on 2017-02-09, 20:31:17
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 :)
Title: Re: HDR Lighting
Post by: TomG on 2017-02-09, 20:45:09
Glad to hear all is working now! NP too, just glad it helped resolve it!
Title: Re: HDR Lighting
Post by: sht on 2017-02-10, 22:00:34
why don't you just rotate the sky object. It's much more intuitive to me.
Title: Re: HDR Lighting
Post by: arail on 2017-02-15, 05:11:42
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.
Title: Re: HDR Lighting
Post by: mrittman on 2017-02-19, 02:08:49
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.
Title: Re: HDR Lighting
Post by: Nejc Kilar on 2017-02-19, 16:50:29
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.