View Full Version : lib links with Mayatomr
bat
December 7th, 2005, 11:42
Hi,
I'm using mentalRay Standalone
to render my Maya scene, I have to export it in Maya with Mayatomr
to create .mi files.
my problem is that Mayatomr adds all the includes the scene need, but not all the links.
Exemple:
Code from Mayatomr:
link "mayabase.so"
link "mayahair.so"
$include "mayabase.mi"
$include "mayahair.mi"
$include "physics.mi"
......
I have to add link "physics.so".
Is it possible to make it automatic?
thanks
-----------------------------------------------------------------------------------
I'm using Maya 7.0
MentalRay standalone 345
And my MI_ROOT, MI_RAY_INCPATH and MI_LIBRARY_PATH are correctly set.
ctrl_studio
December 7th, 2005, 17:27
so you need just nothing. if your incpath and libpath are
correctly set, and rayrc lookup all that shaders, your
render will be fine when you delete all mi and lib link from
your exported mi scene.
max
bat
December 7th, 2005, 18:44
yes I need to add my lib links, if I don't , all my objects using mentalRay shaders are totally black, and when I launch mentalrayrender, I got error messages like that :
....
API 0.0 warn 302004: /usr/local/mi345/include/base.mi, line 777: while defining declaration "mib_geo_cylinder": declaring nonexisting function mib_geo_cylinder
API 0.0 warn 302004: /usr/local/mi345/include/base.mi, line 784: while defining declaration "mib_geo_square": declaring nonexisting function mib_geo_square
API 0.0 warn 302004: /usr/local/mi345/include/base.mi, line 794: while defining declaration "mib_geo_instance": declaring nonexisting function mib_geo_instance
API 0.0 warn 302004: /usr/local/mi345/include/base.mi, line 804: while defining declaration "mib_geo_instance_mlist": declaring nonexisting function mib_geo_instance_mlist
API 0.0 warn 302004: /usr/local/mi345/include/base.mi, line 812: while defining declaration "mib_geo_add_uv_texsurf": declaring nonexisting function mib_geo_add_uv_texsurf
API 0.0 warn 302004: /usr/local/mi345/include/base.mi, line 825: while defining declaration "mib_photon_basic": declaring nonexisting function mib_photon_basic
API 0.0 warn 302004: /usr/local/mi345/include/base.mi, line 837: while defining declaration "mib_light_infinite": declaring nonexisting function mib_light_infinite
....
....
PHEN 0.0 error 051011: shader "mib_illum_phong" not found
PHEN 0.4 error 051011: shader "mib_illum_phong" not found
PHEN 0.0 error 051011: shader "mib_illum_phong" not found
PHEN 0.2 error 051011: shader "mib_illum_phong" not found
PHEN 0.0 error 051011: shader "mib_illum_phong" not found
....
(my scene test is just a sphere with a mib_illum_phong shader)
to create my mi file, I use the mel command Mayatomr :
maya -prompt -file mentalRaySceneTest.ma -command "Mayatomr -mi -cam persp -xp 00a00a00a0 -file test.mi; quit -f"
and to render it, mentalRay standalone command :
mentalrayrender test.mi
which is the same than :
/usr/local/mi345/bin/ray -L /usr/local/mi345/lib -I /usr/local/mi345/include test.mi
MentalRay var:
echo $MI_ROOT
/usr/local/mi345
echo $MI_RAY_INCPATH
/usr/local/mi345/include/
echo $MI_LIBRARY_PATH
/usr/local/mi345/mentalray/lib/
need help please, I won't modify all my .mi files manually :(
ctrl_studio
December 10th, 2005, 00:28
yes I need to add my lib links, if I don't , all my objects using mentalRay shaders are totally black,
yep. this is obvious. but.. if your rayrc lists all the shaders you need
and your include and lib path are accessible.. you'll have nothing
to add to the mi scene file.. and for the simple reason that all shaders
were already looked up before reading that file, infact mentalray
first read and parse rayrc, register the shaders, invoke rayhost...
then and only then will read the mi scene file and if (and only if)
there's some link or include it will register and link other shaders.
so if you have your vars set and the rayrc available with all the
shader you need, you have nothing to add to your mi scene file
but the opposite to delete all the link and includes as if not you'll
get warnings as redeclaration of shaders. you can also include an if
statement in the mi fle to check if some shaders are already reg.
you can even copy and paste the declarations of the shaders you
need without set include paths. I mean do not consider the mi scene
file and the other variuos mi files as something different..
they both are part of the scene you're going to render. so if you
register your shader when mr startups you'll don't need any link or
include in the mi scene file. :wink:
max
bart
December 10th, 2005, 17:23
What does your rayrc look like on your standalone machine installation?
[It should be in the /usr/local/mi345 directory from what it looks like you have chosen as an installation location.]
As mentioned above, the rayrc should link in base.so, physics.so, etc. and also load base.mi, physics.mi, etc. Then, you can turn them off in the export options.
Have you read these two tips pages?
http://www.lamrug.org/resources/standalonetips.html
http://www.lamrug.org/resources/servertips.html
bat
December 14th, 2005, 16:06
ok
thank you for your help
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.