Object rotation increases render time more than 10 times. #56609

Open
opened 2018-08-29 23:09:33 +02:00 by Хамуков Аскер · 16 comments

System Information
Tested with windows 7 64bit and windows 10 64bit.
CPU ryzen 5 1600
GPU GTX 780
RAM 8GB GDDR4
(bug appears on other computers too)

Blender Version
tested with 2.79 and 2.8
Worked: (optional)

Short description of error
If I rotate object for about 45 degrees around Z axis render time increases more than 10 times.
But in preview mode there is no difference in render time before and after rotation.test.blend
Exact steps for others to reproduce the error
just rotate the object on attached blend file around Z axis about 45 degrees and compare render times before and after.
10seconds for 2000 samples before rotation and about 10 minutes after.
Based on a (as simple as possible) attached .blend file with minimum amount of steps

**System Information** Tested with windows 7 64bit and windows 10 64bit. CPU ryzen 5 1600 GPU GTX 780 RAM 8GB GDDR4 (bug appears on other computers too) **Blender Version** tested with 2.79 and 2.8 Worked: (optional) **Short description of error** If I rotate object for about 45 degrees around Z axis render time increases more than 10 times. But in preview mode there is no difference in render time before and after rotation.[test.blend](https://archive.blender.org/developer/F4449470/test.blend) **Exact steps for others to reproduce the error** just rotate the object on attached blend file around Z axis about 45 degrees and compare render times before and after. 10seconds for 2000 samples before rotation and about 10 minutes after. Based on a (as simple as possible) attached .blend file with minimum amount of steps

Added subscriber: @askerpro

Added subscriber: @askerpro

Added subscriber: @jenkm

Added subscriber: @jenkm

This comment was removed by @jenkm

*This comment was removed by @jenkm*

I tryed this object with no light source, except AO and bug still exists. If i remove doybles from mesh and simplify it, it takes less time to render after rotation, but still much more, than before rotation.

I tryed this object with no light source, except AO and bug still exists. If i remove doybles from mesh and simplify it, it takes less time to render after rotation, but still much more, than before rotation.

Added subscriber: @sebastian_k

Added subscriber: @sebastian_k

Wow, what a weird file! I can confirm there are differences in render time, but could not figure out why. I tried with not light source, with a different camera, with a different world, with no materials.
Still the same problem, in some rotation it renders really fast, and then, the more I increase the rotation, the render time increases as well.
It also doesnt depend on the camera angle, since rotating the object and the camera together still produce the same issue. However, copying the object and the camera and pasting it in a different file seems to eliminate the problem. Weird!

Wow, what a weird file! I can confirm there are differences in render time, but could not figure out why. I tried with not light source, with a different camera, with a different world, with no materials. Still the same problem, in some rotation it renders really fast, and then, the more I increase the rotation, the render time increases as well. It also doesnt depend on the camera angle, since rotating the object and the camera together still produce the same issue. However, copying the object and the camera and pasting it in a different file seems to eliminate the problem. Weird!

Could you please send me that file, where u eliminated the problem. I had no success with transfering the object into new empty project, problem didn't dissapear.

Could you please send me that file, where u eliminated the problem. I had no success with transfering the object into new empty project, problem didn't dissapear.

Turns out, I was wrong. The issus got a bit better, but there still is a significant slowdown happening.
I have prepared a file with the default world, no lamps, just the 2 objects (camera and mesh from your file). There are 2 keyframes, on frame 1 it renders fast, and frame 2 it renders slow.
I have tested with latest master as well as 2.79a. So I would say, bug confirmed.
test_slow_render_rotation.blend

Turns out, I was wrong. The issus got a bit better, but there still is a significant slowdown happening. I have prepared a file with the default world, no lamps, just the 2 objects (camera and mesh from your file). There are 2 keyframes, on frame 1 it renders fast, and frame 2 it renders slow. I have tested with latest master as well as 2.79a. So I would say, bug confirmed. [test_slow_render_rotation.blend](https://archive.blender.org/developer/F4458227/test_slow_render_rotation.blend)

Added subscriber: @brecht

Added subscriber: @brecht

This is a typical issue with raytracers, many long thin faces along one direction are difficult to fit well in a BVH unless the faces are aligned to the X/Y/Z axis.

I'll consider this a To Do item, maybe we can make the spatial splits handle this case better, but would not strictly consider this a bug since it requires different BVH algorithms.

This is a typical issue with raytracers, many long thin faces along one direction are difficult to fit well in a BVH unless the faces are aligned to the X/Y/Z axis. I'll consider this a To Do item, maybe we can make the spatial splits handle this case better, but would not strictly consider this a bug since it requires different BVH algorithms.

Ah, thanks for the clarification! :)

Ah, thanks for the clarification! :)

Also, the workaround is to subdivide the object more so the faces are not so long.

Also, the workaround is to subdivide the object more so the faces are not so long.

In #56609#531572, @brecht wrote:
Also, the workaround is to subdivide the object more so the faces are not so long.

Thanks for your comment, I tryed to subdivide my mesh along faces and render time decreased much.
5421b29d-2f26-4781-bfd4-067859c75b85.jpg
but it seems to be a littlebit routine to subdivide :)
Could you please explain me a little bit more:
why there is no problem in preview mode?
BVH structure in preview and final render are different?
(dynamic and static) that's the cause?

Is it possible to final render with dynamic bvh?

LINK to blender stackexchange topic, for other users, who got this problem.

> In #56609#531572, @brecht wrote: > Also, the workaround is to subdivide the object more so the faces are not so long. Thanks for your comment, I tryed to subdivide my mesh along faces and render time decreased much. ![5421b29d-2f26-4781-bfd4-067859c75b85.jpg](https://archive.blender.org/developer/F4460794/5421b29d-2f26-4781-bfd4-067859c75b85.jpg) but it seems to be a littlebit routine to subdivide :) Could you please explain me a little bit more: why there is no problem in preview mode? BVH structure in preview and final render are different? (dynamic and static) that's the cause? Is it possible to final render with dynamic bvh? [LINK ](https://blender.stackexchange.com/questions/117080/why-render-time-in-blender-is-increasing-10-times-after-rotating-3d-model) to blender stackexchange topic, for other users, who got this problem.

It's not possible to render with dynamic BVH currently.

In preview mode all objects have their own BVH which in this case is aligned with the faces. For final render we try to put as much as possible in one global BVH, and only multiple instanced objects get their own BVH. This is usually faster but backfires here.

It's not possible to render with dynamic BVH currently. In preview mode all objects have their own BVH which in this case is aligned with the faces. For final render we try to put as much as possible in one global BVH, and only multiple instanced objects get their own BVH. This is usually faster but backfires here.

Added subscriber: @ThomasDinges

Added subscriber: @ThomasDinges

Checked in Blender 3.5 (master) again:

CPU: 11s -> 35s
GPU (HIP): 13s -> 80s

It seems Embree is doing a better job here than our own BVH, even though it's also 3x slower.

Checked in Blender 3.5 (master) again: CPU: 11s -> 35s GPU (HIP): 13s -> 80s It seems Embree is doing a better job here than our own BVH, even though it's also 3x slower.
Brecht Van Lommel added this to the Render & Cycles project 2023-02-07 19:07:34 +01:00
Philipp Oeser removed the
Interest
Render & Cycles
label 2023-02-09 13:58:12 +01:00
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 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#56609
No description provided.