Exporting from Maya

Modelling, Textures, Animating and other general engine asset topics.

Exporting from Maya

Postby andy4729 on Sun Apr 10, 2011 11:39 am

Hey guys.

I'm trying to export a model from Maya and I'm following this tutorial: http://www.northcapestudios.com/blog/?p=45. I'm using the DT85 exporter because Prall's is soooo broken. On the PathSettings tab in the exporter option box there are no paths in the boxes. I'm not sure what I should be putting in here. I tried putting in the folder I've set up called \model_sources but I just get the error: "unable to open \model_sources for write". I tried setting the full path too which didn't work.

Thanks
We're squatting in a system that consistently stalls
User avatar
andy4729
Regular
Regular
 
Joined: Sat Sep 09, 2006 7:26 pm
Location: Canterbury, United Kingdom

Re: Exporting from Maya

Postby andy4729 on Sun Apr 10, 2011 6:29 pm

Right, I'm almost there. I have the model in source and in the model viewer window right now. However, I can't get the texture to apply to it. Everything is in the right place but I still ahve the purple & black checkerboard...
We're squatting in a system that consistently stalls
User avatar
andy4729
Regular
Regular
 
Joined: Sat Sep 09, 2006 7:26 pm
Location: Canterbury, United Kingdom

Re: Exporting from Maya

Postby Jangalomph on Sun Apr 10, 2011 11:18 pm

http://www.nomoreroominhell.com
I don’t know whether I was right or wrong, I guess I’ll never know… But I made it. And I guess I should be thankful for that. - Strelok
Has anyone really been far even as decided to use even go want to do look more like?
User avatar
Jangalomph
Forum Goer Elite™
Forum Goer Elite™
 
Joined: Wed Jun 25, 2008 3:19 pm
Location: Sumter, SC

Re: Exporting from Maya

Postby andy4729 on Mon Apr 11, 2011 11:11 am

Are the images on that tutorial no longer available? It says "Fill in the values as seen above." but the above is just the text:

"User Posted Image
The New Project options box."
We're squatting in a system that consistently stalls
User avatar
andy4729
Regular
Regular
 
Joined: Sat Sep 09, 2006 7:26 pm
Location: Canterbury, United Kingdom

Re: Exporting from Maya

Postby andy4729 on Mon Apr 11, 2011 12:06 pm

Ahh, I found the same tutorial here with the images: http://www.sourcefortsmod.com/boards/sh ... hp?t=13590

Gunna give it a go and report back.
We're squatting in a system that consistently stalls
User avatar
andy4729
Regular
Regular
 
Joined: Sat Sep 09, 2006 7:26 pm
Location: Canterbury, United Kingdom

Re: Exporting from Maya

Postby andy4729 on Mon Apr 11, 2011 12:43 pm

Ok, I got near the end and now I'm stuck again.

Where the MEL script is run in the Maya script editor with the following:

Code: Select all
//<?---------------------------------------------------------
//  Purpose: Compile mdl's for Half-Life 2 within Maya.
//  Author:  Stieffers - Stieffers@Gmail.com
//  Version: v1.0.3   Date: 12-15-07
//-----------------------------------------------------------
   /*if ( `window -ex $myWindow`)
   {
      print ( "// Window deleted.\n" );
      deleteUI $myWindow;
   }*/

   string $myWindow = `window -wh 532 118 -t "Compile Model" -s false`;
   columnLayout;
      rowLayout -columnWidth 1 55 -columnWidth 2 20 -columnWidth 3 275 -columnWidth 4 85  -height 23 -numberOfColumns 5 -width 180;
         text -label "Qc Path: " -align "right";
         textField -w 20 -text "C:" text_Qc_01;
         textField -w 275 -enable false -text "\\Program Files\\Valve\\Steam\\Steamapps\\SourceMods\\" text_Qc_02; // Double slashes nessecary.
         textField -w 85 -text "(Mod)_src" text_Qc_03;
         textField -w 90 -enable false -text "\\modelsrc\\" text_Qc_04; // Again, double slashes nessecary.
         setParent ..;
      rowLayout -columnWidth 1 55 -numberOfColumns 2;
         text -label "Qc File: " -align "right";
         textField -w 470 -text "(Filename).qc" text_filename_01;
         setParent ..;
      rowLayout -columnWidth 1 55 -columnWidth 2 20 -columnWidth 3 209 -columnWidth 4 151  -height 23 -numberOfColumns 5 -width 180;
         text -label "StudioMdl: " -align "right";
         textField -w 20 -text "C:" text_studio_01;
         textField -w 209 -enable false -text "\\Program Files\\Valve\\Steam\\Steamapps\\" text_studio_02; // Again, double slashes nessecary.
         textField -w 151 -text "(Email)" text_studio_03;
         textField -w 90 -enable false -text "\\source_sdk\\bin\\" text_studio_04; // Again, double slashes nessecary.
         setParent ..;
      separator -w 532;
      rowLayout -columnWidth 1 100 -numberOfColumns 2;
         button -label "Custom" -al "center" -width 100 -c proc_setSourceForts -aop true;
         button -label "Compile" -al "center" -width 425 -c proc_main;
         setParent ..;
   
   showWindow $myWindow;
   
   // Run studiomdl.exe and compile the model.
   proc proc_main ()
   {      
      $pathQc = `textField -q -text text_Qc_01`
         + `textField -q -text text_Qc_02`
         + `textField -q -text text_Qc_03`
         + `textField -q -text text_Qc_04`
         + `textField -q -text text_filename_01`;
      $pathStudio = `textField -q -text text_studio_01`
         + `textField -q -text text_studio_02`
         + `textField -q -text text_studio_03`
         + `textField -q -text text_studio_04`
         + "studiomdl.exe";      
      
      // Console output.
      print ( "\n-PATHS---------------------------\n" );
      print ( $pathStudio + "\n" );
      print ( $pathQc + "\n\n" );
      
      // Open a command prompt.
      string $run = `system ( "cmd.exe" )`;
      print $run;
      
      // Change the directory and then run studiomdl.exe
      string $run = `system ( "dir \"" + $pathStudio + "\"" )`;
      print $run;      
      string $run = `system ( "studiomdl.exe " + "\"" + $pathQc +"\"" )`;
      print $run;

      // Finish message.
      print ( "Completed compiling " + $pathQc );
   }
   
   // Set some of the text fields with default values that correspond with SourceForts
   proc proc_setSourceForts ()
   {
      // Console output.
      print ( "\n-CONFIG: testmod-----------------\n" );
      print ( "testmod_src\n" );
      print ( "andy4729\n\n" );
      
      // Update the text field values.
      textField -e -text "testmod_src" text_Qc_03;      // Ex: textField -e -text "sourceforts_src" text_Qc_03;
      textField -e -text "andy4729" text_studio_03; // Ex: textField -e -text "Stieffers" text_studio_03;
   }

// Resize the window....
window -e -wh 532 118 $myWindow;


When I run this code to compile the model, i get the following output:

-PATHS---------------------------
C:\Program Files\Valve\Steam\Steamapps\andy4729\source_sdk\bin\studiomdl.exe
C:\Program Files\Valve\Steam\Steamapps\SourceMods\testmod_src\modelsrc\cube.qc

Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.

C:\Program Files (x86)\Steam\steamapps\SourceMods\testmod_src\materialsrc\models>The system cannot find the path specified.
'studiomdl.exe' is not recognized as an internal or external command,
operable program or batch file.
Completed compiling C:\Program Files\Valve\Steam\Steamapps\SourceMods\testmod_src\modelsrc\cube.qc


I have Steam running and the SourceSDK open with testmod as the current toolset.
We're squatting in a system that consistently stalls
User avatar
andy4729
Regular
Regular
 
Joined: Sat Sep 09, 2006 7:26 pm
Location: Canterbury, United Kingdom

Re: Exporting from Maya

Postby marnamai on Mon Apr 11, 2011 7:54 pm

User avatar
marnamai
Veteran
Veteran
 
Joined: Thu Nov 10, 2005 12:17 pm
Location: Belgium

Re: Exporting from Maya

Postby andy4729 on Tue Apr 12, 2011 12:38 pm

OK, so I went back to the tutorial I was using originally (which is the one you just posted) and I discovered (using the second link you posted) that my vmt had this line in it:


"$baseTexture" "models/cube.vtf"


..when it should have been this:

"$baseTexture" "models/cube"

...and now it is working! I had to compile the model into hl2 and then copy the files into my mod folder because it wouldn't compile into my mod for whatever reason.

Thanks for the help!
We're squatting in a system that consistently stalls
User avatar
andy4729
Regular
Regular
 
Joined: Sat Sep 09, 2006 7:26 pm
Location: Canterbury, United Kingdom

Re: Exporting from Maya

Postby andy4729 on Sun Jul 03, 2011 9:27 pm

Being a moron, I've forgotten all I learnt when I did this a while ago. I'm trying to get a new model into source but the texture just isn't being applied. I just have the purple/black checkerboard. It's not the file extension in the vmt like I discovered before.

Is there a way I can check the exact name of the texture that the model is looking for?
We're squatting in a system that consistently stalls
User avatar
andy4729
Regular
Regular
 
Joined: Sat Sep 09, 2006 7:26 pm
Location: Canterbury, United Kingdom

Re: Exporting from Maya

Postby marks on Sun Jul 03, 2011 11:18 pm

You would be able to find the filepaths for the texture files in the material VMT. However, if its the material file (VMT) which has a bad filepath, it wont change anything. Best bet is to double check by re-exporting from Maya with the correct VMT name, check your QC for the VMT path before compiling, compile, check VMT paths to VMF's.
User avatar
marks
Creative Assembly
Creative Assembly
 
Joined: Tue Aug 16, 2005 5:07 pm

Re: Exporting from Maya

Postby andy4729 on Tue Jul 05, 2011 11:08 am

marks wrote:You would be able to find the filepaths for the texture files in the material VMT. However, if its the material file (VMT) which has a bad filepath, it wont change anything. Best bet is to double check by re-exporting from Maya with the correct VMT name, check your QC for the VMT path before compiling, compile, check VMT paths to VMF's.


Does the texture file have to have the same name as the model? Not that I haven't done that but it'd be good to know. I tried re-exporting but still nothing. What do you mean check VMT paths to the VMF's? VMF is a map file? o.O
We're squatting in a system that consistently stalls
User avatar
andy4729
Regular
Regular
 
Joined: Sat Sep 09, 2006 7:26 pm
Location: Canterbury, United Kingdom

Re: Exporting from Maya

Postby marks on Tue Jul 05, 2011 11:45 am

I mean check the filepaths to the VTF's in the VMT - sorry. Haven't used source in ages :s
User avatar
marks
Creative Assembly
Creative Assembly
 
Joined: Tue Aug 16, 2005 5:07 pm

Re: Exporting from Maya

Postby andy4729 on Wed Jul 06, 2011 12:24 pm

OK, I started from scratch with this tutorial: http://www.northcapestudios.com/blog/?p=45

I've got the folder structure all sorted and everything and now I've come to exporting from Maya. In the math settings tab, I clicked the default button which puts in all the default paths. The one for the texture path is:

C:/Users/Andy/Documents/maya/projects/centralia/materialsrc/

Shouldn't it be:

C:/Users/Andy/Documents/maya/projects/centralia/materialsrc/models

??

EDIT: Nevermind! It worked! Think my file structure was wrong or something.
We're squatting in a system that consistently stalls
User avatar
andy4729
Regular
Regular
 
Joined: Sat Sep 09, 2006 7:26 pm
Location: Canterbury, United Kingdom

Return to Art Creation

Who is online

Users browsing this forum: No registered users