how to design procedural tool? important design concepts?

   1847   2   0
User Avatar
Member
18 posts
Joined: Jan. 2009
Offline
Hi everyone,

I need some guidance on the following. Hope someone can help.

I want to make a simple procedural tree tool which I can distribute over a grid. For every tree I want different size/color/etc. What is good approach in achieving this?

Here my initial thought:
# Create the procedural tree network
# create a null node with a seed attribute
# reference that seed value in the nodes responsible for size/color/etc so that when the seed changes the tree changes
# Create a HDA with that seed value in parameters
# Copy-stamp the tree on the grid with a stamp function in the HDA seed value

Is there another way to do this? Maybe without copy-stamping?
Or maybe someone knows a good tutorial?
Edited by - May 13, 2016 16:35:23
User Avatar
Member
2548 posts
Joined: June 2008
Offline
Sounds like a reasonable approach. You may want to look into Instancing vs Copying for final deployment.

There is a nice example file here that demonstrates the speed benefit.
http://forums.odforce.net/topic/23294-houdini-16-wishlist/?do=findComment&comment=143811 [forums.odforce.net]
Using Houdini Indie 20.0
Windows 11 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
User Avatar
Member
18 posts
Joined: Jan. 2009
Offline
thanks!

I checked your example. The instance version takes 1.014s to cook and the copy version takes 19.397s to cook. So that's a big difference.
I have very little experience with VEX so i'll probable use the copy-stamp for now; but, once my .hda is finished I think i should be able to do something like this right? (Not sure if syntax is correct :? )

// hda
s@instance = sprintf(“/path/to/hda”);

// seed
float seed = fit(rand(@ptnum),0,1);
v@seed = set(seed);
  • Quick Links