Render bifrost MPM sand without arnold

Render bifrost MPM sand without arnold

xianwu_liu
Contributor Contributor
3,812 Views
12 Replies
Message 1 of 13

Render bifrost MPM sand without arnold

xianwu_liu
Contributor
Contributor

Hi,

I'm trying to render bifrost MPM sand with octane render for maya.

I know I can use points_to_level_set and volume_to_mesh node to mesh sand particles.

but the result looks like liquid mesh.

 

and as my render engine is octane for maya so I can not assign material in bifrost graph.

 

Is there any way to instance mesh to MPM particles and cache out "single" file alembic?

 

Thanks

3,813 Views
12 Replies
Replies (12)
Message 2 of 13

sepu6
Advisor
Advisor

This is something that a lot of people are waiting for. But you can't from the graph yet. 

0 Likes
Message 3 of 13

xianwu_liu
Contributor
Contributor

Thanks for response.
Seems like still too early to use.

Wish Maya and Octane would update for these features ASAP.

0 Likes
Message 4 of 13

Aslan.Jafari
Autodesk
Autodesk

It is possible to instance geometries to sand particles and write the result as a single alembic file.

In order to do this, mpm system needs to keep track of the points by ID. You can turn on this option on the mpm_solver_settings.  ( mpm_solver_settings > Label point id )

mpm_sand_point_id.png

 

Writing a single file alembic requires the Write Single File option to be enabled ( write_Alembic > Write Single File)  and for the simulation to reach the frame indicated in End Frame of write_alembic node.

mpm_sand_write_alembic_single_file.png

 

Note: Instanced geometries need to be backed in order to be exported as a single geometry.

You may use bake_instanced_geometry to do this.

Cache_mpm_sand.png

 

I've included a scene file to demonstrate this workflow.

I hope this helps.

 


Aslan Jafari
Sr QA Analyst
Message 5 of 13

xianwu_liu
Contributor
Contributor

Hi Aslan,
Sorry I did not notice this reply.
Really thanks for the reply, I will try it later.
(Too busy on the work...lol)

Message 6 of 13

a.mayaUser
Enthusiast
Enthusiast

Hi,

I tested this method but the resulting alembic has the motion blur all wrong. Is there a way to write the correct motion data to the alembic file?

Message 7 of 13

calibrix
Advocate
Advocate

Hi @xianwu_liu 

I'm not familiar with the Octane renderer, but you could try exporting the points as an alembic or as VDB points. The renderer should have some way to read both of those formats directly. Both Arnold Stand in and VRAY proxies can directly read the ABC format and can access attribute stored on those points for rendering. They will also detect velocity and radius. I would check to to see if Octane has a similar capability.

0 Likes
Message 8 of 13

InNeedOfHelp
Advocate
Advocate

There's also the write_pdc method, so you can write out a particle cache which can be read back in with maya's old (none N) particle system. And it supports additional properties like velocity for correct motion blur, you just need to rename the properties to match what the old particle system calls them,  ie 'point_size' needs to be renamed 'radiusPP'. Then on the particleShape that's reading the cache, you need to make sure that property is added

0 Likes
Message 9 of 13

a.mayaUser
Enthusiast
Enthusiast

That's interesting, I tried to do this a couple of times without success, can you provide a visual example?

 

I mean, I would you connect the read_PDC points to the particleShape? Can't get it working through the bifrostGeoToMesh or any other method like directly reading the cache from the legacy disk cache in Maya.

Thanks!

0 Likes
Message 10 of 13

InNeedOfHelp
Advocate
Advocate

Yeah its not very intuitive but you need to have them read by a legacy particle shape. Here's a quick video of the process as well for anyone trying to do the same. And as I mentioned in the other reply, any additional properties can be transferred they just need to be renamed to what legacy particles calls them.

Message 11 of 13

a.mayaUser
Enthusiast
Enthusiast

Nice! I just tested the scene and it's working. Thanks @InNeedOfHelp 

Does motion blur works for you? On my side it's crashing as soon as I start rendering, if it's enabled.

0 Likes
Message 12 of 13

jason.stovall
Community Visitor
Community Visitor

This is very helpful! I was able to convert my sand simulation from Bifrost to nparticles, but I'm now trying to use instancer for adding random grain meshes. I'm able to add a random value for the Index, but it seems that the index is changing every frame. Is the index value being written to the PDC file, and how can I make it a static value? Or maybe I'm missing a step when using the instancer.

 

Appreciated!

0 Likes
Message 13 of 13

InNeedOfHelp
Advocate
Advocate
You'd need to enable "label_point_id" in your bifrost particle solver settings and write this to your particle cache. in bifrost the property will be called point_id and I believe you'd just need to rename this to simply "id" before writing the cache, if that doesn't work you could also just write to one of the userScalar particle attributes and use that for you instancer id
0 Likes