Jump to content
WLVL

Vertex Animation Texture - RBD - Houdini to Unreal - Checklist

Recommended Posts

Hey Houdinians,
I have made a check list gathering infos from the webinars/tuts done by the great Houdini GameDev Toolset Team.
Please let me know if something is missing or wrong, I hope this is helpful for some of you.
 
Rigid Body Dynamics Vertex Animation Texture - RBD VAT
optimal for high # of pieces.
alternatives (bones, straight fbx)
 
in HOUDINI:
 
1-
rbd material fracture SOP
proxy to rbd bullet sim
 
2A-
dopimportSOP(fetch geometry from DOP network)
OUT to VAT ROP
 
 
2B- 
this step if you need to add edge/interior details or manipulate geo
static highres full geo
add uvs (autouvSOP)
limit number of poly, polyreduceSOP (precision errors in ENGINE if npoints/nprims is too high)
hou material: shop_materialpath prim attribute (unreal will replicate houdini's)
or assign unreal mat: unreal_material prim attr (in UNREAL/content menu//right click on material/copy ref path)
 
pack fragments (assemble SOP)
add rest point attribute (VAT ROP needs rest)
 
dopimportSOP (create point to represent objects) 
 
use transform pieces to apply motion to high res geo
copy template attributes ON (VAT ROP needs orient + pivot)
OUT to VAT TOP
 
 
3-
VAT ROP
method to RBD
will export a mesh fbx, a pos texture, a rotation texture.
textures size min will be: [ n of packed prim * n of frames ]
 
 
in UNREAL:
 
import VAT passes (pos.exr, rot.exr, mesh.fbx)
 
pos/rot texture:
details/compression_setting/vertex displacement (HDR default not needed, exr is normalized)
details/texture/filter/nearest
 
mesh:
details/import_setting/mesh/vertex_color_import_option/Replace (pivots are stored here)
details/import_setting/mesh/Remove Degenerates/OFF
details/LOD0/build_setting/Remove Degenerates/OFF
details/LOD0/build_setting/full precision uv/ON 
 
create material
details/material/tangent space normal OFF (we write data in world space)
details/material/num_custom_UVs , set to 3.
copy/paste material code from houdini VAT ROP/Rigid Vertex Animation UE Code
connect outputs (base cd, normals, trans offset)
connect (uv1,2, ...) (pass data from vertex shader to texture shader)
 
 
create material instance from material
copy bbox max, bbox min, bbox max1, bbox min1, n frames, from houdini VAT ROP
set playback speed to 1 (it's a multiplier )  (framerate fps / total number of frame animation)
assign pos and rot texture to translation and rotation textures
assign material instance to rbd mesh.fbx
 
---
 
 
tested on Houdini 17.0.416, Game Dev Toolset 1.96

rbd_VAT_workflow_v01.hiplc

Edited by WLVL
correction
  • Like 2

Share this post


Link to post
Share on other sites

Hello

thanks a lot for posting that!

I was having issue with pivot point not working, so I took your file and tried it without changing anything.

and I have the same issue.

in houdini it looks great:

inH17.thumb.gif.0fee7946e5f35be4155e2b0b5868ea2a.gif

but in UE4:

 

inUE4.gif.9076deae878fe615219c1f766529b020.gif

Any Idea?

 

Share this post


Link to post
Share on other sites

Glad you found this useful.
Double check that you are copying bbox max, bbox min, bbox max1, bbox min1, values correctly to the material instance parameters in unreal

Share this post


Link to post
Share on other sites

Yes, super useful !

I did double check (I found another of your post about it :) ).

image.thumb.png.e228f2989f588a840d382a188e2212be.png

 

I included the textures, geometry and Material.  I got out of houdini, if you have a chance to test them and see if you get the same result.

I'm on houdini 17.0.416

and unreal 4.21.2

 

PS: I also tested a scene with their gamedev RBD director, solver and what not but have the same results (weird pivot offset), that's why I think it's something in my UE4 set up.

thanks a million.

 

test_rot.exr

test_pos.exr

test_geo.fbx

M_vat_Test.txt

Share this post


Link to post
Share on other sites

When importing into UE - make sure that Vertex Paint is set to Replace.  for rbd the vertex colors are used to store the packed fragment offset - this is why the rotations are jacked

  • Like 1

Share this post


Link to post
Share on other sites

Thanks bobcober I was having the same problem as misterbil and I wasn't able to find a solution.

Edited by josich

Share this post


Link to post
Share on other sites
Guest
You are commenting as a guest. If you have an account, please sign in.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoticons maximum are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×