OpenGL render with smoke and fire incorrect when using transparency #47639

Closed
opened 2016-03-01 10:20:51 +01:00 by Miika Puustinen (miikap) · 20 comments

Operating system and graphics card
Windows 8.1
I7-5820K 3.3GHz, 2x Asus GTX 960 4Gb, 32Gb RAM

Blender Version
Broken: 2.77 RC1 b594b25
Worked: 2.76 official

Short description of error
If fire rate is more than 1, fire doesn't render properly with opengl render.

How to reproduce:

  • Select default cube
  • Make quick efffect: quick smoke (fire option)
  • Change fire rate from the emitter to 10
  • Tick of smoke high resolution from domain settings (to get faster preview)
  • Make domain bigger by turning on adaptive domain and changing additional to 32 for example
  • sim/playback to frame 50
  • render opengl render / viewport render
  • compare to viewport

Example file:
http://www.pasteall.org/blend/40879

  • Miika P
Operating system and graphics card Windows 8.1 I7-5820K 3.3GHz, 2x Asus GTX 960 4Gb, 32Gb RAM **Blender Version** Broken: 2.77 RC1 b594b25 Worked: 2.76 official **Short description of error** If fire rate is more than 1, fire doesn't render properly with opengl render. How to reproduce: - Select default cube - Make quick efffect: quick smoke (fire option) - Change fire rate from the emitter to 10 - Tick of smoke high resolution from domain settings (to get faster preview) - Make domain bigger by turning on adaptive domain and changing additional to 32 for example - sim/playback to frame 50 - render opengl render / viewport render - compare to viewport Example file: http://www.pasteall.org/blend/40879 - Miika P
Author
Member

Changed status to: 'Open'

Changed status to: 'Open'
Author
Member

Added subscriber: @MiikaPuustinen

Added subscriber: @MiikaPuustinen

Added subscriber: @Sergey

Added subscriber: @Sergey

I can't really reproduce the issue, but i'm on Linux. Some things which could clarify situation for us:

  • What are exact steps of reproducing the issue with attached .blend file?
  • Is it viewport only problem, or render also differs from 2.76 to 2.77?
  • Please attach screenshoot of your problem.
I can't really reproduce the issue, but i'm on Linux. Some things which could clarify situation for us: - What are exact steps of reproducing the issue with attached .blend file? - Is it viewport only problem, or render also differs from 2.76 to 2.77? - Please attach screenshoot of your problem.
Author
Member
  • Without the file follow the steps.
  • With attatched .blend file just sim to frame where there is lot of flames (50 or so). Take an opengl render.

2.76 gives same result in opengl render and in the viewport.
2.77 fire is transparent and weird colored. Higher the flame value, lower the opacity of the flame (see screenshot).
http://www.pasteall.org/pic/100012

- Without the file follow the steps. - With attatched .blend file just sim to frame where there is lot of flames (50 or so). Take an opengl render. 2.76 gives same result in opengl render and in the viewport. 2.77 fire is transparent and weird colored. Higher the flame value, lower the opacity of the flame (see screenshot). http://www.pasteall.org/pic/100012

Ah ok, got it now. Not sure why OpenGL will use transparent background now actually. Needs investigation.

Kevin, any ideas here?

Ah ok, got it now. Not sure why OpenGL will use transparent background now actually. Needs investigation. Kevin, any ideas here?
Member

Added subscriber: @MikeErwin

Added subscriber: @MikeErwin
Member

Added subscriber: @kevindietrich

Added subscriber: @kevindietrich
Member

@kevindietrich This is your area, right?

@kevindietrich This is your area, right?

I checked out the commit before my rewrite of the smoke drawing and rendering either the default scene or a smoke sim also resulted in a transparent background, so chances are this is not related to volume rendering (or not my fault). Rendering fire alone is apparently broken after my change, so that one is on me.

I checked out the commit before my rewrite of the smoke drawing and rendering either the default scene or a smoke sim also resulted in a transparent background, so chances are this is not related to volume rendering (or not my fault). Rendering fire alone is apparently broken after my change, so that one is on me.

This comment was removed by @kevindietrich

*This comment was removed by @kevindietrich*
Member

Added subscriber: @Blendify

Added subscriber: @Blendify
Member

This is not only true for smoke but anything will render transparent unless show world background is enable. This is different then 2.76b where it works correctly.

This is not only true for smoke but anything will render transparent unless show world background is enable. This is different then 2.76b where it works correctly.
Aaron Carlisle changed title from Smoke sim opengl render doesn't match to viewport drawing to OpenGL render is transparent unless "show background" is enabled 2016-03-05 03:05:43 +01:00
Author
Member

I think title was mistakenly changed to "OpenGL render is transparent unless "show background" is enabled".

This was the problem:

http://www.pasteall.org/pic/100187

Bottom image 2.77RC, top one 2.76.

I think title was mistakenly changed to "OpenGL render is transparent unless "show background" is enabled". This was the problem: http://www.pasteall.org/pic/100187 Bottom image 2.77RC, top one 2.76.
Brecht Van Lommel changed title from OpenGL render is transparent unless "show background" is enabled to OpenGL render with smoke and fire incorrect when using transparency 2016-03-05 13:27:11 +01:00

Added subscriber: @brecht

Added subscriber: @brecht

The shaders here changed a lot, previously it was drawing smoke and fire separately, with different OpenGL blend modes.

The tricky thing here is that we are rendering to a 0..1 clamped sRGB buffer with unpremultiplied alpha, where the correct thing to do would be to render to an unclamped linear premultiplied alpha buffer. Then you would just make fire purely emissive without affecting the alpha channel at all, but that doesn't work here.

The alpha channel in 2.76 is much too dense but perhaps that is required to make it work. I'm not sure yet what the solution is, maybe the shader needs to be split up again.

The shaders here changed a lot, previously it was drawing smoke and fire separately, with different OpenGL blend modes. The tricky thing here is that we are rendering to a 0..1 clamped sRGB buffer with unpremultiplied alpha, where the correct thing to do would be to render to an unclamped linear premultiplied alpha buffer. Then you would just make fire purely emissive without affecting the alpha channel at all, but that doesn't work here. The alpha channel in 2.76 is much too dense but perhaps that is required to make it work. I'm not sure yet what the solution is, maybe the shader needs to be split up again.
Kévin Dietrich was assigned by Sergey Sharybin 2016-07-27 11:27:46 +02:00

Kevin, did you have chance to have a look into fire issue?

Kevin, did you have chance to have a look into fire issue?

No, I haven't had a chance yet to look into this more deeply, kinda forgot about that.

No, I haven't had a chance yet to look into this more deeply, kinda forgot about that.

This issue was referenced by 116bab702e

This issue was referenced by 116bab702e009ce8043b976b4a9c4afa4c7ff5b0

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
7 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#47639
No description provided.