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 03-05-2003, 12:38 PM   #1
DukerX
Subscriber
 
DukerX's Avatar
 
Join Date: Nov 2002
Location: Sandnes, Norway
Posts: 99
Thanks: 0
Thanked 0 Times in 0 Posts
Default Using MEL to create objects

Is it possible to make a MEL script that reads inputs from a file or the COM port and uses the data to create a CV-curve?

Iīm making a little item to "3D scan" cars.
Uses a micro-controller chip wich I progrram myself.
I could either store coordinates locally on the EEPROM, and then read it out and put it into a file, wich then is imported into maya through a MEL script, or Icould integrate a UART interface in the microcontroller, and make it send a "live feed" to the computer COM port, and read it directly into maya using MEL.
The reason for doing this is that I want to get the car into 3D and then be able to apply and customise various styling gear and in turn export the models of the customised stylig gear to a 3D mill.

Any pointers to where I can find out more about that kind of MEL scripts? (The part that involves reading data fom my 3D scanner)
__________________
-DX-
DukerX is offline   Reply With Quote
Old 03-05-2003, 06:00 PM   #2
lalamax3d
Registered User
 
Join Date: Apr 2003
Location: lahore
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
Default very nice work..just wanna appriciate

well , too high level discussion for me @ least but

very first, very nice and impressive
i really wanna appriciate suce nice work

what i could say: if i will be the user never prefer for file storing and then loading data to maya for creation

there must be some middle ware thing that integrate run time to show real time creation of that data coming through port

sorry guy, i really can't help u out but

good luck and best wishes....

keep it up

haseeb
__________________
u can do it
lalamax3d is offline   Reply With Quote
Old 03-05-2003, 06:37 PM   #3
Alan
Moderator
 
Alan's Avatar
 
Join Date: Oct 2002
Location: London, UK
Posts: 2,800
Thanks: 0
Thanked 5 Times in 5 Posts
Default

if you can make your 3d scanner dump put a text file of the data then you can easily read it into maya (this is exactly what I am doing in my current WIP, see the link in my sig)

It's farily easy to read thru a file and set keyframes etc and i'm sure that it's just as easy to set the points on a curve.

Post again with some more specfics and I'll point you in the right direction.

Alan
__________________
Technical Director - Framestore

Currently working on: Your Highness

IMDB
Alan is offline   Reply With Quote
Old 03-05-2003, 06:42 PM   #4
adldesigner
Registered User
 
adldesigner's Avatar
 
Join Date: Sep 2002
Location: CCS, Venezuela
Posts: 3,363
Thanks: 0
Thanked 9 Times in 9 Posts
Default

This surely sounds good.
Iīll be watching this threadīs development closely.
__________________
adldesigner
Caracas, Venezuela
Hell .. not gone perse, but with a certainly lower post count per day.

adldesigner is offline   Reply With Quote
Old 03-05-2003, 07:25 PM   #5
strarup
Subscriber
 
Join Date: Jan 2003
Location: Denmark
Posts: 338
Thanks: 0
Thanked 0 Times in 0 Posts
Default

this sounds quite interesting...

for my final exam project I played a bit with drivers... mostly USB... but I also looked at some other drivers... to try to learn how it worked etc...

unfortunately I don't know much about MEL scripting yet... I'm mostly educated in Java... and have played a bit with VB and C++... but I would like to help if I can...

do you e.g. have some more info about your scanner?

regards

Strarup
__________________
------------------------------------------------
Alex V. U. Strarup

One mistake can ruin it all...
strarup is offline   Reply With Quote
Old 03-05-2003, 09:11 PM   #6
Alan
Moderator
 
Alan's Avatar
 
Join Date: Oct 2002
Location: London, UK
Posts: 2,800
Thanks: 0
Thanked 5 Times in 5 Posts
Default

Strarup: MEL is just C coding with a few syntacical differences. It's really quite simple to get to grips with (well sorta! )
__________________
Technical Director - Framestore

Currently working on: Your Highness

IMDB
Alan is offline   Reply With Quote
Old 06-05-2003, 06:10 PM   #7
DukerX
Subscriber
 
DukerX's Avatar
 
Join Date: Nov 2002
Location: Sandnes, Norway
Posts: 99
Thanks: 0
Thanked 0 Times in 0 Posts
Default (Posted at Haakonsvern Naval Base)

So.. I could integrate an IO controller DLL declaration right into the mel script, and read the data from the parallel port right into the script?

Iīve been doing quite alot of various VB stuff, and have found some nice DLLs to use, but I think the INOUT.DLL could be called by any windows application regardless of development language.

For the 3D scanner... Iīve not actually built it yet, but Iīve been working on some ideas.

The core is an ATMEL AT8515S for those who know microcontrollers. Itīs a 8 bit RISC processor, running at up to 8MHz.

The first thought was to build a rig that was driven by step-motors, scanning the entire surface of the car using a laser-beam, but I dropped the idea, cause there is a slight problem using light rays for distance measurements: For a accuracy of +/- 1meter the meaure circuit would have to run at 300MHz !!! and for 1 mm (millimeter)... You figure it out
So I kinda dropped that thought, and changed my mind. I think Iīll go for a simpler and more lightweight rig, that is manually operated. Itīs a rig that can move over the car, much in the same way as the small fully automated car-washers youīll find in almost all small gas stations in Norway, only itīs not powered by engines, and made from very lightweight components.

It has digital encoders on all axis, and a little button on a handle, and each time the button is pushed, it stores X,Y and Z coordinates, or send it straight to the computer (I havenīt desided wich metode iīll use) With this aproach, Iīll have more control of what data I actually get. I could trace the outline of the bonnet, roof and windscreen, and use birail or birail+ to create the surfaces from the CV curves generated by the MEL-script.

Itīs not as cool as the fully automated, but itīs easier to build and ALOT cheaper, allthoīI havenīt given up that idea either. There is just one problem: Iīm in the army right now (all Norwegian men have to complete one year of military service. Undseth (did I spell it right?) could tell you more) and that reduces the time I get to spend on my computer and in the workshop, but I got alot more time to think about stuff , and come up with ideas.
Right now Iīm drawing a fully automated system that uses one laser, wich moves across one plane of the car, and a ultra acurate detector wich locates the laser "dot" on the car surface, and from the angle of the laser and the detector, It should be possible to calculate the distance, but Itīs gonna be slow, and the coding of the microchip wil be quite advanced.

A bit off-topic but If you have ideas on a different design, please post!
__________________
-DX-
DukerX is offline   Reply With Quote
Old 06-05-2003, 06:26 PM   #8
adldesigner
Registered User
 
adldesigner's Avatar
 
Join Date: Sep 2002
Location: CCS, Venezuela
Posts: 3,363
Thanks: 0
Thanked 9 Times in 9 Posts
Default

Gonna talk to some of the electronic engineering guys at the University to see how would they create such a device, if itīs under budget Iīll frigging build it. Nurbs patches are far easier to lay out over a live model.

Rolandīs LPX-250 model is selling at about 9000$, and itīs one of the cheapest around. (non-contact model)
So I guess this could be a cheaper alternative, although time costly .. not to mention what it could do to your mental health.
__________________
adldesigner
Caracas, Venezuela
Hell .. not gone perse, but with a certainly lower post count per day.


Last edited by adldesigner : 06-05-2003 at 06:41 PM.
adldesigner is offline   Reply With Quote
Old 06-05-2003, 06:44 PM   #9
adldesigner
Registered User
 
adldesigner's Avatar
 
Join Date: Sep 2002
Location: CCS, Venezuela
Posts: 3,363
Thanks: 0
Thanked 9 Times in 9 Posts
Default

Desktop though ...
.. yours looks like an industrial-sized 3d scanner.
This is one of the most interesting topics ever to grace this site.
__________________
adldesigner
Caracas, Venezuela
Hell .. not gone perse, but with a certainly lower post count per day.

adldesigner is offline   Reply With Quote
Old 06-05-2003, 07:06 PM   #10
DukerX
Subscriber
 
DukerX's Avatar
 
Join Date: Nov 2002
Location: Sandnes, Norway
Posts: 99
Thanks: 0
Thanked 0 Times in 0 Posts
Default (Still at Haakonsvern Naval Base)

Hehe. Iīm flattered...
I thought Iīd mentione it for some people here at the base. I know a couple of guys who knows about this stuff too, but If you could get some input, it would be really cool.

Iīll be back with more info later on.

(This project have been on my mind since I started 3D modelling. I think if I can make it work, Iīll post info about how I did it, MEL script, Processor code and other scematix related (PCB-layouts and where to get the parts cheap. By the way... Outdated Xerox machines area great source for step-motors and power-electronics.)
__________________
-DX-
DukerX is offline   Reply With Quote
Old 06-05-2003, 07:25 PM   #11
adldesigner
Registered User
 
adldesigner's Avatar
 
Join Date: Sep 2002
Location: CCS, Venezuela
Posts: 3,363
Thanks: 0
Thanked 9 Times in 9 Posts
Default Re: (Still at Haakonsvern Naval Base)

Originally posted by DukerX
Iīll post info about how I did it, MEL script, Processor code and other scematix related (PCB-layouts and where to get the parts cheap. By the way... Outdated Xerox machines area great source for step-motors and power-electronics.)
I for instance will be very gratefull.
Seems a very good proyect.
__________________
adldesigner
Caracas, Venezuela
Hell .. not gone perse, but with a certainly lower post count per day.

adldesigner is offline   Reply With Quote
Old 14-05-2003, 06:17 PM   #12
DukerX
Subscriber
 
DukerX's Avatar
 
Join Date: Nov 2002
Location: Sandnes, Norway
Posts: 99
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Okay... Iīve been doing some calculations and have found that the non-contact aproach just wouldnīt do. The accuracy is just too low if the scanning is to be completed within reasonable time. If I was to compensate for the lack of precision, it would take a whole day to scan the car, and thatīs just too long, and I donīt think the 10$ microchip could handle the heavy calculations required either, so I have focused on the contact variaont, and found that it could be done quite easily. As a matter of fact, the microchip has an integrated UART, and therefore can be directly hooked up to the serial port of any computer, so the only thing I need to do is to write a maya-plugin that can receive the data from the COM port, and put it into 3D-world.

On the PC, Iīve been using "hyper terminal" to comunicate with the chip,and been able to send and receive data from it. It was even easier than I expected!
When the button on the scanner is pressed, the chip sends the coordinates to the COM-port, one byte at the time, and the data is sent back to the chip to verify it, and if itīs okay, it proceeds to the next byte.
Since hyper terminal is not a programming interface, I had to type the data back manually, but at least, it proves that it works. The only thing I need now, is a script sample on handling terminal functionality through the COM port, and itīs working (at least the comunication between MAYA and the scanner).
The next part wil be designing the position encoders, and get that data from the position sensors into the microchip, nd alsoensure the accuracy of the entire design. At this point Iīve encountered a problem. No matter how light-weight I make it, the material would still flex and bend when I move the point-scanner over the car surface, so Iīm also working on a device to make it semi-automated, much in the same fashion as the power steering on a car.


Final note...
I could post code samples and scematics much like the WIP part of this forum, but the various parts wouldnīt be much good without the entire design, and theyīre also due to change whenever I make modifications and improvements, but on the other hand, the people that reads this forum might get their own ideas, and could help me with the design.
__________________
-DX-
DukerX is offline   Reply With Quote
Old 15-05-2003, 12:38 PM   #13
Alan
Moderator
 
Alan's Avatar
 
Join Date: Oct 2002
Location: London, UK
Posts: 2,800
Thanks: 0
Thanked 5 Times in 5 Posts
Default

If you can make the scanner dump out a text file of the co-ordinates in the form:

x,y,z trans I can give you a script to load them into maya. That would avoid the need to write a plugin. Does that help at all?

Alan
__________________
Technical Director - Framestore

Currently working on: Your Highness

IMDB
Alan is offline   Reply With Quote
Old 17-05-2003, 12:08 PM   #14
DukerX
Subscriber
 
DukerX's Avatar
 
Join Date: Nov 2002
Location: Sandnes, Norway
Posts: 99
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Heeey! Pure_Morning! That's cool!

What kind of object is created in maya?... Or is that customisable??
__________________
-DX-
DukerX is offline   Reply With Quote
Old 19-05-2003, 12:41 PM   #15
Alan
Moderator
 
Alan's Avatar
 
Join Date: Oct 2002
Location: London, UK
Posts: 2,800
Thanks: 0
Thanked 5 Times in 5 Posts
Default

Emmmm that's a good point, I'm not sure. I think we could make a poly out of it..... I guess. Hmmm that makes this seem harder than I had originally thought....

let me think about it.

Alan
__________________
Technical Director - Framestore

Currently working on: Your Highness

IMDB
Alan is offline   Reply With Quote
Reply


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem solving many dynamic objects in a pile? rohiniduggal Dynamics & Special Effects 3 14-01-2011 07:26 PM
MEL headache! happymat27 Members Lounge 5 05-12-2010 09:43 AM
Strange Problem - Unable to change attributes for multiple objects anthonysw3 Technical Issues 4 04-12-2010 11:56 PM
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.