Jump to content

Procedural Terrains


thoma.v

Recommended Posts

Thanks a million, Dude! Thats way more than expected (and hoped for)! :rolleyes:

I hardly dare to ask but anytime I try to run the HDK-Sop I get some weird command prompt windows popping up and the node indicates an error. I have installed Visual C Express but are there other important things I have to consider?

Cheers

i guess you have installed visual c++ express 2010 but for houdini you need the 2005 version. if i remember correctly, someone posted a download link somewhere here on odforce for the propper compiler.

petz

Link to comment
Share on other sites

  • 10 months later...

I'm trying to re write the VEX code in the mountain1 example with a VOPSOP node network. This is an exercise so I can understand the code better.

I seem to have the height, slope and vec calculated correctly?

I would be interested in the second VOP SOP node, the one that spreads the points out. That one seems more complicated. If anyone can help convert that would appreciate it. Out of curiosity, why did you use code in the network instead of nodes?

VexCode_V2.hipnc

Edited by breadbox
Link to comment
Share on other sites

Here is my best attempt to recreate the second vopsop with a network.

its not right. I'm not sure how to create the specific while loop and if conditions. there maybe some other problems too.

obviously the network code will be different than the orginal code, but the result output should be the same?

here is the original code:


vector $vec, $ray_dir, $rayhit_pos;
float $rayhit_u, $rayhit_v;
int $handle, $intersect, $i, $cond = 1, $count;
$count = -1;
i = 0;
while(i < $number_steps && ingroup("flowlines", ptnum) && ptnum > $count)
{

$handle = pcopen($file, "P", P, 1, 8);
$vec = normalize(pcfilter($handle, "vec"));
$ray_dir = normalize(pcfilter($handle, "N")) * 0.05;
P += $vec * $step_mult;

$intersect = intersect($file, P, $ray_dir, $rayhit_pos, $rayhit_u, $rayhit_v);
if($intersect == -1)
$intersect = intersect($file, P, -$ray_dir, $rayhit_pos, $rayhit_u, $rayhit_v);

if($intersect == -1)
removegroup("flowlines", ptnum);
if($intersect != -1)
P = $rayhit_pos;

N = normalize($ray_dir);
$count += $number_points;
i += 1;
}
[/CODE]

my vopsop code is in the hip file.

VexCode_V3.hipnc

Edited by breadbox
Link to comment
Share on other sites

On the "old" flowlines topic.

In H12 there is a native flowfieldSOP called volumetrail. It advects streamers/curves from points in a vector field.

If I only could get my RFE thru for it to respect a "max advection lenght" attribute on incoming points it would be one of the best nodes ever. :)

volumeTrail.hipnc

Link to comment
Share on other sites

wow, volumeTrail is super cool. and its really fast as well.

I'd stll be interested in converting the vex code into a vop network if anyone could take a stab at that. Im just learning vops and it would be helpful as a frame or reference.

just a quick animation comparison side by side, by animating the initial noise field VOP. the volumeTrail is a bit more unstable, or produces a few artifacts. this could be a result of not enough voxel density. but then if you increase that it gets slow. it also looks like there is some popping at the beginning or end of trails sometimes.

The VopSop method although slower, produces pretty stable trails even with an animated mesh.

either way the effect is really cool however it looks like magnetic metal filings.

Edited by breadbox
Link to comment
Share on other sites

Out of curiosity, why did you use code in the network instead of nodes?

no special reason just personal preference. i think vex is faster to write and easier to read than intertwined and nested vop-nodes.

The VopSop method although slower, produces pretty stable trails even with an animated mesh.

if performance is important you may want to use the hdk version in the file. it was written for houdini 11 so you´ll need to modify the code to work well with the new geometry library in houdini 12.

hth.

petz

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...