Home Technical Talk

sama Mel-Script

polycounter lvl 17
Offline / Send Message
sama.van polycounter lvl 17
Maybe time for me to start my Mel-Script thread...

I'm not a programmer, a simple 3d artist...

...But I always like to develop tools to maximise the efficiency of the members of my team.



I think it's the most important point on a project.
(because of money and human is not an animal and don't have to repeat everytime the same task...)

I think it's really important for a team to work with tools build specificly for a project.



Actually lot of my tools are copyrighted by the companies I worked in the past...

... and today I'd like to develop my personnal set of tools, and share it with you.


Anyway, I like to have little tools with a pre-configurations in my Mel-Script and it help me to obtain a little UI, low loading to open the UI, and don't have to check evrytime all the parameters.


Today in Game Industry we have to use lot of tools because of the next gen process (Hi Poly models, generate lot of map, etc...),
It's often the garbage in the directories and lot of people have some difficults to work together because of that.


Second reason is I often work at home, and on my laptop too.
But Maya windows for each tools are very big and you cannot really work with pleasure...
and this stupid program break a window you're using for show the parameter of another tools in the same window... ( -__- definitly...)



Finally my tools are for Artists they are interested to work more faster, don't need to use lot of parameters and don't need to have big icons and long explanations about each parameters.


I don't want to change a world with my tools, only want help a little more.
(maybe another person already said that before haha ...)


Tools already exist in Maya but it's different use...

Your welcome to give your opinion on my tools and spirit of my tools.
I'd like to have feed back and create better tools!
..... And correct my english too :)


Thank you!


Explanation is written inside each Mel-Script files!

//
Autoback Maya 2008
//

Maya crash often... But there isn't really autoback in Maya.
And sometimes Maya crash while saving and destroys you file.

The script save a 2nd file each time you're saving your scene with the Ctrl+S command.
The 2nd find is dropped in the same directory as your original file, and add a "_" before the original name.
The script detect the file type you're working with (mb or ma)

Stupid, easy but useful!!

>>> Sama SaveMeCorrectly Script <<<

//
Bevel Maya 2008
//

Usually need to change only 2 parameters with the Bevel tools when I create HiPoly stuff for props and backgrounds.

You can also personnalize other parameters in the mel script file. Ask to me if you need some help!

Stupid, easy but useful!!

>>> Sama Bevel Script <<<
Preview with a Laptop (Resolution Screen 1280x800)

SAMA_Bevel_A.jpg


//
Memorize Selection Maya 2008
//

Often, when we want to switch between vertex, edges or faces modes, we lost the current selection.
In 3dsmax, the program keep in memory of your vertex selection when you swith between this differents modes.


With the SAMA_MemorizeSelection you can save all type of selection really quickly.
It's also usefull when you finished a 3D character and want to memorize vertex of the head part, hand, leg, etc... We often scale this part at the end...
I use this tools when I built a background, I usually work with a few of objects and I like to access really quickly to this objects when I want to move a complete wall or floor.
I know, lot of people can say to me tu use group or layer, but finally I like to work on full screen and I don't like to lost my time with a list of layer or groups.

The hud is really small.

I save all your selection in a file I drop in one directory near your maya file.
When you delete a save selection, I delete the file. and when you launch the tools I check the directory and Update the hud.

Finally, I put this tools on the U hothey and it's really quick to use it everytime!


The on things you have to remember is :
- I take the full path of your object to preventing of the objects with the same name in your scene. Then don't try to move your object in another group or I won't find it...
- If you create a save with vertex selection, you have to remember if you modify the object, maya destroy the order of the vertex, and it could explode your save selection.

Stupid, easy but useful!!

>>> Sama Memorize Selection Script <<<
Preview with a Laptop (Resolution Screen 1280x800)

SAMA_MemorizeSelection.jpg

//
RenderMap Maya 2008
//

"NormalMap" and "lit and Shaded RGB" renderer.

I maybe use this box 10 times per days... Probably 20 times...
When you work props and background with normal map and have to create hi Poly model with Maya, you often launch the render 10 times before to obtain a good renderer... and select your objects each time you close the window with the renderer parameters.

You can also personnalize other parameters in the mel script file. Ask to me if you need some help!

Stupid, easy but useful!!

>>> Sama RenderMap Script <<<
Preview with a Laptop (Resolution Screen 1280x800)


SAMA_RenderMapHelp.jpg

SAMA_RenderMapLight.jpg

Replies

  • Funky Bunnies
    Offline / Send Message
    Funky Bunnies polycounter lvl 17
    nice, sama!

    I did a bevel too a few weeks ago. a few things you may wanna add:

    sometimes it's nice to use whatever preferences you have for bevel instead of always defaulting to 2 and .2
    you can just add a few lines:


    if (!`optionVar -exists polyBevelSegment`)
      optionVar -iv polyBevelSegment 2;
    textField
      -tx `optionVar -q polyBevelSegment` -w $textfieldWidthA -h $buttonHeightA "textFieldBevelSegments";
    and


    if (!`optionVar -exists polyBevelOffset`)
      optionVar -fv polyBevelOffset 0.2;
    textField
      -tx `optionVar -q polyBevelOffset` -w $textfieldWidthA -h $buttonHeightA "textFieldBevelOfset";

    (sorry for the bullet listing, but all the bbcode I tried to use gets rid of variable names becuase of the $ sign :P)

    anyway you can also make the gui drive the bevel AFTER it's created so that it can be dynamic.
  • sama.van
    Offline / Send Message
    sama.van polycounter lvl 17
    Thanks a lot!!

    Updated ! ^_^ (now it saves your paremeters.)

    >>> Sama Bevel Script <<<
  • sama.van
    Offline / Send Message
    sama.van polycounter lvl 17
    hi! a new tools!


    //
    Memorize Selection Maya 2008
    //

    Often, when we want to switch between vertex, edges or faces modes, we lost the current selection.
    In 3dsmax, the program keep in memory of your vertex selection when you swith between this differents modes.


    With the SAMA_MemorizeSelection you can save all type of selection really quickly.
    It's also usefull when you finished a 3D character and want to memorize vertex of the head part, hand, leg, etc... We often scale this part at the end...
    I use this tools when I built a background, I usually work with a few of objects and I like to access really quickly to this objects when I want to move a complete wall or floor.
    I know, lot of people can say to me tu use group or layer, but finally I like to work on full screen and I don't like to lost my time with a list of layer or groups.

    The hud is really small.

    I save all your selection in a file I drop in one directory near your maya file.
    When you delete a save selection, I delete the file. and when you launch the tools I check the directory and Update the hud.

    Finally, I put this tools on the U hothey and it's really quick to use it everytime!


    The on things you have to remember is :
    - I take the full path of your object to preventing of the objects with the same name in your scene. Then don't try to move your object in another group or I won't find it...
    - If you create a save with vertex selection, you have to remember if you modify the object, maya destroy the order of the vertex, and it could explode your save selection.

    Stupid, easy but useful!!

    >>> Sama Memorize Selection Script <<<
    Preview with a Laptop (Resolution Screen 1280x800)

    Hope you won't have problem with this tools!!!
    Don't hesitate to give me some feed-back!

    SAMA_MemorizeSelection.jpg
  • pior
    Offline / Send Message
    pior grand marshal polycounter
    Hey misterman,
    Would it be possible to force Maya to remember the current component selection just like Max does ? (Select edges, go to faces mode, go back to edge mode > edges are still selected)

    I like the idea of your interface but I think quick select sets are quite similar, and they can already be recalled from the outliner (which I think most users keep open?)

    Thanks for sharing your tools, anyways!
  • MoP
    Offline / Send Message
    MoP polycounter lvl 18
    pior, I think NEX does that... but possibly only when using the right-click menu to change component mode. I will check today.
  • Funky Bunnies
    Offline / Send Message
    Funky Bunnies polycounter lvl 17
    yeah, this is cool. Kinda the manual way to accomplish what we wish maya could do ahaha


    (Sorry, I don't mean to keep hijacking your thread or anything, sama)

    I've been lazily trying to work on a save selection script, but I'm not comfortable with where it's at. The reason is that Maya doesn't have any specific component mode that you can query - when you move to vertex mode, it enables the vertex mask but doesn't necessarily disable the edge mask. This could potentially result in an incorrect query. At least there's no way I know of in MEL

    NEX accomplishes it pretty well if I remember, but I never thought to check how they did it when I had the demo a while ago. My guess is they used custom hotkey-commands and marking menu edits to disable the unwanted component modes and run scriptJobs to save and update selections (this won't work on the default hotkeys because of the "select -cl;" section)

    I've been told it's nearly impossible with MEL, but I've been trying every now and again anyway. Unfortunately my only contributions towards it are when I'm drunk :P


    ANYWAY, sorry to hijack your thread once again! Keep up the scripting!

    [edit: rats, beaten by MoP!]
  • sama.van
    Offline / Send Message
    sama.van polycounter lvl 17
    Yes I'll try, if we basicly use hotkeys for switching between vertex/Edges/faces modes, I probably can try to use the scriptJob stuff...

    But I'm worry about the melscript language for that because it's too slow and if you select 1000 of vertex it probably freeze your maya XD...

    But yes... I'll try...

    I leave this sunday for Japan but I have few days with nothing to do on Paris >_</
  • Michael Knubben
    I haven't used this one yet, but have you considered having presets? Like five buttons along the button for 0.25, 0.5, 1 etc?
  • motives
    Offline / Send Message
    motives polycounter lvl 18
    the rendermap script is awesome!

    it would be nice tho if you could choose where to output your file rather than having to use mayas project layout

    tnxs for these!
  • Michael Knubben
    I just realised I wasn't very specific. I meant on the bevel script.

    Could you have buttons somewhere with preset values?
  • sama.van
    Offline / Send Message
    sama.van polycounter lvl 17
    Hop I did it, You only have to replace the Melscript file. :)

    And yes you was right, It's more fast to work with only mouse :)

    Thanks a lot ^_^!

    >>> Sama Bevel Script <<<

    SAMA_Bevel_A.jpg
  • Michael Knubben
    No worries, just thinking of things people could need.
    Nice to see another polycounter getting into the business of improving the tools he uses, and sharing the wealth :)
  • sama.van
    Offline / Send Message
    sama.van polycounter lvl 17
    motives wrote: »
    the rendermap script is awesome!

    it would be nice tho if you could choose where to output your file rather than having to use maya project layout

    tnxs for these!

    I did it :

    SAMA_RenderMapUI.jpg

    - You can use the Right Mouse Button on the textfield with the path directory and you'll obtain a little pop menu with Browse Directory option.

    - You can also use the RMB on the 2 textField for the texture size, it will give you some preset values!
  • motives
    Offline / Send Message
    motives polycounter lvl 18
    awesome job man!
  • sama.van
    Offline / Send Message
    sama.van polycounter lvl 17
    I finally have to skin some character for a Doujin team -_-... They want to work with Maya... Then I developed my skin tools on Maya!...

    Basically for a low poly model I don't need the paint tool... I lost my time and I already know each weight value for each vertex. Then it's more quick for me to do that manually!
    Approximatly 15 to 30 min for a skinning with this tools on a human character (2500 Poly).

    For that reason I prefer 3dsmax to Maya, the input Value with vertex selection works very well!
    See that on this screen :

    SAMA_Skinning_Tools_A000.jpg

    Finally this new tools on Maya help me to work more quickly.... with Maya....


    >>> download the Script <<<



    First :
    I use the Vertex Color mode on Maya for getting the blue and Red Color... Usually people don't really use vertex Color on character then...


    1 - Start the skining mode :

    - Select your model and click on the Edit Envelopes button.
    (It also works if you select vertex, face, edges, Uvs of your model, and works with joints skinned on your model).

    SAMA_Skinning_Tools_A001.gif


    2 - Bone (=joint) Selection:

    - The list of your bones ( = joints) will appears in the ScrollList.
    - Select the bone you want to edit only in the list. if you select it in the viewport it will not edited!
    - Try to select it in your list and it will updates your model's color. (on a 2500 poly model I have 1s of delay...).

    SAMA_Skinning_Tools_A002.gif


    3 - Filter Tools:

    - Usually a good artist give a name to his character's bones.
    - You can use the "Filter" tool for reducing the number of bones in the list.
    - You can also use the right button click on the "Filter" zone and choose one part of your character in the pop menu (Leg, Hand, Arm, etc...). It will help you to work more quickly!


    SAMA_Skinning_Tools_A003.gif



    4 - Edit your skin:

    - Select a bone (=joint) in your list, and select one or some vertex on your model.
    - Use the "abs. Effect" line for editing value of each vertex.
    - You can also use the right button click on the "abs. Effect"line and choose in the pop menu a value.

    SAMA_Skinning_Tools_A004.gif


    5 - Close the skinning mode:

    - Click on the "Editing Envelopes" Button.
    - I will delete all Vertex Color information from your model.

    SAMA_Skinning_Tools_A005.gif


    I already start to work on the basic mode "Add" and "Remove" bones from the skin menu of 3dsmax, don't hesitate if you'd like another option!


    I close this post with the link of the Doujin team I'm working for! Really cool project!
    http://members3.jcom.home.ne.jp/studio-siesta/
  • Buzzer
    I love the track editor, featured in your portfolio. Do you have plans of releasing it?
  • sama.van
    Offline / Send Message
    sama.van polycounter lvl 17
    Buzzer wrote: »
    I love the track editor, featured in your portfolio. Do you have plans of releasing it?

    No I am sorry.....
  • sama.van
    Offline / Send Message
    sama.van polycounter lvl 17
    I update my thread with 2 videos I done for my Mel Script Folio :

    [ame]http://www.youtube.com/watch?v=tnApeBUNEaA[/ame]

    [ame]http://www.youtube.com/watch?v=WNBHPUqtkuk[/ame]

    I done this tools when I worked for F4 then I cannot release the script :(
    But maybe one day.... I will do a new version :)
Sign In or Register to comment.