Author Topic: Problem with Curvature procedural texture: Need help  (Read 4770 times)

0 Members and 1 Guest are viewing this topic.

Offline LeoH

  • Newbie
  • *
  • Posts: 5
Problem with Curvature procedural texture: Need help
« on: November 25, 2015, 05:36:52 am »
Hey. I posted this in the bug report section but I thought I'd try hear as well as it is a texturing issue.
I'm having a problem using the curvature procedural texture in Keyshot 6. I'm finding that the higher the resolution I render the image at, the more severe the problem is.

Here is the image as it looks in keyshot. Everything looks fine here in this screenshot. I'm using curvature to render the fine detail.


This is what happens when I render it out at 1600x1600


And this is it rendered at 3200x3200


All images are rendered as a Tiff file at 300 DPI. Any help with this issue would be greatly appreciated.

Offline Søren

  • Developer
  • Jr. Member
  • *****
  • Posts: 87
  • KeyShot Developer
    • KeyShot
Re: Problem with Curvature procedural texture: Need help
« Reply #1 on: November 25, 2015, 06:57:40 am »
By default the curvature procedural uses the pixel size to determine the area which it uses to estimate the curvature. If you turn off "Adaptive Radius" you should see consistent results with differing resolutions.

To be precise:
When "Adaptive Radius" is ON: Radius is the number of pixels to use for curvature calculation
When "Adaptive Radius" is OFF: Radius is the world space distance used to estimate curvature.

Hope this resolves your issue.

Offline LeoH

  • Newbie
  • *
  • Posts: 5
Re: Problem with Curvature procedural texture: Need help
« Reply #2 on: November 25, 2015, 08:17:47 am »
Amazing! Thank you so much. That has totally fixed the problem  :)

Offline Jay Kushwara

  • Newbie
  • *
  • Posts: 3
Re: Problem with Curvature procedural texture: Need help
« Reply #3 on: November 25, 2015, 09:46:39 am »
Thanks Soren.

I ran into this as well - but noticed that the radius effect was visible in the realtime scene preview window. It looks like the radius is calculated from the environment center outwards ? The example images show the results of the adaptive radius setting tests. I was only able to get consistent results with the adaptive radius off and a high radius setting, then use just the cutoff setting to adjust the range of the three colors used.

Would you mind explaining the radius setting and cutoff values in a bit more detail ? I'd like to understand exactly how each value is calculated and how to best use them in combination.

Offline Søren

  • Developer
  • Jr. Member
  • *****
  • Posts: 87
  • KeyShot Developer
    • KeyShot
Re: Problem with Curvature procedural texture: Need help
« Reply #4 on: November 27, 2015, 12:13:37 am »
Hi Jay,

First, let me add to comments:
1) In the first case (upper image), did you change the camera after moving the object? If you have adaptive radius enabled, the relative size of the pixel on the object will change when you move the camera, which can lead to color shift
2) In the second case (lower image), I notice that "Sample Same Material Only" is disabled. If you have a ground plane, that plane will be included in the curvature estimate, even if it has a different material. This could cause exactly what you are seeing.

If the above information does not resolve the issues you are seeing, I would like to see an example file demonstrating the issue.

Søren

Offline Jay Kushwara

  • Newbie
  • *
  • Posts: 3
Re: Problem with Curvature procedural texture: Need help
« Reply #5 on: November 29, 2015, 08:28:35 am »
Thanks Soren !

Answers -
1. No camera change at all. I'm still guessing that the adaptive radius is based on the center point of the scene / environment sphere ?
2. That makes sense - but in the first example it's enabled. I've tried the test scene with it on and off and it doesn't make any difference.

Also - rotating the object has the exact same effect. As you rotate the object 90 degrees on the Z axis the colors shift. I'd just like to know what the adaptive radius setting was designed to do and how it's being calculated.


Offline Søren

  • Developer
  • Jr. Member
  • *****
  • Posts: 87
  • KeyShot Developer
    • KeyShot
Re: Problem with Curvature procedural texture: Need help
« Reply #6 on: December 09, 2015, 04:58:53 am »
Hi Jay,

We were finally able to reproduce the behaviour you have been seeing. It is a bug and should be fixed in KeyShot 6.1.

I cannot comment on exactly how the curvature is computed, other than to say that it uses a sphere around the point on the surface being shaded to estimate the curvature at that point. The radius of that sphere is controlled by the radius slider. If "Adaptive Radius" is checked, the radius is computed based on the current pixel size, and if it is unchecked the radius is in world space units.

Finally, the center of the scene or environment is not used anywhere in the computation.
Søren
« Last Edit: December 09, 2015, 05:08:03 am by Søren »

Offline Jay Kushwara

  • Newbie
  • *
  • Posts: 3
Re: Problem with Curvature procedural texture: Need help
« Reply #7 on: December 09, 2015, 06:06:54 am »
Soren,

Thanks for following up on this ! I appreciate the feedback. Looking forward to 6.1   :)