Results 1 to 5 of 5

Thread: Custom shader attribute

  1. #1
    Join Date
    May 2012
    Posts
    8

    Question Custom shader attribute

    Hello,
    Is there a way to send to shader chunk of bytes? It is understandable that it is not safe to send pointer to data, because of the rendering on multiple computers. So how one send to shader custom data?
    I know that miTag is some kind of "mental ray pointer" but I have no idea if it is possible to use it for this purpose.

    So does anyone know how to do it?

    If more info is needed: I'm writing mental ray shader for maya.

    And one more thing. Where [is the] proper mental ray api reference??? The only one I found is in maya help and it is pain to use. It never seems to find the stuff I'm looking for.

    Thanks everyone for help!
    Tom

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

    Default

    Since you are posting to the forum for the book "Writing mental ray Shaders", I assume you have the book?

    Are you using the index in the mental ray manual which has an mi_* function specific subindex?
    Barton Gawboy
    Training and Special Projects, NVIDIA ARC
    LAmrUG Forum Originator

  3. #3

    Default

    The mentalray reference in maya (or on the web) is quite okay. Are you missing something?
    In maya you have a userData structure which can be used to transfer data to mentalray. Then in your shader you can acess this userData information.

  4. #4
    Join Date
    May 2012
    Posts
    8

    Default

    Thanks, userData that is exactly what I need. I didn't know under what name should I search.

    And the problem with documentation. On maya help site is manual index for mental ray http://download.autodesk.com/us/maya...obalindex.html For example I want to know how miState is defined. In the index there is no entry "miState". So I search just for state. One finds "state variables" and there are 12 different entries. So you have to search them all.
    Probably I'm doing something terribly wrong but in contrast with maya api reference, which I find very clear(as there is simple list of all classes and their description, !!!plus examples!!!), I find mental ray reference confusing.

  5. #5
    Join Date
    May 2012
    Posts
    8

    Default

    Oh sorry I didn't know that this forum is for the book "Writing mental ray Shaders" I thought that is dedicated to those who write shaders and having problem with it.

Tags for this Thread

Posting Permissions

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