Vertex Animation Textures ROP 2.0 Released

   64676   107   16
User Avatar
Member
5 posts
Joined: 4月 2020
Offline
Hi,dude,I updated side fx LABS with version 18.0.287 and found that there was no vertex animation texture,What should I do to get it?

Attachments:
11.png (35.0 KB)

User Avatar
Member
394 posts
Joined: 5月 2017
Offline
seth_ro18
Sure thing, here it is attached. Thank you again.

Hey Seth. Turns out you discovered a bug in the debug view. Good find! I've submitted the fix and it should be available in tomorrow's labs daily build. The good news is it doesn't effect the mesh and texture that's created. I tested those in UE4 and they're fine. Just make sure you've set the various attributes on the mesh, texture and material instance and it should be all good.

Mike
User Avatar
Member
394 posts
Joined: 5月 2017
Offline
Katten_VFX
Hi,dude,I updated side fx LABS with version 18.0.287 and found that there was no vertex animation texture
Hey dude. It's right there in the screen grab labeled, VAT
User Avatar
Member
13 posts
Joined: 10月 2018
Offline
Hi Mike,
Would it be possible to have a simple Unity example file of the Vertex animation working with the URP or even HDRP, please. I'm still not quite sure where I'm going wrong or why I can't get it to work.
Thanks
Edited by maxecrow - 2020年4月2日 10:56:19
User Avatar
Member
5 posts
Joined: 4月 2020
Offline
米克林頓·塞西
Katten_VFX
Hi,dude,I updated side fx LABS with version 18.0.287 and found that there was no vertex animation texture
Hey dude. It's right there in the screen grab labeled, VAT


Yeah!I found it ,thank you very much!
User Avatar
Member
394 posts
Joined: 5月 2017
Offline
maxecrow
Would it be possible to have a simple Unity example file of the Vertex animation working with the URP or even HDRP, please. I'm still not quite sure where I'm going wrong or why I can't get it to work.

Hey. I've been meaning to update the shaders but keep moving it down the list. Essentially what you need to do is go through each of the shader files and replace the paths to point to URP or HDRP.
If you want a quick fix, you can change the #include paths from ‘lightweight’ to ‘universal’.
“RenderPipeline” = “UniversalPipeline”
“LightMode” = “UniversalForward”
User Avatar
Member
22 posts
Joined: 2月 2020
Offline
Hello,
I'm having trouble getting the VAT 2.0 export to work correctly in UE 4.23 with a simple RBD shatter case out of Houdini Indie 18.0.287. The debug view from the VAT ROP looks fine and I've ensured settings on textures (vector displacement and nearest filter) and meshes (full precision UVs) in UE4 are correct, but the “inside” faces of the shatter always remain static and visible in UE4. I attempted creating new UVs post-shatter thinking they were being left out of the export, but that simply broke the pivots on the pieces in UE4 while the inside faces still remain static as before.

It's always been fairly straightforward in the demos, but it's not working for me - am I doing something wrong in my export process? Test file attached.

Cheers,
Arvan
Image Not Found
Edited by Arvan - 2020年4月6日 16:00:07

Attachments:
HtoUE4_pigFrac03.hiplc (2.8 MB)
pigvat_debugView.jpg (33.2 KB)
pigvat_UE4.23.jpg (16.1 KB)
pigvat_UE4.23_newUVs.jpg (19.3 KB)

User Avatar
Member
18 posts
Joined: 3月 2015
Offline
mikelyndon-sesi
Hey Matt. The latest material function should have logic to deal with rotations. It's in the upper right corner of the nodes.

I updated to 424 but don't see this in the latest material function shader code. Maybe I wasn't clear with my earlier post though. I'm using the Soft Deform version of the shader. I'm talking about rotating the object in Unreal, not handling rotating objects in a rigid body simulation in Houdini.


Edit: Okay I found the fix for this. If you transform the normals from Object Space to World Space after the material function it will correct for object rotation. Might be worth integrating this into the Material Function (at least as an option) to make this usable in more cases.

Thanks for all the hard work Mike!
Edited by Matt Vitalone - 2020年4月2日 14:41:31

Attachments:
VAT_rotation.jpg (62.2 KB)

User Avatar
Member
113 posts
Joined: 12月 2007
Offline
Hello Mike,

Thank you for this tool, it's working well for me so far for fluids in UE4, I wonder if you could explain the “Target Prim Count” and “Target Texture Size” params?

Also what the margin means? The check polycount button doesn't seem to be working.

I'm getting “warning : target texture is too low” though it seems to work fine.

Also as a side note most of the time Houdini crashes (actually shuts itself down without a crash) when I try to enter the VAT network. Not sure if there's a work around.
Image Not Found


edit : it's the fluid_vertex_shader attribute wrangle in objects/debug that causes the crash.

Thank you!
Edited by vinz - 2020年4月2日 19:14:11

Attachments:
targetprimcount.PNG (9.2 KB)

User Avatar
Member
13 posts
Joined: 10月 2018
Offline
Thanks Mike,
I think there's more to it than that as I have I've tried replacing those bits and also replacing lightweight with universal eg>
#include “Packages/com.unity.render-pipelines.universal/Shaders/DepthOnlyPass.hlsl”
but to no avail. The shader also isn't importing any of the pivot, position settings etc either.

However, I can get these examples which use the shader graph, to work in Unity so it is possible (https://github.com/keijiro/HdrpVatExample) but cannot replicate the process from Houdini to Unity with the rop. When I replace the example with my textures and shader settings, like pivot and position, the movement is in the wrong direction and also then does that wierd explosion/dance at the end.

His method also uses the timeline to play the animation,but you have to set the frame rate in the timeline properties.

Cheers.
Edited by maxecrow - 2020年4月2日 20:03:03
User Avatar
Member
5 posts
Joined: 4月 2020
Offline
I encountered two problems:
the first was how to change the vertex UV information, such as from the second vertex UV information to the third UV.
Second, if the model is put into the particle in unreal, it will make a mistake if the size is enlarged. How to solve this problem?

Attachments:
1.png (1.3 MB)
2.png (1.4 MB)

User Avatar
Member
394 posts
Joined: 5月 2017
Offline
Matt Vitalone
I updated to 424 but don't see this in the latest material function shader code

Where are you grabbing the material function from? The code in the VAT ROP is the latest version.

This is what needs to be added to the material function.

Attachments:
rotate_normal.PNG (115.1 KB)

User Avatar
Member
394 posts
Joined: 5月 2017
Offline
vinz
I wonder if you could explain the “Target Prim Count” and “Target Texture Size” params?
Hi.
Target Texture Size is the width in pixels of the texture being created. You generally want this to be power of 2 - 512, 1024, 2048, etc.
Target Prim Count is the maximum number of triangles for the exported mesh. Ideally this is less than your input mesh. So if your input mesh is 10000 poly's and your Target Prim Count is 2000, it will polyreduce the mesh before export to 2000 triangles.
Now, each triangle is 3 vertices which requires 3 pixels to store position. So a target prim count of 2000 requires 6000 pixels per frame. The VAT ROP will automatically wrap that to the target texture size.

You can ignore the warning, margin and check polycount button. That's legacy stuff that I need to remove.

If Houdini is crashing on that wrangle, it's specific to your setup. Try lowering the target prim count to 1364 (4096/3)
User Avatar
Member
394 posts
Joined: 5月 2017
Offline
Katten_VFX
the first was how to change the vertex UV information, such as from the second vertex UV information to the third UV.
Second, if the model is put into the particle in unreal, it will make a mistake if the size is enlarged. How to solve this problem?
The VAT ROP will check for uv and uv2. If uv2 does not exist, uv2 will be used for the vertex animation texture uv layout. If the mesh input has uv and uv2, it will use uv3 for the VAT uv layout.

I'm not too sure what the scale problem is. I setup a simple cascade emitter and set the initial scale. In 4.24 it correctly changes the scale of the mesh.
User Avatar
Member
81 posts
Joined: 7月 2010
Offline
Hey Mike, thank-you for double checking that and submitting the fix! I will try out the conversion to UE4 again. I'm assuming then that the 2 nodes I'm connecting into the material function node (in the material) is all I need.
User Avatar
Member
1 posts
Joined: 1月 2017
Offline
Something that I ran into doing some soft body work with this similar to:
zhujing
Hi Mike,
I found the material in mesh have a strange shadow,just like some triangle in the mesh always been flikering.

I found my mesh crinkling and it turned out It was because i was using VectorDisplacementMap which was compressing and causing artifacts. Switching to HDR or another FloatRGBA format solved the issue for me. Thought i'd mention this in case anyone else was running into a similar issue.
User Avatar
Member
5 posts
Joined: 4月 2020
Offline
mikelyndon-sesi
Katten_VFX
the first was how to change the vertex UV information, such as from the second vertex UV information to the third UV.
Second, if the model is put into the particle in unreal, it will make a mistake if the size is enlarged. How to solve this problem?
The VAT ROP will check for uv and uv2. If uv2 does not exist, uv2 will be used for the vertex animation texture uv layout. If the mesh input has uv and uv2, it will use uv3 for the VAT uv layout.

I'm not too sure what the scale problem is. I setup a simple cascade emitter and set the initial scale. In 4.24 it correctly changes the scale of the mesh.

Thanks!dude!Waiting for your good news!
User Avatar
Member
113 posts
Joined: 12月 2007
Offline
mikelyndon-sesi
vinz
I wonder if you could explain the “Target Prim Count” and “Target Texture Size” params?
Hi.
Target Texture Size is the width in pixels of the texture being created. You generally want this to be power of 2 - 512, 1024, 2048, etc.
Target Prim Count is the maximum number of triangles for the exported mesh. Ideally this is less than your input mesh. So if your input mesh is 10000 poly's and your Target Prim Count is 2000, it will polyreduce the mesh before export to 2000 triangles.
Now, each triangle is 3 vertices which requires 3 pixels to store position. So a target prim count of 2000 requires 6000 pixels per frame. The VAT ROP will automatically wrap that to the target texture size.

You can ignore the warning, margin and check polycount button. That's legacy stuff that I need to remove.

If Houdini is crashing on that wrangle, it's specific to your setup. Try lowering the target prim count to 1364 (4096/3)

Thanks for the quick answer Mike, glad the things I was confused about are legacy/not needed.
Regarding the crash, the export works, it's the preview in Houdini that crashes, so I don't really want to lower the target prim count, but anyway, will give it a shot on another computer and try to narrow down when it crashes (otherwise currently running on win 10 with an i7 and a 2080ti)
User Avatar
Member
22 posts
Joined: 2月 2020
Offline
Hi, my first post from the 1st of April was finally approved but missing the images (EDIT: Images re-uploaded). I since tried updating to Houdini Indie 18.0.416 and redid the simple fracture workflow but I still have static inside faces and now broken pivots even without messing with the UVs. Scene file is same as was posted previously re-run with 18.0.416. The debug view in Houdini still looks fine, but I have yet to have even this simple fracture case work correctly in UE4.23 which is preventing me from committing resources to anything more complex. Any help would be greatly appreciated.

Cheers
Edited by Arvan - 2020年4月6日 16:00:42

Attachments:
pigvat_H18.0.416_debugView_v4.jpg (28.2 KB)
pigvat_UE4.23_v4.jpg (15.8 KB)

User Avatar
Member
394 posts
Joined: 5月 2017
Offline
Arvan
The debug view in Houdini still looks fine, but I have yet to have even this simple fracture case work correctly in UE4.23
If you're using the pighead as a test, it has multiple materials assigned to it. Have you applied the VAT material in UE4 to all the material slots on the static mesh?
Also, looking at your file the inside faces uvs haven't been laid out. All the uv values for the inside faces are the same. I'd suggest isolating the inside group and laying out the uvs. You could use the Labs Inside Face UV's for that.
  • Quick Links