Author : catstyle

TF2: Polycount Pack

Reply
Reply
 
Thread Tools Display Modes
pior's Avatar
Old (#1)
Hey all, another modeling workflow improvement I have been thinking of lately.

I find myself wanting to 'expand' the surface of polygon shells alot. By expand I mean, exactly the opposite to what a chamfer would perfom on the outer outline border.

Heres a diagram :


If I create an outline chanfer, then push it using CSslide, it gives the correct silhouette but a mess of folded shapes obviously :


One way I somehow manage to do it, is by using a convoluted workaround involving the shell modifier and move along normals... but it kinda sucks.

http://vimeo.com/7831268

Is there a better way to get such results? It sounds rather easy to script considering that CSslide and Shell seem to have all the core behavior needed for it ...

Please share!

Last edited by pior; 11-25-2009 at 11:08 PM..
Offline , veteran polycounter, 3,510 Posts, Join Date Oct 2004, Location Irvine CA  
   Reply With Quote

glynnsmith's Avatar
Old (#2)
A lot of the time, I can get away with selecting the element's faces, then use the outline tool in editPoly, with positive values.

Failing that, I do something that's probably similar to your shell trick, but with extruding the faces that make up the border, then extruding the new faces that're now side-faced. Very messy, but you get a bit of control with the extrude dialog.

A proper script/tool for this would very handy.
Glynn Smith (Portfolio - Super Updated @22Feb)
Offline , triangle, 496 Posts, Join Date Apr 2006, Location Staffordshire, UK Send a message via MSN to glynnsmith Send a message via Skype™ to glynnsmith  
   Reply With Quote

SyncViewS's Avatar
Old (#3)
Hi Pior, I'm trying to figure out the algorithm. It doesn't seems to be trivial. Right now the obstacle I'm facing is to find the right vector for surface extension perpendicular to the border reliably.

The general behaviour should be something like this: select some border edges to expand. If there is no selection, expand the whole border. On first click or drag start defining the extension amount, on second click or drag shift the extended border along its normals to adjust surface "curvature" (in double quotes because surface curvature is a totally different subject, about continuity in nurbs surfaces).

p.s.
Have you tried latest IC.FrameIt 0.7b? Does it work as you wanted?
IllusionCatalyst – Instrument set for 3ds Max │ AliquaForma – Personal portfolio in fieri
Offline , polygon, 572 Posts, Join Date Dec 2008, Location Milan, Italy  
   Reply With Quote

pior's Avatar
Old (#4)
Hehe Synch I was sure you would jump in :P Yes the process you describe seems to be exactly what would work the best. And I understand what you mean by 'curvature', no worries :P

If that can be of any help, if you perform a chamfer on a border edge/outline the resulting edges all sit on that desired 'curved surface' so maybe you can get the new orientation from there (by finding the average between the newly created points of a double chamfer, or something!)
Offline , veteran polycounter, 3,510 Posts, Join Date Oct 2004, Location Irvine CA  
   Reply With Quote

renderhjs's Avatar
Old (#5)
I am watching you guys ;)

I like the idea, guess similar to spline > extrude or inset in editPoly/faces. except it works on edges like shift + edges selection drag.
Offline , card carrying polycounter, 2,369 Posts, Join Date Mar 2008, Location Sydney Australia Send a message via AIM to renderhjs Send a message via MSN to renderhjs  
   Reply With Quote

CrazyButcher's Avatar
Old (#6)
what you would do is not just take the edge normals, but create a spline from the connected edge flow (similar to Pior's arrows) and then create curvature information. ie literally slide the new vertices on the extended spline.

this will not prevent you from overlaps and all that, which probably means you must try to detect this and run some relaxation on it. sometimes it can help to treat it as a 2d parameterization (think U,V, similar to how nurbs work)
Offline , polycounter, 1,190 Posts, Join Date Nov 2004, Location Germany Send a message via ICQ to CrazyButcher  
   Reply With Quote

SyncViewS's Avatar
Old (#7)
Hey CrazyButcher, that's the behaviour you got with nurbs. You extend an untrimmed surface and have to define only the extension amount, but in that case you have to deal with a function to describe the surface. Alter the domain, and you get your extension without any more effort.
In poly modeling you got only points in space, without any relation between them other than defining faces, and from faces defining edges. To preserve surface curvature is needed some sort of assumption, like surface is made of quads only, so you can jump from the extension point to some points over the surface and get the curvature angle that's preserved during extrusion.
I guess the easier solution is to extend surface by getting direction from proximal edges of each border vertex, handling the exceptions like a vertex between two edges sitting on a perfect line, then getting the extension amount from the user, and as last step let the user shift the new border along each new vertex normal (perpendicular to new surface lip in each point) to specify the new curvature. I think some tests are required.

Right now I'm cleaning up and finalizing IC.Shape 2.0 to be released in the next few days. I'll jump onto this as soon as possible.
IllusionCatalyst – Instrument set for 3ds Max │ AliquaForma – Personal portfolio in fieri
Offline , polygon, 572 Posts, Join Date Dec 2008, Location Milan, Italy  
   Reply With Quote

DEElekgolo's Avatar
Old (#8)
What about this script? Its poly creep feature should be something to look into.
Offline , spline, 214 Posts, Join Date Dec 2008, Send a message via AIM to DEElekgolo Send a message via MSN to DEElekgolo  
   Reply With Quote

CrazyButcher's Avatar
Old (#9)
sync, I have done similar work on poly stuff, so I am aware of what information is there, and which to synthesize on your own. While there is no nurbs-like parametrization of the surface, given assumptions (quads/tris) one can create internal splines (I mean the math here). That's what I meant with the sentence "create spline... create curvature information".
I didnt mean someone drawing splines in max, but really deduce that info from analyzing the polys. maybe I didn't make myself clear there. anyway it's possible, and works rather fine, as many artists create relative good and smooth edge flows (I've successfully implemented similar before as plugin).

@deelekgolo, that script works by projecting vertices on a hi-res (or any reference) surface. therefore it can "slide" vertices on it. the problem presented here is "guessing" about such a reference surface that doesn't exist.

Last edited by CrazyButcher; 11-26-2009 at 12:13 PM..
Offline , polycounter, 1,190 Posts, Join Date Nov 2004, Location Germany Send a message via ICQ to CrazyButcher  
   Reply With Quote

pior's Avatar
Old (#10)
About the curvature problem : while my diagram suggested that the new geometry should follow a 'guessed' curvature derived from the pre-existing geometry, in practice it is completely enough to just go 'flat' past the outer edge.

In other words : lets imagine that we perform an Extrude, or a simple Shell, on the edge of the base polygonal geometry. The resulting polygons go 'down' at a 90 degrees angles from the original surface. Now if you imagine the face normals of the newly created 'thick' edge .... they point in the correct direction wanted for the surface expand script. Then, the height/curvature of the newly created geo can be controlled with a later input in the script (or through a mere move along normals performed separately, like I did on the first connect shown in my video)

Hope this helps!!
Offline , veteran polycounter, 3,510 Posts, Join Date Oct 2004, Location Irvine CA  
   Reply With Quote

Ghostscape's Avatar
Old (#11)
I've done this with shell modifier (single segment) and then with an extrusion on the new edge faces, then selecting the edge faceloop, deleting it, and then deleting the back element.

Still messy as fuck though.
Offline , polycounter, 974 Posts, Join Date Aug 2006, Location Champaign, IL  
   Reply With Quote

CrazyButcher's Avatar
Old (#12)
no,no pior that is way too simple, we must make it more complex ;)
Offline , polycounter, 1,190 Posts, Join Date Nov 2004, Location Germany Send a message via ICQ to CrazyButcher  
   Reply With Quote

SyncViewS's Avatar
Old (#13)
CrazyButcher, I'm sorry, I never meant to sound bad. You were clear and I'm sure you know well the subject. You actually build only the math of splines not real curves, and use it to find the position for each new vertex along each curve, according to the extension value. I've been thinking about this, and it seems quite a good method, but I don't know how to create such algorithm. Aside from math that can always be learnt, the problem is I don't know how to "sample" the surface to get points to build each spline.

The idea is:
- Take the border vertex.
- Take the bisector of the angle formed by the edges along the border originating from the vertex.
- Take the vector normal to the surface originating from the vertex.
- Build the plane from the two vectors. It is perpendicular to the surface and intersects it.
- Get the intersection between the plane and surface edges (?)
- Build the spline from those points in space (?)
- Extend the spline from border end to find the final position for surface extension (?)

Using the intersection to build the spline avoids the assumptions of a specific type of geometry like quads only.

This is thinking out loud, I'm not sure of any of these steps. What do you have in mind?



@ Pior: If going flat is enough, I guess it can be done "quite" easily by tweaking the outline tool. Basically it should be something like: store current border vertexes positions, perform the outline, then cut the resulting surface following the position of stored ex-vertexes. Not trivial, but much easier. Again, after publishing IC.Shape, I'll be on this.
IllusionCatalyst – Instrument set for 3ds Max │ AliquaForma – Personal portfolio in fieri
Offline , polygon, 572 Posts, Join Date Dec 2008, Location Milan, Italy  
   Reply With Quote

CrazyButcher's Avatar
Old (#14)
I tend to overreact on stuff, so no worries Synch.

yes the sampling is indeed tricky, but what you describe sounds well. Basically walk the edges of the connected polys and check if the edge has either point on opposite sides of the plane, then intersect. Walk along the polys of those edges that did intersect.

or you assume quads/tris (which is what most people will work with) and pick vertices based on rules (faster). the benefit of following the natural edge flow is that you get smoother transitions into the "new surface".
Offline , polycounter, 1,190 Posts, Join Date Nov 2004, Location Germany Send a message via ICQ to CrazyButcher  
   Reply With Quote

mayaterror's Avatar
Old (#15)
Hey, with all these complicated scripts and solutions, why has no one mentioned the Push Modifier? It does exactly what you're asking about, no hassle.
Offline , vertex, 36 Posts, Join Date Nov 2009,  
   Reply With Quote

SyncViewS's Avatar
Old (#16)
Hi guys,
after a little bit of tricky vector math, here is the first version of a new instrument. Get IC.ExtendSurface from IllusionCatalyst web site, under page IC.Tools. Please report any issue, as well as ideas for improvement. Enjoy!

As usual, evaluate once and find it under Customize User Interface... Category: IllusionCatalyst Tools.
IllusionCatalyst – Instrument set for 3ds Max │ AliquaForma – Personal portfolio in fieri
Offline , polygon, 572 Posts, Join Date Dec 2008, Location Milan, Italy  
   Reply With Quote

SerdarDesign's Avatar
Old (#17)
@Sync: Can you add this useful script under the utilities panel of IC Shape 2.0? Both are very useful and it would be nice if you integrate extendsurface to your IC Shape script.

Thx
Offline , null, 23 Posts, Join Date Oct 2009,  
   Reply With Quote

SyncViewS's Avatar
Old (#18)
Hi Serdar, I will do that for sure when it will be a bit more mature and reasonably bugs free, right now is just the first release, and it can be improved with the help of everyone here at Polycount.
IllusionCatalyst – Instrument set for 3ds Max │ AliquaForma – Personal portfolio in fieri
Offline , polygon, 572 Posts, Join Date Dec 2008, Location Milan, Italy  
   Reply With Quote

mLichy's Avatar
Old (#19)
oh dude!!! That is freaking slick man I've been wanting something like this for a long time. *bows down
Offline , polygon, 629 Posts, Join Date May 2008, Location Kirkland, WA Send a message via MSN to mLichy  
   Reply With Quote

Vassago's Avatar
Old (#20)
Works great
Only issue I have with it personally, is once you edit the angle with CTRL and release it, the movement doesn't work as I'd expect/like. It would be nice to have an option (alt+ maybe?) for it to move back along the edge constraint. It would be very handy, if you ended up extruding too much.
joshua stubbles, environment artist
portfolio - linkedin -
polycount.wiki
- nexus:bsg
Offline , veteran polycounter, 4,858 Posts, Join Date Nov 2004, Location Redmond, WA  
   Reply With Quote

mLichy's Avatar
Old (#21)
oooh... now I think I know what you meant josh.
Offline , polygon, 629 Posts, Join Date May 2008, Location Kirkland, WA Send a message via MSN to mLichy  
   Reply With Quote

claydough's Avatar
Old (#22)
Quote:
Originally Posted by pior View Post
About the curvature problem : while my diagram suggested that the new geometry should follow a 'guessed' curvature derived from the pre-existing geometry, in practice it is completely enough to just go 'flat' past the outer edge.

In other words : lets imagine that we perform an Extrude, or a simple Shell, on the edge of the base polygonal geometry. The resulting polygons go 'down' at a 90 degrees angles from the original surface. Now if you imagine the face normals of the newly created 'thick' edge .... they point in the correct direction wanted for the surface expand script. Then, the height/curvature of the newly created geo can be controlled with a later input in the script (or through a mere move along normals performed separately, like I did on the first connect shown in my video)

Hope this helps!!
That direction still needs to be averaged by the previous neighbor's edge direction to define curve?
not jes "normal" direction alone ( not just straight? ).
Store that curve position for offset like u described, so new correct normal direction is stored.

rape dis here script:
cly_gestureSmoothing.mel ( sorry mel.. but the math should iz there )


Gesture Smoothing reaches the limit surface by using the direction of geometry before the quadrilateral divisions. The average between the vrt being calculated for and the direction vector extents, describe gesture continuity.
Offline , triangle, 361 Posts, Join Date May 2008, Location Austin/Baltimoron  
   Reply With Quote

pior's Avatar
Old (#23)
Well clay Im not sure to see the relevance of that subdivision effect here? Maybe you mean predicting a whole curve instead of a "straight" surface extrude.

And btw if you want that "energy preserved" subdivision in Max ... it simply is the Tesselation modifier. Easy!
Offline , veteran polycounter, 3,510 Posts, Join Date Oct 2004, Location Irvine CA  
   Reply With Quote

SyncViewS's Avatar
Old (#24)
Hi guys,
right now the script set the surface extension "straight" from border, taking into account the proximal border faces. It doesn't follow surface curvature, but allow to tweak the extension slant.

@ mLichy: Thanks man, I see if I can push this a little further.

@ Vassago: I'm afraid I cannot understand exactly what you mean. The scripts does all its math to collect extension vectors for each selected border vertex, then create the geometry to tweak. By dragging without pressing any modifier key, it changes the extension amount. When you press CTRL and drag, extended lip just revolve around extension border, like a hinge. When you drag again, after changing the extension angle, the direction is still the one you got at the beginning, it is not recalculated, and so it doesn't appear to extend "straight" anymore. Is this the issue you're referring to? If not, could you please elaborate on this?

@ Claydough: Thank you for your offer, but I think this is another set of problems. In a closed mesh there are different assumption that can be done, and geometry doesn't have to be guessed. The only solution I could think about, is the one I shown in a previous post, by getting the intersection of a virtual plane to the surface and then building a rail spline. Unfortunately is not that simple to code, and I'm neither sure it would lead to good results.

@ pior: Is this solution similar to what you got in mind when posted the original idea?
IllusionCatalyst – Instrument set for 3ds Max │ AliquaForma – Personal portfolio in fieri
Offline , polygon, 572 Posts, Join Date Dec 2008, Location Milan, Italy  
   Reply With Quote

pior's Avatar
Old (#25)
Hi! Yes, as far as I am concerned it's perfect as is! It allows for some very efficient 'shelling' of objects, REALLY quickly!



Now if there ever was another function to add ... that would be a way to somehow load a spline path as a way to define the successive extensions, with overall length and angle user-defined just the way they are now.

For instance one could make a cool extension and manually extract a linear spline form the resulting mesh ; then, running 'extendsurfacespline' would popup a dialog to pick the desired spline profile to work from. This would allow for easy copy/pasting of a specific extension look - somehow like the shell modifier does, but better!

Lemme know if you are interested ; if so I'll mock it up for you in images. It might require a menu with spinners for x y z and scale, plus an option to invert the spline - which is okay since copying-pasting such a spline profile is more of a uniue operation as opposed to the regular surface expand which is more of a freeform modelling tool, best used interface-free.

Also modifier stack structure (plugin only?) is not necessary since I believe it would be very easy to just start over again to change the extension look, if the spline pasting works.

Last edited by pior; 12-07-2009 at 04:43 AM..
Offline , veteran polycounter, 3,510 Posts, Join Date Oct 2004, Location Irvine CA  
   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Copyright 1998-2010 A. Risch
tracker