PDA

View Full Version : Script released: CleanCut


LFShade
02-20-2003, 05:03 PM
You can get it here (http://host.deluxnetwork.com/~rhyde/cleancut.html).

Description:
"CleanCut is a Maya-like cut-tool for 3dsmax5. Unlike the standard poly cut tool in Max, this one doesn't leave messy edges all over the place - you only get the cuts you want!"

I just finished it off and uploaded it last night. Hopefully it's ready for use, if anyone finds any bugs you can email them to me at rhyde09@hotmail.com (or just post here). There will probably be frequent updates over the next week or so, so check in often for fixes if you have problems.

Enjoy!

Reality3D
02-20-2003, 05:55 PM
:thumbsup:

jadedchron
02-20-2003, 05:59 PM
yay! :bounce:

mirror dl-> www.thenewfoodlabel.com/CleanCut.zip 12kb

LFShade
02-20-2003, 06:02 PM
thanks again for the mirror, j :) Just keep in mind that there will likely be some updates coming if any bug reports come in.

jadedchron
02-20-2003, 06:34 PM
will do:thumbsup:

markdc
02-20-2003, 10:05 PM
Very nice. Thanks.:thumbsup:

proteus2002
02-20-2003, 10:07 PM
thank you for sharing.

Mahlon
02-21-2003, 01:00 AM
Cool. Am going to try it out tonight. Thanks.

Mahlon

Erka2
02-21-2003, 05:16 AM
Sorry for my stupid question. But, how did you setup your 3dsmax UI, that when you do some thing(like in your CleanCut movie using it) than rotate viewport... and than you stay with your Clean Cut and can do next cut.
When I do some thing I rotate using "R" button, when I press it tool I use reseting, and I need to select this tool ones more... and more... and more(after each rotating)...
Help me understand your setup :p :beer:

LFShade
02-21-2003, 05:26 AM
If you hold down the Alt key while dragging with the middle mouse button, it orbits the view. Then it doesn't cancel out of the tool ;)

Michael
02-21-2003, 06:36 AM
This looks great! Gotta do a test run when im home from work.
Now if someone could make a Bridgetool as in Nendo :)


Michael

ChristophZollinger
02-21-2003, 08:09 AM
Thatīs a great script.
Itīs an improvement for my workflow.

tubby
02-21-2003, 08:42 AM
hey great idea LF, I havent tried it out yet but am eager to start a new model to try it out. Good stuff man, keep up the awesome work!:)

Iain McFadzen
02-21-2003, 08:57 AM
Originally posted by Michael
This looks great! Gotta do a test run when im home from work.
Now if someone could make a Bridgetool as in Nendo :)


Michael

Meshtools "Connect 1" works as a bridge tool in Poly SO mode :)

magicm
02-21-2003, 09:51 AM
nice one LF !

:thumbsup:

gaggle
02-21-2003, 10:04 AM
Sweeeeet!

On a side-note, I'm glad to see it's packaged in an auto-(un)installer, so damn slick. This is how every script should be released :drool:


played with it some more, and I'm experiencing some.. ah.. issues. Where do I submit bugreports to?

Erka2
02-21-2003, 01:24 PM
Here...

cdinic
02-21-2003, 03:50 PM
Works great! thanks for a great script.

comments....
I like how the normal, less powerful cut tool draws the possible cuts in real time. Could clean cut do that?

also
I have clean cut in my quad. If I want to make 2 seperate cuts, not on the same line, I have to make one cut, right click out of clean cut, go back into it and then make the second cut. The straight max (suface tools) cut alows me to make a single cut, then roll around my mesh, and make another seperate cut without having to select the cut tool again. I see why u didn't build clean cut like this. With clean cut you can make a nice long, complex cut across a single face, which rocks! but what if right clicking finished the current cut without taking me out of the clean cut tool.

workflow would be:

right click>quad>clean cut
make 3 point cut on a face A
right click out of current cut line
alt+middle mouse arc rotate
Make 4 point cut of Face C
right click out of current cut
right click out of clean cut tool.

Make sense?

maybe I'm crazy.. but thats how I like to work.. seems alot faster then re selecting the tool each cut I make....


but It's a great tool as it is! I will use it very often. Thank you

-Chris

LFShade
02-21-2003, 04:33 PM
First of all, I want to thank everyone for the comments. Just the kind of feedback I'd hoped for :buttrock: Now on to the specifics:

gaggle -
glad you like the installer scheme. I'd love to hear about the issues you're having with CleanCut, as I'm very interested in getting all the bugs out as quickly as I am able. You can post here or send me an email (rhyde09@hotmail.com).

cdinic -
I would love to have my tool draw the real-time "rubber band" to show where the next cut's going, but the MAXScript functions for drawing to the viewport would require that the viewport be redrawn every time the mouse moves in order to do something like this. Since redrawing can get a little slow, especially when you're working with a large model, I decided to try and cut down on VP redraws wherever possible in my script. Currently there is a redraw whenever you're hovering the mouse over an edge or vert, and you can see the flipping between the crosshair and wait cursors when it does this. Now imagine it did this the whole time the tool was running -- not very easy on the eyes :surprised

As to your second question, I'm not sure I understand something. I can orbit my view with Alt+MMB without exiting the tool, no problem. It is very easy to continue a cut all around a model without having to restart the CleanCut tool. I'm going to have to ask other folks to back me up on this one, because I don't have the opportunity to test my scripts on a wide variety of systems and configurations. Anyone else having trouble staying in the tool when they orbit the view?

gaggle
02-21-2003, 04:46 PM
LF, I think what cdinic means is that he'd like to be able to make one cut, using orbit and everything, then finish that cut and make a new cut, alltogether different from the cut he just.. er.. cut.. :)

Anyway, the workflow he suggests makes sense to me, and I can see how that would speed that up a bit. On the other hand, as it works now.. I mean, bind it to a hotkey and you're not exactly suffering from slowdowns. I don't think it's considered "normal" to having to essentially right-click twice to get out of a tool?

..or maybe it is, and I just can't remember right now.

And roger roger on the bugreport thing, I'll do it here then for easy feedback from others to determine if this could be something unique to just my workstation.

gaggle
02-21-2003, 04:54 PM
I've bound the script to the quadmenu. I made a box, collapsed it to Poly, entered a submode, and started cutting away.

Suddenly I was staring at my desktop.

I'll see if I can find a pattern to it.

I also received an error when I was using it, I was staring at the scripts encrypted code, and I had to reset twice to get it working without that message popping up.
Apparently I didn't think much at the time: I did not write down the error. Sorry. If I see it again I'll make sure to do that. It was one of those "an error has occured in the script" things where the script editor pops up.


Finally, .. er, well it's not a bug but just me being curious: the snap-to-edge/vert lines were flashing like crazy, which you've just said that is how that works. There's no way to go around that? Double-buffer the refresh-thing or whatnot?
I'm curious how Discreet makes it happen then.. (er, if they do?, I can only remember a band-saw thing happening with the QuickSlice tool, but I don't think that's a line that's draw on the geometry).

LFShade
02-21-2003, 05:00 PM
Ahhh...now I understand! That's not a half bad idea, now that I get it. Should be really, really easy to implement at that! When I get things back in order vis-ā-vis my Max (details here (http://www.cgtalk.com/showthread.php?threadid=45335)), I'll see if this works as well as it sounds like it would. News at 11!

The above was in response, not to the bug report but to the post before that. I'll respond to the bug report shortly.

LFShade
02-21-2003, 06:40 PM
Okay, now that the dust has settled and the gremlins have agreed to stop meddling with my toys (for now), I have some news about this latest CleanCut bug. gaggle is actually the second to report it; I got an email about it late last night as well. I don't yet know what's causing the problem, but I do know a way to find out.

gaggle (or anyone else experiencing the bug) -
go back to my site (http://host.deluxnetwork.com/~rhyde/cleancut.html) and download the new debug version of the script. Uninstall the version you have on now and then install this debug version. It won't fix the problem, but it will (or should, anyway) cause a more readable error to be thrown to the screen. That should help me figure out what's going so terribly wrong. Post the results here after you try it out. Sorry for the trouble, and thanks for the report :thumbsup:

about the broken link - terribly sorry. works now :rolleyes:

jadedchron
02-21-2003, 06:44 PM
It gives a 404 :shrug:

here's the link: http://host.deluxnetwork.com/~rhyde/cleancut.html

and here's a direct dl:

http://www.thenewfoodlabel.com/CleanCut_debug.zip

LFShade
02-21-2003, 07:08 PM
Oh my! And a rather racy 404 at that! :blush:
Thanks for the catch, j!

jadedchron
02-21-2003, 07:32 PM
np, just makes me wish i would catch more 404's :drool:

dvornik
02-21-2003, 07:34 PM
Wow. What a tool. 5 stars.

One thing I've noticed is that shading shortcuts don't work (F3, F4 etc) while the tool is active.

Another suggestions is to include snap override for finer cuts. For instance Ctrl-click wouldn't snap to edges or vertices.

LFShade
02-21-2003, 08:05 PM
I like both of those suggestions, but I'm going to wait and see about fixing that bug before adding features. Getting keyboard shortcuts to work while in the tool may take a bit of time and effort, but snap override should be easy to implement; I'll probably add that one along with the ability to start a new cut without exiting the tool. I love where this is going :)

dvornik
02-21-2003, 08:11 PM
I seem to get "--Unable to convert: undefined to type: Modifier" errors in vertex and edge subobject modes sometimes. Can't figure out when it happens exactly.

jadedchron
02-21-2003, 08:32 PM
me 2 and then some kind of scene error after i tried creating a new scene thereafter

Michael
02-21-2003, 08:51 PM
Originally posted by Iain McFadzen
Meshtools "Connect 1" works as a bridge tool in Poly SO mode :)

LOL thanks mate, i thought that just were a bug, that it was the connect from edge SO...


Michael

LFShade
02-21-2003, 09:23 PM
Could one of you who are experiencing problems with the script please post or send me a scene file, saved just after the problem occurs? I can't reproduce any of these errors here. Frustrating!

Also, let me know what Max version you're using -- could be some sneaky version issue.

dvornik
02-21-2003, 09:38 PM
Here's the easiest way I can replicate it:

Create a box and convert to polys.
Go to vertex level (actually happens on other levels as well).
Cleancut from corner to corner across a face (sometimes it crashes here).
Cleancut across the same face using the OTHER 2 corners directly from corner to corner (not even supposed to let you do this, but it does and crashes).

Like, cut a poly in a cross. May have something to do with hidden edges.

Max 5.1 BTW.

dvornik
02-21-2003, 09:50 PM
Here's another way:

Cut from corner to corner with one vertex in-between.
Cut from another (perpendicular) corner to the middle of one of the resulting edges (between the center vertex created in the previous step and one of the corners used to create it).

LFShade
02-21-2003, 10:51 PM
Fascinating discovery, dvornik, that really helped me solve the problem. It was an errant piece of code in my function to test for valid sub-objects. After the first click on an edge or vert, it should have been flagging only the faces that share that edge or vert as valid, instead it was allowing any element of any face to be picked next -- instant error! All fixed now.

I've also implemented temporarily turning off snaps, and starting a new cut without exiting the tool. In addition to these improvements, I've cleaned up the highlight code to avoid redraws even more shrewdly. The result is that the box highlight for the mouse cursor has been removed, but I don't think that's a problem since the edges/verts still highlight and the mouse cursor tells you where the mouse is :p

Get the new version at my site (http://host.deluxnetwork.com/~rhyde/cleancut.html), and be sure to check the readme.txt to find out how to use the new features. I hope all works well now!

jadedchron
02-21-2003, 11:05 PM
http://www.thenewfoodlabel.com/CleanCut_1_1.zip

dvornik
02-21-2003, 11:30 PM
Give LFShade his stars!

The edge and vertex highlighting is dodgy. Sometimes doesn't work at all on some edges generated during the last cut. Can send you a file. [edit] actually, just criss-cross a poly and you'll see what I mean. The diagonal edge created in the first step is not highlighted while creating the second diagonal.

"Snap override" and "start new cut" features work great (except that highlights flicker a bit. Should be on top of everything).

3dsMax51cs4
02-21-2003, 11:57 PM
Very good script mate cheers!! :applause:

LFShade
02-22-2003, 12:48 AM
dvornik, is this what you're saying you can't do now?

http://www.vi2.com/getFile/100986.gif

I only cut straight from one corner to the opposite, then stopped the tool, started the tool, and went the other way, cutting through the diagonal edge without a problem.

I don't know if it will answer your question, but here are the rules about what will be highlighted/available and what won't:

1. If you start on an edge, that edge will not be available again until you finish your cut. Neither will the vertices at the ends of that edge.

2. If you start on a vertex, the edges extending from that vertex will be unavailable until you finish the cut. The vertices at the other end of those edges will also be unavailiable.

3. Once you've established a cut on a face (a starting edge or vertex and one point on a face), only that face's remaining edges and vertices will be available (except those ruled out by conditions 1 and 2 above).

Oh, and one more thing - I've noticed that if you have antialiased lines turned on, the highlighting doesn't work as well. I'll see if I can find a way to improve the "boldness" of the highlighting, which should alleviate this problem. Don't know how I'll go about that yet, though.

LFShade
02-22-2003, 08:47 AM
I've got a question for you guys. Currently CleanCut uses the Mousetrack function to handle the mouse events. The limitation of this is, as dvornik mentioned, that the standard keyboard shortcuts are disabled while the tool is running. I was looking into converting over to a scripted mouse tool, which would allow keyboard shortcuts for changing the shading mode. The only problem seems to be that with mouse tools, the middle mouse button cancels out of the tool (at least, it does for me).

I want to know what you feel is more important in a tool like this - being able to spin/zoom your view around while continuing your cuts, or the ability to access shortcuts for other things while the tool is active. I feel that it's best to keep it the way it is, since it's nice being able to steer your way around and get into the tight spaces of your model without having to restart the tool. But if there's an overwhelming response on the other side of the issue I'll consider changing the script.

Your thoughts, please.

gaggle
02-22-2003, 01:13 PM
LFS, for the record, the script-error things I mentioned is what the others here have already explained.

As to your question on orbit vs. shortcuts, I'd personally prefer it orbit-able. .. well actually I'd prefer to have it all, it strikes me as pretty lame that the best of both worlds can't be incorporated.

A sort of hack could possibly be to spawn a floating window with buttons to toggle shaded on and off and such? Not exactly standard interface behaviour though I suppose.

3dsMax51cs4
02-22-2003, 03:20 PM
Dude being able to spin/zoom is way better, just keep it that way, this script rocks.

:buttrock:

LFShade
02-22-2003, 06:25 PM
Small update -

Version 1.2 is out now. All I've done is changed highlighting so that when you hold down Ctrl to start a new cut, all verts/edges will highlight when you mouse over them rather than just the ones that are valid after the last cut.

I also added an update scheme to the installer, so you no longer need to uninstall the script first if all you're doing is updating your version.

dvornik
02-22-2003, 06:30 PM
Spin/zoom is more essential. Keep it that way.

I still think highlighting is a bit inconsistent, although you've explained most of it. Vertex highlight is sometimes hard to see behind the cross cursor. Also I've noticed that highlight doesn't happen when cursor overshoots the target vertex or edge, I guess it could be difficult to implement.

[edit] The above was written before the update.

3dsMax51cs4
02-22-2003, 06:33 PM
Thanx for the update. :buttrock:

dvornik
02-22-2003, 06:37 PM
On update:

--Type error: Call needs function or class, got: undefined

Script stops on "answer = (yesNoCance "Update Cleancut? ...."

3dsMax51cs4
02-22-2003, 06:39 PM
Same here.

LFShade
02-22-2003, 06:48 PM
Oops! I'll have to fix that right away!

dvornik -
I know exactly what you mean about the highlighting, and I'm not completely happy with it yet either. I'm going to try and improve it so that an edge or vert will highlight no matter what direction you approach it from, but it's going to take some time to develop a means of doing that without killing the speed of the tool. That's why I've released it the way it is - it may not be perfect yet, but it's functional and sort of fast.

I'm thinking that in the next update, I'll increase the size of the vertex highlights. They really are hard to see behind the selection cursor, aren't they? I think I'll also change the color, since the point indicators for an in-progress cut are also red. It's a different context, so I think a different color is in order.

View navigation seems to have won over shortcuts, so I'm leaving that alone for now. I really appreciate the support and comments, it's all helping me make this tool the best that I am able. Keep it coming if you've got any more!

3dsMax51cs4
02-22-2003, 06:50 PM
Please let us know when you upload the new update, I really like this tool, thanx for sharing. :applause:

LFShade
02-22-2003, 06:53 PM
All better now. Typo in setup routine = bad. LFShade tired when write.

:shrug:

3dsMax51cs4
02-22-2003, 06:56 PM
Wow that was fast is it up now??

LFShade
02-22-2003, 07:00 PM
Yep. Sorry about the screw-up ;)

3dsMax51cs4
02-22-2003, 07:03 PM
Hmm weird I just downloaded again and get the same error
MAXScript Fileln Exception
Type error: Call needs function or class, got: undefined.
answer = (yesNoCancel "Update CleanCut? (click no to uninstall)" title:"RHTools")

Sorry to bother you, maybe I did something wrong.

dvornik
02-22-2003, 07:05 PM
OK, great. Good progress.

What I've noticed is that edge highlights are not visible from certain angles (although they do work both in OGL and Maxtreme) and edge highlights are half-burried inside the surface.

No errors here.

LFShade
02-22-2003, 07:09 PM
3dsmax51cs4 might have just hit before the server refreshed my files. Should be working now.

Do you by chance have line antialiasing turned on, dvornik? As I mentioned, that was causing highlights to disappear sometimes on my comp. I'm still working on a means of making the highlight lines thicker, which should solve that problem.

dvornik
02-22-2003, 07:16 PM
No antialiasing. Here's a cut on a top plane of a cube viewed at an angle. Zooming in and out makes it visible at certain distances. Same thing in perspective and user view, only in user view there are no partial highlights like the one in the picture.

LFShade
02-22-2003, 07:30 PM
Hmmm, interesting. It's difficult to account for the many and various video setups of your target users. I'll just have to spend some serious time on improving the highlighting code. I have some ideas, so this issue alone will probably make up the next point release. I'll let everyone know when it's ready!

3dsMax51cs4
02-23-2003, 12:15 AM
Now I've downloaded the latest version and I can't install it it gives me the next error:

Error CleanCut failed to install!
then it says
Cleancut installed successfully!

But nothing has been installed.

3dsMax51cs4
02-23-2003, 12:28 AM
This error happened cause I had unisntalled the previous version, so I had to re install 1.1 and then 1.2 updated fine, this means that 1.2 won't install unles you have 1.1 installed.

:buttrock:

LFShade
02-23-2003, 12:41 AM
I just discovered this myself a few minutes ago. It's fixed now, you can go and grab the fixed copy off my site. Man, I need to get some sleep so I can stop making these simple little mistakes. Next time I update it will all work well. I promise :D

CGTalk Moderation
01-14-2006, 11:00 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.