Blender gives weird ouput when baking (4096*4096) resolution on GPU #41222
Labels
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
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#41222
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
System Information
Desktop PC:
Win 7 Home Premium
CPU: AMD FX-4170 (Quad, 4.20 GHz)
GPU: (Asus) GTX 560 Ti DirectCUII Top
Laptop:
Win 7 Professional
CPU: Intel Core i7 3520m (2,9GHz)
GPU: Nvidia Quadro K2000m
Blender Version
Broken: 2.71
9337574
Short description of error
Blender gives weird ouput when baking uv-map on GPU at a resolution of 4096*4096. CPU works normal but takes a lot more time than GPU would've.
Higher resolutions are not tested as of now.
Output can be seen here
Exact steps for others to reproduce the error
Bake the cube in the blend file with GPU on a resolution of 4096*4096
brokenuvcube.blend
Changed status to: 'Open'
Added subscriber: @RadiationG0D
The bake was attempted with cycles
Added subscriber: @Sergey
For some reason i can't reproduce the issue here on linux, but form the code side it's really bad idea to multiply image width by height and store it in int, size_t is to be used in this cases.
I've started moving to size_t there http://www.pasteall.org/53120/diff but the issue is -- we can't pass it via API. So afraid the only way is to pass width,height to the baker and multiply them in the baker.
Added subscriber: @ThomasDinges
@Sergey at the moment we can bake an object with multiple materials/target images at once, which means there is no real width and height. We can get some fictional values, but often we will end up with width being 1 or 2. So the problem will likely still be there (assuming that's the issue). (that would work for the case reported here though).
See D688 - in particular calculate_buffer_dimension() in object_bake_api.c
(@RadiationG0D can you see if this patch fix the issue for you)?
Another option is to not pass num_pixels, and tweak rna_BakePixel_next_get() to return NULL, so in Cycles we populate the baking data dynamically until we get a NULL from bp->next (in populate_bake_data).
Or ... to find a way to pass size_t to python. Isn't 'k' enough for that?
https://docs.python.org/3/c-api/arg.html
@ThomasDinges can you reproduce this issue in your CUDA-friendly machine?
Added subscriber: @dfelinto
@dfelinto - I'm afraid I don't know how to test the patch..? I was directed here from blender.stackexchange.com and though intrested in programming and such, I'm not sure what you would like me to do. I suppose it would not be enough to download the latest blender from blender.org?
This issue was referenced by 1607bcebc65fd5296f9f695e76580a1ae7ade9a2
Changed status from 'Open' to: 'Resolved'
Closed by commit 1607bcebc6.
Changed status from 'Resolved' to: 'Open'
closed by 'mistake' while pushing the test to build bot. re-opening now.
@RadiationG0D can you try downloading a build from here [ link ]? This has the patch applied to it.
(note, the build may be overridden any soon, so please download it as soon as you can).
For comparison you can test the above build against a more recent one, such as [ link ].
The ouptut is better, but far from good. Also, the progressbar seemed to show progress now which it has not before :)
Same .blend:
Output:
This is unrelated, it's one of the new features for the upcoming Blender 2.72.
How about the other pass types? I think you are hitting some memory limit in your system, though I don't think it's relate to the patch. Did you try the other build too? (the more recent one from master).
Other pass types, like bake types?
I've set up cache at 4096MB at maximum though my gpu has only 1GB I think. (System has 8GB RAM otherwise)
I will try the other build now...
Added subscriber: @zeauro
No problem to bake 4096 on ubuntu 14.04 with CUDA 6 Nvidia driver 340.24 with Titan Black
The second link gives similar output.
Added subscriber: @mib2berlin
Hi, bake work with my GTX 760 4 GB but not with my GTX 560Ti 448 1.28 GB.
Result with GTX 560Ti 448:
http://www.pasteall.org/pic/show.php?id=74660
Opensuse 13.1/64
Intel i5 3770K
GTX 760 4 GB (Display)
GTX 560Ti 1.28 GB 448 Cores
Driver 340.24
Cheers, mib
I can easily bake 4K x 4K texture on my gt520m with 1gig ram, but that's on linux, will test win7 later a bit. It looks like some particular setup issue or something up to the particular kernel (can't redo the issue forcing sm_20 for usage tho).
So some questions just to be sure:
Will also check gtx560ti this evening from home, maybe that'd give some clues as well.
I can consistently reproduce the problem on the GTX but the quadro seems to be working fine today.
I'm currently running driver v. 337.88 on my GTX 560 Ti (latest). The laptop drivers are probably not the latest but I'm not sure since the update mechanism for Quadro is a bit diffrent.
I have not tried the CUDA toolkit, but I've never heard of it before though..
Lower resolution solves the problem, yes.
Hi, try again with own file and can reproduce error on GTX 560Ti 448.
Just for info, the GTX 560Ti 448 is a cut back GTX 570 and a sm_20 card.
Regular GTX 560Ti is a sm_21 card.
Cheers, mib
@Sergey the problem is that we copy a big chunk of memory and pass that to CUDA. See D690 (it bakes a chunk of 3k * 3k at a time). This works fine in mi2berlin's GPUs.
That said I think the fix should be in device_cuda.cpp::task_add(). It would make more sense to me if for baking CUDA could split the task according to the memory size. So, to do the equivalent of D690 but internally, in the device code.
[about size_t I agree that we should change that, but let's keep that discussion in the patch - D688 - since I don't think it's entirely related to this issue]
This issue was referenced by
a48b372b04
Changed status from 'Open' to: 'Resolved'
Closed by commit
a48b372b04
.Hi, make another tests with buildbot with commit
a48b372b04
from dfelinto and got same weird output with GTX 560Ti 448 1.28 GB and 4096x4096 pixel.3072x3072 is working.
Testing my own build with change device_cuda.cpp to 512 * 512 or 256 * 256 give same error.
Testfile brokenuvcube.blend and own file.
Opensuse 13.1/64
Intel i5 3770K
GTX 760 4 GB (Display)
GTX 560Ti 1.28 GB 448 Cores
Driver 340.24
Cheers, mib
Changed status from 'Resolved' to: 'Open'
Worked for me yesterday, will check with buildbot.
This issue was referenced by
983cbafd18
This issue was referenced by
2c5b6859d9
Changed status from 'Open' to: 'Resolved'
Closed by commit
2c5b6859d9
.