Jump to content

Ray sop question


jim c

Recommended Posts

I've got some geometry that represents a character, so it's polygonal, not NURBS. Is it possible to project a grid or a series of NURBS curves reliably onto this shape? I'm trying to build some clothing this way, just thought it would be a neat technique to try. But I can't get the Ray SOP to do this reliably. Some curves it will project OK, others it will not project all the points correctly, etc. Is there some way to get this to work reliably or is this really not what it's intended for?

Link to comment
Share on other sites

Have you got appropriate normals on the NURBS geometry to project towards the character? That byself it might be difficult but you can probably just tweak it with a Comb SOP. Perhaps you can do multiple iterations of this. Ray, Comb, Ray again. etc. When you're all done, restore or delete the normals used for raying.

Link to comment
Share on other sites

Probably not. The NURbs object was just a curve, created using the default Curve SOP. I thought that perhaps normals might be an issues so I added a Point SOP and adjusted teh normals values a bit so that they pointed straight back towards the surface, along the Z axis. However this didn't make any difference, so I'm clearly misunderstanding something here. For this to work, what should the normals look like? Are there optimal values? Large values, small values?

Link to comment
Share on other sites

my $0.02

i would avoid the raySOP and and look at the creepSOP. The raySOP is cool and all but i would suspect it will be slower, and you will get twitchy results depending on the resolution of the target surface, and if it is polygonal you will have to divide it so you get better results when you start to get non-planar faces (primitives).

Convert your "character" geometry to a mesh or NURBS surface.

and then you can creep your curves on to it. once you get used to how the creepSOP works it can get pretty fun.

-k

Link to comment
Share on other sites

The character has about 10K polys. Won't converting the character geo (that's a bunch of connected polygons) to a nurbs surface result in 10K nurbs surfaces? That's what this

http://www.sidefx.com/docs/houdini10.0/nodes/sop/convert

(see Face to Surface Conversion)

seems to imply, since it's not really n rows by n columns.

Link to comment
Share on other sites

The character has about 10K polys. Won't converting the character geo (that's a bunch of connected polygons) to a nurbs surface result in 10K nurbs surfaces? That's what this

http://www.sidefx.com/docs/houdini10.0/nodes/sop/convert

(see Face to Surface Conversion)

seems to imply, since it's not really n rows by n columns.

...converting polys to nurbs wouldn't be any simpler...

how about calculating the normals on the curves first (by looking up the closest primitive) and then projecting the with the raySOP?

Link to comment
Share on other sites

Probably not. The NURbs object was just a curve, created using the default Curve SOP. I thought that perhaps normals might be an issues so I added a Point SOP and adjusted teh normals values a bit so that they pointed straight back towards the surface, along the Z axis. However this didn't make any difference, so I'm clearly misunderstanding something here. For this to work, what should the normals look like? Are there optimal values? Large values, small values?

The normals should be non-zero. :) Other than that, it should work if the ray of your curve point actually hits the geometry. The thing to be aware of is that only the CVs of the curve will be affected. The interpolated portions of your curve will ignore the geometry that you rayed it onto.

curveRay.hipnc

Link to comment
Share on other sites

You are right it would be a mess if it is a entire character. I read this in your first message

so i was thinking it was chunks, bits and pieces. easier to remodel.

You could rebuild and structure your model differently. depends on what you are doing. If you have a quad mesh you should be able to rejink it procedurally in sections to be a Mesh/NURBS, just depends again on what you are trying to achieve.

Throw up a file and let's see, otherwise E.W.A.R.D.'s example is a good bet.

Good luck

-k

The character has about 10K polys. Won't converting the character geo (that's a bunch of connected polygons) to a nurbs surface result in 10K nurbs surfaces? That's what this

http://www.sidefx.com/docs/houdini10.0/nodes/sop/convert

(see Face to Surface Conversion)

seems to imply, since it's not really n rows by n columns.

Link to comment
Share on other sites

  • 2 weeks later...

Here's a hip file that reproduces the error, if that's what it is. I sculpted a shape that some of you may or may not recognize. Then subdivided it a final time to get the mesh count a little higher tom simulate the original mesh that caused the problem the first time.

Then tried to project the curve onto the mesh. The curves last point (where it's x value is 0) get's bounced all the way to the back of the shape, instead of staying on the front facing portion with the rest of the curve points.

Adding a polyreduce node to the high density mesh resolves the issue. If you toggle the polyreduce SOP on and off you can see this happen. So is this a bug? Should you not use the ray node with high density meshes?

post-4235-132051530054_thumb.jpg

post-4235-132051531295_thumb.jpg

rayproblem.hipnc

Link to comment
Share on other sites

Hey, jimc.

If you have UVs on your geometry, this can be much easier to deal with.

I attached a solution.

Basically you are simplifying the problem by removing 1 dimension. I added a UVunwrap for a lazy UV map. Then set the point positions to UV coordinates. Now you have a 2D shape that you can just draw a curve on. The RaySOP can then pick up the rest position attribute.

This method is neat because it will also work with particles...

Hope this helps.

rayproblem_solution.hipnc

Edited by Ryan
  • Like 1
Link to comment
Share on other sites

Thanks. Glad you like it.

It gets even cooler when you use particles. You can just create a 2D particle system in XY space and then ray it on the UV geometry. It works way better than the Creep SOP because you don't have to deal with NURBS and other random issues.

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...