Texturepainting: Mipmap Levels aren't updated #31539

Closed
opened 2012-05-20 13:14:24 +02:00 by Tobias Oelgarte · 10 comments

%%%If i draw on a mesh and zoom out i get graphic errors. The reason is that Mipmaps of the texture I'm painting on aren't updated. They still show the texture as it was before painting. (r46796, Nvidia Geforce 7600, Ubuntu 10.10)

It worked fine in previous versions (one week ago or so).%%%

%%%If i draw on a mesh and zoom out i get graphic errors. The reason is that Mipmaps of the texture I'm painting on aren't updated. They still show the texture as it was before painting. (r46796, Nvidia Geforce 7600, Ubuntu 10.10) It worked fine in previous versions (one week ago or so).%%%

Changed status to: 'Open'

Changed status to: 'Open'

%%%I can not reproduce the issue here neither with nvidia card nor with intel one. Also code seems to be handling mipmaps properly in texture painting.

Is it still issue for you? If so having sample file where the issue is 100% reproducible would help a bunch.%%%

%%%I can not reproduce the issue here neither with nvidia card nor with intel one. Also code seems to be handling mipmaps properly in texture painting. Is it still issue for you? If so having sample file where the issue is 100% reproducible would help a bunch.%%%

%%%I posted this bug a longer time ago. But i will see if i can still reproduce it. If so, then i will attach an example file or let you know that i can't reproduce it anymore. %%%

%%%I posted this bug a longer time ago. But i will see if i can still reproduce it. If so, then i will attach an example file or let you know that i can't reproduce it anymore. %%%

%%%Still happens in r50551. All i need to do is the following to reproduce the error:

  1. Go to Cycles-Mode (might also "work" in BI mode)
  2. Unwrap a some mesh
  3. Assign it a texture
  4. Change to texture paint mode and draw (anything should look normal)
  5. Go to object mode !!
  6. Enable painting in UV/Image editor and draw some lines (viewport does not update mipmaps)

I appended a screenshot to show the issue (I guess that there is no need for a file). I painted all over the cube, but only see the result at lowest mipmap level.

Additionally i happens (only for the first time) that the brush circle in the UV/Image Editor is missing after i leave the texture-paint mode (going to object mode) while paint mode in UV/Image Editor is active.%%%

%%%Still happens in r50551. All i need to do is the following to reproduce the error: 1. Go to Cycles-Mode (might also "work" in BI mode) 2. Unwrap a some mesh 3. Assign it a texture 4. Change to texture paint mode and draw (anything should look normal) 5. Go to object mode !! 6. Enable painting in UV/Image editor and draw some lines (viewport does not update mipmaps) I appended a screenshot to show the issue (I guess that there is no need for a file). I painted all over the cube, but only see the result at lowest mipmap level. Additionally i happens (only for the first time) that the brush circle in the UV/Image Editor is missing after i leave the texture-paint mode (going to object mode) while paint mode in UV/Image Editor is active.%%%

%%%Developer note:

Issue seems to be caused by rev43462, where call of GPU_paint_update_image was changed to always do partial image update.This works fine for texture painting from 3d viewport because mipmaps are disabling for such painting. In other cases it seems to be tricky to distinguish whether mipmaps are enabled for object or not.

Could see couple of possible ways:

  • Restore back old behavior with doing full update of GPU image, Probably it still could only affect on mipmaps and image itself would be updated partially.
  • Disable mipmaps on stroke begin, enable them on stroke end, do full image update on stroke finish. This could be better feedback than doing full update on every stroke step.

Antony, that was originally your change, what do you think about best way of solving the issue?%%%

%%%Developer note: Issue seems to be caused by rev43462, where call of GPU_paint_update_image was changed to always do partial image update.This works fine for texture painting from 3d viewport because mipmaps are disabling for such painting. In other cases it seems to be tricky to distinguish whether mipmaps are enabled for object or not. Could see couple of possible ways: - Restore back old behavior with doing full update of GPU image, Probably it still could only affect on mipmaps and image itself would be updated partially. - Disable mipmaps on stroke begin, enable them on stroke end, do full image update on stroke finish. This could be better feedback than doing full update on every stroke step. Antony, that was originally your change, what do you think about best way of solving the issue?%%%

%%%I can't reproduce the issue here predictably with the steps you have outlined (Actually I only managed it once).
I have found a similar issue where -undoing- between object and texture mode would invalidate the gpu texture image state (because GPU textures do not get recalculated properly on undo since they do not belong in the Scene but on a separate static GPU state struct).

On this issue: Usually texture verification (happens on mesh display) catches the zeroed IMA_MIPMAP_COMPLETE flag and calculates the mipmaps anyway.
Which is exactly the reason GPU_free_image, line 892 works: On verification the image will be reloaded.

Can you really always reproduce the issue with these steps? An exact way to reproduce would help me decide better on this.
My vote would be not to disable partial update, but more on this once I get a fully reproducable bug. %%%

%%%I can't reproduce the issue here predictably with the steps you have outlined (Actually I only managed it once). I have found a similar issue where -undoing- between object and texture mode would invalidate the gpu texture image state (because GPU textures do not get recalculated properly on undo since they do not belong in the Scene but on a separate static GPU state struct). On this issue: Usually texture verification (happens on mesh display) catches the zeroed IMA_MIPMAP_COMPLETE flag and calculates the mipmaps anyway. Which is exactly the reason GPU_free_image, line 892 works: On verification the image will be reloaded. Can you really always reproduce the issue with these steps? An exact way to reproduce would help me decide better on this. My vote would be not to disable partial update, but more on this once I get a fully reproducable bug. %%%

%%%I can always reproduce this steps. I tested it on a Geforce 7600 under Ubuntu 10.10 and a GTX 560 TI under Ubuntu 12.04. Both show the same result. The only requirement is that you leave the texture paint mode and then start to paint on the texture in the UV/Image editor. If i do so then i can see that the highest resolution (close to view) is updated, while the lower resolution mipmaps are not.%%%

%%%I can always reproduce this steps. I tested it on a Geforce 7600 under Ubuntu 10.10 and a GTX 560 TI under Ubuntu 12.04. Both show the same result. The only requirement is that you leave the texture paint mode and then start to paint on the texture in the UV/Image editor. If i do so then i can see that the highest resolution (close to view) is updated, while the lower resolution mipmaps are not.%%%

%%%OK, I got it reproduced but only with generated images. Investigating...%%%

%%%OK, I got it reproduced but only with generated images. Investigating...%%%

%%%50730 should do it, closing. Please poke if still buggy. Also, can you please file a separate report about the brush bug if it's still valid?%%%

%%%50730 should do it, closing. Please poke if still buggy. Also, can you please file a separate report about the brush bug if it's still valid?%%%

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