Professional Web Applications Themes

just trying to make my shader's texture not squish to fit the plane.. - Macromedia Director 3D

I thought I already knew how to do this, but I can't seem to get it to work.. I have 3d planes and I'd like to display a texture on them, made from a text cast member image, but obviously I'd like the letters/pixel aspect ratio to be square, and not be squished when the texture is applied to the plane mesh (Stretching to fit). Is there a command which will make my texture simply stay in proportion when applied to the mesh (so its width scale, scales to the width of the plane mesh, but its bottom part extends ...

  1. #1

    Default just trying to make my shader's texture not squish to fit the plane..

    I thought I already knew how to do this, but I can't seem to get it to work..
    I have 3d planes and I'd like to display a texture on them, made from a text cast member image, but obviously I'd like the letters/pixel aspect ratio to be square, and not be squished when the texture is applied to the plane mesh (Stretching to fit).

    Is there a command which will make my texture simply stay in proportion when applied to the mesh (so its width scale, scales to the width of the plane mesh, but its bottom part extends past the bottom of the plane... then the text, texture, can be scrolled by modifying the texture transform)

    I cant seem to find anything to help me out, except the commands for tiling or non tiling...

    I'm thinking I might just have to create a function that compares the size of the plane (converted to screen x/y coordinates) and the size of the text member's image.. and then find the required scale % for the texture that way.... does that sound about right?


    kemical webforumsuser@macromedia.com Guest

  2. #2

    Default Re:just trying to make my shader's texture not squish to fit the plane..

    actually, another problem that i cant seem to solve that is related..

    i am dynamically creating planes, they all use the same texture, but each plane varies in size.. because of this, the texture is scaled differently on each plane, i want the texture to just tile at its original size, so that it looks the same on each plane (just more tiled texture shown on the larger ones....), if the planes are all at the same distance from the camera obviously....

    i cannot figure out how to do this, and it seems like its something stupidly simple.. i dont know what i'm forgetting or missing.

    i've been trying to just figure out how much to scale the texturetransform by, (taking into account the actual pixel dimensions that each plane takes up, and then the texture size which is 256) but when i do what i think should work, it ends up scaling the texture... but still scaled to the plane's dimensions.. its really getting annoying since im completely lost with this one.. haha





    kemical webforumsuser@macromedia.com Guest

  3. #3

    Default Re:just trying to make my shader's texture not squish to fit the plane..

    ok, so finally i realized that they all keep scaling the same because when i tell it to scale, it scales the shader that they all use... so basically the last plane to do the scale code i have ends up setting all the other textures exactly the same as it, which messes it all up...

    so in order to do this i'm going to need a new shader for every plane... ?


    kemical webforumsuser@macromedia.com Guest

  4. #4

    Default Re:just trying to make my shader's texture not squish to fit the plane..

    Nevermind.. I still havn't found the true answer to my problem, but I found that using texturemode = #reflection , it does exactly what i need more or less... (well, the texture doesnt move with each plane, but the reflection map way is more fitting, since the planes look like they are masking out a larger tiled texture behind them, .. it looks cool... yay. :D)




    kemical webforumsuser@macromedia.com Guest

  5. #5

    Default Re: just trying to make my shader's texture not squish to fit the plane..

    Hi Kemical,

    Here's an example movie that scales the width of a text cast member to
    a 3d plane while maintaining the original proportions of the text cast
    member:

    [url]http://forgefx.com/posts/textOnPlane.htm[/url] <- 39k demo
    [url]http://forgefx.com/posts/textOnPlane.zip[/url] <- 62k source

    This also shows scrolling via the shader.textureTransform.position
    property.

    Cheers,

    Adam
    Adam Kane Guest

Similar Threads

  1. dragging a small texture around a HUGE plane
    By Jez C in forum Macromedia Director 3D
    Replies: 1
    Last Post: August 16th, 05:14 PM
  2. Moving a texture layer around a plane
    By Jez C in forum Macromedia Director 3D
    Replies: 2
    Last Post: August 14th, 03:43 PM
  3. Plane only shows texture on one side
    By mufc 1974 in forum Macromedia Director 3D
    Replies: 2
    Last Post: October 31st, 03:00 PM
  4. Plane Texture Problem
    By sinopsis in forum Macromedia Director 3D
    Replies: 1
    Last Post: August 5th, 03:55 PM
  5. A portion of a texture/plane transparent...?
    By Lovehina in forum Macromedia Director 3D
    Replies: 1
    Last Post: April 25th, 01:06 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