Fluid vertex animation flickering

   1085   13   1
User Avatar
Member
12 posts
Joined: Aug. 2013
Offline
Hi, I followed the tutorials and webinar on bringing a fluid sim into Unity with vertex animation. Everything went smoothly, except the first few frames look great, but then the mesh starts flickering like in the attached images.

I checked the bbox min/max and the frame range and everything looks setup correctly.

Is there anything special on the fbx import in Unity that needs to be set? I have already turned off optimize mesh and import blendshapes. All compression is off on the textures as well as the filtering.

I also followed the cloth sim vertex animation tutorial and had no issues. Everything looks great which is why I think it may have something to do with the mesh import and it having varying poly counts per frame in the fluid example.

any thoughts?

thanks for your help,
Jason
Edited by JasonJ3d - Sept. 29, 2017 01:26:17

Attachments:
unityVTXfluid_01.jpg (32.8 KB)
unityVTXfluid_02.jpg (49.0 KB)

User Avatar
Staff
87 posts
Joined: May 2017
Offline
Since its changing topology, make sure you're using the vertex_fluid.shader. Also make sure your color space is set to Linear.

According to your post, I believe you followed this tutorial, but just making sure: https://www.sidefx.com/tutorials/unity-shaders-for-vertex-animation-export-tools/ [www.sidefx.com]
User Avatar
Member
12 posts
Joined: Aug. 2013
Offline
Hi, thanks for the reply. Yes, I am using the vertex_fluid.shader and the color space is set to linear.
User Avatar
Member
12 posts
Joined: Aug. 2013
Offline
Looks like I am also getting the flickering with the vertex_sprite setup. Does anyone have an example of the vertex_fluid or vertex_sprite working in unity without flickering?

thanks,
Jason
User Avatar
Staff
80 posts
Joined: May 2017
Offline
Hi Jason. Can you upload the files for that example? And I can post a working file later today.

Mike
User Avatar
Member
12 posts
Joined: Aug. 2013
Offline
Sure, here is a link to a zip containing the houdini files and the unity project. Thanks for looking.

https://www.dropbox.com/s/7forywe8lnosjry/Houdini_Unity_Vtx_Flicker.zip?dl=0 [www.dropbox.com]
User Avatar
Staff
80 posts
Joined: May 2017
Offline
Hey Jason,

I just remembered that there's a unity example package as part of the GitHub download in the unity folder. Have you had a look at those yet?

Mike
User Avatar
Member
12 posts
Joined: Aug. 2013
Offline
Hey Mike,

Yeah, I did look at the package and those examples do work, but it seems that exporting with the latest tools doesn't, or at least I cannot seem to get it to work.

Have you had a chance to look at my files?

thanks,
Jason
User Avatar
Staff
80 posts
Joined: May 2017
Offline
Hi Jason,

Your target polycount was too high. The mesh only has around 5000 points at each frame. By setting the target polycount to 10000 it's expecting at least 10000 points. If you drop that number down to something like 2000 it works as expected.

Mike
User Avatar
Member
12 posts
Joined: Aug. 2013
Offline
Great, that got it going for the fluid. I had a feeling it was something I was missing. Thank you! So, it seems that there is a polycount limit for bringing meshes into unity? If I raise the detail of the mesh so that the polycount and point count is over 10000, it still causes the same flickering. At least the 5000 count works for now.

Also, did you get a chance to check out the particle sprite in the file? I cannot seem to get that one to work either.

thanks,
Jason
User Avatar
Staff
80 posts
Joined: May 2017
Offline
Hi Jason,

There were a couple of bugs in the export process. One was incorrectly setting the max no. of points and the other was incorrectly setting the resolution of the export texture. I've fixed both of them and submitted the changes to GitHub. Please download the latest development branch for the fixes.
https://github.com/sideeffects/GameDevelopmentToolset/tree/Development [github.com]

Sorry about that.

Mike
User Avatar
Member
12 posts
Joined: Aug. 2013
Offline
Hey Mike,

Thanks for updating that. Unfortunately, when I download it, the new ROP is empty. Looking into it further, it looks like the Contents.mime file is empty and 0 bytes. Maybe it didn't get posted correctly?

Thanks again,
-Jason
User Avatar
Staff
80 posts
Joined: May 2017
Offline
Let's try that again. Serves me right for trying to make changes to an HDA while in an indie hip file.
User Avatar
Member
12 posts
Joined: Aug. 2013
Offline
Hi Mike,

Sorry, I've been out of town, just now got back to this. I downloaded the new update at github and the particle export now works really well. Thanks for fixing that up, really appreciate it.

-Jason
  • Quick Links