Exporting Houdini scene to WebGL/three.js
17642 19 4- garyo
- 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.
- mandrake0
- Member
- 642 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.
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.
- garyo
- 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)?
- cb
- 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
- mandrake0
- Member
- 642 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]
https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/figures/gltfOverview-2.0.0a.png [github.com]
- garyo
- 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?
- skydave
- 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.
- garyo
- 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?
- cb
- Staff
- 635 posts
- Joined: July 2005
- Offline
garyoskydave
…
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
- vime_mohn
- 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.
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.
- garyo
- Member
- 32 posts
- Joined: Nov. 2017
- Offline
- goldleaf
- Staff
- 4195 posts
- Joined: Sept. 2007
- Offline
- ToddDurant
- Member
- 24 posts
- Joined:
- Offline
- bberak
- 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..
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..
- BrunoCohen
- 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!
- ctedin
- 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.
- velopl
- Member
- 1 posts
- Joined: Sept. 2010
- Offline
- GiantSpaceTurtle
- 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.
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.
- rayalez
- Member
- 13 posts
- Joined: Nov. 2014
- Offline
- matthias_k
- 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)
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