PDA

View Full Version : Advanced Subd<-->Poly Convertor v.1.0.


GennadiyKorol
04-15-2006, 02:51 PM
Hello everyone! It's time to share the new tool with you :)


New in 1.1:



Compiled for 8.0 x64 and 8.5 x64 for Windows.
Compiled for 7.0, 8.0, 8.5, 8.0 x64 and 8.5 x64 for Linux.
Compiled for 7.0, 8.0 and 8.5 (UB) for OSX.


Ability to specify custom smoothing angle for polygonal meshes.
A fix for Maya's subd display bug on 8.0 and 8.5 when wires are turned off. Script fixes that by temporarily activating ghosting for subd shapes.
For my own workflow I prefer clean Subdivision Surfaces over any Poly Smooth Proxy analogs.
It's just much faster while tweaking and the scene is much cleaner in the end.
Every conversion to Subd and back actually works as an implicit clean up for correct topology and valid geometry of the mesh.

Unfortunately native maya converter didn't support many features that make this workflow pleasant so I sat down and wrote a little helper for myself. With time it has grown up to what you can see here.
The workflow for me pretty much mimics the one of Lightwave or Modo. Mesh is toggled from Subd to Poly, by hitting the ~ hotkey. Selections are preserved between subds and polygons. Plus I've added a lot of little automations that simplify the conversion to subd mesh. Script automatically finds the invalid geometry that may prevent converting. Invalid geometry is selected and you can use the automatic fix for most cases.

Also this tool addresses some of maya bugs connected with Subdivisions Surface conversion. Like famous undo bug where you end up with both poly and subd shape is fixed with this converter.

In all I'm not using hierarchical Subdivisions for what they are, just their power and speed as a great replacement for slow and bloated Smooth proxy solutions.

List of features from online docs:




Script works as a toggler, both hilited and selected objects get converted.
Preserves object/s name/s.
Preserves instancing (as on the gif animation).
Converts component selection between subd and polygon mesh/es and vice versa.
Preserves sets.
An option to fix UV that could be cut after converting from subd back to poly. Script performs a mergeUv's with a very little tolerance to fix that.
Script can turn off wireframe display when converting single object to subd, letting you to evaluate the model better. The wireframes are back once you convert back to polygon.


Script automatically checks the geometry for correct topology. If you have any non manifold or lamina geometry the pop up window will be displayed suggesting you to perform an automatic clean up. Name of the object with a problem will be displayed, and problem vertices selected.
Checks for the inner vertices that are connected to less than 3 edges (another problem that won't allow the conversion). In this case the script again pops up a window selecting the bad vertices, You have the option to delete them with the "Just delete" button or quit and perform a manual fix.
Script performs cleaner conversion, the history of the polygon object is deleted first making sure no trash nodes are left behind.
Script has no bug with undo, you can convert and undo without having a subd and polygon shape together (very famous maya convertors bug).
Converts the selection mask for components. So if you had a vertex selection mask for subd's convertor will switch the polygon mask to vertex as well.
Converting an object with more than one shapes does the following: Convertor converts the first shape of the object; The rest of the shapes are deleted. This allows converting meshes with errors in a cleaner way (maya's convert won't convert them at all).
Converts the subd in proxy mode back to polygons preserving the polygon selections.

And a couple of animated gifs:

http://www.henrykorol.com/Scripts/SubdToggle/images/SubdConvertorSelection.gif

http://www.henrykorol.com/Scripts/SubdToggle/images/ConvertorAutoCleanUp.gif

http://www.henrykorol.com/Scripts/SubdToggle/images/SubdConvertorUI.gif


The web page for the tool: http://www.henrykorol.com/Scripts/SubdToggle/

The tool itself and installation instructions are in the Download section. The plugin is currently compiled on Windows for Maya versions 8.5 x64, 8.0 x64, 8.5, 8.0, 7.0, 6.5, 6.0. On Linux for Maya versions 8.5 x64, 8.0 x64, 8.5, 8.0, 7.0. On Mac OSX for Maya versions 8.5 (UB), 8.0, 7.0.
Would love to hear opinions, suggestions and bug reports :) Hope you enjoy the script! :)

Cheers,
Henry

swag
04-15-2006, 03:52 PM
great work henry - this is the best poly2sub tool out there a must have for every modeler
5 stars from me for this eastern present

aadams
04-15-2006, 04:01 PM
FANTASTIC

could you continue to develop it to develop a cleaner poly--->subd--->nurbs/bezier output??

when you convert subd to bezier it always produced double the needed bezier

and i convert it to degree 3 not degree 5 bezier.

and the nurbs conversion is well sad....alot of slabs ending in rounded corners...try it you will see...

why it this important?

because maya needed an update in nurbs modelling tools badly...with subds you can make rounded corners ALOT easier by using a poly base mesh...its just the output is a little borked....

I cant wait to try your plugin! thank you

-=TF=-
04-15-2006, 04:50 PM
great tool!

[insert linux port question here]


cheers

Emil3d
04-15-2006, 05:11 PM
The listed features are awesome and address a lot that I do on everyday basis. I was already using your ToggleWireframes script I found earlier by a search in a post where you were helping somebody.
I installed and tested quickly the script - no problems so far. Works as expected – very beautiful! It is a great timesaver.
Thank you so much for giving this away and being around.

One shameless request. Every time when I choose poly proxy I do the following repetitive tasks. I have 3 layers in my scene preserved for the poly proxy nodes: one template layer for the transform node, one reference layer for the subdiv shape node and a layer for the poly proxy node. This prevents the subdiv shape from being selected while working in the poly proxy.


If this can be automated and added to your script it will be very beautiful, similar to the layer options in the Smooth proxy command.

PAL
04-15-2006, 08:15 PM
absolutely amazing tool!

mathix
04-16-2006, 12:46 AM
Great tool! I would only add possibility of setting smoothing angle after converting back to polygon. I wrote a script which do it for me, but it would be nice to see it in next release of your plugin. :)

Mikademius
04-16-2006, 02:41 PM
Aaand, it's finally out :) This tool is great. It can enhance workflow many times. I've already implemented this into my workflow, but you already knew that :) Keep developing. Talk to you on later msn.

lazzhar
04-16-2006, 03:59 PM
Great tool !! thanks a lot.

leif3d
04-17-2006, 03:41 PM
Wonderful tool!!!, Speeds up workflow significantly! Good job and keep on Developing your skills. :D

GennadiyKorol
04-24-2006, 08:33 AM
Thank you! I will look into suggested features here and try to add them to the next version. I will try to make a linux port soon as well.

Currently the main features on TODO list are:

Converting deformer history from polygon to subd and vice versa. First I will try to make it work for basic deformers and blendshapes, maybe even skin.. Should be handy while modeling, say tweaking some area with lattice or soft mod, you could hit the same hotkey and continue tweaking the subd mesh with the same deformers.

Secondly I want to make a special mode of conversion that will not delete history on polygon objects. The polygon shape would be hidden, and while converting back the subd geometry tweaks and vertex positions would be transefered to polygon shape, so it's history will still be there in place :-)

Anyways tell me what you think about it, and thanks for using the tool!

aadams
04-24-2006, 03:02 PM
oh please consider the poly to subd to bezier problems....pretty please???:cry:

Emil3d
04-24-2006, 06:06 PM
Thank you! I will look into suggested features here and try to add them to the next version.…That’s just great. I’ll be looking forward for the next release.

Thank you again

mike0006
05-17-2006, 08:36 PM
This is great, I just downloaded it and I like it alot. So far no problems. I was using zzToggleSubDee but some geometry it just would not convert for some reason. You plug-in chucked it out with out a problem.

Great deal, and the idea that I may be able to convert without losing history is pretty exciting.

Good Job.

GennadiyKorol
09-29-2006, 09:19 AM
Hello everyone,

Now the plug-in is compiled for Maya 8.0.

Cheers :)
Henry

Visor66
09-29-2006, 11:09 AM
This is awesome! Works great with Maya 8!

Thanks alot Henry!!! :bounce:


Cheers
Pascal

almux
09-29-2006, 12:50 PM
Any prodject for Macfans?

GennadiyKorol
09-29-2006, 03:19 PM
Visor66: Thank you for trying this out:)

almux: Yeah, I'll try to ask some friends with mac to compile it for macOS when Maya for Intel Mac is out.

To Someone: I hate to say this, but it's not the first time it's happening to my threads. I don't care about rating of the thread or anything, but still. Why would someone put a 1 star rating? Just to make the rating lower? I never understood that. If you're reading this, PM or mail me and at least tell why you did that.

Icarus
09-29-2006, 03:55 PM
just gave it a shot, big thanks and great work for this tool, was nice to be able to get some feedback while doing modeling

cheers!

almux
10-01-2006, 06:52 PM
Visor66: Thank you for trying this out:)

almux: Yeah, I'll try to ask some friends with mac to compile it for macOS when Maya for Intel Mac is out.

To Someone: I hate to say this, but it's not the first time it's happening to my threads. I don't care about rating of the thread or anything, but still. Why would someone put a 1 star rating? Just to make the rating lower? I never understood that. If you're reading this, PM or mail me and at least tell why you did that.
Oh good luck and best wishes to see your work in action with a nice little try! ;)
I love your "...when Maya for Intel Mac is out." ... hopefully Autodesk gives a push for this to come true soon enough!

GennadiyKorol
01-19-2007, 05:14 PM
Hey everyone,

Plug-in is now compiled for Maya version 8.5, 32 bit, Windows.
Haven't time looking into 64-bit compilation yet.

Thanks everyone for using this tool and support! :)

Cheers,
Henry

Emil3d
01-19-2007, 07:38 PM
Cool, one more reason to get 8.5.:)
Thanks a bunch.

GennadiyKorol
01-20-2007, 12:25 AM
Thank you Emil :)

A bit bad news here. With help of script users I just found a major bug about Subdivision Surface redraw with wireframe display off in Maya. It seems to be introduced in version 8.0, still there with version 8.5. I didn't notice it because I'm developing with 7.0 version to ensure backward compatibility of my plug-ins.

Just create a subd cube, turn of the wireframe display with: Window --> Settings Preferences --> Preferences --> Display: Wireframe On Shaded to None.
Now grab some points on the subd cube and move them around. The Subd. mesh won't refresh itself whatsoever.

As you may understand this bug impacts the "Hide wireframes" feature in the converter script.
To avoid inconvenience just turn it off in the option window.

EDIT: There is actually a workaround, check the next post.

Thanks again,
Henry

hanskloss
01-20-2007, 12:40 AM
Henry, you're doing a fantastic job as usual. Keep it up. Anxiously awaiting Magnet Tool for Maya:) Cheers

OmegaN
01-20-2007, 07:44 PM
I agree with hanskloss =) and your magnet tool will probably be like a bronze to platinum upgrade in workflow =)

GennadiyKorol
01-20-2007, 11:08 PM
hanskloss, OmegaN: Thank you, your support is precious.

Back to the bug with Subdivision Surface refresh with wires off in maya 8.0 and 8.5.

More investigation into the matter has shown that it only occurs when all faces of the mesh have the same material assigned to them. Once you have object with 2 or more materials assigned to it on different faces, the bug is gone.

Looks like the bug is connected with shader-geometry connections. Maybe I could add a fix for it to the Convertor plug-in later on :)

In the meantime you might use this fact for a workaround :) Hope this helps those appreciating Subdivision Surfaces speed in their workflow.


Thanks for checking this out,
Henry

swag
01-20-2007, 11:37 PM
great support henry :thumbsup:
yes it looks like a stupid maya bug hope you find a workaround

GennadiyKorol
04-26-2007, 01:22 PM
Hello everyone,

Just found a little bit of time to update this to 1.1:



Added compiles for 8.0 x64 and 8.5 x64 for Windows.
Compiled for 7.0, 8.0, 8.5, 8.0 x64 and 8.5 x64 for Linux.
Compiled for 7.0, 8.0 and 8.5 for OSX.


Ability to specify custom smoothing angle for polygonal meshes.
A fix for Maya's subd display bug on 8.0 and 8.5 when wires are turned off. Script fixes that by temporarily activating ghosting for subd shapes.



http://www.henrykorol.com/Scripts/SubdToggle/images/SubdConvertorUI.gif


Just as before you can grab it here:

http://www.henrykorol.com/Scripts/SubdToggle/ (http://www.henrykorol.com/Scripts/SubdToggle/)

Thanks for your attention,
Henry

swag
04-26-2007, 08:05 PM
looks like your multi maya dev platform is ready :)

mike0006
04-27-2007, 01:45 AM
Great stuff!

I really appreciate and use this plug-in every day.

_-_twiggy_-_
04-27-2007, 01:57 AM
WoW, what a fantastic tool! ...iv'e fell in love with it :)

Great work :thumbsup:

djx
04-27-2007, 03:59 AM
Thanks Henry. This continues to be top of my "must have" list.

I think the spelling change may confuse some people though.

cheers
David

GennadiyKorol
04-27-2007, 09:39 AM
Thanks guys! :) I would also like to hear about how it works for those on Linux and OSX :)

djx: Thanks, I'm sorry for that little spelling correction. When I noticed the mistake I already had all the 15 compiles ready, so I could change only the plug-in names because script one is hard coded inside the plug-in and I haven't had time to recompile them again.. But I guess as long as you put plug-in and script to the right folders it'll work :)

Cheers,
Henry

Als
04-27-2007, 05:34 PM
I hope I'm not jumping the gun here, but would it be possible to have version which would help conversion but keep the history, in order to use it to render maya cloth?

Otherwise amazing plugin, and many thanks.


Als

GennadiyKorol
04-27-2007, 09:13 PM
You mean the proxy kind of conversion? For that you could use any other simpler script or even Maya's own conversion system. Although I believe that for animation putting a PolySmooth node or using approximation editor in Mental Ray might work better :)

Henry

CGTalk Moderation
04-27-2007, 09:13 PM
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.