Fluid vertex animation flickering
8852 19 4- JasonJ3d
- Member
- 29 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
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
- seelan
- Member
- 571 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]
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]
- JasonJ3d
- Member
- 29 posts
- Joined: Aug. 2013
- Offline
- JasonJ3d
- Member
- 29 posts
- Joined: Aug. 2013
- Offline
- mikelyndon-sesi
- Member
- 394 posts
- Joined: May 2017
- Offline
- JasonJ3d
- Member
- 29 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]
https://www.dropbox.com/s/7forywe8lnosjry/Houdini_Unity_Vtx_Flicker.zip?dl=0 [www.dropbox.com]
- mikelyndon-sesi
- Member
- 394 posts
- Joined: May 2017
- Offline
- JasonJ3d
- Member
- 29 posts
- Joined: Aug. 2013
- Offline
- mikelyndon-sesi
- Member
- 394 posts
- Joined: May 2017
- Offline
- JasonJ3d
- Member
- 29 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
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
- mikelyndon-sesi
- Member
- 394 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
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
- JasonJ3d
- Member
- 29 posts
- Joined: Aug. 2013
- Offline
- mikelyndon-sesi
- Member
- 394 posts
- Joined: May 2017
- Offline
- JasonJ3d
- Member
- 29 posts
- Joined: Aug. 2013
- Offline
- pupps09
- Member
- 13 posts
- Joined: July 2014
- Offline
Hi Mike,
I'm working in Houdini 16 (my company doesn't want to upgrade to 16.5) and I am getting the same flickering when exporting a flip sim as well. If I export a low poly sim, I can get decent results in Unity, but is there any work around with the Houdini 16 Game Dev Toolkit so I can get some higher resolution simulations to export?
I have Houdini 16.5 Apprentice, but with the resolution limits, I cannot export the textures out. I dug into the fluid COPNET and found that there is a Gamma node and Convert node attached for exporting to mobile(Unity). If you dont mind, can you give me any tips on what else I would need to change?
Thx in advance.
Naoki
I'm working in Houdini 16 (my company doesn't want to upgrade to 16.5) and I am getting the same flickering when exporting a flip sim as well. If I export a low poly sim, I can get decent results in Unity, but is there any work around with the Houdini 16 Game Dev Toolkit so I can get some higher resolution simulations to export?
I have Houdini 16.5 Apprentice, but with the resolution limits, I cannot export the textures out. I dug into the fluid COPNET and found that there is a Gamma node and Convert node attached for exporting to mobile(Unity). If you dont mind, can you give me any tips on what else I would need to change?
Thx in advance.
Naoki
- mikelyndon-sesi
- Member
- 394 posts
- Joined: May 2017
- Offline
- pupps09
- Member
- 13 posts
- Joined: July 2014
- Offline
Hi Mike,
Thx for the quick reply. I tried using the latest version of the GameDev Toolset, but I still get the flickering triangles if my Target Poly count is too high. I lowered to 15000 and I get the mesh to preview in Unity, but the Global position is wrong as well as some pinching going on (refer to attached image). I'm thinking this has to do with the color conversion of the texture maybe? By the way, is the Target Poly count referring to the polygon count or the point count?
Thx for the quick reply. I tried using the latest version of the GameDev Toolset, but I still get the flickering triangles if my Target Poly count is too high. I lowered to 15000 and I get the mesh to preview in Unity, but the Global position is wrong as well as some pinching going on (refer to attached image). I'm thinking this has to do with the color conversion of the texture maybe? By the way, is the Target Poly count referring to the polygon count or the point count?
- mikelyndon-sesi
- Member
- 394 posts
- Joined: May 2017
- Offline
It's possible that you're running into a precision issue. If the polycount is too high the second uv set may be packed too close together to get a proper texture read.
And the pinching looks like the texture is being imported in a normalised space. It's squashing everything into positive values. You probably want to double check your texture compression settings.
The target polycount is the number of polys, not the number of points.
And the pinching looks like the texture is being imported in a normalised space. It's squashing everything into positive values. You probably want to double check your texture compression settings.
The target polycount is the number of polys, not the number of points.
- pupps09
- Member
- 13 posts
- Joined: July 2014
- Offline
I checked my settings and everything looks like its in order.(see attached image)
I also exported out a low res sim and adjusted the Target Polycount accordingly, which resulted in the same pinching as before.
I then exported out the low res sim with the Game Dev Toolset for H16, which gave me decent results, shapewise, but I get that flickering still.
I've uploaded all related data to the link below. Would greatly appreciate it if you can check it out for me. No rush though.
https://www.dropbox.com/s/zpo716vnezytpcq/rnd_vat_test.zip?dl=0 [www.dropbox.com]
I also exported out a low res sim and adjusted the Target Polycount accordingly, which resulted in the same pinching as before.
I then exported out the low res sim with the Game Dev Toolset for H16, which gave me decent results, shapewise, but I get that flickering still.
I've uploaded all related data to the link below. Would greatly appreciate it if you can check it out for me. No rush though.
https://www.dropbox.com/s/zpo716vnezytpcq/rnd_vat_test.zip?dl=0 [www.dropbox.com]
- pupps09
- Member
- 13 posts
- Joined: July 2014
- Offline
Hi Mike,
I think I got it to work. On the Houdini side, I rendered out the position and normal maps as .tga, instead of .exr.
Then, on the Unity side, in the texture import settings, I had to adjust the Max Size depending on the size of the rendered out maps.
I rendered out using Target Texture Size of 2048, which resulted in a 2048 x 2987 image. The default Max Size for a texture in Unity is 2048. Using the default settings, Unity relatively scaled the image down. In this case, 1404 x 2048. I changed the Max Size to 4096, which kept the original resolution and everything looks good.
Thx for all of your help.
Naoki
I think I got it to work. On the Houdini side, I rendered out the position and normal maps as .tga, instead of .exr.
Then, on the Unity side, in the texture import settings, I had to adjust the Max Size depending on the size of the rendered out maps.
I rendered out using Target Texture Size of 2048, which resulted in a 2048 x 2987 image. The default Max Size for a texture in Unity is 2048. Using the default settings, Unity relatively scaled the image down. In this case, 1404 x 2048. I changed the Max Size to 4096, which kept the original resolution and everything looks good.
Thx for all of your help.
Naoki
-
- Quick Links