Bifrost particles snowfall taking too long to start rendering

Bifrost particles snowfall taking too long to start rendering

renato_battaglia
Contributor Contributor
7,379 Views
24 Replies
Message 1 of 25

Bifrost particles snowfall taking too long to start rendering

renato_battaglia
Contributor
Contributor

Hello guys,

 

I'm trying to change my pipeline instead of using Nparticles, and I made a snowfall animation using Bifrost. The particles were pre-calculated (cached on disk). The render is fast, around 3 seconds, but it takes about 3 min after I hit the render button to start rendering. The computer processor is 100% load during these 3 mins, which makes me believe that Maya is calculating something. So a 3-second render takes more than 3 minutes in total.

The scene is basic:  the snowfall (Bifrost Graph), a snowflake geometry which I used for instancing the particles and an aiSkyDomeLight.

 

Is expected to take this long to start rendering, maybe because of the number of particles, or am I missing something?

 

Thanks,

Renato

 

Maya 2022.2

Arnold MtoA 4.2.4

0 Likes
Accepted solutions (2)
7,380 Views
24 Replies
Replies (24)
Message 2 of 25

sepu6
Advisor
Advisor

Without looking at the files is a little tough to debug or to see what could be the issue if there is any at all. 

How dense is the main shape that you are instancing? 

Also, you could try to load the shape as alembic procedural and see if that helps a little bit, if there is any translation time, probably not but is worth a shot. 

0 Likes
Message 3 of 25

renato_battaglia
Contributor
Contributor

Thanks for the feedback! 

The geometry is very light, and I don't think the issue is there. 

I started the snowfall again from scratch, adding nodes one by one and testing the render time, and to my surprise, the problem was happening before instancing the geometry.

 

The only option that the render starts immediately is when the shape of the particles is a sphere at Particle Display  (particle_solver_settings node). Any other shape option like disk, quad or cube, the render doesn't start immediately.

 

The snowfall is just one element of my animation series that I'm working on. That's the reason I'm trying to reduce the snowfall render time. Using Bifrost for snowfall, on the one hand, improved my pipeline a lot, but on the other hand, the render time issue is making use impossible. 

 

I don't know if this is a bug or if there is a technical explanation behind it.

 

 

0 Likes
Message 4 of 25

sepu6
Advisor
Advisor

Can you share the file? 

Also, what BF version are you using? 

0 Likes
Message 5 of 25

renato_battaglia
Contributor
Contributor

Sure,

 

Biforst version 2.3.0.0

Arnold-Bifrost Procedural for Arnold 6.0.0.0, 6.2.0.0

 

I'm having trouble attaching/sharing the Maya file. I'm trying to share at "Attachments", but it's not working

0 Likes
Message 6 of 25

sepu6
Advisor
Advisor

Yeah sometimes it doesn't want to add the files, you can try a .ma file those works or try to .zip it or use wetransfer and post the link. 

0 Likes
Message 7 of 25

renato_battaglia
Contributor
Contributor

Ok, trying the zip file.

0 Likes
Message 8 of 25

Stephen.Blair
Community Manager
Community Manager

Takes 1.3 seconds to render frame 1432

That's with the latest MtoA and Bifrost.

 

Can you post an Arnold log?



// Stephen Blair
// Arnold Renderer Support
0 Likes
Message 9 of 25

renato_battaglia
Contributor
Contributor

Hi Stephen. Did you render the sphere shape? If you try to change to another geometry like disk, quad, cube or a custom shape, does it render that fast?
For me, the issue happens when I try to render any other shape than the sphere.

 

Please find attached both logs. When I render the sphere shape and when I changed to quad shape.

 

0 Likes
Message 10 of 25

sepu6
Advisor
Advisor

Taking 42 sec on my computer use a cube mesh as an instance, with the initial processing time, as you can see.  I do not think anything is wrong is just Arnold being Arnold. If you turn off MB render immediately. Obviously, you do not want that. But to me, this is just how Arnold works.  Can't wait until BF opens up the SDK to other engines. 

Using the latest Arnold and BF 2.3.1

 

maya_M2zRg5zImZ.png

GlassWire_LFKECCnNPB.png

 

0 Likes
Message 11 of 25

Stephen.Blair
Community Manager
Community Manager

I rendered the scene as provided...so, Sphere

 

Using Cube, it's even slower to cache, and the cache file sizes are significantly larger.

 

Because it's one point cloud versus thousands of "cube" instance nodes.

 

For the rendering part, it's the scene initialization (the stuff that happens before any rays are traced) that takes all the time. 

 

From the logs:

# For Sphere shape, Bifrost outputs a single node

00:00:01 2191MB | [bifrost] /bifrostGraph1/bifrostGraphShape1: input0_0_0_graph_outputs_0 object type : point_cloud



# For Cube shape, Bifrost outputs a 575415 instances

00:06:26 3090MB | [bifrost] /bifrostGraph1/bifrostGraphShape1: object input0_0_0_graph_outputs_0_points created 575415 instances from 1 sources

 

Large numbers of instances are, unfortunately, slow to initialize.

 

The actual ray tracing takes about the same time (19.6 vs 21.4 seconds)

 



// Stephen Blair
// Arnold Renderer Support
0 Likes
Message 12 of 25

renato_battaglia
Contributor
Contributor

Hi Stephen, thank you for clarifying. The only thing that is intriguing me now is that why Bifrost is considering the cubes or quads or disks or circles as instances and the sphere don't? In the logs I sent you above, I didn't add any new node to my rig, I just chose the cube shape option instead of the sphere shape inside the particle_solver_settings node.

0 Likes
Message 13 of 25

sepu6
Advisor
Advisor
Accepted solution

I'm pretty sure is because spheres are basically a point with radius (size/scale). That's it. Isn't a real mesh. Is a procedural, created at render time. 

0 Likes
Message 14 of 25

Stephen.Blair
Community Manager
Community Manager

@sepu6 wrote:

I'm pretty sure is because spheres are basically a point with radius (size/scale). That's it. Isn't a real mesh. Is a procedural, created at render time. 


Yup, that's it



// Stephen Blair
// Arnold Renderer Support
Message 15 of 25

1006138663
Advocate
Advocate

@Stephen.Blair    I scattered 100.000 cubes. Arnold needs to load every frame for 30s when rendering.Interestingly, I used bake_ instanced_geometry, the loading time has changed from 30s to 5S. Does this mean that t there is a performance overhead between Bifrost and Arnold.

0 Likes
Message 16 of 25

renato_battaglia
Contributor
Contributor

Hey,

 

Thanks for the reply. Could you please detail where you placed the bake_instanced_geometry node?

I tried several different places but had no success. The Bifrost help documentation is vague.

0 Likes
Message 17 of 25

sepu6
Advisor
Advisor

it usually goes right after the create_instance node 

maya_Jf1vajcLlM.png

0 Likes
Message 18 of 25

renato_battaglia
Contributor
Contributor

Almost working 100%, Thank you!

It's taking more time to calculate the particles now, the cache file is considerably bigger, but the time saved on rendering definitely works for me:

Without bake_instanced_geomerty node: 1:30min 

With bake_instanced_geomerty node: 5 seconds

 

However, the motion blur is not working anymore. Maybe I'm still doing something wrong. 

 

Unfortunately, I'm using After Effects to composite the final animation, and After Effects don't support vector motion blur natively like Nuke does unless I pay for a 3rd part plugin.

 

My budget option is rendering the motion blur directly from Arnold.

There is any way to make the motion blur work using the bake_instance_geometry node?

0 Likes
Message 19 of 25

sepu6
Advisor
Advisor

use `get_point_velocity` and `set_point_velocity`

0 Likes
Message 20 of 25

renato_battaglia
Contributor
Contributor

Sorry, I'm a Bifrost new user and probably struggling with basic stuff.

 

I tried adding `get_point_velocity` and `set_point_velocity` nodes in several different ways and positions, but I couldn't make the motion blur work.

Based on my node rig attached, where exactly should I place those nodes?

0 Likes