Workbench Next Volumes #105501

Merged
Miguel Pozo merged 10 commits from pragma37/blender:pull-workbench-next-volumes into main 2023-05-16 16:56:27 +02:00
Member

This is an almost 1:1 port of the Workbench volumes to Workbench Next using the new Draw Manager API.
I initially tried to port the draw_volume.cc API instead, but the Workbench needs many features not present there.

The only improvement is a optimization to early out the shader volume accumulation loop the when the evaluation is already fully opaque.

Additionally I've updated Volume Object slices to be drawn using a plane instead of a box, just like Volume Modifier slices.
I think that's actually the intended way to use the slice shader version, but I may be wrong?
The only visual difference is that using a plane results in a slightly lower opacity slice.

There's also currently a warning for not using the return value of matrix normalize_and_get_size function, but I don't think the nodiscard there is actually needed?

This is an almost 1:1 port of the Workbench volumes to Workbench Next using the new Draw Manager API. I initially tried to port the draw_volume.cc API instead, but the Workbench needs many features not present there. The only improvement is a optimization to early out the shader volume accumulation loop the when the evaluation is already fully opaque. Additionally I've updated Volume Object slices to be drawn using a plane instead of a box, just like Volume Modifier slices. I think that's actually the intended way to use the slice shader version, but I may be wrong? The only visual difference is that using a plane results in a slightly lower opacity slice. There's also currently a warning for not using the return value of matrix `normalize_and_get_size` function, but I don't think the nodiscard there is actually needed?
Miguel Pozo added this to the EEVEE & Viewport project 2023-03-06 17:53:56 +01:00
Miguel Pozo requested review from Clément Foucault 2023-03-06 17:54:06 +01:00
Miguel Pozo force-pushed pull-workbench-next-volumes from 69e8ff8a96 to 54eb5509a5 2023-03-06 17:57:49 +01:00 Compare
Clément Foucault requested changes 2023-05-16 11:19:52 +02:00
Clément Foucault left a comment
Member

Looks good. Just a few style errors.

Looks good. Just a few style errors.
@ -212,0 +212,4 @@
if (final_transmittance <= 0.01) {
/* Early out */
final_transmittance = 0;

Do not use implicit cast assignment. This is not supported by all drivers.

Do not use implicit cast assignment. This is not supported by all drivers.
pragma37 marked this conversation as resolved
@ -327,0 +337,4 @@
GPUShader *shaders_[2][2][3][2];
GPUShader *get_shader(bool slice, bool coba, int interpolation, bool smoke);
void draw_slice_ps(Manager &manager,
Follow class layout style https://wiki.blender.org/wiki/Style_Guide/C_Cpp#Class_Layout
pragma37 marked this conversation as resolved
Miguel Pozo force-pushed pull-workbench-next-volumes from 54eb5509a5 to 60f5e72f1f 2023-05-16 15:32:55 +02:00 Compare
Clément Foucault approved these changes 2023-05-16 16:50:24 +02:00
Miguel Pozo merged commit eb0e03bae7 into main 2023-05-16 16:56:27 +02:00
Miguel Pozo deleted branch pull-workbench-next-volumes 2023-05-16 16:56:28 +02:00
Miguel Pozo referenced this issue from a commit 2023-05-16 16:56:35 +02:00
Contributor

Hi, is it okay to post a bug report about this at this stage? I see an issue (or difference with the current Workbench) with volumes and transparency. (In solid mode volume objects ignore viewport display transparency of other objects.)

Hi, is it okay to post a bug report about this at this stage? I see an issue (or difference with the current Workbench) with volumes and transparency. (In solid mode volume objects ignore viewport display transparency of other objects.)
Author
Member

Hi, is it okay to post a bug report about this at this stage?

Sure. I don't remember if I did it on purpose, to be honest.
But I think the Workbench Next behavior makes more sense.

> Hi, is it okay to post a bug report about this at this stage? Sure. I don't remember if I did it on purpose, to be honest. But I think the Workbench Next behavior makes more sense.
Contributor

Hi, is it okay to post a bug report about this at this stage?

Sure. I don't remember if I did it on purpose, to be honest.
But I think the Workbench Next behavior makes more sense.

To be clear, this is what I'm seeing.

Workbench Next shows difference in solid view transparency (via viewport display setting) and render view transparency (via material setting)

WorkbenchNextVolumeTransparency.png

Workbench:

WorkbenchVolumeTransparency.png

File: WorkbenchNextVolumeTransparency.blend

> > Hi, is it okay to post a bug report about this at this stage? > > Sure. I don't remember if I did it on purpose, to be honest. > But I think the Workbench Next behavior makes more sense. To be clear, this is what I'm seeing. Workbench Next shows difference in solid view transparency (via viewport display setting) and render view transparency (via material setting) ![WorkbenchNextVolumeTransparency.png](/attachments/7c3282a8-0f5d-4279-b520-256ba1566dc6) Workbench: ![WorkbenchVolumeTransparency.png](/attachments/aa38d623-37d3-4651-8df2-2768f4135c2b) File: [WorkbenchNextVolumeTransparency.blend](/attachments/f71077db-97d1-4593-b374-5ce85860ece8)
Falk David referenced this issue from a commit 2023-05-23 14:35:33 +02:00
Howard Trickey referenced this issue from a commit 2023-05-29 02:51:39 +02:00
Sign in to join this conversation.
No reviewers
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 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#105501
No description provided.