Results 1 to 2 of 2

Thread: "call to undeclared function" error to render with mental ray standalone

  1. #1
    Join Date
    Feb 2010
    Posts
    7

    Default "call to undeclared function" error to render with mental ray standalone

    one_color.mi
    ---------------------------------------------------------------------------------
    declare shader
    color "one_color" (
    color "color" default 1 1 1 )
    version 1
    apply material
    end declare
    ----------------------------------------------------------------------------------

    one_color.c
    ----------------------------------------------------------------------------------
    #include "shader.h"

    DLLEXPORT
    int one_color_version(void) { return 1; }

    struct one_color {
    miColor color;
    };

    DLLEXPORT
    miBoolean one_color (
    miColor *result, miState *state, struct one_color *params )
    {
    *result = *mi_eval_color(&params->color);
    return miTRUE;
    }
    ------------------------------------------------------------------------------------------

    As you can see, this is very simple shader from "writing mental ray shader"

    I compiled this shader and tried to
    render the attached file "single_color_1.mi" with mental ray standalone.

    It looked to load a shader fine, but keep getting error.
    I attached full log to render that scene.

    Do you have any idea to solve this error?
    Thank you,
    Sean.

    seankim@bender:/mnt/users/seankim/download 1053 %
    /usr/autodesk/mrstand3.8.1-adsk2011-x64/bin/ray single_color_1.mi
    LINK 0.0 progr: module #2 (one_color.so) loaded
    API 0.0 error 301031: single_color_1.mi, line 17: while defining material "red": call
    to undeclared function "one_color"
    API 0.0 error 301031: single_color_1.mi, line 23: while defining material "yellow":
    call to undeclared function "one_color"
    API 0.0 error 301031: single_color_1.mi, line 29: while defining material "blue":
    call to undeclared function "one_color"
    API 0.0 error 301031: single_color_1.mi, line 53: while defining instance "cone-1":
    call to undeclared function "bw_cone"
    API 0.0 error 301031: single_color_1.mi, line 66: while defining instance "ball-1":
    call to undeclared function "bw_ball"
    API 0.0 error 301031: single_color_1.mi, line 79: while defining instance "column-1":
    call to undeclared function "bw_cylinder"
    MI 0.0 info : wallclock 0:00:00.00 for mi scene file parsing
    MI 0.0 info : CPU user 0:00:00.00 for mi scene file parsing
    MI 0.0 info : allocated 14 MB, max resident 14 MB
    SCEN 0.2 progr: begin scene preprocessing for frame 0
    SCEN 0.2 info : 0 geometry leaf instances (0 scheduled, 0 cached, 0 shared)
    SCEN 0.2 info : 0 light leaf instances
    SCEN 0.2 info : wallclock 0:00:00.00 for scene preprocessing
    SCEN 0.2 info : CPU user 0:00:00.00 for scene preprocessing
    SCEN 0.2 info : allocated 14 MB, max resident 14 MB
    RC 0.2 info : scene extent: empty
    RC 0.2 info : option: scanline on
    RC 0.2 info : option: trace on
    RC 0.2 info : option: trace depth reflection 2, refraction 2, sum 4
    RC 0.2 info : option: acceleration bsp2
    RC 0.2 info : option: shadow on
    RC 0.2 info : option: lightmap on
    RC 0.2 info : option: motion off
    RC 0.2 info : option: luminance weights 0.212671 0.71516 0.072169
    RC 0.2 info : option: caustic off
    RC 0.2 info : option: globillum off
    RC 0.2 info : option: finalgather off
    RC 0.2 info : option: samples min 0, max 2
    RC 0.2 info : option: contrast 0.1 0.1 0.1 1
    RC 0.2 info : option: jitter 1
    RC 0.2 info : option: filter box 1 1
    RC 0.2 info : option: render space object
    RC 0.2 info : option: face both
    RC 0.2 info : option: field off
    RC 0.2 info : option: hair on
    RC 0.2 info : option: task size 32
    RC 0.2 info : option: pixel preview off
    RC 0.2 info : option: lens on
    RC 0.2 info : option: volume on
    RC 0.2 info : option: geometry on
    RC 0.2 info : option: displace on
    RC 0.2 info : option: premultiply on
    RC 0.2 info : option: colorclip rgb
    RC 0.2 info : option: output on
    RC 0.2 info : option: merge on
    RC 0.2 info : option: fb mem management cached
    RC 0.2 info : option: type filter name
    RC 0.2 info : rgba yes color
    RC 0.2 info : camera: focal length 90
    RC 0.2 info : camera: aperture 33.3
    RC 0.2 info : camera: aspect 1.33333
    RC 0.2 info : camera: resolution 400 300
    RC 0.2 info : camera: clip 0.001 1e+06
    RC 0.2 info : camera: frame 0 0 0
    RC 0.2 progr: rendering
    RCI 0.2 progr: begin intersection preprocessing
    RCI 0.2 info : using scanline for eye rays
    RCI 0.2 info : using BSP2 for secondary rays
    RCI 0.2 progr: end intersection preprocessing
    RCI 0.2 info : wallclock 0:00:00.00 for intersection prep.
    RCI 0.2 info : CPU user 0:00:00.00 for intersection prep.
    RCI 0.2 info : allocated 14 MB, max resident 14 MB
    JOB 0.2 progr: 0.8% rendered on bender.2
    JOB 0.4 progr: 1.7% rendered on bender.4
    JOB 0.2 progr: 2.5% rendered on bender.2
    .....
    JOB 0.5 progr: 98.2% rendered on bender.5
    JOB 0.7 progr: 99.1% rendered on bender.7
    JOB 0.11 progr: 100.0% rendered on bender.11
    PHEN 0.2 progr: calling output shaders
    PHEN 0.2 progr: writing image file single_color_1.tif (frame 0)
    RC 0.2 progr: rendering finished
    RC 0.2 info : wallclock 0:00:00.09 for rendering
    RC 0.2 info : CPU user 0:00:00.06 for rendering
    RC 0.2 info : allocated 17 MB, max resident 18 MB
    GAPM 0.2 info : triangle count (including retessellation) : 0
    IMG 0.0 info : texture cache: maximum 35 pages, 0.547 MBytes; flushed 35 pages, 0.547
    MBytes
    MSG 0.0 info : wallclock 0:00:00.45 total
    MSG 0.0 info : CPU user 0:00:00.07 total
    MSG 0.0 info : allocated 5 MB, max resident 18 MB
    seankim@bender:/mnt/users/seankim/download 1054 %
    Attached Files Attached Files

  2. #2
    Join Date
    Dec 2004
    Location
    Marina Del Rey, California
    Posts
    2,916

    Default

    Did you read up on setting up the render environment with rayrc, etc.?

    Note that it appears to be having issues with the include of one_color.mi, because I don't see notice of the mi being parsed.

    Try an extremely simple test.mi file with just the one_color loading and declaration:

    Code:
    link "one_color.so"
    $include "one_color.mi"
    Then,
    Code:
    ray test.mi -v 5
    or even -v 6 if you can't tell whether it has loaded and declared correctly.
    Last edited by bart; April 2nd, 2011 at 17:49.
    Barton Gawboy
    Training and Special Projects, NVIDIA ARC
    LAmrUG Forum Originator

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •