Jump to content

Houdini Points to Unity Line Renderer

Recommended Posts

Hey folks, I'm currently working on a planet asset for a game (see attached file + picture). The idea is to take the lines that connect the quads on the surface and feed them to the unity line renderer. I also animated it by using $F. Now there are several questions and problems:


1) Would you export and .fbx and bake the animation? I used $F for the animation and its not working in Unity. However the .fbx has some weird smoothing group issues that the HDA has not (why?).

2) Is there a way to connect the lines to the line renderer in Unity?

3) For some reason the quads on the planets surface always have flipped normals (which makes them invisible in Unity...). I even tried flipping them manually in the last node before the output but the problem still exists. Any ideas? I could fix them by using a double sided shader but I'd prefer it if you'd help me make it work as intended. :)





Share this post

Link to post
Share on other sites

Hello Oliver,

Welcome to the forum.

We were just having the line rendering the issue the other day, lol.

For animated FBX, use the Vertex Texture Exporter, or you will have to animate your geo at the object level. Each element in a separate object with each animation on that object, and then export the whole object level tree. When exporting for the frame range $F does not really apply in the case of FBX as it spits out one monolithic file, not multiple files. I highly recommend the Vertex Texture Exporter, as it will be more efficient for almost all FX cases, as opposed to traditional FBX rigs. The mesh is still FBX, but the animation is really a fancy displacement shader. The process is a lot cheaper at runtime unless you are doing complex stuff like characters that are blending motions.

The unity FBX importer does not import lines or points/vertexs it will cull them out. FBX does store them though. You would need to make a custom unity importer, which there are a few unity forum post about on the interwebs. You will need to be a bit more on the tech side to do it. The alternative hack is to make polygons out of your points/vertices and lines so they import. Dirty I know, but it depends on how complex your pipe is. If you are working on a side project I would recommend this. If you are working at a company I would recommend the later. 

Make sure your normals are on the vertex level, and that your points are fused for your geometry for FBX. Also visualize the face normal, this can be reversed from the your vertex normals. Use the reverse node to flip the face normals. This generally happens when you build a mesh in a few different ways. I could open your file, but I'm lazy :P This reverse winding of the face can have different issues for different rendering programs, especially which way it interpolates the normals in your case invisible.


Share this post

Link to post
Share on other sites
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.