Hi guys!
Searched the forum & google but didn't found what i want to know. Ok, here is the question:
How can i revert a chamfered edge? (3ds max)
Example image below. I chamfer this edge and maybe some hours later i think: "Hm, this edge is annoying, i want to have the original state of the model here!". Ok, i could just loop-select the lower edge, bring it to the same height as the top of the "box" and then delete the inner part of the top...but is there no way to just select some edges and click one button and *swup* all is fine as before?
Replies
Probably need to click each vertical edge and make planar to straighten them out as it might slope the sides.
Doing it this way is most friendly to your UV's, unlike welding which is time consuming and destructive to UV's.
2) Symmetry on the Z axis, so the bottom is mirrored to the top, remove the center seam.
It will mirror your UV's also, the easy fix is to flip half and weld it before you remove the center seam.
3) Delete the top poly and the chamfered polys, select the boarder, cap it and drag it up a bit to match the height.
The new cap will have fugly UV's, but nothing quick planar map won't fix.
Probably a few other ways to get it done too...
I mean, the manual steps to do this are pretty simple - can't imagine there is no script for it...
It's probably not so easy to figure out where an edge was or where the two edges would intersect? Then collapse the chamfer back down to a single edge and move it back to that point. Add to it that there are probably all kinds of odd case situations that could dork it out. It sounds like a scripting nightmare...
I'm not a big fan of wizard like tools, they aren't all that reliable. They normally work great for specific things like this example but but aren't swiss army knives and ultimately fail on other things. If it takes longer to try it out and find out it failed than to do it manually I'd rather do it manually.
I hate scripts also, but I think a simple chamfer like this wouldn't be too hard to fix. I shouldn't say that because I've never messed with it and I haven't programmed in about a year, but here is my logic behind it:
Basically 'extend the top surface poly out over the edge, and extend the side poly also and where those two intersect, the new (old) edge should go. This would probably get way harder than this with advanced chamfering, but something like this 1 chamfer shouldn't be too hard to script?
For me it would a really great time saver because correcting a lot big bended polygons is annoying and time consuming if you do it more than 1x a day.
that gives you 2 planes that intersect at a line on which our "old vertex" should be.
then intersect that line with a plane that is created from the edge that connects the vertices and its normal is created from the 2 (or 1) polygon shared of that edge.
move top and bottom vert there, weld and delete the polys between.
thats the theory.
Do you have right to say how your programmer solved the problem?
Maybe you could look at the script and try to construct your own for max?
1. Select the edges of the chamfer (just the outter most ones if you have a higher value of chamfers)
2. Delete all geometry in between selected edges.
3. Extend edges that were selected.
4. Weld verts.
I'm actually going to try this as soon as I finish a prop I'm working on (should be tonight).
It's not as quick to clean up the top portion of the mesh pictured in the first post but cleaning up the sides is fine. You select the edges that make up the bevel and run the script but it needs an edge on both sides of the bevel. So say for the top you would have to cut the top across to get another edge to run the script or you will not get an accurate placement of the collapsed verts. I'll see what I can come up with soon.
Edit: I also need to make it work on multiple edge rows. Currently you have to select each edge loop that has a bevel and run it... need to find a way to sort out each edge loop you have selected and then run the function on it.
Should show up under the category "BCTools" I'm sure there are bugs and if anyone wants to take it further then go right ahead.
The sides work perfect but...
You can see here how the top is still a pain. Would probably need a different algorithm for that where you just select the ring and hit a button. Thats beyond me though.
Edit: Nevermind now I see what you mean, my phone wasn't animating your images :P
Good lord, I just glanced over that code and it's rough. Not the coders fault though haha.
Bryan, you're script does things a little differently than I'd like so I'm not going to use it, but it's good none the less!
I would also VERY much appreciate a script like this.
Here's Seneca's explanation of his script... mine works just the same. I should probably put a pop up window in if you have a closed loop
Edit: Yeah that works great . Now just if someone could somehow do the same for the top of the box, that would be epic
Also I noticed that scaling edges locally naturally create that 'expansion' effect - meaning the axis of projection should be easily readable?
Scripts looking great so far, trying it out first thing tomorrow!
I think I know why it's not working on the top chamfers, I think it has to do with the order in which things are being done in the Linelineintersect function. I'm going to try to write a function that checks the faces normal direction and then reorders that function if the surface normal is facing in the positive z direction. Unless someone gets to it before I do (hence why I posted this here haha).
DarthNater: If your only checking for a positive z normal then it will only work if the top part of the bevel/chamfer is facing up. What if you want to get rid of the bevel and that particular object is rotated 90 degrees... or 47.8 degrees?
I think there's another way of taking care of the top. I'll see if I can get it to work. I have an idea but knowing which edges to use as the vector and which point to project onto that vector may require the user to select the top poly or polys so I could test and see which vert is the correct end vert.
Ah gotcha. Sorry, I'm a little (OK VERY) rusty, haven't used my 'technical' brain for at least a year now :P