Color rendered differently between v2.79 and v.79a #54364

Closed
opened 2018-03-19 19:39:33 +01:00 by yokotsumo · 10 comments

Gradient.py
System Information
Windows 10
GTX 1070

Blender Version
Broken: 2.79a
Worked: 2.79

Short description of error
Colors are faded a lot when I render with v2.79a compared to v2.79

Exact steps for others to reproduce the error
I am using this material:

	# create the emission material
	mat = bpy.data.materials.new(name="gradient")
	mat.use_nodes = True
	# get the nodes
	nodes = mat.node_tree.nodes

	# clear all nodes to start clean
	for node in nodes:
		nodes.remove(node)

	# create output node
	node_output = nodes.new(type='ShaderNodeOutputMaterial')   
	node_output.location = (1300,0)

	# create diffuse node
	node_diffuse = nodes.new(type='ShaderNodeBsdfDiffuse')
	node_diffuse.location = (1100,0)

	# create colorRamp node
	node_colorRamp = nodes.new(type='ShaderNodeValToRGB')
	node_colorRamp.location = (800,0)
	node_colorRamp.color_ramp.elements[0].color = [0.156, 0.014, 0.153, 1]
	node_colorRamp.color_ramp.elements[1].color = [0.651, 0.485, 0.644, 1]

	# create GradientTexture node
	node_gradientTexture = nodes.new(type='ShaderNodeTexGradient')
	node_gradientTexture.location = (600,0)

	# create Mapping node
	node_mapping = nodes.new(type='ShaderNodeMapping')
	node_mapping.location = (200,0)
	node_mapping.rotation.x = math.pi/2
	node_mapping.rotation.y = math.pi/2

	# create TextureCoordinate node
	node_textureCoordinate = nodes.new(type='ShaderNodeTexCoord')
	node_textureCoordinate.location = (0,0)

	# link nodes
	links = mat.node_tree.links
	link = links.new(node_textureCoordinate.outputs[0], node_mapping.inputs[0])
	link = links.new(node_mapping.outputs[0], node_gradientTexture.inputs[0])
	link = links.new(node_gradientTexture.outputs[0], node_colorRamp.inputs[0])
	link = links.new(node_colorRamp.outputs[0], node_diffuse.inputs[0])
	link = links.new(node_diffuse.outputs[0], node_output.inputs[0])

	text.data.materials.append(bpy.data.materials['gradient'])

The gradient is correctly rendered in v2.79 but is nearly monochrome (first color) with v2.79a

[Gradient.py](https://archive.blender.org/developer/F2466391/Gradient.py) **System Information** Windows 10 GTX 1070 **Blender Version** Broken: 2.79a Worked: 2.79 **Short description of error** Colors are faded a lot when I render with v2.79a compared to v2.79 **Exact steps for others to reproduce the error** I am using this material: ``` # create the emission material mat = bpy.data.materials.new(name="gradient") mat.use_nodes = True # get the nodes nodes = mat.node_tree.nodes # clear all nodes to start clean for node in nodes: nodes.remove(node) # create output node node_output = nodes.new(type='ShaderNodeOutputMaterial') node_output.location = (1300,0) # create diffuse node node_diffuse = nodes.new(type='ShaderNodeBsdfDiffuse') node_diffuse.location = (1100,0) # create colorRamp node node_colorRamp = nodes.new(type='ShaderNodeValToRGB') node_colorRamp.location = (800,0) node_colorRamp.color_ramp.elements[0].color = [0.156, 0.014, 0.153, 1] node_colorRamp.color_ramp.elements[1].color = [0.651, 0.485, 0.644, 1] # create GradientTexture node node_gradientTexture = nodes.new(type='ShaderNodeTexGradient') node_gradientTexture.location = (600,0) # create Mapping node node_mapping = nodes.new(type='ShaderNodeMapping') node_mapping.location = (200,0) node_mapping.rotation.x = math.pi/2 node_mapping.rotation.y = math.pi/2 # create TextureCoordinate node node_textureCoordinate = nodes.new(type='ShaderNodeTexCoord') node_textureCoordinate.location = (0,0) # link nodes links = mat.node_tree.links link = links.new(node_textureCoordinate.outputs[0], node_mapping.inputs[0]) link = links.new(node_mapping.outputs[0], node_gradientTexture.inputs[0]) link = links.new(node_gradientTexture.outputs[0], node_colorRamp.inputs[0]) link = links.new(node_colorRamp.outputs[0], node_diffuse.inputs[0]) link = links.new(node_diffuse.outputs[0], node_output.inputs[0]) text.data.materials.append(bpy.data.materials['gradient']) ``` The gradient is correctly rendered in v2.79 but is nearly monochrome (first color) with v2.79a
Author

Added subscriber: @YokoTsumo

Added subscriber: @YokoTsumo
Member

Added subscriber: @LazyDodo

Added subscriber: @LazyDodo
Member

please attach a .blend file showing the issue.

please attach a .blend file showing the issue.

Added subscriber: @brecht

Added subscriber: @brecht

Setting priority back to incomplete, please do attach a .blend file. I can't see any difference with a material created by this script.

Setting priority back to incomplete, please do attach a .blend file. I can't see any difference with a material created by this script.
Member

also run blender with --factory-startup parameter on both blender versions to rule out any local settings changes you may have done.

also run blender with --factory-startup parameter on both blender versions to rule out any local settings changes you may have done.
Member

We've asked twice now for a .blend file, please once you have run your script (preferably both in 2.79 and 2.79a) please hit file->save and save the file, then attach them both to this post.

We've asked twice now for a .blend file, please once you have run your script (preferably both in 2.79 and 2.79a) please hit file->save and save the file, then attach them both to this post.

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
Brecht Van Lommel self-assigned this 2018-03-19 22:28:39 +01:00

I can reproduce the difference with the latest attached script, it's due to this bug fix: e7aad8f

The new behavior is the correct one though, it's not ideal that the texture mapping changed for text objects but that's what needed to be done to fix the bug.

I can reproduce the difference with the latest attached script, it's due to this bug fix: e7aad8f The new behavior is the correct one though, it's not ideal that the texture mapping changed for text objects but that's what needed to be done to fix the bug.
Author

And is it possible to get the same result with 2.79a as with 2.79? If so, what should be changed?

And is it possible to get the same result with 2.79a as with 2.79? If so, what should be changed?
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#54364
No description provided.