Monday, November 29, 2010

Detect N-gons in Maya using MEL

I learned something really interesting today and I just had to share it.

I'm not much of an organic modeler, but sometimes I have to get my hands dirty. Someone asked something that I've been wondering for a while. Is there a way to select ngons, or polygons with more than 5 or more sides. Someone else responded with the following MEL script:

polySelectConstraint -mode 3 -type 0x0008 -size 3;
polySelectConstraint -disable;

After selecting your mesh, run this. All of your 5+ sided faces will be selected. Now you can do with them what you will...

If you're new to MEL like I am, this can look like a string of nonsense, but it's really pretty simple. Let's take a second and dissect this:

polySelectConstraint - "By using the polySelectConstraint command you can select connected components, components within a shell, or components on open borders." -source

-mode 3 - Mode 3 is "all and next", in other words it selects everything meeting the requirement of the constraint. But what is the requirement of the constraint? That's defined next.

-type 0x0008 - type 0x0008 is face. So the type of your selection will be a face, not an edge or vertex.

-size 3 - size 3 is nsided. (fyi, 0 is off, 1 is triangles and 2 is quads)

So the first line of this simple script is plainly read as "Create a polySelectConstraint for every face that is nsided". The second line is read, "disable the constraint". Once you have your selection, there's no need to keep it enabled.

Pretty useful, huh?


Thursday, November 18, 2010

Art Advice for Auditory Learners and the People Who Have to Deal with Them

I'm an auditory learner.

I've always needed things explained to me before I really understood them. I got a B in Physics without cracking open the book the entire semester to study. How? People explained the proper steps to figuring out a certain type of problem and I remembered. Elementary, Middle, and High School was simple for me. Teachers explained, I did the work, I got an A.

This all changed when I got to college and decided I wanted to be an animator.

The teachers were all visual, and so were 98% of the students. If I had a question, the teacher would butcher their attempt at an answer before they just gave up, went to the board and drew something. Everyone else but me would understand what the heck was going on. Not only that, but I was often ridiculed or chastised for needing steps to be verbalized in a clear manner.

"In the work place, no one is going to sit you down and hold your hand through this process."
"Figure it out for yourself."
"Look it up."

I don't know why it's so difficult for many artists to understand this concept:
Verbalizing a basic process is not the same as giving someone the answer!

2n + 7 = 21; solve for n.

How do I figure out what n is is not the same as asking "what is n"? When responding, don't treat these questions as if they are the same!

The first is a valid question to someone who has never come across a problem like this before. Some people can pull up Google, read up on basic algebra and boom, they know how to do everything. For others like me, you'll kind of get it, but you won't be sure until you can discuss it with someone. And don't treat us like we're idiots. A lot of people ask before reading, but there are people like me who pour over every available resource before asking a question.

I realize art can be a difficult thing to explain with words.

It's really something that needs to be demonstrated. However, I believe that art is the purest form of communication. Anything that is communicated from one person to another needs to be able to BE communicated from one person to another. Even great artist were taught the basics before they discovered their own personal style and developed their personal techniques.

To people like me: It's going to be rough, get over it now and save yourself the pain. You may never be able to sit down and brute force your way through something complicated and that's ok. Knowing how you learn is half the battle. There are resources available to you to make learning easier. I, for one, love forums. It's one of the closest ways you can get to speaking with someone. People explain things differently in forums than they would if they were writing a book. Read posts, watch video tutorials, recreate tests (I find this helps a LOT because I speak to myself when doing this) and things will start to fall into place. This process can be slow, so be patient.

Don't be put off by people who don't like to share or people who look down on your for needing things to be verbalized. Remember how this feels, and when you acquire the knowledge you're seeking, don't be afraid to share your basic workflow. Showing someone how to approach something is not the same as showing someone how to do something. (I swear that makes sense in my head, I hope it makes sense to you, heh).

Oh, and n = 7 by the way ^_^;


Second Nuke Test

So I realize up-resing your fluid tests when you're 3% sure of what you're doing is a big no-no, but I was just so curious.

This is my second nuke test, done using Maya Fluids in Maya 2011
Container size - 50 90 50
Resolution - 200 360 200
Playblast time - ~4.5 Hours (174 frames)

I did this before I got a lot of really good advice from the people in the Ka-boom thread in the CGTalk Forums.

By the way, this thread is AWESOME. There's a lot of great information and people willing to help you improve. I really suggest reading every post, doing a few tests, looking at the sample file hidden in the thread, and asking for ways to improve once you've got a basic understanding of what you're doing.

Anyway, I've gone back to testing at a modest resolution (50, 90, 50), the computer I use can handle this really well and I can get tests out pretty quickly. From now on, I think I'll combine three or four tests in one video, and I can talk about them here.

Thanks everyone!


Thursday, November 11, 2010

Maya nuke explosion! My first one!!

What have I been up to lately...

I got a freelance job, doing what I did this summer. Animating cubes to music. Sweet.

I also started learning/teaching myself how to create nukes/nuke like explosions in Maya. I'm having a blast pun intended. I think this is the most fun I've had doing something in Maya since I started really getting into Cloth simulation. After a few hours of reading and struggling, I got a presentable result, which I've posted here:

1 emitter, 1 volume axis field. When I get the hang of this, I'll try 2, then 3 and so on until I get the look I want.

I realize this is a WIP but it's WAY smaller than I want it to be. This explosion doesn't FEEL big at all. I think it's going to fast from the middle to the end. I need to figure that out.

Anyway, I'll post more tests as I go. If someone in the know happens across this, PLEASE offer your suggestions and criticisms. I'm just here to learn ^^;