Improve UDIM functionality #72390
Labels
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
28 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#72390
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The UDIM code from D3509 covers basic use cases, but there still are quite a few ToDos:
fa5e28ab08
)e0cd5b980f
)11d9271804
)bdbcb0df10
)850aa3a6cf
)f9e65fcea7
)Added subscriber: @LukasStockner
Added subscriber: @txo
Added subscriber: @FrancoisRimasson
Added subscriber: @g-lul
Added subscriber: @boberfly
Hey @LukasStockner
Testing this out on my end. In GafferCycles if I create an image_texture node but have the filename path blank, I will get an assert. My workaround is:
In: https://developer.blender.org/diffusion/B/browse/master/intern/cycles/render/image.cpp$319
So that in https://developer.blender.org/diffusion/B/browse/master/intern/cycles/render/nodes.cpp$410 this doesn't get set to true on an invalid filename path.
While I have your attention, may I suggest using the syntax to force is_tiled to on? This is aligned with how OpenImageIO works and other renderers using OIIO adhere to this system (and I assume the TextureCache branch might also use):
https://github.com/OpenImageIO/oiio/blob/master/src/libtexture/imagecache.cpp#L300
Cheers, great work so far Lukas!
Added subscriber: @Yang_Jing_Gui
@boberfly I can't reproduce that issue - if I set an empty filename, it just renders pink without any asserts. Can you tell me which assert you're hitting?
Regarding the tag: Good point, implemented in
e4413dc
.Hi @LukasStockner
I just did a clean build off of Blender master to my standalone Cycles and I can't recreate the issue now, it is pink so that's good. I am balancing the texture cache, openvdb, adaptive sampling & light-groups patch here which probably one of them introduced something weird with the udim patch which I'll try to investigate on my side (gut-feeling it was the openvdb one).
In my case it is triggering
has_image
totrue
(first slot is not -1) despite having an invalid path so it never assigns pink and thinks there's an image so it'll eventually assert in the kernel somewhere when it can't find the rightINTERPOLATION_*
orEXTENSION_*
as they were never uploaded to the device properly.Cheers for adding the tag, that'll work consistently inside of GafferCycles next to Arnold, Appleseed & 3Delight.
I just had another thought/idea which isn't necessarily UDIM-related but it might be a good feature to have. In the other renderer backends you are allowed to set the pink missing texture to a color plug. This works well as a fallback, so often in lookdev we would assign a safe texture fallback to the missing texture plug or set it to black if we don't care (like if the model/texture is WIP) or if there's an asset variant change and only some UDIMs are modified and the missing ones would just sample from the base UDIMs via the fallback plug.
In addition to this, I haven't done much testing here with Cycles UDIMs but usually a toggle to fail the render on missing UDIMs (when there are some tiles but not all tiles available based on the mesh UV requests) can be set in other renderer's image samplers, which you can turn off and show the missing texture colour instead of failing. This might go hand-in-hand with the above feature.
Cheers!
Hey Lukas,
I got a chance to test out UDIM support in GafferCycles/Standalone, and I think I've found a bit of an issue here. I noticed in the blender_shader.cpp that this is where the known tiles available are discovered eg.
https://developer.blender.org/diffusion/B/browse/master/intern/cycles/blender/blender_shader.cpp$669
However, in the case of Cycles standalone there's no real way to give this information if all you've got is a file path, so there is an early exit made here:
https://developer.blender.org/diffusion/B/browse/master/intern/cycles/render/nodes.cpp$311
Should this use a filesystem check to see what tiles are available, or should I made something custom in GafferCycles to do something similar to what Blender is doing? I'm guessing for regular Cycles standalone that a path won't know/check for more than 1001 either and would need code as well to set the tiles vector.
I wanted to post it here to see if it was an oversight or by design.
Cheers
Added subscriber: @Fuxna
This comment was removed by @Fuxna
Added subscriber: @Alumx
Added subscriber: @DanielBystedt
Added subscriber: @YegorSmirnov
By the way, UDIMs are not autodetected if using ctrl+shift+t for simultaneous shader channels population with image nodes. But may be it's up to the node wrangler addon functionality.
Added subscriber: @pixeltrain3d
Added subscriber: @lemenicier_julien
Added subscriber: @AndreasErni
Added subscriber: @Kalle-SamuliRiihikoski
I don't know if this is already addressed, but I have python script that load tiled image (texture_1001, texture_1002) into texture node but preview only show first tile.
Did some more tests. So If I name textures in 3d-coat like this: Mesh_diffuse_1001..1002.jpg
Then use blender python script to create texture node and load images files into it. The preview will show only first tile. Now if I go back to 3d-coat and create textures again and this time name them Mesh_1001_diffuse.jpg, etc... then use texture node folder button to load images manually and select this new file ...1001.jpg file. Then preview view changes to look correct.
Added subscriber: @SLAD1026
UDIM baking is not working yet, please update in the latest upcoming blender version.
Added subscriber: @vr_sebas
Added subscriber: @stjerneidioten
Added subscriber: @XB982
Added subscriber: @end_ahmed
Added subscriber: @tomsmalley
Added subscriber: @GregoryS
Added subscriber: @hemul
Added subscriber: @Chang-Chin-Wen
Added subscriber: @lampy
Removed subscriber: @AndreasErni
This issue was referenced by
6787cc13d4
Added subscriber: @AlexeyAdamitsky
Added subscriber: @pauanyu_blender
Added subscriber: @JerahmyPocott
Can we also add interacting with tile images via python scripts? Currently only the first tiles pixels are available via the script interface.