Maya Training

Introduction to Hard Surface Modeling

Maya Training

Interiors and Furniture Vol 1 & 2 - Modeling & Cloth

Maya Training

Shading, Lighting and Rendering the Bedroom in MR

Maya Training

Robot volume one - Modeling with animation in mind

Maya Training

Spach-Alspaugh House the complete courseware

Maya Training

Burt The Cartoon Dinosaur Vol 01 - Modeling

New Maya Training

Robot Volume 02 - Hybrid Rigging
You are here > Home > SimplyMaya Community Forums
Loading

Welcome to Simply Maya

Please Sign in or Sign up for an account

Member Login

Lost your password?

Not a member yet? Sign Up!

Old 05-09-2007, 09:28 AM   #1
souzasan
Registered User
 
Join Date: Aug 2007
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Mental Ray in MEL

Hi, i want, if possible, to user the Math functions of Mental Ray into my scripts MEL. how to call, for example, the function: void mi_vector_neg( miVector *r). please, help me!!
souzasan is offline   Reply With Quote
Old 06-09-2007, 02:49 AM   #2
kbrown
Moderator
 
kbrown's Avatar
 
Join Date: Sep 2002
Location: London, UK
Posts: 3,198
Thanks: 0
Thanked 8 Times in 8 Posts
Default

I don't think you can do that. Maybe with python... not sure.

But for basic vector math you can just use operators (+, -, *, /, etc). There are also special commands for things like dot and cross product. Check the docs under Commands -> By Category -> Language -> Maths...
__________________
Kari
- My Website
- My IMDB

Do a lot, Fail a lot and Learn a lot!
kbrown is offline   Reply With Quote
Old 06-09-2007, 06:39 AM   #3
souzasan
Registered User
 
Join Date: Aug 2007
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

the mi_vector_neg function is just a example, the functions than need are more complex how resolutions of linear systems , rotations matrix, ...
souzasan is offline   Reply With Quote
Old 07-09-2007, 02:43 AM   #4
kbrown
Moderator
 
kbrown's Avatar
 
Join Date: Sep 2002
Location: London, UK
Posts: 3,198
Thanks: 0
Thanked 8 Times in 8 Posts
Default

I'm pretty sure you cannot do that kind of stuff (directly) without plugins. Of course you could script it by programming the maths manually using lower level commands, but it probably wouldn't be efficient enough.

At work we have a MEL extension library (a set of new mel commands) which is written for things like this (and much more). If you're up to it, maybe start looking into the Maya API and learn how to create custom MEL commands? It's not too hard once you get into it. The maya API itself already contains the most common vector / matrix etc stuff.

Edit: I'm not too familiar with python but as Maya now has python bindings to the API, you could go that route too...
__________________
Kari
- My Website
- My IMDB

Do a lot, Fail a lot and Learn a lot!
kbrown is offline   Reply With Quote
Old 07-09-2007, 03:44 AM   #5
vladimirjp
Subscriber
 
vladimirjp's Avatar
 
Join Date: Jun 2003
Location: stuck in the 90's boston, USA
Posts: 1,871
Thanks: 0
Thanked 4 Times in 3 Posts
Default

yup. python has a robust math lib
__________________
Image dump
vladimirjp is offline   Reply With Quote
Reply


Similar Threads
Thread Thread Starter Forum Replies Last Post
MEL headache! happymat27 Members Lounge 5 05-12-2010 09:43 AM
MEL headache!! happymat27 Mel Scripts & Programming 1 03-12-2010 04:41 PM

Thread Tools





A little bit about who we are
Links you might find useful
Catch up with SimplyMaya
SimplyMaya specialises in Maya tutorials. We offer over 1,000 individual Maya training videos, ranging from basic Maya tutorials through to intermediate Maya tutorials. Our tutorials are created by instructors with industry experience and are designed to get you up and running in Maya quickly without making it seem like hard work.

Copyright © 1999-2015 SimplyMaya - vBulletin® Copyright © 2000-2015, Jelsoft Enterprises Ltd.