Cycles: Improve the coverage of automated regression tests #123012
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
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
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
Viewport & EEVEE
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
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
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
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
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
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#123012
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
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?
principled_thinfilm_xxx.blend
, with increased light radius2724f296b2
)Here are a few ideas for other things that could be added to the test suite.
More OSL testing (Maybe run every file with SVM and OSL?)DoneBake view from active camera
optionBake from selected to active
optionI created a script that interates through objects in the Cycles test files looking for nodes that aren't being tested. According to my script, these nodes aren't being tested on any non-light objects, so we should probably add tests for some of these.
For the nodes that are already tested, there may be configurations that aren't tested (E.g. The Mutliscatter GGX Glass case). I will investigate these next.
Map Range and Wave Texture are tested on lights though, we can add them on lights but not sure if it's necessary.
Sorry about that. Quite a lot of what I'm finding is "there's a gap in testing, but that gap probably doesn't need testing". For example the wave texture on a mesh. There probably isn't a need for a mesh test, unless the wave texture has a 3D component that can't be captured in the light test.
For the next list I'm creating (the configurations of nodes that aren't tested from the nodes that are tested), I will include more notes about the things that likely don't need extra tests made.
Sorry it took me so long to creating the second list (Configurations we don't test from nodes we do test).
In the list below you will find nodes that are being tested, but configurations of these nodes that aren't. Many of these can probably be skipped.
Sorry the list is so long. There are a lot of nodes.
List of nodes
Ambient Occlusion
Inside
option (Probably doesn't need a extra test because it just flips a vector)Attribute
These extra configurations probably don't need testing.
Geomtry
modeObject
modeInstancer
modeViewlayer
modeBevel
Color Attribute
Hair info
Should we test every output of the node with both rounded ribbons and 3D curve hairs?
What about on meshes?
Geometry
Would it be a good idea to test each output on a mesh, strand, and a point object?
Light Path
None the inputs from the light path node are properly tested, except for the
Is diffuse ray
.Object Info
None of it's outputs seem to be properly tested.
It's tested in the "Opengl" section, but these tests don't appear to run by default.
Particle Info
Tangent
Texture coordinates
Note: I skimmed through this section as there were a lot of files to look at. So I may of missed some cases that are tested.
Most of the inputs aren't properly tested
Normal output
Object output
Camera output
Window output
Reflection output
The object input
The From instancer boolean
It might be a good idea to test each option on different object types (mesh, light, hair, etc)
Wireframe
Brightness/Contrast
Hue/Saturation/Value
None of it's outputs seem to be properly tested.
It's tested in the "Opengl" section, but these tests don't appear to run by default.
Invert
The node doesn't appear to be properly tested.
It's tested in the "Opengl" section, but these tests don't appear to run by default.
Mix node
Combine colour
Combine XYZ
The node doesn't appear to be properly tested.
It's tested in the "Opengl" section, but these tests don't appear to run by default.
Math
Note: I only looked at float_math.blend for simplicity sake. Some of these modes may already be tested in other files.
light_texture.blend
test some of them.RGB to BW
This node isn't directly tested, but it is likely to be indirectly tested wherever a RGB socket is connected to a value socket.
This node is directly tested in the "Opengl" section, but these tests don't appear to run by default.
Seperate Color
The node doesn't appear to be properly tested.
It's tested in the "Opengl" section, but these tests don't appear to run by default.
Vector Math
Note: I only looked at vector_math.blend for simplicity sake. Some of these modes may already be tested in other files.
Note: For BSDF testing, I primarily tested the "main shader files" (E.g. the files in the
bsdf
test folder). This means I may miss some cases that are tested in other files.MOST BSDFs
I bring this up because I was making some changes to the glass BSDF a few months ago. And according to the Cycles test suite, the change had "no impact on the rendering of glass". But it did have an impact, it specifically had a impact on every coloured or darker coloured glass, which wasn't tested.
This same issue may be encountered with other BSDFs if people are working on them.
Emission shader
Diffuse BSDF
Note: A lot of files use the Diffuse BSDF as a background, so I didn't check them all. A roughness greater than 0 may already be tested
Glossy BSDF
glossy_ggx_smooth.blend
)Hair BSDF
Holdout
Holdout + transparent file
I'm not sure if this test is needed.
Principled BSDF
Principled Hair BSDF
Absorption input in Huang mode
Melanin input in Huang mode
Both of the tests above probably don't need to be added as the colour part of the code parth is probably the same between the Huang and Chiang models.
Random roughness
Random colour
Different IORs?
Coat parameter in the Chiang mode
Test on a mesh?
Principled Volume
Ray Portal
Sheen BSDF
Subsurface Scatting
all_light_types_in_volume.blend
)Toon BSDF
Volume Scatter
Brick texture
This node doesn't appear to be properly tested. (There's no test dedicated to it, and the tests that do use it don't test it well)
Gradient Texture
This node doesn't appear to be properly tested. (There's no test dedicated to it, and the tests that do use it don't test it well)
Magic Texture
This node doesn't appear to be properly tested. (There's no test dedicated to it, and the tests that do use it don't test it well)
principled_emission_alpha.blend
Noise texture
This node doesn't appear to be properly tested. (There's no test dedicated to it, and the tests that do use it don't test it well)
principled_emission.blend
Voronoi texture
This node doesn't appear to be properly tested. (There's no test dedicated to it, and the tests that do use it don't test it well)
light_texture.blend
Wave texture
This node doesn't appear to be properly tested. (There's no test dedicated to it, and the tests that do use it don't test it well)
light_texture.blend
Bump
Displacement
Mapping
This node doesn't appear to be properly tested. (There's no test dedicated to it, and the tests that do use it don't test it well)
Normal
The node doesn't appear to be properly tested.
It's tested in the "Opengl" section, but these tests don't appear to run by default.
Normal Map
The "Blender Object Space" and "Blender World Space" don't appear to be tested. I'm unsure if these are legacy options or not.
Vector Curve
The node doesn't appear to be properly tested.
It's tested in the "Opengl" section, but these tests don't appear to run by default.
Vector Displacement
World space mode isn't tested
Vector transform
This node doesn't appear to be properly tested. (There's no test dedicated to it, and the tests that do use it don't test it well)
Edit: I have shifted nodes that we now properly test into the list below. I will try and keep this up to date.
Updated
Glass BSDF
glass_multiggx_tinted.blend
)Seperate XYZ
light_texture.blend
)all_light_types_in_volume.blend
)This probably don't need a test added for it.
@Alaska thanks a lot for the list, I've updated your reply with the things that I know are tested, and struck through the bullet point where all sub-bullet points are tested.
For the texture nodes, I simply mentioned the test files I know that include those texture, probably you want to have a check if those are enough.
Thanks for that. I'll take a closer look at some of these nodes later this week and provide some new test cases if I have the time.
For co-ordination with regard to updaing the tests, I'll discuss it in Blender chat.
Just as a note. I've mainly been looking at missing tests for nodes because the search can be assisted with automation. There are obviously other areas/render settings (E.g. light linking in volumes) that need to be tested. From my perspective, it's hard to know what specific combinations that aren't being tested need testing unless there's a bug report for it. So I don't have plans to provide a list for render setting combinations to test.
I have attached some test files for texture nodes. In it you will find .blend files and a readme that should hopefully explain things.
Notes:
/render/texture/
folder. This will require the texture tests folder to be enabled: !124574I've created a rough pull request that allows the enablement of OSL for the Cycles render test: !124601
It's a "rough pull request" because it works, but it seems a bit hacky. Not sure if it's up to the standard of the Blender foundation.
@Alaska
Thanks for the extensive test files, I have started looking into the individual blend files.
For a proper review process, would you like to have temporary commit access to
blender/blender-test-data
, so that you can create a PR inblender/blender-test-data
like this blender/blender-test-data#5, and then creata a PR inblender/blender
to point to your commit in the PR, like this #124360, to call the blender-bot for testing?Otherwise I can make a PR in the test repo, but then it becomes my PR and it would be quite complicated for you to make subsequent changes.
Let me know what works best for you.
The main benefit commit access would grant me is the ability to quickly iterate on files and get then tested by the build bot? Or is it that I can iterate on files in a repo and you can get them with a simple
git pull
.In either case, it might be better to NOT give me commit access.
I can do testing locally (I have access to a wide range of hardware and OS'), and I can create a temporary repo you can pull from.
Once we've gotten the tests to a state where it's ready for commiting to
blender/blender-test-data
, you could open a pull request in theblender-test-data
repo, I can modify !124574 to point to it, then we can run a final test on build bot and commit if it passes.Note: I believe
@blender-bot build
requires the user to have commit access toblender/blender
to stop people from running code on the build machine without going through some sort of review first. So giving me commit access toblender/blender-test-data
wouldn't be enough for build bot testing.I believe we should start with getting the tests commited to 4.3/main, then can work backwards and add them to the 4.2 and 3.6 LTS branchs if desired.
While investigating texture tests, I found a few other areas we should probably add tests for:
While working on !125803 I noticed there was no test for shadow linking with curves/point objects, which is important for testing some custom BVH functions.
I've added a point for this to the original report.
#125307 is a bug report about precision realted artifacts that occured when far away from the world origin on Metal-RT due to the disabling of ray offsetting on that platform during the development of 4.2.
In that bug report Michael Jones from Apple asked if it was possible to add a render test away from the world origin to test these sorts of issues so they can be picked up easier. I volunteered to investigate if this was feasible by comparing the results across many different devices. And here are some quick results.
I created a standard size test scene at position x=500m, y=1000m, z=2000m to test these precision issues, although other precision related tests could be (I have attached an example image and .blend file). Note: This files tests 1, maybe 2 precision issues. There are many others we could try testing.
A lot of platforms are fairly consistent with subtle noise differences between them. However, some platforms do have differences that will make them fail our render tests. For example, comparing x86 Windows to ARM macOS has enough of a difference to fail the render test using our standard test threshold (See
x86 vs ARM.png
). The exact same differences between x86 and ARM also propergate to x86 vs Metal. So I assume the issue is with slight precision differences during scene setup, not during rendering, but I'm just guessing here. However with the same CPU there can still be some large differences. For example x86 vs HIP with BVH2 is fine, but x86 vs HIP-RT is not (seex86 vs HIP-RT.png
). And ARM CPU vs Metal is fine, but ARM CPU vs Metal-RT is not.So at this scale, we can't add a precision test to the test suite.
I had a few thoughts on how to resolve this:
What are peoples thoughts? CC @Sergey for your input.
One thing I noticed while creating and testing the OSL patch was that if constant folding can be done, then the node will be constant folded using SVM.
For example, in the vector math nodes test all the vector math nodes are constant folded by SVM. Meaning that the OSL version of this test doesn't actually test the vector math node in OSL mode.
I have added a bullet point for this issue.
Here are the test result from the major GPU platforms we support to help gauge the "inconsistency between Embree and Hair Primitives on GPU".
Process for creating these test results:
BLENDER_TEST_IGNORE_BLOCKLIST=1
whenever I ran a test to ensure these blocked tests were run.Notes: