Professional Web Applications Themes

Shader Issue - Macromedia Director 3D

Hi there, I have a grid created in Maya. The grid has 4 additional sides (models) coming off the grid, that are going to be colored differently to distinguish which side of the grid the user is looking at. The models are called 'side1', 'side2', etc. When I apply a shader and texture to one of the models - all four sides have that color applied to them. No matter if I apply the color to different sides, or just one side - they will all be the same color, as if they are all linked. The code is correct ...

  1. #1

    Default Shader Issue

    Hi there,

    I have a grid created in Maya. The grid has 4 additional sides (models) coming
    off the grid, that are going to be colored differently to distinguish which
    side of the grid the user is looking at. The models are called 'side1',
    'side2', etc.

    When I apply a shader and texture to one of the models - all four sides have
    that color applied to them. No matter if I apply the color to different sides,
    or just one side - they will all be the same color, as if they are all linked.
    The code is correct because I can color in a different models using the same
    function, it will not work with these four 'side' models.

    Has anyone else come across this or know why it may be happening? I have
    exported the Maya scene many times in many different ways. It seems to only be
    these four models that are affected.

    Thanks
    Lis

    Lisa Phillips Guest

  2. #2

    Default Re: Shader Issue

    Hi LISA,
    I don't know anything about your "code",but it seems that you have a multiple
    shader there.
    In this case,is about shaderList and the script should look like this one:
    w.model("side1").shaderList[1] = w.shader("whatever_1")
    w.model("side2").shaderList[2] = w.shader("whatever_2")
    Anyway, just play with these commands (change the model name and shaderList
    number to get the desired result).
    cheers


    necromanthus Guest

  3. #3

    Default Re: Shader Issue

    Thanks for the help necromanthus.

    Shaders were created for each model, so when I output the shaderlist, it only
    returned one shader.

    I have however worked a way around the problem (by hacking it unfortunately).
    I think it may be somehow related to the model resources, as they all used the
    same model resource in Maya.

    I ended up deep-cloning each side, attaching the shader, and deleting the
    original model. That seemed to be the only way it would work. However, it is
    working now, so I won't complain.

    However, since they all used the same model resource in Maya, could this be
    why all four models (sides) on the grid got shaded when I only shaded one model?

    Thanks
    Lis

    Lisa Phillips Guest

Similar Threads

  1. shader and reflections
    By otterman in forum Macromedia Director 3D
    Replies: 2
    Last Post: October 16th, 03:39 PM
  2. Cannot set shader in world
    By Max in forum Macromedia Director 3D
    Replies: 10
    Last Post: February 5th, 12:37 PM
  3. Shader issues
    By Rastermaster in forum Macromedia Director 3D
    Replies: 1
    Last Post: March 23rd, 04:17 PM
  4. Blend 2 textures on a shader
    By Denis M webforumsuser@macromedia.com in forum Macromedia Director 3D
    Replies: 2
    Last Post: December 13th, 02:21 PM
  5. Problems with Shader Swapping
    By palcrypt webforumsuser@macromedia.com in forum Macromedia Director 3D
    Replies: 2
    Last Post: August 4th, 09:11 PM

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139