Jump to content

Procedural Polysplit


Recommended Posts

  • Replies 46
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

Still no answer for the above, but here are some more bug fixes. Deceptively trick this little sop.

Hey Simon,

Could it be the merge is not working?

Maybe try:

GU_Detail *scratchgdp = new GU_Detail(gdp);

Or maybe

GU_Detail *scratchgdp = new GU_Detail();

scratchgdp->duplicate(*gdp);

Just guessing...

Link to comment
Share on other sites

Ok I think I've squashed most of the bugs. And finally added embedding and extraction. Haven't done angle overriding yet. Just need to think about that one. I haven't rigourously tested the extraction part but it basically works.

I've used this at work to put over 300 cuts in a mesh so I'm fairly happy it works.

Compiled for Windows H8.0.510 source included, should work with all the current H8 releases I think.

PolyCrease.zip

Link to comment
Share on other sites

Hey Simon,

I finally got a minute to take a look at this SOP of yours and I must say I'm very impressed by it. I think this might well be a pretty useful tool for effects artists who have been very set in the procedural mindset. Thank you very much for your spirit of sharing!

I think it may be a good idea to start a Wiki page with some promotional/educational screenshots for your tools.:)

Link to comment
Share on other sites

Cheers Jason, :)

This thing won't go to bed though, I found some more "features" and have squashed them.

One problem was embedding and extracting curves that cut the same edge.

The other was finding a way to have groups of curves embedded seperately so that on extraction you could apply different options like close path just to that set and not all of them. I tried to use the built in layering method but the hdk didn't play nice with it, so for the time being I've added a user controlled prefix that is added to the detail attribute.

Polycrease.zip

Link to comment
Share on other sites

I figured out how to get layering working, it was of course my own stupid fault, not the hdk.

Polycrease.zip

25235[/snapback]

Well done! :)

I'll check it out when I get in to work. I'm trying to forge a spot for it in the way we work and am trying to figure out a way to make it more cut in a predicatable way when the underlying mesh changes. One thing I'm sure we all wish is that it could cut where edges cross even if it can't find a place to for the curve points to go. I suppose it would be kind of like a mode of a Knife tool (that has been RFE'd for ever) where you could draw a line of two points right across a grid where the points lay way outside the grid and still get all the interior cuts.

Of course, a Knife tool would have to support viewport interaction, with being able to cut across all selected surfaces along the view projection.

I wonder how close PolyCrease could get to being a PolyKnife? Is there any way yet to code Handles?

Cheers,

Jason

Link to comment
Share on other sites

If you only need to cut in straight line segments then turning it into a knife tool wouldn't be too hard. You just need to search for intersections between the knife edges and the edges in the mesh. It would just mean extending one part of the code to deal with edge on edge intersection. Making the assumption that a point was already on a edge just made it easier to code for.

The tricky bit is how you control things when the mesh isn't flat and you are only trying to cut through particular polys in the model, you have to allow for the fact that the line won't necessarily perfectly intersect with the edges you need so you have to project it onto the surface or allow for some sort of tolerance.

Could you post a sample mesh and line as an illustration of the workflow?

I was deliberately trying to avoid using viewport interaction as making an external curve made it more editable, that was my main original problem with polysplit, it was too hard to change if you layed it down wrong first time.

Link to comment
Share on other sites

Could you post a sample mesh and line as an illustration of the workflow?

I'm really going off seeing the Maya implementations of a Knife tool. I'll try to find you those links.

I was deliberately trying to avoid using viewport interaction as making an external curve made it more editable, that was my main original problem with polysplit, it was too hard to change if you layed it down wrong first time.

25254[/snapback]

I tried very very quickly to throw a PolyCrease into an HDA together with a Curve SOP whose parms are promoted, and then attaching curvepoint Handle to the field so that it'd be one-click-easy to model away with a procedural PolyCrease . Unfortunately I don't know if its possible to get the curvepoint Handle to add new points instead of just allowing you to modify existing ones. Does anyone know if this is possible? This is just another attempt to make your curvepoint step closer to an interactive modeling tool.

Link to comment
Share on other sites

I'm pretty sure that isn't possible, one of the many limitations of modelling hda's

25269[/snapback]

That seems a pity, that that Handle is not capable of adding another triplet to the text field. It already modifes any existing values in there, why not let it add more?

Link to comment
Share on other sites

If you only need to cut in straight line segments then turning it into a knife tool wouldn't be too hard. You just need to search for intersections between the knife edges and the edges in the mesh. It would just mean extending one part of the code to deal with edge on edge intersection. Making the assumption that a point was already on a edge just made it easier to code for.

The tricky bit is how you control things when the mesh isn't flat and you are only trying to cut through particular polys in the model, you have to allow for the fact that the line won't necessarily perfectly intersect with the edges you need so you have to project it onto the surface or allow for some sort of tolerance.

Could you post a sample mesh and line as an illustration of the workflow?

I was deliberately trying to avoid using viewport interaction as making an external curve made it more editable, that was my main original problem with polysplit, it was too hard to change if you layed it down wrong first time.

25254[/snapback]

It seems that there could definitely be a way in which your tool could be extended in a procedural way and not resulting with a fixed non-procedural result and still keep it open enough to be a viewport modeling tool - especially if SESI ever open up the HDK for viewport interaction.

As for edge-edge intersections, it'd be great to mimic the Ray SOP's capabilities to determine nearest intersections and projected intersections along N or along X, Y or Z, or a user defined view or a external camera/light view maybe?

Link to comment
Share on other sites

How about this then, rather than a knife "line" it would be a knife "plane" - a bit like a clip plane but not straight and not like a cookie cutter because it would only cut existing edges. Would that do it? and would that be useful?

25411[/snapback]

Here's a demo of what I mean - is this what you mean?

ray_crease2.zip

You'll need Polycrease installed to get it to work.

This one nearly works just with default Houdini tools, needs more testing though.

curvesect.zip

Link to comment
Share on other sites

Here's a demo of what I mean - is this what you mean?

ray_crease2.zip

You'll need Polycrease installed to get it to work.

This one nearly works just with default Houdini tools, needs more testing though.

curvesect.zip

25417[/snapback]

Yeah, some of the Knife tools out there do support the straight-line plane clip style thing as a mode of operation, but most allow poly-lines or freehand curves to be drawn in the viewport. I wouldn't expect your particular tool to be able to handle all that since SESI don't allow you to draw in the viewport, but I really think if PolyCrease handled edge-to-edge intersections then it might be 90% of the way there and still keeping things procedural - which would be more useful for parts of production which aren't pure modeling tasks.

Obviously the Knife type of tool is intended to assist in fast modeling without much regard for keeping it procedural at all. In fact, keeping it procedural for modelers would probably cause far more trouble than it's worth considering so many modeling operations rely on point and primitive numbers being reliable and unchanging.

I'm just looking for that middle-ground, that sweet spot where viewport interaction meets proceduralism :) ... and I'll admit that over the years I've grown a tad wary of CurveSect, SurfSect and other more historical tools that haven't been revamped in a while.

I think that if SESI had to release a Knife tool that it should have a "spatial/proximity/projected(procedural)" and "explicit(non-procedural)" modes since we can see where these two worlds meet for this type of tool.

Link to comment
Share on other sites

I think your right most times for modelling you want something non-procedural that just does it and you move on. I think a knife tool would probably fall into that mode. However the reason I wrote PolyCrease was for modelling, in particular the situation that I have had a lot in what we do. It might not translate to other worlds but here's the two situations.

1. When the split operation is actually the last thing you do just to divide the model up into different parts. The line of division may change so it's better if its procedural, nothing comes after it except making groups, which is why I added the partitioning

2. When you have a lot of polysplits one after another and changing the first one would make all the others after it blow up. I was often finding myself in that position and its painful to have to redo so much work. With polycrease this isn't an issue, also being able to embed stuff means you can apply the spatial splits deep within the model whilst you can see easily get to the parts then carry on refining the shape and extract them later, this is really for when you are putting "creases" in a surface. This is probably less common because of tools like z-brush, but it's something I still need to do.

I'll try and add edge to edge intersection but it brings a whole heap of problems which I think are better done solved in the viewport, hopefully Sesi will take some note and add such a tool. Have you rfe'd it?

Link to comment
Share on other sites

I'll try and add edge to edge intersection but it brings a whole heap of problems which I think are better done solved in the viewport, hopefully Sesi will take some note and add such a tool. Have you rfe'd it?

25455[/snapback]

Cool :-P Probably just supporting edge intersections with proximity and projected modes would allow the tool to work in all the necessary fundamental ways to support having some level of viewport modeling tacked on either in the HDA manner we played with or some future drawing-in-the-viewport mode.

Yup, the Knife tool has been RFE'd for years :)

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