Chaos Corona Forum

Chaos Corona for Cinema 4D => [C4D] Bug Reporting => Topic started by: sirio76 on 2020-04-16, 12:55:34

Title: Yet another critical problem with bump mapping
Post by: sirio76 on 2020-04-16, 12:55:34
Is this the expected behavior??
Specular highlight vary wildly depending on the size of the render/distance from camera, seems also related to MIP mapping. It happens on both preview and real scene.

Title: Re: Yet another critical problem with bump mapping
Post by: maru on 2020-04-16, 13:36:14
I think this one would be the same in 3ds Max. It's just how things work.
Title: Re: Yet another critical problem with bump mapping
Post by: Nejc Kilar on 2020-04-16, 13:53:44
I think this one would be the same in 3ds Max. It's just how things work.

Em, its just how things work in Corona or in real life as well? :)

Thanks for reporting, sirio76!
Title: Re: Yet another critical problem with bump mapping
Post by: maru on 2020-04-16, 14:25:46
I think this one would be the same in 3ds Max. It's just how things work.

Em, its just how things work in Corona or in real life as well? :)


In Corona/Max/C4D/other, anywhere where there is texture filtering involved. But of course a dev's opinion would be more relevant here.
Title: Re: Yet another critical problem with bump mapping
Post by: sirio76 on 2020-04-16, 14:27:18
It's just how things work.
Not in real life ;) I'm building all my shaders using physical samples of material inside a real calibrated setup and a 3D equivalent scene, also calibrated using correct exposure and light intensity. Results are mostly close to real life(below just a couple examples) but when I use a material with strong bump, results are inconsistent. Simply take several shots of a leather at different distance, the highlights is consistent no matter how you look at it, in Corona is just wrong and it's worrisome that you do not consider this a critical issue. It needs to be investigated and fixed. Sorry for the rant but I'm investing time and resources in Corona and I want things to work properly ;)
Title: Re: Yet another critical problem with bump mapping
Post by: sirio76 on 2020-04-16, 14:38:32
Also, it's not the same with Cinema materials, no matter if I use MIP or other sampling methods. I do not have Vray installed anymore but I'm pretty sure it doesn't have this problem neither and to be honest in over 20 years of work in CG using tons of other engine I do not remember this behavior.


Title: Re: Yet another critical problem with bump mapping
Post by: sirio76 on 2020-04-16, 19:09:52
@maru or any other developers, have you seen that?
Title: Re: Yet another critical problem with bump mapping
Post by: Fluss on 2020-04-16, 19:49:14
Wouldn't bump to roughness solve those sampling issues?
Title: Re: Yet another critical problem with bump mapping
Post by: sirio76 on 2020-04-16, 23:06:20
Wouldn't bump to roughness solve those sampling issues?

I don't know about this feature, can you elaborate?
Title: Re: Yet another critical problem with bump mapping
Post by: maru on 2020-04-17, 12:17:45
Here is a reply from our dev team:

Quote
This issue is present in all renderers which perform texture filtering / mip-mapping and it needs special handling - here is a paper from Pixar which explains this well: https://graphics.pixar.com/library/BumpRoughness/paper.pdf

We may, however, look into this - so stay tuned!

Also, please note: I am not a developer. :)
Title: Re: Yet another critical problem with bump mapping
Post by: sirio76 on 2020-04-17, 13:20:14
Thank a lot for looking into this, I really appreciate your support:)
Title: Re: Yet another critical problem with bump mapping
Post by: sirio76 on 2020-04-17, 13:25:38
In the mean while I've founded a combination of maps/parameters that works fairly well, but it took me a lot of effort because of the filtering issue and close-up still look different:


Title: Re: Yet another critical problem with bump mapping
Post by: Redeemer on 2020-04-19, 11:24:27
Posted in 'I need help' but I guess it is the same bug as Sirio pointed out:
https://forum.corona-renderer.com/index.php?topic=28892.0 (https://forum.corona-renderer.com/index.php?topic=28892.0)

Title: Re: Yet another critical problem with bump mapping
Post by: Fluss on 2020-04-19, 12:09:30
Here is a reply from our dev team:

Quote
This issue is present in all renderers which perform texture filtering / mip-mapping and it needs special handling - here is a paper from Pixar which explains this well: https://graphics.pixar.com/library/BumpRoughness/paper.pdf

We may, however, look into this - so stay tuned!

Also, please note: I am not a developer. :)

Great, I'm so happy to hear that you're considering to solve this!
Title: Re: Yet another critical problem with bump mapping
Post by: Nejc Kilar on 2020-04-20, 08:51:36
I'd just like to point out that this report could potentially be about the same bug that I'm seeing here - https://forum.corona-renderer.com/index.php?topic=28382.0 :)
Title: Re: Yet another critical problem with bump mapping
Post by: sirio76 on 2020-04-20, 11:10:45
Please anyone with similar issues report it to developers, the more we are the more likely it will be fixed.
Title: Re: Yet another critical problem with bump mapping
Post by: agentdark45 on 2020-04-20, 15:33:23
Max Corona user here and I can confirm (along with others) that there's a big issue with bump mapping being view/resolution dependant. The issue becomes more apparent when using micro fine bump maps (fine plastic pitting, fine stainless steel brushing e.t.c).

I've posted this before but if you want an example of rock solid bump/filtering implementation, at least as far as needed for our purposes take a look at this video:


The anistropy of the stainless steel is purely derived from the fine bump map (no dedicated anistropy slot) and being a dual user of Corona and Fstorm I can guarantee that if you try this in Corona using bump maps, it will break. You might get a semi decent result for one particular view but as soon as you increase the render resolution or change the view all hell breaks loose and you'll have to re-tweak the material.

This is quite a large problem imo, as it impacts pretty much all common materials - wood, concrete and wall paint for example. The natural anistropy from the video example will be lost on common materials unless explicitly mapping it (and even then you won't be able to get as fine a result unless rendering larger and downsampling).

This isn't a knock on Corona - I still use it for 95% of commercial projects, I'm just trying to aid in key areas that could use some improvement.
Title: Re: Yet another critical problem with bump mapping
Post by: sirio76 on 2020-04-20, 16:20:23
This is quite a large problem imo, as it impacts pretty much all common materials

+1
I can't see how such an important feature has been neglected until now. An implementation like Fstorm would be ideal but I would be more than happy even if they simply solve the bug reported here. This is not a fancy new feature needed by a very few users, it is really a basic needs for all of us and it's crucial to get consistent shaders.
Title: Re: Yet another critical problem with bump mapping
Post by: Designerman77 on 2020-04-20, 17:09:42
Also immediately noticeable: nice tone mapping, color grading & natural looking light dynamics in FStorm...

I'm sure Corona devs are working on getting there. :)
Title: Re: Yet another critical problem with bump mapping
Post by: lupaz on 2020-04-20, 23:15:19
+1 about the bump mapping. (I'm a Max user though)
Title: Re: Yet another critical problem with bump mapping
Post by: Matthew86 on 2022-12-10, 23:46:52
I know this is an old topic, but I wonder if this bug has been fixed or it is still unresolved.
Title: Re: Yet another critical problem with bump mapping
Post by: John_Do on 2022-12-12, 11:52:43
I don't know if it is considered as a bug but this annoying behavior is still here yes.

(https://i.imgur.com/u6G21Gz.jpg)

Video (https://i.imgur.com/05b05XG.mp4)

It's way better with the Corona Bitmap shader ( default shader settings, haven't touched the bump strength )

(https://i.imgur.com/nYGLYGw.png)
Title: Re: Yet another critical problem with bump mapping
Post by: lollolo on 2022-12-12, 11:58:09
+1
Title: Re: Yet another critical problem with bump mapping
Post by: Nejc Kilar on 2022-12-12, 12:31:54
Howdy! We are looking into options on how to improve this behavior and from my understanding it is mostly related to filtering. Quite a complicated topic.

For more consistent results (albeit with potentially longer render times) you should place your bump maps into Corona Bitmaps and set the interpolation method to "Bicubic (smoother)". Alternatively, if you prefer using C4D's bitmap shader you can also try tweaking its Blur Scale (by lowering it) or changing to a different sampling method. Do note that zero filtering typically isn't the smartest thing to do though.
Title: Re: Yet another critical problem with bump mapping
Post by: maru on 2022-12-12, 15:27:04
It's the same issue as described here https://forum.corona-renderer.com/index.php?topic=38682.0
Title: Re: Yet another critical problem with bump mapping
Post by: John_Do on 2022-12-12, 17:17:24
It's way better with the Corona Bitmap shader ( default shader settings, haven't touched the bump strength )

Unfortunately not a solution in some cases like on a wooden floor where a Corona UVW Randomizer shader is used. I had forgotten that Corona Bitmap and UVW Randomizer don't work together. Time for a rant !

Could you guys please fix once and for all all these inconsistencies in the C4D plugin ? Triplanar and Layer in Bump channel, proper UVW support, proper render instances support, motion blur, duplicated nodes from Corona Shared shader and the list goes on.
Some are known for YEARS, and are sometimes even reported by several users on the forum in the span of a few years, and it doesn't get better with each new version, still we are asked to pay the same price as the Max guys. I would gladly trade new features for a bug-free Corona 10 ( heck, some are not even bug but rather non-working features / settings ).
Title: Re: Yet another critical problem with bump mapping
Post by: TomG on 2022-12-12, 17:36:18
duplicated nodes from Corona Shared shader - afaik this no longer happens. If there is a workflow that makes it happen still, does it have a ticket or a thread on the forum about it?

Motion blur - what does Max do that C4D does not here? Remember that Max has limitations on what can be moblurred too. Just wanting to know the specifics of any particular complaint, thanks!

UVW Support, can you be specific again? Just wondering, since Max and C4D handle UVs very differently, and not sure if the problem you are running into is a Corona one, or a C4D one.

As for paying the same price, well there are things done for C4D that are not done for Max, the Node Material Editor, support for totally different hardware in the form of Macs (with several different types of those now), and other things that C4D gets/needs that Max does not.

Thanks!
Title: Re: Yet another critical problem with bump mapping
Post by: burnin on 2022-12-12, 17:54:28
Hmmm... can I see an exemplary scene file?
Title: Re: Yet another critical problem with bump mapping
Post by: John_Do on 2022-12-12, 19:24:10
Hi Tom, thanks for answering so quickly

duplicated nodes from Corona Shared shader - afaik this no longer happens. If there is a workflow that makes it happen still, does it have a ticket or a thread on the forum about it?

It is still here. For example import "Fabric Cotton" from the Corona Material Library and drop it into the Node Editor. Happens also randomly with my own materials, usually when copy pasting materials between scenes. Unfortunaterly it's hard to track.

Also the Corona Shared shader leads to another limitation I've discovered today which is happening when you transform a shared C4D Bitmap to a Corona Bitmap. The bitmap path is lost during the "conversion" and you have to relink the nodes. Example below.

(https://i.imgur.com/T5VfSOs.gif)

Quote
Motion blur - what does Max do that C4D does not here? Remember that Max has limitations on what can be moblurred too. Just wanting to know the specifics of any particular complaint, thanks!

Motion blur doesn't work with Render Instances, it was reported again last week (https://forum.corona-renderer.com/index.php?topic=38635.0), it's on the Trello board  (https://trello.com/c/4XNObugs/83-fixing-the-remaining-motion-blur-issues)for 3 years. It works with instances but it's not a real workaround since C4D "Instance" mode eats as much memory as if it was a regular object.

Quote
UVW Support, can you be specific again? Just wondering, since Max and C4D handle UVs very differently, and not sure if the problem you are running into is a Corona one, or a C4D one.

Corona Bitmap's Override UVW parameter is a nice addition to overcome the way UVs are handled in C4D ( poorly yes ) , unfortunately it doesn't work at all. In the same way, the UVW channel setting for Anisotropy Orientation doesn't work.
( Request #63528 )

Quote
As for paying the same price, well there are things done for C4D that are not done for Max, the Node Material Editor, support for totally different hardware in the form of Macs (with several different types of those now), and other things that C4D gets/needs that Max does not.

Fair enough, I hadn't thought about that and the Apple Silicon support is really nice since I guess it was not an easy thing to tackle.
Title: Re: Yet another critical problem with bump mapping
Post by: TomG on 2022-12-12, 19:57:06
Thanks John for the extra detail on each point! With Trello links or ticket numbers to go with those, extra useful.

While C4D does need some extra things Max does not, we do still want and aim to achieve as much feature-parity as is possible, still important for us and we'll continue working to make anything possible in Corona for Max to be possible Corona for C4D (within the limitations of the host software sometimes being very different and having its own unique limitations :) ).
Title: Re: Yet another critical problem with bump mapping
Post by: Matthew86 on 2022-12-12, 20:29:20
Howdy! We are looking into options on how to improve this behavior and from my understanding it is mostly related to filtering. Quite a complicated topic.

For more consistent results (albeit with potentially longer render times) you should place your bump maps into Corona Bitmaps and set the interpolation method to "Bicubic (smoother)". Alternatively, if you prefer using C4D's bitmap shader you can also try tweaking its Blur Scale (by lowering it) or changing to a different sampling method. Do note that zero filtering typically isn't the smartest thing to do though.

Hi! I've tried using corona bitmaps but it doesn't seem to give any benefit as you can see from the images attached. Am I doing something wrong?
Title: Re: Yet another critical problem with bump mapping
Post by: Nejc Kilar on 2022-12-15, 11:25:29
Howdy! We are looking into options on how to improve this behavior and from my understanding it is mostly related to filtering. Quite a complicated topic.

For more consistent results (albeit with potentially longer render times) you should place your bump maps into Corona Bitmaps and set the interpolation method to "Bicubic (smoother)". Alternatively, if you prefer using C4D's bitmap shader you can also try tweaking its Blur Scale (by lowering it) or changing to a different sampling method. Do note that zero filtering typically isn't the smartest thing to do though.

Hi! I've tried using corona bitmaps but it doesn't seem to give any benefit as you can see from the images attached. Am I doing something wrong?

Howdy!

Let me first start by saying that yes, we are aware this isn't ideal and we are looking into how the bump gets through. It is a _very_ complex topic with no clear cut solutions at the moment as there are a lot of potential drawbacks to most of the solutions.

In the meantime you can try lowering the filtering on the shader itself by going under the "Basic" menu (in your Corona Bitmap or your C4D bitmap shader) and in there try lowering the Blur scale to something closer to -99%.

This wouldn't be the absolute ideal solution as it can cause longer render times in additional to potential visual artifacting but it should help alleviate your issue quite considerably. Worth looking into at least.