Age | Commit message (Collapse) | Author |
|
|
|
Oversight in fb10eaf6e8a4f959cd5d46fd1bb7e8fb26b67205
|
|
IO add-ons.
Try to detect if a given image may have valid alpha data or not (based
on number of channels and depth). This may be a bit doggy in theory, but
in practice it should cover most fields as expected. We can always
adjust the euristic here in other wrong cases appear.
This will affect all import add-ons using that node shader wrapper (at
least OBJ and FBX ones).
|
|
|
|
This impacts I/O add-ons. OBJ, FBX and Collada have been updated, glTF not yet.
Differential Revision: https://developer.blender.org/D4971
|
|
There is no ideal solution here, but we can assume by default that we should
use the Alpha output from a texture used for transparency data.
This will break people using a dedicated B&W texture for this alpha
pass, but we cannot really handle all cases properly in this wrapper, we
only try to support the most common ones to some extent.
|
|
All the single-value texture inputs of Principled BSDF node should use
non-color colorspace profile, not sRGB one (issue raised in
https://blender.stackexchange.com/questions/155617, thanks).
That also revealed another issue - since those color space settings are
stored at the image level itself, not the node one, we need to
duplicate those image data-blocks when we use same picture for e.g. base
color (sRGB) and specular (non-color) inputs...
For now using a basic mechanism for that, might generate several extra,
uneeded copies of the image ID, but that’s better than breaking custom
settings and such.
Note that while this will modify the behavior of the impporters using
that node wrapper, no change should be needed in IO add-ons themselves.
|
|
This did not exist when that wrapper was created, but is supported by
many formats, so worth supporting it now. See also T70666.
|
|
This affected all exporter add-ons using that wrapper to handle the node
shaders... sigh...
|
|
Since rBbaaa89a0bc54 we have to access the mapping node differently.
This doesnt take actual linkage of the new sockets into account (but
this wasnt done for most sockets on the Principled BSDF node either)
Also the min/max of the mapping node was removed entirely.
It was decided upon removing this from node_shader_utils as well (and
replace this by existing access to the Extension parameter of the
Texture node).
Part of solving T69526.
Differential Revision: https://developer.blender.org/D5693
|
|
Taking values from relevant node definition C file...
Related to T67889.
|
|
'is_data'
since the move from 'cycles_shader_compat' (2.79) to
'PrincipledBSDFWrapper' (2.8) we lost the ability to (automatically) set
this colorspace setting for imported textures. This was useful for e.g.
normalmaps to always assume 'Non-Color' data.
This adds the possibility to overide and uses this for normalmaps...
Fixes T66368
Reviewers: mont29, brecht
Maniphest Tasks: T66368
Differential Revision: https://developer.blender.org/D5176
|
|
Reported with patch as D5140 by andreas atteneder (@atti), thanks!
|
|
Principled BSDF.
Now that we have real alpha in BSDF, it's much better option for
transparency, than previously used Transmission value.
Related to T64609.
|
|
|
|
|
|
|
|
|
|
Pretty stupid mistake...
|
|
|
|
value.
Ellipsis value is internal ingredient only, to tag hidden _node_normalmap
'real' property as not yet initialized. Public node_normalmap accessor
should never ever have that value, it's either None or a valid node!
|
|
This reverts commit ce4cfbe108d0641832d86a731ea32f596220b7c5.
Obviously wrong 'fix', please do not touch other dev’s code, especially
in active/WIP area, when you do not fully understand it.
|
|
Update the addons repository as well.
|
|
Also added access to extension property in texture wrapper.
|
|
Fix broken behavior in case of texcoords mapping (we do need texcoords
node in all cases, then, even for UV coords...).
Use nodes by default when generating new write-allowed wrapper around a
material.
Do not try to find nodes in existing tree all the time, do it only once,
even for lazy-initialized nodes (through accessors).
Fix ugly spacing in property accessors (since it looks like some people
do not like a single 'block' with both getters, setters and prop
definition, at least use one sep line everywhere (and two sep lines to
separate properties)...
|
|
Best to give its actual name so it's clear that the Principled BSDF does
not have a diffuse color exactly, and does not have an alpha component.
Also image textures use UVs by default, so avoid creating a texture
coordinate node for that.
|
|
|
|
|
|
That new bpy_extras' node_shader_utils module is remotely based on
existing addons' cycles_shader_compat module. It has some key
differences though:
- It is based on Principled shader, instead of the noodle combination
of half a dozen simpler shaders.
- It does not do any value conversion (like e.g. clamping, which was
only suited for FBX). Any conversion/adaptation is to be done
by each IO add-on.
- It extensively uses accessors to offer:
- Easy read/write of values, hiding all the hairy noodly nodes
(principled shader helps a lot here).
- lazy creation of most nodes on accessing (when generating a
material), which avoids getting unused nodes in final shader.
- We only use Principled BSDF so far though, which means some features
supported by previous system are not yet implemented in new one.
Note that, even though we support 'exporting' side of things, this will
only work for a very specific (and basic) kind of shader. This will have
to be clearly explained in end-user documentation.
Also, that code has had some basic testing, but most certainly needs a
lot more refinement.
As proof-of-concept, OBJ IO script will be updated to use that new
system after that commit.
|