Draw inside 3D world using passed vertices

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

  1. #1

    Default Draw inside 3D world using passed vertices

    Hello,

    I would like to dynamically feed (from another program) a series of
    consecutive vertices (x,y, so they are all on the z=0 plane) into a 3D world in
    shockwave to draw a closed polygon. I have figured out how to do this, but
    then trying to figure out how to fill in the shape using a series of triangular
    faces is a nightmare. Does anyone know of a way to dynamically draw a shape
    inside a 3D world using vertices but having the shape be filled in once the
    vertices are drawn. The sequence of vertices can make any shape (e.g. L-shape,
    U-shape, others...) so trying to come up with simple logic to fill in the
    triangles is not feasible. Ideally, I would like to draw a plane but instead
    of it being rectangular, feed it a series of vertices to represent its size and
    shape. Can anyone help me?

    Thanks in advance.
    Max

    vanessaemma Guest

  2. Similar Questions and Discussions

    1. create text inside a 3D world
      hello; I would like to have a sign in a 3d world, hanging from a wall maybe or a sign in front of a building; the text that I would like to...
    2. How to draw an arrow head inside a path?
      Hi, when I add the arrow effect to a path, the arrow head exceeds the path endpoint due to the fact that the arrow center is placed at the anchor...
    3. #25879 [Opn->Bgs]: SORT_ASC when passed into a function can NOT be passed as a string
      ID: 25879 Updated by: mgf@php.net Reported By: it at oh-barcelona dot com -Status: Open +Status: ...
    4. #25879 [Bgs->Opn]: SORT_ASC when passed into a function can NOT be passed as a string
      ID: 25879 User updated by: it at oh-barcelona dot com Reported By: it at oh-barcelona dot com -Status: Bogus...
    5. #25879 [NEW]: SORT_ASC when passed into a function can NOT be passed as a string
      From: it at oh-barcelona dot com Operating system: Windows PHP version: 4.3.2 PHP Bug Type: Variables related Bug...
  3. #2

    Default Re: Draw inside 3D world using passed vertices

    I've never done it myself, but this is a classic polygon fanning problem and
    is not a trivial matter to solve by yourself.

    Try a google search for "solving convex and reflex vertices".
    also try "triangulating polygon algorithm"

    Any job like this would be quite CPU intensive, and for your brain too!

    Hope that's a start at least.

    Richard



    Richard Guest

  4. #3

    Default Re: Draw inside 3D world using passed vertices

    Thanks Richard.

    I actually know how to mathematically solve the problem, but it is the
    processing power situation that I am trying to avoid. If I were using
    Shockwave but NOT in a 3D world, I could simply draw a vector shape and add
    vertices as I need them to create any shape, and it would automatically be
    'filled in'. Drawing this same shape in a 3D world however, seems to be a
    whole different story. Given that the shape does not need a 3rd dimension
    (height), does anyone else have any suggestions on how I might solve this
    problem? Can a vector shape somehow be created and then brought into the 3D
    world?

    Max

    vanessaemma Guest

  5. #4

    Default Re: Draw inside 3D world using passed vertices

    You could try and grab the image of a vector member and use it as a texture
    mapped to a plane?

    You may need to rescale your plane to match the dimensions of the vector
    member. Or try to make the rect of the vector member you a re grabbing a
    square with a power2 ratio. 2,4,8,16,32,64,128,256,512 etc.

    You'd need to make the textureRenderFormat #rgba8888 though if you want an
    alpha mapped edge.

    Richard


    Richard Guest

  6. #5

    Default Re: Draw inside 3D world using passed vertices

    You could try is a simple trick: Do you know the extruded 3D Text? You can not
    only extrude text members but also vector members: 1) feed your coordinates
    into a vector shape member 2) create a dummy text and extrude this into a a
    3dModel of a 3d member 3) drop the 3DModel Ressource and apply the VectorList
    of the vector shape member 4) Thats it, You can deine the height of the
    extrude Memeber, e.g to zero as you like to do 1) --make newVector newVector
    = new(#vectorShape) VectorMem = newVector.member VectorMem.vertexList = []
    VectorMem.closed = True --feed Vector Member vertexCount =
    VectorMem.VertexList.count + 1 VectorMem.addVertex(vertexCount, point(XKoord,
    YKoord)) -- your Vertices theVertexList = VectorMem.VertexList 2) -- create
    dummy text and extrude it textmember = member('DummyText') --extrude the text
    member's string into a 3D cast member extruderResource =
    textMember.extrude3d(member('3D')) 3) --replace dummy text with your vertex
    List --update model resource extruderResource.vertexList = VectorMem.vertexList
    --apply model member('3D').newModel('myModel', extruderResource) 4) --
    define Height of extrusion member('3D').model('myModel').resource.tunnelDepth =
    yourHeight

    lukeskywalker Guest

  7. #6

    Default Re: Draw inside 3D world using passed vertices

    Oooh smart! Never used 3Dtext before, nice trick.

    Richard


    Richard Guest

  8. #7

    Default Re: Draw inside 3D world using passed vertices

    I was going to suggest the vector - extruded text trick as well. I think Tom
    Higgins has had an example of that on his site for a couple years now. I
    built a whole 2D - 3D gallery creator thingy using this technique. If I can
    dig it up, I'll throw it online.

    --
    Dave
    [url]http://www.blurredistinction.com/director[/url]
    Team Macromedia Volunteer
    [url]http://www.macromedia.com/go/team[/url]


    Dave Mennenoh 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