View Full Version : Vertex Shading
Dark Monk 11-19-2003, 01:39 PM Hi,
Is there any good scripts or plugins out there that make vertex shading in Maya quicker and more pleasing to do??
I am a max user but my work has changed to Maya now and i cant believe how bad the tools are, they do not update in realtime and there is no easy way to make gradients or adjust HSV values.
If you would like to see a perfect example of vertex shading at its best then look at the video of 3dsMax 6 on the following webpage.
Vertex Paint
http://www.discreet.com/3dsmax/tutorials.html
If there are not any good scripts could people describe how they vertex light there models just in case im not doing it the best way.
Thanks in advance
|
|
mhovland
11-19-2003, 04:22 PM
I concur that Maya's vert color tools are lacking compared to Max's.
I have attached a script I wrote to adjust vertex colors in HSV color space. Be forewarned, that the script is SLOW.
There is a document in the zip that explains how to use it. Pretty simple, actually.
If you have any questions post them here, or drop me an e-mail.
So everyone knows, because of the lack of speed, I am working on converting this script to a plugin, but it isn't finished. I will release the plug when I am finished.
Dark Monk
11-20-2003, 12:08 PM
Thanks for the script mhovland.
One thing that i would like to see this script do is update in realtime, i dont like the way that you need to click on apply to see what it looks like, This is the same problem that Mayas built in vertex painter has.
In 3dsMax when you drag a slider it updates in realtime in your veiwport, can this really be so hard to achieve ??
I am just starting to learn Mel script so i am not familiar with whats difficult and whats not but i have seen vertex colours update in realtime so surely it must be possible in Maya.
You said that you are going to convert it to a plugin, could you tell me what difference this would make ??
I am interested in finding out about making scripts and plugins but i have just started to learn and i am an Artist not a programer so i have no prior programming skills.
look forward to seeing the plugin version.
Cheers,
mhovland
11-20-2003, 01:30 PM
Originally posted by Dark Monk
Thanks for the script mhovland.
One thing that i would like to see this script do is update in realtime, i dont like the way that you need to click on apply to see what it looks like, This is the same problem that Mayas built in vertex painter has.
This is one of the limitations of the script (and a complaint I got from every person at work, except one, thanks Danny). The main functionality was to allow adjustments in HSV space.
In 3dsMax when you drag a slider it updates in realtime in your veiwport, can this really be so hard to achieve ??
I am just starting to learn Mel script so i am not familiar with whats difficult and whats not but i have seen vertex colours update in realtime so surely it must be possible in Maya.
No, it is not hard to achieve, but as I said before, the math involved is pretty intense, so having it update in realtime is not usable with a selection greater than a few verts (we're talking around 10 -12 verts maximum).
You said that you are going to convert it to a plugin, could you tell me what difference this would make ??
I am interested in finding out about making scripts and plugins but i have just started to learn and i am an Artist not a programer so i have no prior programming skills.
Cheers,
Well, a compiled plugin can run much faster than an interpreted script can. I have seen people offer up numbers for speed increases anywhere from between 10x and 50x. All I know for sure, is the plugin can perform the math necessary, and apply the changes to all the verts in the selected object in realtime.
So you know what is involved in the script here is what happens for every vertex you have selected.
1) get the vertexes color. Simple enough, Maya stores the values as normalized (between 0 and 1) RGB values.
2) convert the values to HSV color space.
3) get the value adjustment from the UI
4) normalize the value adjustment from the UI (hue: 0 - 360, needs to be between 0 - 1)
5) adjust the the vertexes value using the new value.
6) convert the adjusted values back to RGB space
7) set the vertexes colors to the new colors.
Now that isn't a whole lot of steps, it just takes a while for it all the happen because MEL is interpreted, in other words Maya goes through each line of code as it needs it. This is slow.
A plugin has all it's code compiled into a fancy binary form (.mll files). They are quick to access and quick to execute.
If you are looking to get your feet wet with MEL and possibly move on to Plugins, here are my recommendations
for MEL: There are a couple of MEL books I recommend.
Mel scripting for Maya Animators by: Mark Wilkins and Chris Kazmeir
and
The MEL Companion: Maya Scripting for 3D Artists by David Stripinis
For Maya API there is only one book
Complete Maya Programming by David Gould.
You can do a search on these on Amazon to find out more info.
Hope all my rambling helped........
Dark Monk
11-20-2003, 07:53 PM
Hi,
Thanks for a very good and full reply, much appreciated.
I have been thinking about getting the Mel scripting for Maya Animators book, is this book good for people who dont have any previous programing experience??
Once again thanks for spending some time to explain things to me. :)
CGTalk Moderation
01-16-2006, 05:00 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.
vBulletin v3.0.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.