strange output from Cycles Vector Curves Node #46915

Closed
opened 2015-12-02 20:35:33 +01:00 by bassam kurdali · 8 comments
Member

System Information
GNULinux (fedora 22) intel cpu, nvidia gpu

Blender Version
Broken: (example: 2.69.7 e5e1010
Worked: ?

Short description of error
when Vector Curves are not linear, and we have a point at 0,0 feeding in zero doesn't give zero but some non zero output. I'm unable to predict or understand what the math going on here is supposed to be...

Exact steps for others to reproduce the error

  • download the attached .blend{F262008}
  • open it in blender
  • turn on viewport rendering
  • try plugging in R then G then B into the Emission Strength, you get a black cube
  • the same for Y and Z, but if you plug in X you get some greyness
  • plug in Y, you should get a black cube again
  • now create a point in the middle of the Y curve and move it away from the linear curve
  • You now get a grey cube!

what I expect is the cube to stay black since the input is zero/zero/zero and all the curves have a point at zero, zero

**System Information** GNULinux (fedora 22) intel cpu, nvidia gpu **Blender Version** Broken: (example: 2.69.7 e5e1010 Worked: ? **Short description of error** when Vector Curves are not linear, and we have a point at 0,0 feeding in zero doesn't give zero but some non zero output. I'm unable to predict or understand what the math going on here is supposed to be... **Exact steps for others to reproduce the error** - download the attached .blend{[F262008](https://archive.blender.org/developer/F262008/vector.blend)} - open it in blender - turn on viewport rendering - try plugging in R then G then B into the Emission Strength, you get a black cube - the same for Y and Z, but if you plug in X you get some greyness - plug in Y, you should get a black cube again - now create a point in the middle of the Y curve and move it away from the linear curve - You now get a grey cube! what I expect is the cube to stay black since the input is zero/zero/zero and all the curves have a point at zero, zero
Author
Member

Changed status to: 'Open'

Changed status to: 'Open'
Sergey Sharybin was assigned by bassam kurdali 2015-12-02 20:35:33 +01:00
Author
Member

Added subscriber: @BassamKurdali

Added subscriber: @BassamKurdali

Added subscriber: @brecht

Added subscriber: @brecht

This isn't really a bug, just some specific of how curve mapping works in Cycles in general and how Vector Curve works in particular.

The thing here is -- any curve mapping in Cycles is expected to be Use Cllipping-ed, because internally the curve is getting rasterized in [0..1] range.

This makes color mapping working as expected (mainly), because colors are not negative. Only issue here is that Cycles will clip the input (solving this is in my TODO).

But vectors are usually negative, so what Curve Mapping node is doing is it maps input values from [-0.5..0.5] range to [0..1], applies the mapping and then goes back to [-0.5..0.5] range. This makes it so curve point corresponding to curve's x=0.5 is actually defines mapping for the input value of 0.

it's not really a bug, but quite confusing logic here and not sure how we can solve this without intruding regressions.

What we can do, is to solve the clipping limitation, make it so Curve Mapping is default to -0.5..0.5 range, do some do-versions code to preserve existing renders. IMO, this is most friendly approach.

@brecht, do you have any inputs here from your side?

This isn't really a bug, just some specific of how curve mapping works in Cycles in general and how Vector Curve works in particular. The thing here is -- any curve mapping in Cycles is expected to be `Use Cllipping`-ed, because internally the curve is getting rasterized in `[0..1]` range. This makes color mapping working as expected (mainly), because colors are not negative. Only issue here is that Cycles will clip the input (solving this is in my TODO). But vectors are usually negative, so what Curve Mapping node is doing is it maps input values from `[-0.5..0.5]` range to `[0..1]`, applies the mapping and then goes back to `[-0.5..0.5]` range. This makes it so curve point corresponding to curve's `x=0.5` is actually defines mapping for the input value of `0`. it's not really a bug, but quite confusing logic here and not sure how we can solve this without intruding regressions. What we can do, is to solve the clipping limitation, make it so Curve Mapping is default to `-0.5..0.5` range, do some do-versions code to preserve existing renders. IMO, this is most friendly approach. @brecht, do you have any inputs here from your side?

Submitted a patch which implements the logic above, D1672.

@BassamKurdali, mind giving it a whirl and see if it's indeed behavior you was dreaming about?

Submitted a patch which implements the logic above, [D1672](https://archive.blender.org/developer/D1672). @BassamKurdali, mind giving it a whirl and see if it's indeed behavior you was dreaming about?

This issue was referenced by c81e6ffdf9

This issue was referenced by c81e6ffdf942a7e8ac58ef3a48ca1bcab78f01fd

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'

This issue was referenced by blender/cycles@2260ddcd2d

This issue was referenced by blender/cycles@2260ddcd2d91b4ade10e7ef097f08358cb994bb9
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#46915
No description provided.