layered alpha gradients in viewport not correct #27979

Closed
opened 2011-07-15 11:15:23 +02:00 by Ingo Randolf · 6 comments

%%%When using alpha-gradiented textures in objects, which are overlapping (laying on top of each other), the alpha-channel is not correctly drawn.
if an object is selected though, the alpha channel of this object is drawn correctly.

please see this forum entry:
http://www.blender.org/forum/viewtopic.php?t=20287

a .blend file is attached.

Tested on:
CPU: Intel Core 2 Duo 2,5 GHz
RAM: 4 GB
GFX: GeForce 8600M GT, 512 MB
OS: Mac OS X 10.6.7 (10J869)
Blender: 2.58.0 (r37702)

blender 2.57 on ubuntu shows the same behaviour.%%%

%%%When using alpha-gradiented textures in objects, which are overlapping (laying on top of each other), the alpha-channel is not correctly drawn. if an object is selected though, the alpha channel of this object is drawn correctly. please see this forum entry: http://www.blender.org/forum/viewtopic.php?t=20287 a .blend file is attached. Tested on: CPU: Intel Core 2 Duo 2,5 GHz RAM: 4 GB GFX: GeForce 8600M GT, 512 MB OS: Mac OS X 10.6.7 (10J869) Blender: 2.58.0 (r37702) blender 2.57 on ubuntu shows the same behaviour.%%%
Author

Changed status to: 'Open'

Changed status to: 'Open'

%%%I believe this is a known issue and there is an existing bug report.

It seems to be the result of the transform out of linear space somehow doubling up the transform on the alpha channel.

Please test with linear output and ingestion to confirm.%%%

%%%I believe this is a known issue and there is an existing bug report. It seems to be the result of the transform out of linear space somehow doubling up the transform on the alpha channel. Please test with linear output and ingestion to confirm.%%%
Author

%%%thanks for the reply.

Sorry, what i forgot to mention in my initial message was that this happens in the viewport (3D View Window). i am am not talking about final render.
(this is mentioned in the forum thread tough... also the screenshots provided there are made from the 3D View)

as far as i understood the colormanagement it is used in the rendering process and is not affecting the viewport. is this correct?

i can not see an effect in the 3D View by un/checking the Color Management button in the render-tab in the properties window.

when i render the scene provided in the .blend file, everything is fine. i use the game-renderer, also there the quality is very good.

but maybe i just do not know how to change to linear output for the viewport...
(looked through the preferences another time...)
sorry, i also do not understand what you mean with "test with ingestion".

thx%%%

%%%thanks for the reply. Sorry, what i forgot to mention in my initial message was that this happens in the viewport (3D View Window). i am am not talking about final render. (this is mentioned in the forum thread tough... also the screenshots provided there are made from the 3D View) as far as i understood the colormanagement it is used in the rendering process and is not affecting the viewport. is this correct? i can not see an effect in the 3D View by un/checking the Color Management button in the render-tab in the properties window. when i render the scene provided in the .blend file, everything is fine. i use the game-renderer, also there the quality is very good. but maybe i just do not know how to change to linear output for the viewport... (looked through the preferences another time...) sorry, i also do not understand what you mean with "test with ingestion". thx%%%
Member

%%%Troy is a bit confused here with other alpha issues :) I also have still no idea what this ingestion stuff is...

Ingo: drawing multiple transparent objects correcly in the 3d viewport is very hard with openGL.
For correct and visible display, we also draw everything that's unselected first, then a selection on top of it. We also don't sort alpha faces on Z before drawing (speed reasons).
This means the viewport display for transparent objects isn't very accurate yet.

There's ways to solve it but that's really a special new project someone should work on one day... it's on our todo in wiki as well.%%%

%%%Troy is a bit confused here with other alpha issues :) I also have still no idea what this ingestion stuff is... Ingo: drawing multiple transparent objects correcly in the 3d viewport is very hard with openGL. For correct and visible display, we also draw everything that's unselected first, then a selection on top of it. We also don't sort alpha faces on Z before drawing (speed reasons). This means the viewport display for transparent objects isn't very accurate yet. There's ways to solve it but that's really a special new project someone should work on one day... it's on our todo in wiki as well.%%%
Member

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
Author

%%%I digged into the code a bit to solve this problem and want to propose an object-base solution:

in view3d_draw.c function view3d_main_area_draw:

when drawing the objects:

  • calculate distance to viewpoint
  • z-sort the objects
  • draw the objects in z-order

in order for this working nicely, also the selected objects and objects in edit_mode are drawn z-ordered. no drawing afterwards, this would mess with the alphas again...
(me being a beginner with blender-coding wonder: whats the reason, to draw selected objects and obj in editmode afterwards?)

to try out, please find a patch here:
http://www.bildstrom.at/dl/view3d_render_objzsort.patch

the patch solves this viewport bug. after a quick test with more complex sceneries it does not interfere.
before i submit this patch, i would love to get reactions from more advanced developers than me about this solution. there might be more efficient ways... ;)

cheers%%%

%%%I digged into the code a bit to solve this problem and want to propose an object-base solution: in view3d_draw.c function view3d_main_area_draw: when drawing the objects: - calculate distance to viewpoint - z-sort the objects - draw the objects in z-order in order for this working nicely, also the selected objects and objects in edit_mode are drawn z-ordered. no drawing afterwards, this would mess with the alphas again... (me being a beginner with blender-coding wonder: whats the reason, to draw selected objects and obj in editmode afterwards?) to try out, please find a patch here: http://www.bildstrom.at/dl/view3d_render_objzsort.patch the patch solves this viewport bug. after a quick test with more complex sceneries it does not interfere. before i submit this patch, i would love to get reactions from more advanced developers than me about this solution. there might be more efficient ways... ;) cheers%%%
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
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#27979
No description provided.