Geometry Nodes: Unusable texture inputs? #95461

Closed
opened 2022-02-03 03:42:00 +01:00 by Will · 21 comments

System Information
Operating system: Biological Bobsleigh Birds (Linux)

Blender Version
Broken: 3.0, 3.20 alpha

Short description of error

As the Attribute Sample Texture Node is being removed, it doesn't appear that there is any way to use the Texture socket types that can be exposed from the modifier panel anymore:

image.png

Texture socket type added w/ Attribute Sample Texture:

https://developer.blender.org/D11222

Exposed as nodegroup input in modifier panel:

https://developer.blender.org/rB3025c348253a66f9c316259aa03f8884bf56d779

Two possible solutions:

  • Add Texture Sample Field node.

  • Make texture input output RGB.

Exact steps for others to reproduce the error

  • Add a "Texture" input to a Geometry Nodes group.
  • Try to use it in the nodegroup.
**System Information** Operating system: Biological Bobsleigh Birds (Linux) **Blender Version** Broken: 3.0, 3.20 alpha **Short description of error** As the [Attribute Sample Texture Node](https://docs.blender.org/manual/en/latest/modeling/geometry_nodes/attribute/attribute_sample_texture.html) is being removed, it doesn't appear that there is any way to use the Texture socket types that can be exposed from the modifier panel anymore: ![image.png](https://archive.blender.org/developer/F12842998/image.png) Texture socket type added w/ Attribute Sample Texture: https://developer.blender.org/D11222 Exposed as nodegroup input in modifier panel: https://developer.blender.org/rB3025c348253a66f9c316259aa03f8884bf56d779 Two possible solutions: * Add Texture Sample Field node. * Make texture input output RGB. **Exact steps for others to reproduce the error** * Add a "Texture" input to a Geometry Nodes group. * Try to use it in the nodegroup.
Author

Added subscriber: @WCN

Added subscriber: @WCN

Added subscriber: @iss

Added subscriber: @iss

Changed status from 'Needs Triage' to: 'Needs User Info'

Changed status from 'Needs Triage' to: 'Needs User Info'

This sounds like design issue rather than bug to me. If I understand this, you say, that Attribute Sample Texture was only node that could work with textures, but now there is none (non-legacy)?

This sounds like design issue rather than bug to me. If I understand this, you say, that Attribute Sample Texture was only node that could work with textures, but now there is none (non-legacy)?
Contributor

Added subscriber: @Rawalanche

Added subscriber: @Rawalanche
Contributor

The node you are talking about has been replaced with Image Texture node:
image.png
Which is not planned to be deprecated. Use that one, and use your texture input attribute as its input.

The node you are talking about has been replaced with Image Texture node: ![image.png](https://archive.blender.org/developer/F12843917/image.png) Which is not planned to be deprecated. Use that one, and use your texture input attribute as its input.
Member

Added subscriber: @HooglyBoogly

Added subscriber: @HooglyBoogly
Member

I think we'll end up removing the texture socket completely when we remove the legacy nodes "before 4.0".

The "problem" here is that it still shows up in a few places-- the group inputs and outputs list, and the switch node.

We could hide it from this list fairly easily, but I'm not sure it's worth it:

diff --git a/source/blender/editors/space_node/node_edit.cc b/source/blender/editors/space_node/node_edit.cc
index 6275e7e4656..965fbf6b36a 100644
--- a/source/blender/editors/space_node/node_edit.cc
+++ b/source/blender/editors/space_node/node_edit.cc
@@ -2464,6 +2464,10 @@ static bool socket_change_poll_type(void *userdata, bNodeSocketType *socket_type
     return false;
   }
 
+  if (socket_type->type == SOCK_TEXTURE) {
+    return false;
+  }
+
   /* Only use basic socket types for this enum. */
   if (socket_type->subtype != PROP_NONE) {
     return false;
I think we'll end up removing the texture socket completely when we remove the legacy nodes "before 4.0". The "problem" here is that it still shows up in a few places-- the group inputs and outputs list, and the switch node. We could hide it from this list fairly easily, but I'm not sure it's worth it: ``` diff --git a/source/blender/editors/space_node/node_edit.cc b/source/blender/editors/space_node/node_edit.cc index 6275e7e4656..965fbf6b36a 100644 --- a/source/blender/editors/space_node/node_edit.cc +++ b/source/blender/editors/space_node/node_edit.cc @@ -2464,6 +2464,10 @@ static bool socket_change_poll_type(void *userdata, bNodeSocketType *socket_type return false; } + if (socket_type->type == SOCK_TEXTURE) { + return false; + } + /* Only use basic socket types for this enum. */ if (socket_type->subtype != PROP_NONE) { return false; ```
Member

Changed status from 'Needs User Info' to: 'Confirmed'

Changed status from 'Needs User Info' to: 'Confirmed'
Author

In #95461#1301171, @HooglyBoogly wrote:
I think we'll end up removing the texture socket completely when we remove the legacy nodes "before 4.0".

Personally I would be disappointed at losing the ability to reuse the same nodegroup with different procedural/volumetric textures chosen in the modifier pane.

> In #95461#1301171, @HooglyBoogly wrote: > I think we'll end up removing the texture socket completely when we remove the legacy nodes "before 4.0". Personally I would be disappointed at losing the ability to reuse the same nodegroup with different procedural/volumetric textures chosen in the modifier pane.

Added subscriber: @Quver

Added subscriber: @Quver

In #95461#1301171, @HooglyBoogly wrote:
I think we'll end up removing the texture socket completely when we remove the legacy nodes "before 4.0".

Please don't! This is a very usable feature for reusable nodegroups and removing it completely is a step back to me.
Shaders currently lack this. Instead expand this functionality to shader nodes.

See
https://devtalk.blender.org/t/input-socket-for-image-texture-shader-node/19601

It’s a pity the texture Image node (all texture nodes actually) actually conflates two things: Generating/loading texture data (colors) and doing the mapping. It would be nice if there would be simple ‘texture’ node which provides the color data (and has no inputs) , and a texturing node which takes a ‘texture’ input and a ‘mapping’ vector input and outputs the same as the current (Image) Texture nodes.

> In #95461#1301171, @HooglyBoogly wrote: > I think we'll end up removing the texture socket completely when we remove the legacy nodes "before 4.0". Please don't! This is a very usable feature for reusable nodegroups and removing it completely is a step back to me. Shaders currently lack this. Instead expand this functionality to shader nodes. See https://devtalk.blender.org/t/input-socket-for-image-texture-shader-node/19601 > It’s a pity the texture Image node (all texture nodes actually) actually conflates two things: Generating/loading texture data (colors) and doing the mapping. It would be nice if there would be simple ‘texture’ node which provides the color data (and has no inputs) , and a texturing node which takes a ‘texture’ input and a ‘mapping’ vector input and outputs the same as the current (Image) Texture nodes.
Contributor

In #95461#1301447, @Quver wrote:

In #95461#1301171, @HooglyBoogly wrote:
I think we'll end up removing the texture socket completely when we remove the legacy nodes "before 4.0".

Please don't! This is a very usable feature for reusable nodegroups and removing it completely is a step back to me.
Shaders currently lack this. Instead expand this functionality to shader nodes.

See
https://devtalk.blender.org/t/input-socket-for-image-texture-shader-node/19601

It’s a pity the texture Image node (all texture nodes actually) actually conflates two things: Generating/loading texture data (colors) and doing the mapping. It would be nice if there would be simple ‘texture’ node which provides the color data (and has no inputs) , and a texturing node which takes a ‘texture’ input and a ‘mapping’ vector input and outputs the same as the current (Image) Texture nodes.

The current "Image Texture" node is primarily what does texture sampling and mapping. It doesn't really conflate it, because the texture data block is actually exposed as a node socket input. The only issue here is that right now, this data block can only be exposed at the Geometry Nodes Group Input UI. It can not be crated within the tree in the same way you can create a float, vector and so on.

So all that would be needed would be some sort of "Texture" input node with just image texture datablock selector, which would accompany this set of input nodes:
image.png

This would make things such as triplanar displacement mapping a bit easier to do, without user having to swap image datablock manually in 3 separate "texture sampler" nodes.

The video in the thread you linked to talks exactly about that. So I would not conflate ability to use image texture as a data type in GN with the ability to use legacy procedural textures.

To wrap it up:

  1. We need "Image Texture Input" node, both in GN and in Shader Editor
  2. Image Texture (sampler) node in the shader editor needs Image datablock socket, in the same way GN already has it.
> In #95461#1301447, @Quver wrote: >> In #95461#1301171, @HooglyBoogly wrote: >> I think we'll end up removing the texture socket completely when we remove the legacy nodes "before 4.0". > > Please don't! This is a very usable feature for reusable nodegroups and removing it completely is a step back to me. > Shaders currently lack this. Instead expand this functionality to shader nodes. > > See > https://devtalk.blender.org/t/input-socket-for-image-texture-shader-node/19601 > > >> It’s a pity the texture Image node (all texture nodes actually) actually conflates two things: Generating/loading texture data (colors) and doing the mapping. It would be nice if there would be simple ‘texture’ node which provides the color data (and has no inputs) , and a texturing node which takes a ‘texture’ input and a ‘mapping’ vector input and outputs the same as the current (Image) Texture nodes. The current "Image Texture" node is primarily what does texture sampling and mapping. It doesn't really conflate it, because the texture data block is actually exposed as a node socket input. The only issue here is that right now, this data block can only be exposed at the Geometry Nodes Group Input UI. It can not be crated within the tree in the same way you can create a float, vector and so on. So all that would be needed would be some sort of "Texture" input node with just image texture datablock selector, which would accompany this set of input nodes: ![image.png](https://archive.blender.org/developer/F12845339/image.png) This would make things such as triplanar displacement mapping a bit easier to do, without user having to swap image datablock manually in 3 separate "texture sampler" nodes. The video in the thread you linked to talks exactly about that. So I would not conflate ability to use image texture as a data type in GN with the ability to use legacy procedural textures. To wrap it up: 1. We need "Image Texture Input" node, both in GN and in Shader Editor 2. Image Texture (sampler) node in the shader editor needs Image datablock socket, in the same way GN already has it.
Contributor

In #95461#1301196, @WCN wrote:

In #95461#1301171, @HooglyBoogly wrote:
I think we'll end up removing the texture socket completely when we remove the legacy nodes "before 4.0".

Personally I would be disappointed at losing the ability to reuse the same nodegroup with different procedural/volumetric textures chosen in the modifier pane.

The issue is that those procedural textures are legacy remnants of Blender Internal renderer. That doesn't mean you should not have the option to swap the procedural textures at your will. There are two more GN based concepts:

  1. You could wrap your entire GN network into a node group and expose the input for the custom procedural texture, and then easily quickly swap through any of those available in GN (which almost mirror those old BI ones):
    image.png
  2. Once GN gets proper enum handling, you could create Enum with all the GN Texture types and swap through them right in the modifier panel.

While the option 1. can feel less usable because it requires you to open a GN editor first before you can start switching and tweaking the textures, you must not forget the extreme amount of possibilities this opens. For example with the legacy textures, just mere mixing of them becomes a hell, requiring you to use multiple GN modifiers with the same GN node network, with one texture each. That's bad for both usability and performance. Let alone something like distorting the mapping of one procedural texture with another. That's pretty much impossible.

On the other hand, with GN it becomes trivial:
https://www.youtube.com/watch?v=4X4V-UUnYkM
So you trade a small reduction in ease of use by having to open node editor first to start switching texture types for giant increase in flexibility, by ability to mix, distort, blend, color correct, remap, etc... multiple procedural textures in a ways that were absolutely impossible with the legacy texture datablocks. I mean even XYZ offsetting of the texture mapping coordinates is not possible with the legacy textures, so you get whatever random seed you are stuck with, with very little option to art direct the initial state of the texture mapping.

> In #95461#1301196, @WCN wrote: >> In #95461#1301171, @HooglyBoogly wrote: >> I think we'll end up removing the texture socket completely when we remove the legacy nodes "before 4.0". > > Personally I would be disappointed at losing the ability to reuse the same nodegroup with different procedural/volumetric textures chosen in the modifier pane. The issue is that those procedural textures are legacy remnants of Blender Internal renderer. That doesn't mean you should not have the option to swap the procedural textures at your will. There are two more GN based concepts: 1. You could wrap your entire GN network into a node group and expose the input for the custom procedural texture, and then easily quickly swap through any of those available in GN (which almost mirror those old BI ones): ![image.png](https://archive.blender.org/developer/F12845345/image.png) 2. Once GN gets proper enum handling, you could create Enum with all the GN Texture types and swap through them right in the modifier panel. While the option 1. can feel less usable because it requires you to open a GN editor first before you can start switching and tweaking the textures, you must not forget the extreme amount of possibilities this opens. For example with the legacy textures, just mere mixing of them becomes a hell, requiring you to use multiple GN modifiers with the same GN node network, with one texture each. That's bad for both usability and performance. Let alone something like distorting the mapping of one procedural texture with another. That's pretty much impossible. On the other hand, with GN it becomes trivial: https://www.youtube.com/watch?v=4X4V-UUnYkM So you trade a small reduction in ease of use by having to open node editor first to start switching texture types for giant increase in flexibility, by ability to mix, distort, blend, color correct, remap, etc... multiple procedural textures in a ways that were absolutely impossible with the legacy texture datablocks. I mean even XYZ offsetting of the texture mapping coordinates is not possible with the legacy textures, so you get whatever random seed you are stuck with, with very little option to art direct the initial state of the texture mapping.

Oh, turns out there are separate "texture" sockets and the "image" sockets. I'm sorry, I thought there is only one "purple" socket type that is used for any textures (both BI and image textures). I was worried about the "Image" socket being removed.

Oh, turns out there are separate "texture" sockets and the "image" sockets. I'm sorry, I thought there is only one "purple" socket type that is used for any textures (both BI and image textures). I was worried about the "Image" socket being removed.
Member

Added subscriber: @JacquesLucke

Added subscriber: @JacquesLucke
Member

Changed status from 'Confirmed' to: 'Archived'

Changed status from 'Confirmed' to: 'Archived'
Member

It's not a bug. The texture data block socket is deprecated currently. We do plan to have a new system to support sharing textures between different systems, the design for that is still being worked on.

It's not a bug. The texture data block socket is deprecated currently. We do plan to have a new system to support sharing textures between different systems, the design for that is still being worked on.

Added subscriber: @Boris-Okunskiy

Added subscriber: @Boris-Okunskiy

Can you please provide some pointers into the new texture sharing system (i.e. links to design documents, drafts, discussions, etc)? TIA

Can you please provide some pointers into the new texture sharing system (i.e. links to design documents, drafts, discussions, etc)? TIA
Member
https://code.blender.org/2022/02/layered-textures-design/ https://devtalk.blender.org/t/layered-textures-design-feedback/23092
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
7 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#95461
No description provided.