Open gl render objects transparent #47218

Closed
opened 2016-01-21 10:37:25 +01:00 by Andrew · 13 comments

System Information
Win 7 GTX 750ti

Broken: 2.76.5

Open gl renderer put alpha on the objects, which resulting them to appear transparent when rendering playblasts in textured shaded mode. This kinda works with static images, and the animated playblasts works fine with solid and shadeless modes.

Exact steps for others to reproduce the error
With a textured character turn on viewport shading to texture, and make sure shadeless is unchecked and you render animated playblast. Also viewport background appear transparent too. World background texture works fine. The engine should be cycles.

static solid static solid.jpg
animated textured shaded.avi

**System Information** Win 7 GTX 750ti Broken: 2.76.5 Open gl renderer put alpha on the objects, which resulting them to appear transparent when rendering playblasts in textured shaded mode. This kinda works with static images, and the animated playblasts works fine with solid and shadeless modes. **Exact steps for others to reproduce the error** With a textured character turn on viewport shading to texture, and make sure shadeless is unchecked and you render animated playblast. Also viewport background appear transparent too. World background texture works fine. The engine should be cycles. static solid ![static solid.jpg](https://archive.blender.org/developer/F275829/static_solid.jpg) [animated textured shaded.avi](https://archive.blender.org/developer/F275831/animated_textured_shaded.avi)
Author

Changed status to: 'Open'

Changed status to: 'Open'
Author

Added subscriber: @AndrewShi

Added subscriber: @AndrewShi

Added subscriber: @mont29

Added subscriber: @mont29

Please follow our submission template and guidelines and make a complete, valid bug report, with required info, precise description of the issue, precise steps to reproduce it, small and simple .blend and/or other files to do so if needed, etc.

Please follow our submission template and guidelines and make a complete, valid bug report, with required info, precise description of the issue, precise steps to reproduce it, **small and simple** .blend and/or other files to do so if needed, etc.
Author

I already described this pretty much precise...Okay second attempt.

Open file with textured model, push alt+z - you now should see the textured model on the screen. Then OpenGl render active viewport. It small camera icon on the bottom panel of your 3d view. Now you on UV IMAGE editor window and should see rendered image. And due the bug - objects here are transparent.
If you check shadeless in the SHADE menu of the N-panel and render again - you should see the objects on the render result.

Again:
TEXTURE SHADED VIEW is bugged - transparent objects on the render

TEXTURE SHADED with SHADELESS checked - no transparent, works fine (except background is still transparent)

Solid shaded - works

Material shaded - don't work

When i render the playblasts with my textured characters from active viewport, i expect too see them on the render. This bug cuts' them off if i turn on textured shaded view.

In your UV IMAGE EDITOR you have three checkered icons near "combined". Channels of the image to draw.
COLOR AND ALPHA
COLOR
ALPHA

Check the Alpha channel any time you render.
Cube.blend
this file contains the cube with a uv grid texture on it. The texture should be packed there. If not - create your own and put it on the cube.

I already described this pretty much precise...Okay second attempt. Open file with textured model, push alt+z - you now should see the textured model on the screen. Then OpenGl render active viewport. It small camera icon on the bottom panel of your 3d view. Now you on UV IMAGE editor window and should see rendered image. And due the bug - objects here are transparent. If you check shadeless in the SHADE menu of the N-panel and render again - you should see the objects on the render result. Again: TEXTURE SHADED VIEW is bugged - transparent objects on the render TEXTURE SHADED with SHADELESS checked - no transparent, works fine (except background is still transparent) Solid shaded - works Material shaded - don't work When i render the playblasts with my textured characters from active viewport, i expect too see them on the render. This bug cuts' them off if i turn on textured shaded view. In your UV IMAGE EDITOR you have three checkered icons near "combined". Channels of the image to draw. COLOR AND ALPHA COLOR ALPHA Check the Alpha channel any time you render. [Cube.blend](https://archive.blender.org/developer/F276938/Cube.blend) this file contains the cube with a uv grid texture on it. The texture should be packed there. If not - create your own and put it on the cube.

Added subscriber: @cheleb

Added subscriber: @cheleb

Confirmed on Linux

Broken in: 147f7a1e86
Last working: 82191b102f

Exact steps for others to reproduce the error:

  • open Andrew's attached Cube.blend
  • set the Render Engine to Cycles and the 3dView drawmode to Textured
  • do an OpenGL render by pressing the Camera icon in the 3dView's Header

The Render Result is completely transparent, but you can see the RGB values of the Cube by LMB clicking on the image.
missing_alpha.jpg

Now:

  • open the properties panel in the 3dView and activate Shadless under the Shading Tab
  • do an OpenGL render by pressing the Camera icon in the 3dView's Header

This time, the Cube can be seen in the Render Result
correct_alpha.jpg

The reason seems to be that the new Simple Shader is initialized with an alpha value of zero in drawmesh.c [here ]] and [ https:*developer.blender.org/diffusion/B/browse/master/source/blender/editors/space_view3d/drawmesh.c;147f7a1e860587a928f465b0b4d0ecf816c997be$387 | here .

Attached patch fixes this for me, but I am not sure if this is the right solution.
fix_t47218_initialize_basic_shader_with_full_alpha.diff

Cheers,
Ralf

Confirmed on Linux Broken in: 147f7a1e86 Last working: 82191b102f **Exact steps for others to reproduce the error:** - open Andrew's attached [Cube.blend ](https://developer.blender.org/F276938) - set the Render Engine to Cycles and the 3dView drawmode to Textured - do an OpenGL render by pressing the Camera icon in the 3dView's Header The Render Result is completely transparent, but you can see the RGB values of the Cube by LMB clicking on the image. ![missing_alpha.jpg](https://archive.blender.org/developer/F277062/missing_alpha.jpg) **Now:** - open the properties panel in the 3dView and activate Shadless under the Shading Tab - do an OpenGL render by pressing the Camera icon in the 3dView's Header This time, the Cube can be seen in the Render Result ![correct_alpha.jpg](https://archive.blender.org/developer/F277064/correct_alpha.jpg) The reason seems to be that the new Simple Shader is initialized with an alpha value of zero in drawmesh.c [here ]] and [[ https:*developer.blender.org/diffusion/B/browse/master/source/blender/editors/space_view3d/drawmesh.c;147f7a1e860587a928f465b0b4d0ecf816c997be$387 | here ](https:*developer.blender.org/diffusion/B/browse/master/source/blender/editors/space_view3d/drawmesh.c;147f7a1e860587a928f465b0b4d0ecf816c997be$1080). Attached patch fixes this for me, but I am not sure if this is the right solution. [fix_t47218_initialize_basic_shader_with_full_alpha.diff](https://archive.blender.org/developer/F277066/fix_t47218_initialize_basic_shader_with_full_alpha.diff) Cheers, Ralf
Campbell Barton was assigned by Bastien Montagne 2016-01-25 08:07:41 +01:00

Added subscribers: @MikeErwin, @Sergey, @ideasman42

Added subscribers: @MikeErwin, @Sergey, @ideasman42

@ideasman42 think you worked on OGL rendering recently? But hti may also interest @Sergey or @MikeErwin…

@ideasman42 think you worked on OGL rendering recently? But hti may also interest @Sergey or @MikeErwin…

Added subscriber: @brecht

Added subscriber: @brecht
Campbell Barton was unassigned by Brecht Van Lommel 2016-01-25 09:08:40 +01:00
Brecht Van Lommel self-assigned this 2016-01-25 09:08:40 +01:00

This is my mistake, the patch looks fine, will test and commit later today.

This is my mistake, the patch looks fine, will test and commit later today.

This issue was referenced by 820e7214dd

This issue was referenced by 820e7214dddd13ecf415621f433ee762e2f95066

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
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
5 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#47218
No description provided.