I'm trying to import some trees from SpeedTree into Houdini Indie, and while I've been able to get the geometry into Houdini, I haven't been able to get materials onto them in Solaris. I'm using an assignmaterial node to attempt to assign materials to the bark and leaves, but the materials aren't getting attached to the geometry.
I tried using the SpeedTree importer that comes with SpeedTree 9.3, but that's just erroring out, and though I've asked for help from SpeedTree, haven't gotten any response from there yet, so I'm at a loss here. I'm exporting .OBJ from SpeedTree, but I don't know if that's the best way to go about it or not.
Thanks!
Importing SpeedTree trees?
1985 3 2-
- WinterLightDP
- Member
- 6 posts
- Joined: March 2022
- Offline
-
- lukeadow
- Member
- 2 posts
- Joined: Feb. 2023
- Offline
-
- jtk700cln
- Member
- 52 posts
- Joined: Jan. 2016
- Offline
Hey you two--recommendations from me are to use the alembic exporter from speedtree. The materials will not export for you, so you will have to reassemble them yourself based on the alembic file paths. The texture paths that speedtree sends to disk match explicitly with the separate alembic groups, making your job at least a little easier. I recommend changing the export to meters, and capping the texture resolution at 4k (some of the 8k textures dont play well with karma). Once you have the asset template set up though, its super easy to generate additional speed tree variants--they will always use the exact same texture setup unless you make really large changes to the speed tree node setup. Hope that advice is helpful. If I have time over the next couple weeks I can send over an example file.
-
- lukeadow
- Member
- 2 posts
- Joined: Feb. 2023
- Offline
Just replying to this with an update.
Thanks jtk for the response, I based my solution off of it.
I started with exporting the alembic sequence from SpeedTree (and grouping the geometry based off of material).
I used the SpeedTree importer in Houdini node, and also imported the Principled Shaders.
I modified some of the code found here: https://app.gumroad.com/d/b2cc28b5e4858875d201d6310a8b0d76 [app.gumroad.com] to automatically convert the SpeedTree Principled Shaders to MaterialX (to work with Karma XPU). Mostly I just had to change variable names, but also added some automatic checking for whether certain textures were present or not.
Then taking this into the Solaris context, I can instance the alembic geometry, and using the Assign Material node, assign it to the instancer's sub-geometries.
Hopefully this helps someone, and please respond if you find a more elegant solution!
Thanks jtk for the response, I based my solution off of it.
I started with exporting the alembic sequence from SpeedTree (and grouping the geometry based off of material).
I used the SpeedTree importer in Houdini node, and also imported the Principled Shaders.
I modified some of the code found here: https://app.gumroad.com/d/b2cc28b5e4858875d201d6310a8b0d76 [app.gumroad.com] to automatically convert the SpeedTree Principled Shaders to MaterialX (to work with Karma XPU). Mostly I just had to change variable names, but also added some automatic checking for whether certain textures were present or not.
Then taking this into the Solaris context, I can instance the alembic geometry, and using the Assign Material node, assign it to the instancer's sub-geometries.
Hopefully this helps someone, and please respond if you find a more elegant solution!
-
- Quick Links