Mental ray can´t open a file


#1

Hey guys, i was following a tutorial about photorealistic render when i had to load an .HDR image but after rendering the scene an error is shown saying that mental ray couldn´t open the file because the directory doesn´t exist.
Now, i googled the issue and the solution given was:

“Does it work if you add your Maya project root directory as MI_TEXTURE_PATH variable into Maya.env, like
Code:
MI_TEXTURE_PATH = $MAYA_APP_DIR/projects/default”

The problem i have is that english is not my native language and all the coding thingy is all greek to me (i actually google that saying) so i´m not completely sure what i have to do here. Do i have to create a new folder named MI_TEXTURE_PATH and set the project to that path?
Do i have to add that line to the MEL widow changing MI_TEXTURE_PATH to my own, custom path, and the APP_DIR to the directory where my maya is installed? because both are set to default.
Any insights?


#2

Can you copy and paste the exact error message? There are many possiblities, e.g. is the hdr file a texture file for an ibl node or normal texture file, or did you set your output image format to .hdr? Normally if maya can see the image, mentalray can see it as well. So before doing any fancy env variable settings, let’s see what the error is.

You should set the mentalray verbosity to progress to see a bit more info about the render process. You can do it in the Render->Render CurrentFrame -> Options window. If you now render, you see more output, have a look for error messages there.


#3

Ok, the exact error message says:
// Error: (mental ray) : …listic Automotive Rendering in Maya//sourceimages/bright.hdr: can’t open file for reading (No such file or directory)

I did what you said about setting the mentalray verbosity to progress and the message on the output window says this:

PHEN 0.4 49 MB info : mayabase version 10.8, compiled on Mar 1 2013.
PHEN 0.4 49 MB info : -----------------------------------------------
RCGI 0.4 49 MB info : wrote photon maps to C:/Users/usuario/Documents/maya/projects/default/renderData/mentalray/photonMap/default.pmap
RC 0.4 49 MB progr: rendering
IMG 0.10 64 MB progr: opening texture C:/Users/usuario/Documents/maya/projects/default/sourceimages/environment_ibl.hdr, for reading
PHEN 0.10 141 MB progr: environment texture sampler constructed.
IMG 0.7 154 MB progr: opening texture C:/Users/usuario/Documents/maya/projects/default/sourceimages/tiresBump.jpg, for reading
IMG 0.7 158 MB progr: opening texture C:/Users/usuario/Documents/maya/projects/default/sourceimages/tiresColor.jpg, for reading
JOB 0.10 163 MB progr: 6.2% rendered on usuario-PC.10
JOB 0.5 163 MB progr: 12.5% rendered on usuario-PC.5
JOB 0.3 163 MB progr: 18.7% rendered on usuario-PC.3
JOB 0.11 163 MB progr: 25.0% rendered on usuario-PC.11
JOB 0.6 163 MB progr: 31.2% rendered on usuario-PC.6
JOB 0.12 164 MB progr: 37.5% rendered on usuario-PC.12
JOB 0.7 164 MB progr: 43.7% rendered on usuario-PC.7
JOB 0.13 164 MB progr: 50.0% rendered on usuario-PC.13
JOB 0.5 164 MB progr: 56.2% rendered on usuario-PC.5
JOB 0.10 163 MB progr: 62.5% rendered on usuario-PC.10
JOB 0.14 162 MB progr: 68.7% rendered on usuario-PC.14
JOB 0.7 162 MB progr: 75.0% rendered on usuario-PC.7
JOB 0.8 161 MB progr: 81.2% rendered on usuario-PC.8
JOB 0.6 160 MB progr: 87.5% rendered on usuario-PC.6
JOB 0.3 159 MB progr: 93.7% rendered on usuario-PC.3
JOB 0.11 158 MB progr: 100.0% rendered on usuario-PC.11
RC 0.4 158 MB info : rendering statistics
RC 0.4 158 MB info : type number per eye ray
RC 0.4 158 MB info : eye rays 212606 1.00
RC 0.4 158 MB info : reflection rays 245131 1.15
RC 0.4 158 MB info : shadow rays 5390957 25.36
RC 0.4 158 MB info : environment rays 161815 0.76
PHEN 0.4 139 MB progr: calling output shaders
PHEN 0.4 139 MB progr: maya_shaderglow(): Computing glow…
PHEN 0.4 139 MB info : maya_shaderglow(): Glow: Filter Width … 41
PHEN 0.4 139 MB info : maya_shaderglow(): Resolution … 0.638926
PHEN 0.4 139 MB info : maya_shaderglow(): Normalization … 3.362000
PHEN 0.4 140 MB info : maya_shaderglow(): Halo: Filter Width … 101
PHEN 0.4 140 MB info : maya_shaderglow(): Resolution … 0.260841
PHEN 0.4 140 MB info : maya_shaderglow(): Normalization … 20.402000
PHEN 0.4 140 MB progr: maya_shaderglow(): Done!
RC 0.4 139 MB progr: writing frame buffer mayaColor to image file C:/Users/usuario/Documents/maya/projects/default/images/tmp/Begin 01.jpg (frame 1)
IMG 0.4 139 MB warn 102002: type rgba not supported by jpg format, using default type rgb
RC 0.4 139 MB progr: rendering finished
RC 0.4 139 MB info : wallclock 0:00:12.58 for rendering
RC 0.4 139 MB info : current mem usage 139 MB, max mem usage 202 MB
GAPM 0.4 139 MB info : triangle count (including retessellation) : 442840
PHEN 0.4 85 MB info : Reflection rays skipped by threshold: 16658


#4

I suppose the hdf file is located in the sourceimages directory of your current project like all the other textures?

If yes, try to reload the image in the file node. You can see the image in your maya interface? If this does not help, try to place the image outside the sourceimages folder and try to load it from there.


#5

I just realized that my .HDR image is not named “bright”. I don´t know where did maya got that name or to what it assigned to. All i know is that the car i´m rendering doesn´t reflect the enviroment i´m giving to it.
The scene i´m working has an area light with a user_ibl_env assigned, according to the tutorial i was following, it should work as an enviroment and the image should be reflected on the car material (mi_car_paint_phen_x_passes1).
However the HDR image is not being reflected and Maya is looking for an image i never provided. Now that´s weird…

EDIT: Nevermind. The reason the HDR image was not being reflected on the car texture was because i forgot to add the user_ibl_env node to the renderable camera (select the camera, go to “mental ray” tab and move the env node from the hypershade into the “enviromental shader” option, just in case any of you had the same problem)

However, i still get the “Bright.hdr file missing” message. I looked for that node all over the hypershade but i found no trace of it. There´s something connected to it but i can´t figure out what… (ghost node? scary…)