Fix #127131: Deforming motion blurred point clouds do not render in Cycles HIP-RT when BVH timesteps != 0 #127163

Merged
Sergey Sharybin merged 2 commits from salipour/AMD_HIPRT:point_cloud_deformation_motion into main 2024-09-06 12:27:36 +02:00
Member

The device code was disabled for primitives with deformation blur
and the intersection function always returned false, hence no
rendered primitive.

Other than that, there were a few bugs on both device and host codes
(e.g., the order of current and previous times and the primitive name.)


This change would address #127131 but it would be nice to try failing curve tests here #125086.

The device code was disabled for primitives with deformation blur and the intersection function always returned false, hence no rendered primitive. Other than that, there were a few bugs on both device and host codes (e.g., the order of current and previous times and the primitive name.) --- This change would address https://projects.blender.org/blender/blender/issues/127131 but it would be nice to try failing curve tests here https://projects.blender.org/blender/blender/issues/125086.
Sahar A. Kashi requested review from Sergey Sharybin 2024-09-05 01:01:00 +02:00
Sahar A. Kashi added 1 commit 2024-09-05 01:02:28 +02:00
Member

it would be nice to try failing curve tests here #125086.

In my testing this PR doesn't have a impact on the failing curves tests. It only fixes the motion blurred deforming point cloud issue.

> it would be nice to try failing curve tests here https://projects.blender.org/blender/blender/issues/125086. In my testing this PR doesn't have a impact on the failing curves tests. It only fixes the motion blurred deforming point cloud issue.
Alaska changed title from Fix: Deforming motion blurred point clouds do not render in Cycles HIP-RT when BVH timesteps != 0 to Fix #127131: Deforming motion blurred point clouds do not render in Cycles HIP-RT when BVH timesteps != 0 2024-09-05 08:39:40 +02:00
Sergey Sharybin reviewed 2024-09-05 16:34:19 +02:00
Sergey Sharybin left a comment
Owner

Generally looks fine, and works better than it used to.
There are a couple of comments about keeping the ifdef.

The issue I've run into is: i was testing this patch on Linux on top of #121050. After multiple renders Blender crashes with, seemingly, driver or something attempting to free invalid pointer. Just open the file from the report, and hit F12 few times.

Not sure if it is something still missing in this PR. If someone can confirm it on Windows that'd be super great.

Generally looks fine, and works better than it used to. There are a couple of comments about keeping the ifdef. The issue I've run into is: i was testing this patch on Linux on top of #121050. After multiple renders Blender crashes with, seemingly, driver or something attempting to free invalid pointer. Just open the file from the report, and hit F12 few times. Not sure if it is something still missing in this PR. If someone can confirm it on Windows that'd be super great.
@ -319,7 +310,6 @@ ccl_device_inline bool point_custom_intersect(const hiprtRay &ray,
void *payload,
hiprtHit &hit)
{
# ifdef __POINTCLOUD__

Similar to above, I'd keep it.

Similar to above, I'd keep it.
salipour marked this conversation as resolved
@ -225,7 +225,6 @@ ccl_device_inline bool motion_triangle_custom_local_intersect(const hiprtRay &ra
void *payload,
hiprtHit &hit)
{
# ifdef MOTION_BLUR

I think I'd keep it as #ifdef __OBJECT_MOTION__, to help in cases when we disable features for whatever investigation.
Do you have strong opinions here?

I think I'd keep it as `#ifdef __OBJECT_MOTION__`, to help in cases when we disable features for whatever investigation. Do you have strong opinions here?
salipour marked this conversation as resolved
Author
Member

Generally looks fine, and works better than it used to.
There are a couple of comments about keeping the ifdef.

The issue I've run into is: i was testing this patch on Linux on top of #121050. After multiple renders Blender crashes with, seemingly, driver or something attempting to free invalid pointer. Just open the file from the report, and hit F12 few times.

Not sure if it is something still missing in this PR. If someone can confirm it on Windows that'd be super great.

I tried on Windows w/wo #121050 and didn't have any issue (I hit F12 as if I was trying to catch the BIOS setup screen.)

> Generally looks fine, and works better than it used to. > There are a couple of comments about keeping the ifdef. > > The issue I've run into is: i was testing this patch on Linux on top of #121050. After multiple renders Blender crashes with, seemingly, driver or something attempting to free invalid pointer. Just open the file from the report, and hit F12 few times. > > Not sure if it is something still missing in this PR. If someone can confirm it on Windows that'd be super great. I tried on Windows w/wo #121050 and didn't have any issue (I hit F12 as if I was trying to catch the BIOS setup screen.)
Sahar A. Kashi added 1 commit 2024-09-05 21:58:40 +02:00
Sergey Sharybin approved these changes 2024-09-06 11:55:37 +02:00
Sergey Sharybin left a comment
Owner

@salipour Thanks for testing and updates. Then I'd say lets move forward with this PR, and revisit the HIP-RT on Linux separately.

@Alaska Do you want to have a final look into this PR before we land it?

@salipour Thanks for testing and updates. Then I'd say lets move forward with this PR, and revisit the HIP-RT on Linux separately. @Alaska Do you want to have a final look into this PR before we land it?
Alaska approved these changes 2024-09-06 12:19:28 +02:00
Alaska left a comment
Member

Just running some quick tests here on Windows.

It fixes the reported issue with deforming motion blurred points.

Curves are still failing exactly as they were previously.
No new tests are failing.

So all good by me.

The only issue I've noticed is that rendering performance drops drastically with specific BVH time steps. Not sure if it's expected or not. If it is unexpected, it can be addressed in a different PR.

5 time steps = ~0.5 seconds to render.
6 time steps = ~4.0 seconds to render.
7 time steps - ~0.5 seconds to render.

After multiple renders Blender crashes with, seemingly, driver or something attempting to free invalid pointer. Just open the file from the report, and hit F12 few times.

I could not reproduce this issue constantly re-rendering the scene over the course of 5 minutes here on Windows with HIP-RT 2.0.something and HIP SDK 5.5.

Just running some quick tests here on Windows. It fixes the reported issue with deforming motion blurred points. Curves are still failing exactly as they were previously. No new tests are failing. So all good by me. The only issue I've noticed is that rendering performance drops drastically with specific BVH time steps. Not sure if it's expected or not. If it is unexpected, it can be addressed in a different PR. 5 time steps = ~0.5 seconds to render. 6 time steps = ~4.0 seconds to render. 7 time steps - ~0.5 seconds to render. > After multiple renders Blender crashes with, seemingly, driver or something attempting to free invalid pointer. Just open the file from the report, and hit F12 few times. I could not reproduce this issue constantly re-rendering the scene over the course of 5 minutes here on Windows with HIP-RT 2.0.something and HIP SDK 5.5.
Member

The only issue I've noticed is that rendering performance drops drastically with specific BVH time steps. Not sure if it's expected or not. If it is unexpected, it can be addressed in a different PR.

5 time steps = ~0.5 seconds to render.
6 time steps = ~4.0 seconds to render.
7 time steps - ~0.5 seconds to render.

Disregard that. I ran some more quick tests and I'm getting completely different results now.

> The only issue I've noticed is that rendering performance drops drastically with specific BVH time steps. Not sure if it's expected or not. If it is unexpected, it can be addressed in a different PR. > > 5 time steps = ~0.5 seconds to render. > 6 time steps = ~4.0 seconds to render. > 7 time steps - ~0.5 seconds to render. Disregard that. I ran some more quick tests and I'm getting completely different results now.
Sergey Sharybin merged commit d4597e20b6 into main 2024-09-06 12:27:36 +02:00
Sergey Sharybin deleted branch point_cloud_deformation_motion 2024-09-06 12:27:39 +02:00
Member

As is typically, I discovered a issue after the change is commited: #127240

It doesn't impact normal users, but may give insights into the crashing issue seen on Linux.

As is typically, I discovered a issue after the change is commited: #127240 It doesn't impact normal users, but may give insights into the crashing issue seen on Linux.
Sign in to join this conversation.
No reviewers
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Code Documentation
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
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
Viewport & EEVEE
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
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
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
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
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#127163
No description provided.