Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 27

Thread: Help me with a conversion

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

    Default

    It does or it doesn't run correctly.
    I don't see the threads on your jpg.

    Did you connect it to the blinn1SG in the displace slot of the mental ray tab?

    Because I did not put an 'apply' command in the mi declaration file, the shader will show up in the Misc category.
    Barton Gawboy
    Training and Special Projects, NVIDIA ARC
    LAmrUG Forum Originator

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

    Default

    Also, I'm no expert on compiling on Windows with visual C++.

    But you need to use the shader.lib file that comes in the Maya mental ray devkit. This is referenced in the Maya documentation section named:
    Use a custom-made mental ray for Maya shader in Maya.
    Barton Gawboy
    Training and Special Projects, NVIDIA ARC
    LAmrUG Forum Originator

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

    Default

    So I put 'apply displace' into the mi file, and it now appears under the mental ray displacement shaders category.

    declare shader
    scalar "threads" (
    scalar "Km" default .1,
    scalar "frequency" default 5.0, #: default 10.0
    scalar "phase" default 0.0,
    scalar "offset" default 0.0,
    scalar "dampzone" default 0.05
    )
    #: nodeid 101
    apply displace
    version 1
    end declare

    Also, note the little #: I put in after frequency. In the Maya doc, you can see how to add 'comment commands' with this syntax to affect how the AE presents the parameter. In the above case, I'm actually overriding the default. But there are other things that let you affect the slider.

    And if you are going to be using this shader for a while, in other words, you take it out of R&D, you should assign it a nodeid.
    Barton Gawboy
    Training and Special Projects, NVIDIA ARC
    LAmrUG Forum Originator

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

    Default

    BTW, my pic:

    [img]http://www.lamrug.org/resources/images/threads1.jpg[/img]
    Barton Gawboy
    Training and Special Projects, NVIDIA ARC
    LAmrUG Forum Originator

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

    Default

    To switch u(s) and v(t) directions you can switch them in the code, or you can remap how your textures get placed.

    s and t are gathered from the u and v of the initial texture map space.
    Barton Gawboy
    Training and Special Projects, NVIDIA ARC
    LAmrUG Forum Originator

  6. #16
    Join Date
    Mar 2005
    Posts
    11

    Default

    No, it does not work for me.
    Mental Ray return me the follow message:

    mental ray for Maya 6.5
    mental ray: version 3.4.1.5, 27 Dec 2004
    API 0.0 error 301031: call to undeclared function "threads"
    API 0.0 error 301036: undefined shader "threads1

    Enrico"

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

    Default

    Did you put references to the shader in your maya.rayrc file, both an mi command and a link command like there is for base, physics, etc.?

    Also, we should probably address the compiling issue first. Did you see the section in the manual I referred to above?
    Barton Gawboy
    Training and Special Projects, NVIDIA ARC
    LAmrUG Forum Originator

  8. #18
    Join Date
    Mar 2005
    Posts
    11

    Default

    I have set the references, Maya return me the follow message in the output window:

    mental ray for Maya 6.5
    mental ray: version 3.4.1.5, 27 Dec 2004
    API 0.0 warn 302004: C:/Program Files/Alias/Maya6.5/mentalray/include/threads.mi, line 9: while defining declaration "threads": declaring nonexisting function threads
    PHEN 0.2 error 051011: shader "threads" not found
    PHEN 0.2 error 051011: shader "threads" not found
    GEOE 0.2 error 091030: evaluation of displacement shader failed

    I have tried with and without the #: nodeid 101
    And yes, I use the correct shader.lib

    Thanks Enrico

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

    Default

    The first warning indicates that the threads.dll is either not found or not loading, or not loading properly. Please increase verbosity, to track this better. Try Translation with mode set to progress in mental ray render globals.

    And, just to make sure, you use shader.lib when you are compiling and no longer get the warnings you indicated previously?
    Barton Gawboy
    Training and Special Projects, NVIDIA ARC
    LAmrUG Forum Originator

  10. #20
    Join Date
    Mar 2005
    Posts
    11

    Default

    Sorry, double post.

    Enrico

Posting Permissions

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