Anyone familiar with Geo poly from polyboost? You select a face, of any number of sides, hit it, and it makes the poly perfectly planar and equi-angular. So an 8 sides face becomes a perfect octagon. This is handy for extruding perfect cylinders that will smooth into perfect cylinders.
But, I want a geo loop tool. Let's say you have a tree branch, and you create it out of an 8 sided cylinder, but you want the tip to be 4 sides, and have it taper down in between. After collapsing edges, you're left with an odd cross section that isn't as round as it could be. I want a geo loop tool that let's you select an edge loop, and it will make it planar and equi angular.
Does one exist? If not, will a kind soul attempt to create one?
Replies
I thought you were a technical artist anyway, can't you script this?
Not anymore, I'm a level artist, and the second my title changed, all my skills disappeared!
Wharghoul, in Max.
Polyboost is a Max exclusive plugin.
I would remove the faces of your branch cylinder so that you only have the two end-cap polygons, then border select them and use the bridge tool. From here you can use the bridge options to modify segments, taper, bias, etc to get a really nice transition from an 8-sided polygon a 4-sided one, that has a good organic curve to it and everything. You can even throw some twist in there if you like.
Depending on your branch you might do this in two sections or per sub-branch or something, but using this basic technique and some soft-select afterwards I'd think you could get some decent results pretty quickly.
also HELL YEAH LEVEL ARTIST WELCOME TO THE CLUB BUDDY.
Also, he could have been referencing a tool, and asking for something like that, ie. XSI has this cool mumbojumbo tool, I want something similar in Lightwave, can anyone help?
But the idea is cool, and I probably will make one for Maya - the math seems fairly easy, except for a little bit of "best fit" stuff. I already have one I wrote for fitting things to the best plane (great for capping off a wrist for example) - but adding something to "cylinderize" it shouldn't be too tough.
It's a python script, so maaaaybe portable to Max fairly easily, but I dunno if I have the time/inclination to look into that yet
you can already do that with polyboost in max... it is very handy indeed...
Is every vertex in the edge loop modified to fit the regular shape, or is there a fixed point and the other just slide around? I guess it's easier to have a fixed point to start the calculation. How do you like it? Do you want to take the radius form the average distance from loop center, or prefer to take it from the chosen fixed point?
What if vertexes in the loop don't lie on a plane? Do you want them to be flattened on the average plane, or do you prefer them to keep the same projection distance from the average plane?
I may code such tool in forthcoming IC.Shape 2.
(after a quick test...)
...Well, it seems it's not calculated at all. If you try a "Make Planar" on bare isolated verts it makes them planar in X.
EDIT
(after other quick tests...)
It seems "Make Planar" fails badly even on an edge loop in a cylinder. Again it makes verts flat along one axis.
Edit: So what i thought was actually true. Once you collapse vertices the original center of the circle is lost. The center calculated from all vertices at least. How do you construct a cicle without knowing the correct centerpoint? Some testing code:
EDIT: Never mind that doesn't work that well at all.
1. get average center point
2.get average plane
3. get average radius
4.create n sided circle with radius and center point
5 move vertexes to their counterpart in the circle
6.delete circle
7. rotare vertexes relative to the centerpoint until the hull is convex
even easyer script way slice edgeoop, cap edgeloop,geopoly, delete cap, move ugly verts to beaty verts and collapse
we already have it, i use it all the time...
http://www.creativecrash.com/maya/downloads/scripts-plugins/modeling/c/equalize-continuous-edges?software_version=2009
the example pic is doing it a different way, but it also has the functionality your looking for, if you select a loop is going around the tube and not down it.. it basically spaces everything out equally, so if you do it to a round loop it becomes a circle..
SHAKE IT!!!
*shakes fist at arshlevon*
The only problem is that it doesn't work right if there are any poles on the loop(vertices with more than 4 edges connected to them). So , in the case of callapsed edges, it won't work.
I guess it is because it cannot read the closed edge loop, since poles stop it.
CompleteCurrentTool;
ctxCompletion;
What about about relax, then scale it back up a bit, or is it important to have all edges be equal lengths?
what exactly are you doing? i don't understand this part..
"I tried creating 6 sided cylindar into an 8 sided"
it doesn't do that, it spaces things out evenly..
i use the script on a regular basis so if you show me what you are trying to do then maybe i can help... just select one loop and run: mm_equalizeEdges;
Anyway if I were more comfortable with normals and matrix stuff I would do it like this:
@mop, if you have just a cross section it's area preserving, ie one could deduce the radius from the original cross surface. (area = pi r², r = root(area/pi)). but maybe you meant the shrink due to subdiv?
I was more thinking along the lines of the problem where, if you go from a 12-sided cylinder and "collapse" every other edge (instead of "removing" every other vertex), the Collapse action actually loses volume since it averages the edge's vertex positions. So going from 12-sided to 6-sided using Collapse operations (which are better in these cases than remove since it deals with the cylinder connections nicely) inherently reduces the radius of the mesh at that point.
Edit: Then again, I don't really understand poopinmymouth's original post, since he says "going from 8 sided, collapsing to 4 sided" and then requests the script to make it as close to a circle as possible - surely if you have collapsed a regular 8 sided cylinder down to 4 sided then the result is a perfect square anyway?
The example image he gives later is more accurate, in that just the top 2 edges are collapsed so you end up with an irregular 7-sided shape instead of a 12-sided shape. Going from 8 to 4 (or 12 to 6, 16 to 8 or whatever) doesn't have this problem if you're collapsing regularly.
This is why a script would be nice, because the tentacle like limbs will prevent a more standard solution. Of course I know that collapsing every other edge evenly doesn't need this type of fixing.
here it is: IC.GeoEdgeLoop! Get it from IllusionCatalyst website, under Script section in MaxScript Page.
It works on closed edge loops in Editable Poly objects with two algorithms: refit by vertex and average.
- Refit by vertex ask for a vertex as fixed starting point for calculation. Its position is preserved, while other vertexes slide around.
- Refit average works iteratively every vertex until a regular polygon is shaped by subsequent shifts. It checks for edge length and angle between edges.
In both cases the edge loop is flattened on the average plane.I hope you enjoy it, please report any issue. Now back to workshop Wrench!
One other feature that would be nice, currently you must do one ring at a time. It would be good if you have more than one selected, if it auto chooses the average feature and does it to each of them.
Does the Average function lock Max on every kind of geometry, or is it a particular case? Would you mind posting an OBJ for testing purposes?
I'm not sure about it, but it could be a simple tolerance issue, if you are comfortable with code, try to rise fLengthEpsi and fAngleEpsi from 1e-4 to 1e-3 in function refitLoopByAvg.
About the multi loop feature, I think it would be quite handy. Right now I guess it would require quite a heavy edge sorting and loop testing, but should be possible to implement. Thanks for the tip.
As long as the mesh is "Editable Poly". It took me a while to figure out it won't work on an Edit Poly modifier only a Editable Poly object. It would crash and highlight line 292.
Having it work on edit poly would awesome since its not always possible to collapse the stack down to editable poly. Or maybe just having a check and error message would be nice.
Thanks again this rocks x10!