Skip to content

python scripts for exporting trees from grove3d to houdini with instancing

Notifications You must be signed in to change notification settings

kubo-von/grove3d-to-houdini

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

NOTE:

USD export has been added to Blender since I wrote this script, this works quite well for exporting the whole tree along with instanced twigs. If you dont want to do something fancy with the twigs this could be more simple solution for you.

grove3d-to-houdini

Python scripts for exporting trees from grove3d to houdini with twing instancing.

Don't expect anything polished, I made these as my personal messy R&D.

This setup works for Renderman and Mantra, for Redshift or Arnold it migth need slight adjustments but I haven't tested it.

Tested with Blender 2.80 beta and Grove 7

Tutorial:

1.Blender

Open grove3d-to-houdini-export.py in the text editor, change the path on the first line to where you want the twig file to be exported. Select the tree trunk and Run the script
Export the trunk as Alembic file (tick "Vertex Colors" if you want to use grove3d attributtes like thickness, Power etc.. )
Export each twig you want to use as an alembic file.

alt text

2.Houdini - scene preparation

Create geometry node for the trunk, load it with Alembic node.
Create instance node, set it to "fast point instancing" and name it e.g. "twigs".
Create Subnet called e.g. twig_lib", inside it create geometry node for each twig you exported from Blender. In the geometry node load the alembic files with alembic node and add transform node with Y rotation set to -90.

alt text alt text

3.Houdini - Reading the points

Go inside the instance node ("twigs") and delete the "add" node

Create python node and paste content of grove3d-to-houdini-import.py as the node's Code

alt text

Edit the varibles on the first few lines:

filename = the .pckl file we exported from blender
twigLib = "path to twing_lib subnet"
twigsApical = array of geometry nodes from twig_lib that you want use as apical twigs
twigsLateral = array of geometry nodes from twig_lib that you want use as lateral twigs
scaleRandom = twing scale randomnes

Jump out of the instance node and you should see the twigs being instanced in the viewport: alt text

About

python scripts for exporting trees from grove3d to houdini with instancing

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages