Hello there,
Trying to save out ABC files of meshed particles with velocityPV from bifrost graph. Failing dismally, I'm afraid.
We need it to be an ABC of a polySurface in order to render with VRay. Motion blur is vital to the project
We were previously doing it with nParticles, which just does the velocityPV automatically when using the motionVectorColorSet attribute during export . Can't wrap my head around how to do this in bifrost graph though with bifrostGeoToMaya prior to ABC export.
Is there anyone who can advise me on the right approach here?
(says me, suspecting @syracoj is the man who knows everything)
Solved! Go to Solution.
Solved by syracoj. Go to Solution.
I am able to reproduce the problem with your scene file. Perhaps there is a defect in this particular case with bifrost mesh export. Digging further.
Took a look at this with one of our devs (Morten) and we have identified a problem with this setup. I will be drawing up an improvement ticket and discuss with design to make this a bit more automatic.
With Morten's help we were able to come up with a compound that should be a potential workaround for you. Download the attached json (sample_velocity_workaround.json), add to your compounds directory, do file > new, then reload the bifrost plugin. Take the bifrost scene (BifrostParticleMesher2Velocity.mb) and connect the simulate_particles.particles port to the sample_velocity_workaround.particles_in port. Then connect the sample_velocity_workaround.out_geometry output to the output node. Then re-export your alembic of your resulting bifrostGeoToMaya mesh. <- import the result of this via vray_proxy and dial down the velocity multiplier as needed.
see attached image for result on my side using your scene file
hey Rico,
Jonah (who is one of our Bifrost PO/Designers) took a look at the graph and came up with a better solution. The volume_to_mesh apparently has the capability to export out point_velocities (where as the dual_contour_marching_cubes by itself, used inside the volume_to_mesh, does not).
I tried exporting the ABC out with a point_color set set with the data from the volume_to_mesh -> get_point_velocity and it seemed to render correctly on my side in vray.
For this particular workflow this would be the correct way to do this. Could you please try this?
Also, if you tab/type: point_scope you will get a utility node that you can use to visualize point velocities. This can be connected after the volume_to_mesh and its (point_scope) output connected as another port on the graphs output node. Usually you will have to dial down the point_scope nodes Length Scale to a smaller value, but it's great for visualizing the velocities.
Wehaay! That works, and it's superb. THANK YOU!
Not only that, but by god it's fast for what I need now. Very happy here.
Also, thank you for the Point_Scope tip.. that's icing on the cake.
That graph does not look correct.... If you grab the voxel_velocity off the volume then set the generated mesh velocities from that the array sizes will not match and the points will not get the correct velocities. This would explain the bad velocities we are seeing.
Instead you could use sample_volume_vector passing in the mesh point positions, the volume and sample voxel_velocity. Then set the mesh velocities with that. I think there might be a way where one doesn't need to call sample_volume_vector, but the graph as shown should not work property.
Also the velocities in bifrost are in units/second, while for the velocity colorset stuff used by nParticles it was in units/frame. That is likely why the velocities seemed to large. Simply divide by the frame rate.
The latest graph looks ok.... in my last email I was referring to the the early graph posted by John.
Hi @syracoj
Thanks for posting this solution. It seems there have been several posts on getting vertex colorset data from BiFrost into maya. One of the issues that I've been facing is transferring point_* data onto meshes for use in other render engines (not Arnold). It seems BiFrost doesn't export those properties in a way that Maya can read them. The "bifrostGeoToMaya" doesn't carry any point attributes to the mesh. The method you've posted is decent way to get a single colorset out, but I think it would be good for BiFrost to be able to export it's data directly into Maya (or any DCC). Perhaps this is something that could be flagged as a needed feature.
Hi,
I'm trying this method, but I'm getting this error as soon as I connect to set_geo_property the proper nodes:
// Error: Error: while compiling top level compound 'bifrostGraphShape1', around the node 'bifrostGraphShape1::set_geo_property':
The data type could not be inferred for one or more input ports of set_geo_property: default. Try connecting one of these ports. //
Here's a screenshot also
Thanks for the quick reply syracoj, but now I'm getting other errors, I'm following exactly the graph you already posted, sim is working and the data I get from the volume_to_mesh seems correct using the point scope.
here's another screenshot
Thanks again
perhaps it doesn't like the object array being passed in. Could you zip up your scene and graph and post it here so I can take a look please?
Of course, here we go.
it's a pretty basic scene, I was having problems with motion blur on alembic export, so I tested this method the easiest way possible.
I tried also this other solution I found on the forum, but motion blur still works not correctly.
I'm on Maya 2022.1, bifrost 2.2.1.2
Thanks again!
Still nothing, same error as before,
If I don't connect anything to the default port, it asks me to connect something to the port, like the first screenshot I posted. If I connect the array math4 to default, then I get the error of the second screenshot I posted.
I'm using point_color as property in the set_geo_property.
I'll try to update to the latest bifrost release, but still don't understand why it won't work as expected.
Okay, I updated to Bifrost 2.3.0.0 from 2.2.1.2, and done the last test for today, time to go to bed.
It's finally working, at least without errors, using the last graph you suggested with first_in_array.
I'm going to try everything else tomorrow and take a look at the change log, hoping that the motion blur will work correctly.
Thank you very much syracoj, I'll keep you updated.
Quick update:
I got rid of the errors, but the resulting alembic mesh apparently doesn't have any velocity or color data written. On Bifrost 2.2.1.2 the motion blur was wrong, but some data was obviously there. Now apparently there's nothing, or if it's there it doesn't respect the proper naming set assigned by the node in the graph.
I tested different exported files and different graph combinations, with and without instances, on:
Maya + Arnold
Maya + Redshift
Blender + Cycles
Definitely something strange is happening, after a whole day of testing honestly I'm feeling quite scared at the idea to seriously invest time on Bifrost, if I need to debug for hours or days basic stuff like exporting a useful alembic file without success.
I think also there's something wrong with the Watchpoint, it doesn't work consistently, and instead of give information it often disconnects the 'noodle'. When I'm lucky it works but I need to be all zoomed into the graph, and the behavior it's completely random.
Here in attach the last scene with the very basic setup,
Thanks for any help
Try the attached scene.
You define color on the set_geo_property and feed it the velocity data which will be the color info. Also, you want to connect the bifrostGraph to a BifrostGeoToMaya node in the Node Editor and then connect that to a Maya mesh node. On the mesh node, you turn on Display Colors in the attribute Editor on the mesh's shape. The set_geo_property in the Bifrost Graph btw has to be called: point_color.
Thanks again @syracoj for the quick answer. Yes, I forgot to change the set_geo back to point_color as I was doing some experiments and I saved the scene without change it back. I did test this very similar setup before trying to export the alembic from the bif to maya -> mesh but the motion blur still wasn't working.
I can already tell you that, even without exporting, the motion blur is finally working at render time on both Arnold and Redshift with your scene. It looks like it's just very exaggerated, but the direction looks okay though.
I guess I should put a multiplier between the get_point_velocity and the vector3 to 4. to make it right, it looks like it's a matter of scale.
Just last question:
- should I add the motionVectorColorSet from the alembic export, or it is automatic if I just leave the tick on Write Color Sets options? I'm going to do some other test right know.
Many many many tanks again!
Can't find what you're looking for? Ask the community or share your knowledge.