How to connect a vray texture to it's existing model in Maya


#1

So I am an animator who has picked up a gig doing some models. Easy. However the company I am working for has been out sourcing all their work over seas (just great!). I am the only 3d person within the company fyi. Anyway so I’ve been given some models with textures which the over seas company created. The models open up great but I am having issues relinking the textures to the model. I am not familiar with Vray at all, if I ever needed to rendered I always just used ray tracing. So I figured it was as simple as selecting the Vray material within the Hypershade then go into the Attribute Editor and select the file to relink but it doesn’t even give me the option of a file upload (does this make any sense?). Can someone please just help me out by explaining the proper way to relink and existing texture to it’s model please?

Thanks so much ahead of time.


#2

re-linking texture in Vray is the same as Maya … Vray doesnt do anything special, the file node is a Maya node…
Make sure all the textures are in source images and it should be as easy as matching the names.
Also you could use the File Path Editor … or just simply go to Hypershade > Texture tab and start re linking .

It Might be also be just that you need to set up your project to the correct folder.


#3

Thxs for all that info. If I don’t have VRay installed can I see the Vray Material texture? I relink the files but the texture isn’t applying to the model and the model is still green. Sorry for the amateur question, I just don’t know nothing about Vray, just an animator here lol!


#4

I answered this in your other post (don’t post twice btw):

is your Maya folder structure like this?:

projectName/scenes/file.mb
projectName/sourceimages/texture.tif

If so, select Maya’s File/Set Project menu item and set the project folder to the projectName folder. Then re-open your scene and the textures will load. I made a script to do this sequence in one step. You can copy and paste this into the Script Editor/MEL tab and hit control-enter to execute it and it will set the project to the parent folder for the open scene and prompt you to reload the scene:

string $pathToScene = `file -q -sn`;
string $bufferName[];
tokenize $pathToScene "/" $bufferName;
int $pathCount = `size $bufferName`;
//split off .ma extension so it doesn't get confused by reg exp
string $revisedPathSansExt = `substitute "...$" $pathToScene ""`;//This now has no .ma at the end
tokenize $revisedPathSansExt "/" $bufferName;//replace the buffer with the stripped extension version 
//strip out the file name sans .ma or .mb
string $revisedFullPath = `substitute ($bufferName[$pathCount - 1] + "$") $revisedPathSansExt ""`;

int $checker = `gmatch $bufferName[$pathCount - 2] "scenes*"`;
	if ($checker == 1)//contains scenes
	{ 	
	string $mainProjPath = $revisedFullPath;
	string $revisedPath = `substitute "scenes/" $revisedFullPath ""`;
    
    setProject $revisedPath;
    //sysFile -makeDir ($mainProjPath + "/images");
	}
    
  else if ($checker == 0)//doesnt contain scenes so don't strip it and set root folder to project folder
	{ 
     setProject $revisedFullPath;
     sysFile -makeDir ($revisedFullPath + "images");
	}

string $resulert = `confirmDialog -title "Confirm" -message "Reload file with proper project path?" 
     -button "Yes" -button "No" -defaultButton "Yes" 
     -cancelButton "No" -dismissString "No"`;

if ($resulert == "Yes") 
	{
	file -f -open $pathToScene;
	} 
	else 
	{
	warning ("File load cancelled but project path set.
");
	}


#5

Thxs for the mel script and info. I guess I am just rusty with Maya. I was however able to set the project to the proper file and they all loaded no problem :slight_smile:

Last question, I do not have Vray plugin installed and the scene has vray lights and other vray materials. When the textures relink, some parts of the models are still green. I wonder is that because that part of the model is a vray texture? Again I do not know much about Vray. I know the studio overseas could have easily left out some textures but looking through all the models they provided (over 50 of them), they all do this.

Thanks guys so much!


#6

ya, Maya doesn’t know how to render those correctly because the plugin that would tell it how it looks is missing


#7

Cool, that’s what I thought. Thanks for your help :slight_smile:

I may have other questions here soon as I start working with Vray.