Beer glass scene creation
This course contains a little bit of everything with modeling, UVing, texturing and dynamics in Maya, as well as compositing multilayered EXR's in Photoshop.
# 1 08-09-2010 , 04:51 PM
Stannoman's Avatar
Registered User
Join Date: Apr 2009
Posts: 51

Need some help with course assignment

Hello folks, I started a new study program this week, with a modeling course. We're basicly given an assignment already, while most of us have never touched Maya, and had to learn some of the basics in a 1.5 hour during lecture, we feel quite left in the dark, though it is understandable as the school wants us to learn by ourselves as much as possible. So I started to work on the assignment, but am stuck now. We basicly have to follow certain steps, but we lack the details on how to. (The tutorials we are given are really really basic and not useful for me).

The assignment contains that we disassemble and scan a carton box of any kind, crop the image (so the carton fits exactly on the canvas, (no white borders)). The next step is to put this image on a plane as reference and basicly create the shape of the silhouette by tracing the shape with the create polygon tool. Then we had to actually project the image (the scan of the disassembled carton) on the newly created mesh, after a lot of fiddling in the Create UV's menu, I managed to project the image of the carton, on the mesh.

However, I have no idea on how to complete the next steps, wich are described only vaguely (to me). The steps, quoted from my assignment description are:

j. Project UVs on carton (done)
k. Make shader
l. Attach carton scan as map
m. Apply shader to model

I am not sure what is meant by these steps, hopefully someone can explain what these steps mean, and how to commence them. It will also allow me to help my co-students further.

Thanks in advance.

# 2 08-09-2010 , 05:26 PM
Events Team at Wargaming.net
Join Date: Dec 2008
Location: Crystal Lake, Illinois
Posts: 486
Make Shader - if your familiar with the hypershade open this if not go window > rendering editor > hypershade, on the left side you will see a bunch of materials (blinn, phone, lambert, etc. These are your basic materials, each one has different properties and are useful for different types of materials. Wood, Metal, etc) left click on any of those.

When you have made a shader (material) double left click on it, this will bring up your Attribute Editor (may have to minimize the hypershade) there should be an option for color with a slider and to the right of the slider a checker box looking icon, click on that and it should bring up an option box. Find Image and bring in the scan of your carton. (This step just brings your texture and applies it to a material that you choose)

After doing that you can either right click on the object you modeled and go down to apply shader and than find the one you just made..or middle mouse drag the shader from the hypershade to the object.

If you did the UV's right it should place your scan (texture) in the right place.

Hope this helps.


Last edited by Ozgalis; 08-09-2010 at 05:32 PM.
# 3 08-09-2010 , 05:29 PM
Dango77's Avatar
Registered User
Join Date: Mar 2009
Location: London, England
Posts: 1,009
Hold your right mouse button over the object and select "assign new material", choose a blinn or lambert from the following menu, open up the attributes editor and click on the little black and white checkered box to the righthand side of "color", select "file" from the next menu, then back in the attributes editor next to image name selct the folder and browse to your image of the carton, should be okay from there.

If there's any other problems hopefully someone else can help as I'm off out for the evening, good luck!

*edit*

Oops, looks like Ozgalis got in there at the same time as me...lol. Either way will work.


Last edited by Dango77; 08-09-2010 at 05:31 PM.
# 4 08-09-2010 , 07:07 PM
Stannoman's Avatar
Registered User
Join Date: Apr 2009
Posts: 51
Ok thank you guys, was easier than I imagined it to be hehe, anyway, due to me fiddling around a lot with hypershade and such, I probably changed some setting somewhere and now I can't simply even project an image correctly on a simple plane anymore! So I guess I will have to reset my settings, by deleting some prefs file, will look into that now, then continue with the information you guys gave me.

# 5 08-09-2010 , 09:04 PM
Mayaniac's Avatar
As Zbrushiac sounds stupid!
Join Date: Nov 2007
Location: Derby
Posts: 1,241

Re: Need some help with course assignment

Originally posted by Stannoman
...we feel quite left in the dark, though it is understandable as the school wants us to learn by ourselves as much as possible.

So, how much tuition are you paying these idiots to tell you to go learn it yourself?

Not having a go at you... but theres far too much of this going on now days. You learn just as much, if not more, on your own than you do with most of these courses. Plus you're not left at the end of it all with £40,000 of debt, and you still don't know what's going on.


www.stevenegan-cgi.com

"Your weapons are no match for ours! People of Mars, surrender!"
"Um, this isn't Mars. This is Earth."
"Earth? Earth-with-nuclear-weapons Earth?"
"Yes."
[long pause] "Friend!!"
# 6 09-09-2010 , 11:25 AM
bullet1968's Avatar
Lifetime Member
Join Date: Feb 2010
Location: Australia
Posts: 4,255
Sadly I agree with Steve....I have the exact same problem re-teaching uni or TAFE Surveyors...how to be Surveyors...and no I didnt go to school..I learnt in the field.

Stanno I cant understand how or why they really want you to do this?? Texturing is obviously a progression in the overall art of 3D. I would have assumed they would be teaching you modelling basics first up....without those even a good artist will flounder.

I am glad that there is a site like this (one of the best by far) where you can get a lot of help from good people. I wont re-invent the wheel but I use Dango's method (by trail and error) but am learning the hypershade is good for complex mixing of substance. (more so you can see whats going on in the Hyper window etc)

Can I ask is this program PART of something larger and they are trying to compress the learning process for this reason? If so I would question..as Steve said..the end result mate?? I only do it part time (yes you can tell LOL) but I reckon I have learnt more from the guys (and girls mmwwaa) here than I would get from a powercourse/shortcourse.

For image planes there are some here I believe and GOOGLE is your best mate (well for me anyway). There are some good free and easy tutorials for this.

I dont know mud from clay but break it down. I dont know what they are doing but HOW or WHAT is the image meant to look like. Are you doing 2D with create poly then extrude etc? If it is simply to learn mapping do as Dango or Oz said. Then apply the shade to the model. Remember to press 6 to apply/see the image on your model mate. I think 5 provides the shade and 6 proje cts it to the model...something similar anyway.

Post some images of what you are trying to achieve..

cheers bullet


bullet1968

"A Darkness at Sethanon", a book I aspire to model some of the charcters and scenes
# 7 09-09-2010 , 11:45 AM
Stannoman's Avatar
Registered User
Join Date: Apr 2009
Posts: 51
The course is part of a complete study program, International Game Architecture and Design.

I got an update for you guys, (lol)

For another class we have to form up with programmers, and start working on a concept for a game. Something we are trying to work out at the moment, is to export our maya files, to .mdl files, as these extentions are required to use the models in A8 Gamestudio, the school provided us a converter, but it only works with an outdated version of maya. :headbang: And when I tried asking the gamelab professor for help, he said he's not gonna help us, and that this is part of our research and learning curve.. ARRGH.

I will continue trying to find a converter/exporter, but no luck so far.

BTW: Thanks for the help so far, it turned out that I already did the steps I wrote down... I am just not used to the termology yet so it is often not clear to me what they mean.

Alright, I found a Mel script, think I am supposed to use this to export my maya model into .mdl

though I have no clue how it works as I have 0 knowledge on coding. Here is the script:

global proc shelf_Export () { global string $gBuffStr; global string $gBuffStr0; global string $gBuffStr1; shelfButton -enableCommandRepeat 1 -enable 1 -width 34 -height 34 -manage 1 -visible 1 -preventOverride 0 -align "center" -label "//mdl5-ascii exporter (c) 2003 thomas oppl\r\n\r\n//////////////////..." -labelOffset 0 -font "tinyBoldLabelFont" -image "C:/Documents and Settings/igadmin/My Documents/maya/8.0/prefs/shelves/maya_3dgame32.bmp" -image1 "C:/Documents and Settings/igadmin/My Documents/maya/8.0/prefs/shelves/maya_3dgame32.bmp" -style "iconOnly" -marginWidth 1 -marginHeight 1 -command "//mdl5-ascii exporter (c) 2003 thomas oppl\r\n\r\n//////////////////////////////////////////\r\n\r\nglobal int $tf_aindex=0;\r\n\r\nglobal string $tf_anames[]; clear $tf_anames;\r\n\r\nglobal string $tf_aframes[]; clear $tf_aframes;\r\n\r\n\r\n\r\nprint $tf_anames;\r\n\r\n\r\n\r\nproc int bc_add()\r\n\r\n{\r\n\r\n\tglobal int $tf_aindex;\r\n\r\n\tglobal string $tf_anames[]; \r\n\r\n\tglobal string $tf_aframes[];\r\n\r\n\r\n\r\n\t$tf_aindex++;\r\n\r\n\tsetParen t RCL2;\r\n\r\n\t$tf_anames[$tf_aindex]=`textField`;\r\n\r\n\t$tf_aframes[$tf_aindex]=`textField`;\r\n\r\n\treturn 1;\r\n\r\n}\r\n\r\n\r\n\r\nproc int bc_remove()\r\n\r\n{\r\n\r\n\tglobal int $tf_aindex;\r\n\r\n\tglobal string $tf_anames[];\r\n\r\n\tglobal string $tf_aframes[];\r\n\r\n\r\n\r\n\tif($tf_aindex>0)\r\n\r\n\t{\r\n \r\n\t\tdeleteUI $tf_anames[$tf_aindex];\r\n\r\n\t\tdeleteUI $tf_aframes[$tf_aindex];\r\n\r\n\t\ttext -l \"\" t_temp; deleteUI t_temp;\r\n\r\n\t\t$tf_aindex--;\r\n\r\n\t}\r\n\r\n\treturn 1;\r\n\r\n}\r\n\r\n\r\n\r\nproc int bc_load()\r\n\r\n{\r\n\r\n\tfileBrowserDialog -m 0 -fc \"load_animlist\" -an \"load\";\r\n\r\n\treturn 1;\r\n\r\n}\r\n\r\n\r\n\r\nproc int bc_save()\r\n\r\n{\r\n\r\n\tfileBrowserDialog -m 1 -fc \"save_animlist\" -an \"save\";\r\n\r\n\treturn 1;\r\n\r\n}\r\n\r\n\r\n\r\nproc int bc_browse()\r\n\r\n{\r\n\r\n\tfileBrowserDialog -m 4 -fc \"set_path\" -an \"browse\";\r\n\r\n\treturn 1;\r\n\r\n}\r\n\r\n\r\n\r\nproc int set_path(string $filename, string $fileType)\r\n\r\n{\r\n\r\n\ttextField -e -tx $filename tf_path;\r\n\r\n\treturn 1;\r\n\r\n}\r\n\r\n\r\n\r\nproc int load_animlist(string $filename, string $fileType)\r\n\r\n{\r\n\r\n\tglobal int $tf_aindex;\r\n\r\n\tglobal string $tf_anames[]; \r\n\r\n\tglobal string $tf_aframes[];\r\n\r\n\r\n\r\n\twhile($tf_aindex>=0)\r\n\r\n\t{ \r\n\r\n\t\tdeleteUI $tf_anames[$tf_aindex];\r\n\r\n\t\tdeleteUI $tf_aframes[$tf_aindex];\r\n\r\n\t\ttext -l \"\" t_temp; deleteUI t_temp;\r\n\r\n\t\t$tf_aindex--;\r\n\r\n\t}\r\n\r\n\t$fileid=`fopen $filename \"r\"`;\r\n\r\n\tsetParent RCL2;\r\n\r\n\twhile(!`feof $fileid`)\r\n\r\n\t{\r\n\r\n\t\t$tf_aindex++;\r\n\ r\n\t\t$fname=`fgetline $fileid`;\r\n\r\n\t\t$tf_anames[$tf_aindex]=`textField -tx $fname`;\r\n\r\n\t\t$fframes=`fgetline $fileid`;\r\n\r\n\t\t$tf_aframes[$tf_aindex]=`textField -tx $fframes`;\r\n\r\n\t}\r\n\r\n\tfclose $fileid;\r\n\r\n\treturn 1;\r\n\r\n}\r\n\r\n\r\n\r\nproc int save_animlist(string $filename, string $fileType)\r\n\r\n{\r\n\r\n\tglobal int $tf_aindex;\r\n\r\n\tglobal string $tf_anames[]; \r\n\r\n\tglobal string $tf_aframes[];\r\n\r\n\r\n\r\n\t$fileid=`fopen $filename \"w\"`;\r\n\r\n\tfor($i=0;$i<=$tf_aindex;$i++)\r\n \r\n\t{\r\n\r\n\t\tstring $fname=eval(\"textField -q -tx \"+$tf_anames[$i]);\r\n\r\n\t\tstring $fframes=eval(\"textField -q -tx \"+$tf_aframes[$i]);\r\n\r\n\t\tfprint $fileid ($fname+\"\\n\"+$fframes);\r\n\r\n\t\tif($i!=$tf_a index)fprint $fileid (\"\\n\");\r\n\r\n\t}\r\n\r\n\tfclose $fileid;\r\n\r\n\treturn 1;\r\n\r\n}\r\n\r\n\r\n\r\nproc int update_progress(int $value, int $max_value, string $status)\r\n\r\n{\r\n\r\n\tfloat $divisor=(float)$max_value/(float)100;\r\n\r\n\tfloat $percent=(float)$value/$divisor;\r\n\r\n\tprogressWindow -e -pr $value -st ((int)$percent+\"% \"+$status);\r\n\r\n\treturn 1;\r\n\r\n}\r\n\r\n\r\n\r\nproc int bc_export()\r\n\r\n{\r\n\r\n\tflushUndo;\r\n\r\n\t undoInfo -state off;\r\n\r\n\r\n\r\n\tglobal int $tf_aindex;\r\n\r\n\tglobal string $tf_anames[];\r\n\r\n\tglobal string $tf_aframes[];\r\n\r\n\r\n\r\n\tfloat $scale=`floatField -q -v ff_scale`;\r\n\r\n\tstring $path=`textField -q -tx tf_path`;\r\n\r\n\tstring $filename=`substitute \"(\\\\\\\\)+$\" $path \"\"`+\"\\\\model.txt\";\r\n\r\n\tstring $anim_names[];\r\n\r\n\tint $export_frames[];\r\n\r\n\tint $export_frames_nameindex[];\r\n\r\n\tint $export_frames_namecount[];\r\n\r\n\tint $count=0;\r\n\r\n\tint $ai=0;\r\n\r\n\tint $efi=0;\r\n\r\n\r\n\r\n\t//----------------------------------------fetch animations from textfields\r\n\r\n\twhile($ai<=$tf_aindex)\r\n\r\n \t{\r\n\r\n\t\t$anim_names[$ai]=eval(\"textField -q -tx \"+$tf_anames[$ai]);\r\n\r\n\t\t\tif(match(\"[a-zA-Z0-9]+\",$anim_names[$ai])==\"\")//----------------------------------------------------------------warning\r\n\r\n\t\t\t{\r\n\r\n\t\t\t\tstring $message=\"empty animation name field!\";\r\n\r\n\t\t\t\tprogressWindow -ep; confirmDialog -t \"warning\" -m $message -b \"ok\";\tundoInfo -state on; error $message;\r\n\r\n\t\t\t}\r\n\r\n\t\t\tif(`size $anim_names[$ai]`>14)//--------------------------------------------------------------------------------warning\r\n\r\n\t\t\t{\r\n\r\n\t\t\t\tstring $message=\"animation name has more than 14 characters!\"; \r\n\r\n\t\t\t\tprogressWindow -ep; confirmDialog -t \"warning\" -m $message -b \"ok\";\tundoInfo -state on; error $message;\r\n\r\n\t\t\t}\r\n\r\n\t\t\tif(match(\" +\",$anim_names[$ai])!=\"\")//--------------------------------------------------------------------------warning\r\n\r\n\t\t\t{\r\n\r\n\t\t\t\tstring $message=\"animation name contains spaces!\"; \r\n\r\n\t\t\t\tprogressWindow -ep; confirmDialog -t \"warning\" -m $message -b \"ok\";\tundoInfo -state on; error $message;\r\n\r\n\t\t\t}\r\n\r\n\t\tstring $tempstring=eval(\"textField -q -tx \"+$tf_aframes[$ai]);\r\n\r\n\t\t\tif(match(\"[0-9]+\",$tempstring)==\"\")//---------------------------------------------------------------------------warning\r\n\r\n\t\t\t{\r\n\r\n\t\t\t\tstring $message=\"error in animation frames field!\";\r\n\r\n\t\t\t\tprogressWindow -ep; confirmDialog -t \"warning\" -m $message -b \"ok\";\tundoInfo -state on; error $message;\r\n\r\n\t\t\t}\r\n\r\n\t\tint $frame;\r\n\r\n\t\tint $namecount=0;\r\n\r\n\t\tfor($frame in return_intarray($tempstring))\r\n\r\n\t\t{\r\n\r\n \t\t\t$export_frames[$efi]=$frame;\r\n\r\n\t\t\t$export_frames_nameindex[$efi]=$ai;\r\n\r\n\t\t\t$export_frames_namecount[$efi]=$namecount;\r\n\r\n\t\t\t$namecount++;\r\n\r\n\t\ t\t$efi++;\r\n\r\n\t\t}\r\n\r\n\t\t$ai++;\r\n\r\n\ t}\r\n\r\n\r\n\r\n\t//----------------------------------------evaluate selected object\r\n\r\n\tstring $object[]=`ls -tr -sl`;\r\n\r\n\t\tif($object[0]==\"\")//---------------------------------------------------------------------------------------------------warning\r\n\r\n\t\t{\r\n\r\n\t\t\tstring $message=\"no object selected!\"; \r\n\r\n\t\t\tprogressWindow -ep; confirmDialog -t \"warning\" -m $message -b \"ok\";\tundoInfo -state on; error $message;\r\n\r\n\t\t}\r\n\r\n\tstring $cmd;\r\n\r\n\t$cmd=(\"polyEvaluate -v\");\r\n\r\n\tint $numverts[]=eval($cmd);\r\n\r\n\t$cmd=(\"polyEvaluate -uv\");\r\n\r\n\tint $numuvs[]=eval($cmd);\r\n\r\n\t$cmd=(\"polyEvaluate -t\");\r\n\r\n\tint $numtris[]=eval($cmd);\r\n\r\n\r\n\r\n\tint $numframes=size($export_frames);\r\n\r\n\tint $current_frame=0;\r\n\r\n\tcurrentTime $export_frames[$current_frame];\r\n\r\n\r\n\r\n\tint $progress=0;\r\n\r\n\tfloat $step=1;\r\n\r\n\tint $max_progress=$numframes+$numuvs[0]+(2*$numtris[0])+($numverts[0]*$numframes);\r\n\r\n\tprogressWindow -t \"exporting mdl5-ascii file...\" -pr $progress -st \"0%\" -ii false -min 0 -max $max_progress;\r\n\r\n\t\r\n\r\n\t//----------------------------------------open file\r\n\r\n\t$fileid=`fopen $filename \"w\"`;\r\n\r\n\t\tif($fileid==0)//-------------------------------------------------------------------------------------------------------warning\r\n\r\n\t\t{\r\n\r\n\t\t\tstring $message=\"directory does not exist!\"; \r\n\r\n\t\t\tprogressWindow -ep; confirmDialog -t \"warning\" -m $message -b \"ok\";\tundoInfo -state on; error $message;\r\n\r\n\t\t}\r\n\r\n\t\r\n\r\n\t//----------------------------------------find global bounding box\r\n\r\n\t$cmd=(\"polyEvaluate -b\");\r\n\r\n\tfloat $gbb[]=eval($cmd);\r\n\r\n\twhile ($current_frame<$numframes)\r\n\r\n\t{\t\r\n\r\n\t \t$cmd=(\"polyEvaluate -b\");\r\n\r\n\t\tfloat $bb[]=eval($cmd);\r\n\r\n\t\r\n\r\n\t\tif ($bb[0]<$gbb[0]){$gbb[0]=$bb[0];}\r\n\r\n\t\tif ($bb[1]>$gbb[1]){$gbb[1]=$bb[1];}\r\n\r\n\t\tif ($bb[2]<$gbb[2]){$gbb[2]=$bb[2];}\r\n\r\n\t\tif ($bb[3]>$gbb[3]){$gbb[3]=$bb[3];}\r\n\r\n\t\tif ($bb[4]<$gbb[4]){$gbb[4]=$bb[4];}\r\n\r\n\t\tif ($bb[5]>$gbb[5]){$gbb[5]=$bb[5];}\r\n\r\n\r\n\r\n\t\t$current_frame++;\t\r\n\r\n\ t\tcurrentTime $export_frames[$current_frame];\r\n\r\n\r\n\r\n\t\tupdate_progress($progress++,$ max_progress,\"finding globalboundingbox...\");\r\n\r\n\r\n\r\n\t}\r\n\r\ n\t$current_frame=0;\r\n\r\n\tcurrentTime $export_frames[$current_frame];\r\n\r\n\r\n\r\n\t//----------------------------------------write header\r\n\r\n\tfprint $fileid \"globalboundingbox\\n\";\r\n\r\n\tfprint $fileid ((-$gbb[1])+\" \"+$gbb[4]+\" \"+$gbb[2]+\" \"+(-$gbb[0])+\" \"+$gbb[5]+\" \"+$gbb[3]+\"\\n\");\r\n\r\n\tfprint $fileid (\"numverts\\n\"+$numverts[0]+\"\\n\");\r\n\r\n\tfprint $fileid (\"numtris\\n\"+$numtris[0]+\"\\n\");\r\n\r\n\tfprint $fileid (\"numuvs\\n\"+$numuvs[0]+\"\\n\");\r\n\r\n\tfprint $fileid (\"numframes\\n\"+$numframes+\"\\n\");\r\n\r\n\tfp rint $fileid (\"scale\\n\"+$scale+\"\\n\");\r\n\r\n\r\n\r\n\t//----------------------------------------write uvcoordinates\r\n\r\n\tfprint $fileid \"uvcoordinates\\n\";\r\n\r\n\t$step=$numuvs[0]/10;if($step<1)$step=1;\r\n\r\n\t$count=0;\r\n\r\n\ twhile($count<$numuvs[0])\r\n\r\n\t{\t\r\n\r\n\t\tfloat $uv[]=`polyEditUV -q -u -v ($object[0]+\".map[\"+$count+\"]\")`;\r\n\r\n\t\tfprint $fileid ($uv[0]+\" \"+$uv[1]+\"\\n\");\r\n\r\n\t\t\tif($uv[0]>1.001||$uv[0]<-0.001||$uv[1]>1.001||$uv[1]<-0.001)//--------------------------------------------------warning\r\n\r\n\t\t\t{\r\n\r\n\t\t\t\tstring $message=\"some uvcoordinates are outside 0 and 1 texture space!\";\r\n\r\n\t\t\t\tfclose $fileid; system(\"shell del \"+$filename);\r\n\r\n\t\t\t\tprogressWindow -ep; confirmDialog -t \"warning\" -m $message -b \"ok\";\tundoInfo -state on; error $message;\r\n\r\n\t\t\t}\r\n\r\n\t\t$count++;\r\n\ r\n\r\n\r\n\t\tif($count%$step==0)update_progress( $progress+=$step,$max_progress,\"writing uvcoordinates...\");\r\n\r\n\r\n\r\n\t}\r\n\r\n\r\ n\r\n\t//----------------------------------------write triangles\r\n\r\n\tfprint $fileid \"triangles\\n\";\r\n\r\n\t$step=$numtris[0]/10;if($step<1)$step=1;\r\n\r\n\t$count=0;\r\n\r\n\ twhile($count<$numtris[0])\r\n\r\n\t{\r\n\r\n\t\tstring $tempstringarray[]=`polyInfo -fv ($object[0]+\".f[\"+$count+\"]\")`;\r\n\r\n\t\tint $list[]=return_intarray($tempstringarray[0]);\r\n\r\n\t\t\tif(size($list)>4)//---------------------------------------------------------------------------------------------warning\r\n\r\n\t\t\t{\r\n\r\n\t\t\t\tstring $message=\"model is not triangulated!\";\r\n\r\n\t\t\t\tfclose $fileid; system(\"shell del \"+$filename);\r\n\r\n\t\t\t\tprogressWindow -ep; confirmDialog -t \"warning\" -m $message -b \"ok\";\tundoInfo -state on; error $message;\r\n\r\n\t\t\t}\r\n\r\n\t\tfprint $fileid ($list[1]+\" \"+$list[2]+\" \"+$list[3]+\"\\n\");\r\n\r\n\t\t$count++;\r\n\r\n\r\n\r\n\t\ tif($count%$step==0)update_progress($progress+=$st ep,$max_progress,\"writing triangles...\");\r\n\r\n\r\n\r\n\t}\r\n\r\n\r\n\r\ n\t//----------------------------------------write uvtriangles\r\n\r\n\tfprint $fileid \"uvtriangles\\n\";\r\n\r\n\t$count=0;\r\n\r\n\twh ile($count<$numtris[0])\r\n\r\n\t{\r\n\r\n\t\tstring $tempstringarray[]=`polyInfo -fv ($object[0]+\".f[\"+$count+\"]\")`;\r\n\r\n\t\tint $list[]=return_intarray($tempstringarray[0]);\r\n\r\n\t\tfor($i=1;$i<4;$i++)\r\n\r\n {\r\n\r\n\t\t\tstring $vf=$object[0]+\".vtxFace[\"+$list[$i]+\"][\"+$list[0]+\"]\";\r\n\r\n\t\t\tstring $tempstringarray[]=`polyListComponentConversion -fromVertexFace -toUV $vf`;\r\n\r\n\t\t\tint $intarray[]=return_intarray($tempstringarray[0]);\r\n\r\n\t\t\tfprint $fileid ($intarray[size($intarray)-1]+\" \"); //faster with $tempstring?\r\n\r\n\t\t}\r\n\r\n\t\tfprint $fileid (\"\\n\");\r\n\r\n\t\t$count++;\r\n\r\n\r\n\r\n\t\ tif($count%$step==0)update_progress($progress+=$st ep,$max_progress,\"writing uvtriangles...\");\r\n\r\n\r\n\r\n\t}\r\n\r\n\r\n\ r\n\t//----------------------------------------write animation frames\r\n\r\n\t$step=$numverts[0]/5;if($step<1)$step=1;\r\n\r\n\twhile($current_fram e<$numframes)\r\n\r\n\t{\r\n\r\n\t//----------------------------------------frame name\r\n\r\n\t\tstring $tempstring=$anim_names[$export_frames_nameindex[$current_frame]]+$export_frames_namecount[$current_frame];\r\n\r\n\t\tfprint $fileid ($tempstring+\"\\n\");\r\n\r\n\t//----------------------------------------bounding box\r\n\r\n\t\tfprint $fileid \"boundingbox\\n\";\r\n\r\n\t \t$cmd=(\"polyEvaluate -b\");\r\n\r\n\t\tfloat $bb[]=eval($cmd);\r\n\r\n\t\tfprint $fileid ((-$bb[1])+\" \"+$bb[4]+\" \"+$bb[2]+\" \"+(-$bb[0])+\" \"+$bb[5]+\" \"+$bb[3]+\"\\n\");\r\n\r\n\t//----------------------------------------vertices+normals\r\n\r\n\t\tfprint $fileid \"vertices+normals\\n\";\r\n\r\n\t\t$count=0;\t\r\ n\r\n\t\twhile($count<$numverts[0])\r\n\r\n\t\t{\r\n\r\n\t\t\tfloat $vtx[]=`pointPosition ($object[0]+\".vtx[\"+$count+\"]\")`;\r\n\r\n\t\t\tfprint $fileid (-$vtx[0]+\" \"+$vtx[2]+\" \"+$vtx[1]+\" \");\r\n\r\n\t\t\tfloat $x[]=`polyNormalPerVertex -q -x ($object[0]+\".vtx[\"+$count+\"]\")`;\r\n\r\n\t\t\tfprint $fileid ($x[0]+\" \");\r\n\r\n\t\t\tfloat $z[]=`polyNormalPerVertex -q -z ($object[0]+\".vtx[\"+$count+\"]\")`;\r\n\r\n\t\t\tfprint $fileid (-$z[0]+\" \");\r\n\r\n\t\t\tfloat $y[]=`polyNormalPerVertex -q -y ($object[0]+\".vtx[\"+$count+\"]\")`;\r\n\r\n\t\t\tfprint $fileid (-$y[0]+\"\\n\");\r\n\r\n\t\t\t$count++;\r\n\r\n\r\n\r\n\ t\t\tif($count%$step==0)update_progress($progress+ =$step,$max_progress,\"writing frame \"+$tempstring+\"...\");\r\n\r\n\r\n\r\n\t\t}\r\n\ r\n\t\t$current_frame++;\r\n\r\n\t\tcurrentTime $export_frames[$current_frame];\r\n\r\n\t}\r\n\r\n\t\r\n\r\n\t//----------------------------------------close file\r\n\r\n\tfclose $fileid;\r\n\r\n\r\n\r\n\tprogressWindow -ep;\r\n\r\n\tconfirmDialog -t \"export done!\" -m \"export done!\" -b \"ok\" -db \"ok\" -ds \"ok\" -p exporterwindow;\r\n\r\n\r\n\r\n\tundoInfo -state on;\r\n\r\n\treturn 1;\r\n\r\n}\r\n\r\n\r\n\r\nproc int[] return_intarray(string $intstring)\r\n\r\n{\r\n\r\n\tint $intarray[];\r\n\r\n\tint $i=0;\r\n\r\n\twhile(match(\"[0-9]+\",$intstring)!=\"\")\r\n\r\n\t{\r\n\r\n\t\t$inta rray[$i]=match(\"[0-9]+\",$intstring);\r\n\r\n\t\t$intstring=`substitu te \"[0-9]+\" $intstring \"\"`;\r\n\r\n\t\t$i++;\r\n\r\n\t}\r\n\r\n\tret urn $intarray;\r\n\r\n}\r\n\r\n\r\n\r\nproc int create_gui()\r\n\r\n{\r\n\r\n\tglobal int $tf_aindex;\r\n\r\n\tglobal string $tf_anames[];\r\n\r\n\tglobal string $tf_aframes[];\r\n\r\n\tif(`window -exists exporterwindow`)deleteUI exporterwindow;\r\n\r\n\twindow -wh 512 384 -te 100 -le 100 -s false -t \"maya mdl5-ascii exporter\" exporterwindow;\r\n\r\n\trowColumnLayout -nr 2 -rh 1 250 -rh 2 125 RCL1;\r\n\r\n\t\tscrollLayout -hst 0 -p RCL1 SL1;\r\n\r\n\t\t\trowColumnLayout -nc 2 -cw 1 85 -cw 2 385 -p SL1 RCL2;\r\n\r\n\t\t\t\ttext -l \"animation name\" tx1;\r\n\r\n\t\t\t\ttext -l \"animation frames\" tx2;\r\n\r\n\t\t\t\t$tf_anames[$tf_aindex]=`textField -tx \"walk\"`;\r\n\r\n\t\t\t\t$tf_aframes[$tf_aindex]=`textField -tx \"2 4 6 8 10 12\"`;\r\n\r\n\t\tcolumnLayout -p RCL1 CL1;\r\n\r\n\t\t\trowLayout -nc 4 -cw4 60 60 60 60 -p CL1 RL1;\r\n\r\n\t\t\t\tbutton -l \"add\" -w 60 -c \"bc_add()\";\r\n\r\n\t\t\t\tbutton -l \"remove\" -w 60 -c \"bc_remove()\";\r\n\r\n\t\t\t\tbutton -l \"load\" -w 60 -c \"bc_load()\";\r\n\r\n\t\t\t\tbutton -l \"save\" -w 60 -c \"bc_save()\";\r\n\r\n\t\t\tsetParent CL1;\t\r\n\r\n\t\t\t\ttext -l \"\";\r\n\r\n\t\t\trowLayout -nc 2 -cw2 30 300 -p CL1 RL2;\r\n\r\n\t\t\t\ttext -l \"scale:\";\r\n\r\n\t\t\t\tfloatField -pre 4 -v 1 -min 0.1 -max 128 ff_scale;\r\n\r\n\t\t\trowLayout -nc 3 -cw3 30 414 60 -p CL1 RL3;\r\n\r\n\t\t\t\ttext -l \"path:\";\r\n\r\n\t\t\t\ttextField -tx \"e:\\\\\" -w 414 tf_path;\r\n\r\n\t\t\t\tbutton -l \"browse\" -w 60 -c \"bc_browse()\";\r\n\r\n\t\t\tsetParent CL1;\r\n\r\n\t\t\t\tbutton -l \"export mdl5-ascii file\" -w 504 -c \"bc_export()\";\r\n\r\n\tshowWindow exporterwindow;\r\n\r\n\treturn 1;\r\n\r\n}\r\n\r\n\r\n\r\ncreate_gui();" -actionIsSubstitute 0 ; }

I also have this md5_convert_v4.exe and have no idea how to use it.


Last edited by Stannoman; 09-09-2010 at 12:06 PM.
# 8 09-09-2010 , 12:25 PM
gster123's Avatar
Moderator
Join Date: May 2005
Location: Manchester Uk
Posts: 6,300
If its for an older version of maya try exporting out as an fbx, one of the older versions that the olde version of maya supports.

If not try obj and then re-map the textures in the older version.

Or you can hack a ma file to an older version as long as theres nothing that you have used in the new version that the old one does not have.

Hope it helps

Steve


"No pressure, no diamonds" Thomas Carlyle
# 9 09-09-2010 , 01:54 PM
bullet1968's Avatar
Lifetime Member
Join Date: Feb 2010
Location: Australia
Posts: 4,255
gster you are a fountain.

For another class we have to form up with programmers, and start working on a concept for a game.

How about..as you are doing this field...a game concept..with a good story...gameplay...graphics and not just another shoot 'em up.

Throw some art around...find a niche......learn it well, and post some pics of what you have done?

I would like to see some pictures of your stuff.

cheers bullet


bullet1968

"A Darkness at Sethanon", a book I aspire to model some of the charcters and scenes
# 10 09-09-2010 , 07:45 PM
Stannoman's Avatar
Registered User
Join Date: Apr 2009
Posts: 51
I will post pics when we got some concept art done, though we're kinda crappy drawers, (drawing skills is also a course included in the program thank god), but for now, I got a problem (again).

Also, we discovered that the MDL stuff is bullshit, A8 works fine with FBX files, wasted hours yay...

I am simply trying to fit my reference pic on a plane, so I look what resolution the picture is, and create a plane in this resolution (Create -> Poly -> Plane (and the box next to it to put in the width and height)) Then I go to hypershade, make a new shader, file -> choose the pic, and apply the shader to the plane. it looks alright, but I am missing a strip on the right of roughly 35 pixels wide. What the hell am I doing wrong?

user added image




Instead of just assigning the material to the plane. I now used Create UV's -> Planar Mapping and it looks correct now, Confused though, as I would swear the lecturer did the assigning material thing. I have no idea what I am doing lol, but it sort of looks right now.


Last edited by Stannoman; 09-09-2010 at 08:02 PM.
# 11 09-09-2010 , 08:57 PM
Stannoman's Avatar
Registered User
Join Date: Apr 2009
Posts: 51
I am supposed to do specific things, but not sure in wich order lol,

I have to fold the carton into box shape
I have to extrude the plane so it gets a thickness
I have to project a different texture on the other side of the carton (a scan of the box' interior)

Can someone put them in the right order and explain how the third step is done.

# 12 09-09-2010 , 11:18 PM
bullet1968's Avatar
Lifetime Member
Join Date: Feb 2010
Location: Australia
Posts: 4,255
The scale will only move the configuration of the image around mate. I say if there is a bit missing check the PS image...you may have cut a bit off accidently??

Ok you have to put an image on the inside as well?? or texture?? weird. How would they see it or are you leaving the top or side open to see inside?

If it wa me..I would fold the box...then extrude inward to get thickness. Then pick outside faces..apply red shade and hide it. Then apply another shade to the inside (yellow).

Then UV the 2 different shades and apply the checker shade to see if it is all relative (you done this before at all?)

Then snapshot the UV layout..take to PS and do your thing. Bring it back and apply the image to a shade and then assign to the model...presto.

Cheers bullet


bullet1968

"A Darkness at Sethanon", a book I aspire to model some of the charcters and scenes
# 13 10-09-2010 , 06:44 AM
Stannoman's Avatar
Registered User
Join Date: Apr 2009
Posts: 51
Correct, I want to leave the top open,
I solved the texture thing, now the texture is on the plane (and the created mesh) properly.

And no, I have not used multiple shades on 1 mesh before, so I am not sure how to apply a red shade to one side (and why hide?) and another shade to the inside (why the colors btw?) Also, I am not (yet) allowed to edit UV's, the textures basicly have to fit right away after projecting, I'm also not sure what you mean by snapshotting the UV layout, taking it to PS and doing my thing.

Argh I hate being a noob, and English not being my native language doesn't help :headbang:

EDIT: I would probably get it right away if I'd just see someone do it lol,

EDIT: Ok great now I also have problems folding along edges.
I tried selecting the faces of 1 flap, pressed Insert and moved the pivot point to the folding edge (with snap).
Then I tried rotating the face but it would still rotate around the center. I also selected the whole object, and moved it's pivot to that one specific folding edge, but when I switch to the rotate tool/move tool, it looks as if the pivot is still in the center of the face/object.

user added image


Last edited by Stannoman; 10-09-2010 at 07:34 AM.
# 14 10-09-2010 , 07:42 AM
bullet1968's Avatar
Lifetime Member
Join Date: Feb 2010
Location: Australia
Posts: 4,255
Dont worry Im a noob too mate.

When you move the pivot are you in rotate tool when you do?

Select the rotate tool, select the faces you want to rotate. When you have done this hold the 'd' key down and either the 'v' (for vert snap) or 'x' (for grid snap)..I would use 'v'.

Dont forget the rotate will probably be set to world and will only rotate relative to the grid.

You can assign shades to faces mate...top or bottom etc...so you can have a red lid and a blue base and yellow sides. Its for UV ing...but dont worry about that for now. Lets sort out the above.

Google is your best friend...the manual for Maya isnt very good but does give basics.

cheers bullet


bullet1968

"A Darkness at Sethanon", a book I aspire to model some of the charcters and scenes
# 15 10-09-2010 , 08:28 AM
Stannoman's Avatar
Registered User
Join Date: Apr 2009
Posts: 51
Thanks a lot, I thought you would just move the pivot, THEN switch to rotate tool, and that the pivot would stay on its place. Your method worked flawlessly,

Here is an update:

user added image

I drew the mesh keeping overlap in account, so just like with the real carton. (folding edges not exactly aligned). So I guess the next step is extruding inwards, I'll see how far I get, but don't hesitate to post the instructions anyway user added image

Posting Rules Forum Rules
You may not post new threads | You may not post replies | You may not post attachments | You may not edit your posts | BB code is On | Smilies are On | [IMG] code is On | HTML code is Off

Similar Threads