Professional Web Applications Themes

Cube mapping possible in SW3D - Macromedia Director 3D

Hi, is there an extra or a trick to achieve cube mapping in SW3D? This would be great for simulating reflections. thank you, markus...

Sponsored Links
  1. #1

    Default Cube mapping possible in SW3D

    Hi,

    is there an extra or a trick to achieve cube mapping in SW3D?
    This would be great for simulating reflections.

    thank you, markus

    Sponsored Links
    markus halbritter Guest

  2. #2

    Default Re:Cube mapping possible in SW3D

    Good question !

    I've wondered this myself, I'm not aware of it in the docs. Director does spherical reflection mapping of course.

    I wonder if the effect could be ted by applying a standard wrap and updating the wrapTransform to the inverse vector derived from the direction of the object to the camera ?

    Rix


    Rix webforumsuser@macromedia.com Guest

  3. #3

    Default Re:Cube mapping possible in SW3D

    It's possible, if you do it by "manually".

    By manually I mean coding the cubemap UV mapping routines yourself, using lingo and the #meshdeform modifier, that allows you access to the texture coordinates in a given model. But it would end up pretty slower than if it were built in, because it'll not take advantage of the hardware cubemap extensions avaliable on GeForce3+ videocards, that can render a cubemap in a single pass.

    To produce a cubemap, you'll need 6 texture layers, and perform a projective mapping from the model's center for each layer, with 90 degrees between each projection. The textures would also need to have a 1-pixel fully transparent border around them, and have their textureRepeatList set to FALSE, the blendfuncitonlist set to #blend and the blendsourcelist set to #alpha.

    Unless you *need* cubemap accuracy, you can achieve similar, but not so accurate results by using the #refleciton mapping to fake some sort of dynamic cylindrical mapping for reflections.

    Pick your cubemap texture's sides, then use a image editor to build a single wide texture with the cube's sides (not top nor bottom: only the left, right, front and back sides), by having the sides put aside each other. This works WONDERS for reflecting skyboxes.

    Now, put that texture into a texutrelayer in a shader and set it's texturemode to #reflection.

    Then you scale teh textureTransform horizontally by 4.0. This will make only one "side" of the merged skybox visible. A further scaling might be needed due the camera's angle, but often you can get away with this. Now, the complicated part: you need to translate the texture horizontally based on the camera rotation along the vertical axis. This way you change the area of the texture shown reflected in the model, thus doing a really cool looking reflection effect.

    I'm using this effect in a lake in my current project. The lake uses #meshdeform to produce dynamic waves, and a proxy #mesh primitive for normal generation, that are copied back into the lake mesh. The water produces a *very* convincing reflection effect, that is affected by the weaves, and seems to reflect the envronment at a quick glance (the clouds and mountains you see reflected in the lake are the ones you see in the scenery - but it won't reflect nearby geometry, of course, since the texture "follows" the camera, thus can only properly reflect distant things, like the skybox's contents).



    Medion webforumsuser@macromedia.com Guest

Similar Threads

  1. sw3d Plugin for 3ds Max 9
    By w1zb1t@hotmail.com in forum Macromedia Director 3D
    Replies: 0
    Last Post: October 24th, 08:28 AM
  2. New Anark 3.0 pricing and SW3D thoughts
    By Lorax2003 in forum Macromedia Director 3D
    Replies: 7
    Last Post: February 18th, 11:04 PM
  3. Interior mapping of panoramic on to a cube..
    By Mike in forum Macromedia Director 3D
    Replies: 5
    Last Post: February 15th, 04:20 PM
  4. sw3d display problems on Mac OS 9 & X
    By rtomada webforumsuser@macromedia.com in forum Macromedia Director 3D
    Replies: 0
    Last Post: November 21st, 03:26 PM
  5. Vectorworks into SW3D
    By Rob in forum Macromedia Director 3D
    Replies: 1
    Last Post: October 3rd, 04:21 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