Exporting Houdini scene to WebGL/three.js

   17796   19   4
User Avatar
Member
32 posts
Joined: Nov. 2017
Offline
I'd like to export a whole Houdini scene: camera, lights, geometry, materials, textures and animations so I can load it into a high quality PBR-based three.js/WebGL web app. What's the best-practices way to do that with Houdini 16.5? I know Houdini exports lots of formats, and three.js can convert and/or read directly lots; I'm hoping folks here have good experience to share.
User Avatar
Member
644 posts
Joined: June 2006
Offline
Just checked there is a scene file format.

https://github.com/mrdoob/three.js/wiki/JSON-Object-Scene-format-4 [github.com]

It look like you need some python to create a exporter. You can export geometry files in houdini but no scene file.
User Avatar
Member
32 posts
Joined: Nov. 2017
Offline
I'm not sure that scene file format is implemented properly/completely. But three.js can load glTF (https://threejs.org/docs/#examples/loaders/GLTFLoader). Can Houdini export glTF? Seems like no, which is too bad. Three.js also supports COLLADA; can Houdini export COLLADA (dae)?
User Avatar
Staff
635 posts
Joined: July 2005
Offline
garyo
I'm not sure that scene file format is implemented properly/completely. But three.js can load glTF (https://threejs.org/docs/#examples/loaders/GLTFLoader). Can Houdini export glTF? Seems like no, which is too bad. Three.js also supports COLLADA; can Houdini export COLLADA (dae)?

Your request for GLTF support has been noted.

See also this thread here: https://www.sidefx.com/forum/topic/53079/ [www.sidefx.com]

Cristin
User Avatar
Member
644 posts
Joined: June 2006
Offline
my bad didn't seen that gltf 2.0 supports scene setup's.

https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/figures/gltfOverview-2.0.0a.png [github.com]
User Avatar
Member
32 posts
Joined: Nov. 2017
Offline
I must be missing something – I can't even export a basic object with PBR (prinicipledshader) material and a texture. I've tried Alembic and FBX and obj, but all of those only get the geometry and miss the material settings and texture (at least with the settings I've tried). I'm using Houdini 16.5 Indie; is this an Indie limitation or am I just not doing it right?
User Avatar
Member
15 posts
Joined: March 2010
Offline
mandrake0
It look like you need some python to create a exporter. You can export geometry files in houdini but no scene file.

Check out https://github.com/dkoerner/houio/tree/master/scene_exporter [github.com]. This python script exports the current scene in houdini to a json description file. Exported are cameras, objects (not including sops), lights and some animated parameters. It is very rudimentary and does not support materials etc. But it might be a good starting point for writing your own exporter.
User Avatar
Member
32 posts
Joined: Nov. 2017
Offline
skydave

Check out https://github.com/dkoerner/houio/tree/master/scene_exporter [github.com]. This python script exports the current scene in houdini to a json description file…

Wow, I didn't expect that Houdini would have no way to export a full scene! I have written a full glTF exporter before, but I'm hoping not to have to do it for Houdini; it's a good chunk of work. And when/if SideFX does implement glTF export that work would be wasted.

At this point I've tried fbx and Alembic, and neither one exports even basic principledshader or textures. Are there other 3rd party exporters?
How do people use Houdini to develop assets for games? Just use it for geometry (exporting obj) and recreate all materials and textures in some other software?
User Avatar
Staff
635 posts
Joined: July 2005
Offline
garyo
skydave

Check out https://github.com/dkoerner/houio/tree/master/scene_exporter [github.com]. This python script exports the current scene in houdini to a json description file…

Wow, I didn't expect that Houdini would have no way to export a full scene! I have written a full glTF exporter before, but I'm hoping not to have to do it for Houdini; it's a good chunk of work. And when/if SideFX does implement glTF export that work would be wasted.

At this point I've tried fbx and Alembic, and neither one exports even basic principledshader or textures. Are there other 3rd party exporters?
How do people use Houdini to develop assets for games? Just use it for geometry (exporting obj) and recreate all materials and textures in some other software?

Maybe my comment earlier was a little too subtle. If you can wait a bit, you won’t have to write it for Houdini.

Cristin
R&D SideFX
User Avatar
Member
4 posts
Joined: June 2018
Offline
Hi there,

our studio is quite new at working with Houdini. However, we already love it as part of the digital asset creation for our offline rendering pipeline.

However, we'd love to have a proper workflow for having instances of digital assets created by Houdini in a WebGL-Environment. We'd prefer Babylon Js. For maya there is a .babylon exporter but not for Houdini however.

Is there some way to get that? It's in a json format.
User Avatar
Member
32 posts
Joined: Nov. 2017
Offline
Houdini 17 supports glTF 2.0 import and export. Still a little wobbly in places but it's getting there. Babylon.js accepts glTF 2.0; that's probably your best bet.
User Avatar
Staff
4199 posts
Joined: Sept. 2007
Offline
I wish I were smart enough and/or had enough time to implement HEngine for three.js; would love to embed live HDAs in documentation…
I'm o.d.d.
User Avatar
Member
24 posts
Joined:
Offline
goldleaf
I wish I were smart enough and/or had enough time to implement HEngine for three.js; would love to embed live HDAs in documentation…

I wish for this too!
User Avatar
Member
3 posts
Joined: April 2019
Offline
Hi there,

It's been about 8 months since this post was initially created - and it looks like a GLTF export has made its way into Houdini!

I've got a couple of questions regarding the export process:

- Does the exporter support animations and multiple animations?
- I have created a very simple geometry with about 5 different poses (1 frame animations). I did this using the Houdini Animation Editor. How can I get these animation actions / poses to be exported via GLTF? I cannot seem to get these animations exported.

My goal is to export the model with the various poses, and import them into ThreeJS as different animation clips which I can then assign weights to as required.

I should note that I'm more of a developer than an artist, so I'm not sure if my terminology is correct. Please let me know if you need more info.

Also, exporting as FBX (which can be imported into ThreeJS) won't work because as far as I know, FBX only supports a single animation track, not multiple.

Thanks in advance for any help..
User Avatar
Member
1 posts
Joined: July 2019
Offline
bberak
Hi there,

It's been about 8 months since this post was initially created - and it looks like a GLTF export has made its way into Houdini!

I've got a couple of questions regarding the export process:

- Does the exporter support animations and multiple animations?
- I have created a very simple geometry with about 5 different poses (1 frame animations). I did this using the Houdini Animation Editor. How can I get these animation actions / poses to be exported via GLTF? I cannot seem to get these animations exported.

My goal is to export the model with the various poses, and import them into ThreeJS as different animation clips which I can then assign weights to as required.

I should note that I'm more of a developer than an artist, so I'm not sure if my terminology is correct. Please let me know if you need more info.

Also, exporting as FBX (which can be imported into ThreeJS) won't work because as far as I know, FBX only supports a single animation track, not multiple.

Thanks in advance for any help..

Hey bberak, I'm trying to do something similar but can't seem to get animation out of Houdini into glTF natively. Have you had any luck since this post? Thanks!
User Avatar
Member
69 posts
Joined: Dec. 2005
Offline
I've been trying the same thing myself. I did some MOPs work, and tried the MOPs Extract Attributes node. No luck so far. I'll keep trying. Bone-based animation seems to work. I tried importing an animated GLTF file and it doesn't bring in the animation. Going to export it as an Alembic or FBX file, and use Blender to convert. Might not work, but worth a try.
User Avatar
Member
1 posts
Joined: Sept. 2010
Offline
goldleaf
HEngine
Did you have any success with HEngine and three.js/babylon?
I'm thinking about exact same approach for my project
User Avatar
Member
1 posts
Joined: June 2020
Offline
Not having any luck exporting .gltfs with animation for three.js. Anyone able to do this? Have tried exporting from Blender but it doesn't work either.


https://github.com/arqtiq/houTHREEni [github.com] I'm aware of this but it seems like overkill when you could just have .gltfs that work.
User Avatar
Member
13 posts
Joined: Nov. 2014
Offline
Did anyone manage to figure this out?
I'd love to find any way at all of exporting animated models from Hou to Godot (game engine).
Unfortunately, FBX exporter doesn't work at the moment, unable to split animation into multiple clips.
User Avatar
Member
483 posts
Joined: Dec. 2006
Offline
Animation , ok done via Blender... (sorry, no v18 here)

Export from Houdini as Alembic to Blender and then exported as GLB:
https://www.matthias-kappenberg.de/downloads/digital-asset-simple-pipeline [www.matthias-kappenberg.de]

(Scroll little bit down, klick: "Load 3D Model", Intro after load has rotation and scale)
Edited by matthias_k - Dec. 30, 2020 07:07:26
English is not my native language, sorry in advance for any misunderstanding :-)
  • Quick Links