Jump to content
pfistar

Trouble with Creep and Ray SOPs

Recommended Posts

Posted (edited)

Hi all,

Somewhat of a noob here trying to make vines creeping up a tree trunk (image A). I've put together a series of screengrabs along with my .hip file. Project geo peripheral might be a bit too large for attachment so here's a dropbox link: https://www.dropbox.com/sh/87f6okcs4h6a1xa/AAAXy7BdIlo1eJxFCmvkFzkPa?dl=0

 

I followed Scott Pagano's tutorial on Lynda, where he sets up the 2d point travel as a CHOP and feeds that into an (old school) ForEach net which holds the Creep node and iterates on a series of points.

In Scott's setup, the geo surface the vines travel along is created by conforming a simple Tube SOP around an abstract base geo using the Ray SOP. Using this tutorial as my guide, I tried to do the same by using Ray SOP to wrap Tube around my tree trunk model. Because the trunk leans in a certain direction and has some irregularities in its form, the Ray SOP was having trouble finding what it needs to find to get a good, full wrap all the way up the trunk (image B).

So, I tried a workaround, where I took the spine line of the tree, Resampled the points, used Copy SOP to clone series of Circles, and then created a surface with PolyLoft SOP. I figured this would line up the normals a little bit better between wrapping geo and tree geo and give the Ray SOP a better chance of finding the surface. Lo and behold this works quite a bit better (image C) however, now the Creep SOP yields an error saying that the geo surface I'm inputting is "not a surface". What's particularly frustrating is that I had it working for a moment yesterday (was able to generate "creeping" points up the tree surface) but can't recall how my setup was any different from now.

What's happening now is that the Creep SOP is placing its points on only a single primitive in my mesh (prim# = 0). (image E)

I ran a quick test with other primitive geometry objects: a Box, Sphere with top and bottom truncated using a Delete SOP. This was also yielding the "Input is Not A Surface" error in the Creep SOP, and the points were once again bound to the perimeter of primitive 0. It seems the only geo object allowing Creep SOP to let points travel is geo derived from a Tube SOP (image D). I was wondering if the points' travel ability had anything to do with normal angle, so I cranked down the number of sides to its minimum (3) but the points could still creep and travel around those sharp corners, so I'm wondering if it has to do with how the points are ordered on the surface geometry. Or is it something else entirely - ultimately wondering what separates a recognized 'surface' from a 'non-surface'.

I'd also ask if anyone knows of a better way than Ray SOP to conform a Tube to my tree trunk surface. Ideally, the Y value of each point would stay in place, so the mesh would be made up of evenly spaced horizontal loops, though of course X an Z would move to conform to the target surface.

Preemptive thanks to any responders!

NpF

 

houdini creep and ray.zip

 

Edited by pfistar

Share this post


Link to post
Share on other sites

Heyo,
I had a look at your hipfile and I think I've made it work like you wanted, though I have mostly created a different setup than the one you were using just based on my own experience creating similar things.
Some of the takeaway might be that:
- The ray node is not really a good idea for actual geometry since it will not make any effort to maintain the geometry's shape. It will just smush the geometry against the collision geometry and create a mess. Instead, try to ray something like a simple spline to the collision geometry and see if you can create the geometry sometime after the ray operation.

- Also on the note of the ray SOP, I saw you had it set to use "Projection Rays" and "Normals", this works but do keep in mind that this means that it will try to shoot the points of the geometry along their normals till they hit the collision geometry. For this to work best, be sure to carefully craft your point normals before the ray SOP. If the normals don't hit anything the points will just stay where they were before the ray sop and make your spline look very strange.

- Try to keep the setup as simple as possible for as long as possible. Basically, if you can work with splines all the way through your node tree until the very last node converts it into an actual mesh then strive to do so since your setup will be way more responsive for not having to deal with thousands and thousands of points each frame.

- For animating/revealing a spline like this the "carve" node is your best friend, it's certainly mine!


I've created this in Houdini 18.0.460, so there might be some errors when you open it. It should be fine though, nothing should be lost. However, for the best compatibility, I'd recommend you look at my setup, if you want to use it, and try to recreate it in your own scene.

Good luck!
ray and creep_forum_mnb.hipnc

  • Like 2

Share this post


Link to post
Share on other sites

Hi Martin

Many thanks for the reply and for the investigation! :)

Before I saw your response I did manage to get things working using the Ray SOP to create my creep surface. File is attached. What I ultimately ended up doing was using PathDeform SOP along with PolyFrame SOP to create my initial tube geo and to keep the normals of the tube I was trying to wrap from straying off their initial horizontal direction. The results weren't absolutely perfect, but were good enough to move forward.

I took a look at your solution which is far more Zen than mine - though I don't imagine I would have ever arrived there for a couple reasons:

1) My VEX knowledge is nil, save for the most very, very basic things

2) Allowing the vines to criss-cross as they climb the tree-trunk is essential to the look I was trying to achieve, which is why I chose to copy this tutorial over others of a similar nature. I struggled with re-creating the CHOPs networks to get that point-position randomization, but ultimately it gave me the exact effect I wanted. I would bet there are other ways to do this (for example, I haven't investigated how I might pipe the CHOPs data into your VEX-based point set-up), but this one seemed logical to me, and easy enough to control, should I want to art-direct the randomization.

Otherwise, yes Carve SOP is totally a friend!

Many thanks again for taking a look and for the general advice!

Cheers

Nik

 

 

 

 

 

 

 

ray_and_creep_forum_npf_followup_4.1.zip

  • Thanks 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×