Cube mapping possible in SW3D

Ask a Question related to Macromedia Director 3D, Design and Development.

  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

    markus halbritter Guest

  2. Similar Questions and Discussions

    1. sw3d Plugin for 3ds Max 9
      Hi all, I finally got my new copy of max 9! (yay me) It's bucket loads faster but there's one rather large problem with it THERE'S NO SW3D...
    2. New Anark 3.0 pricing and SW3D thoughts
      Well, I hope Intel and their U3D format can make it into a second revision of the SW3D engine for DMX 2005. What I saw as real comp. for SW3D,...
    3. Interior mapping of panoramic on to a cube..
      This has probably been asked/answered here, but I can not locate it, if it was. Can anyone point me in the right direction for the following: *...
    4. sw3d display problems on Mac OS 9 & X
      Hi there, I´m developing an application with which the user can change the colors and decors( logos, etc.) of cars. The textures (tiffs) are...
    5. Vectorworks into SW3D
      Hi does anyone know how to get a vectorworks model into shockwave (with the colours.) I can export to DXF, DWG,IGS etc. but they all lose their...
  3. #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 replicated 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

  4. #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

Posting Permissions

  • You may not post new threads
  • You may 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