Professional Web Applications Themes

space partitioning - Macromedia Director 3D

Hello! I have made a 3d scene in 3d studio max, it has 20 000 polygons.It works acceptable but not on eny computer. for collision detection i have used modelsUnderRay function but for this number of polygons it is not so good. I heard at a friend of mine that he is using space partitioning in his 3d c++ applications.How can i use it in director? From where can i learn about it? What better collision detection function can i use and from where can i learn how to use it in director?...

  1. #1

    Default space partitioning

    Hello! I have made a 3d scene in 3d studio max, it has 20 000 polygons.It works
    acceptable but not on eny computer. for collision detection i have used
    modelsUnderRay function but for this number of polygons it is not so good. I
    heard at a friend of mine that he is using space partitioning in his 3d c++
    applications.How can i use it in director? From where can i learn about it?
    What better collision detection function can i use and from where can i learn
    how to use it in director?

    DANGH_b Guest

  2. #2

    Default Re: space partitioning

    - Segment your 3D scene into different sections, each belonging to a different
    group that will be turned into a model at export time. - Create additional
    models that are basically made of the real models' bounding boxes and bounding
    spheres. Attach them all to the same group - 'collision detection' - that will
    be turned into a model at export time. - Export your scene as a W3D file. -
    To detect collisions in Director in an enterFrame script: first erase all
    models using removeFromWorld(). Display the collision detection model using
    addToWorld(). Cast a ray in the direction the user wants to move to detect
    collision. Discard the collision detection model using removeFromWorld(). -
    Use Lingo to determine what section to display (view frustrum) using
    addToWorld() and take appropriate action if a collision has been detected.
    Cheers, Karl.

    Newt99 Guest

  3. #3

    Default Re: space partitioning

    dont forget to take a look at this thing:
    [url]http://www.macromedia.com/cfusion/knowledgebase/index.cfm?id=tn_19118[/url]

    there you can specifie the models that will be checked by the modeslunderray
    command.

    you could create different groups of models that are in your different
    sections. then use these modellists together with the modelsunderray thing.

    if you want to check wich modellist should be used you can place some empty
    group objects in your scene and check the distance to them.

    if you have for example four sections, place in the middle of every section a
    empty group object. then put all models that should be involved in the
    collision detection for one sector in a list. then if you move around you just
    have to check the distance to the emptygroup objects in a repeat loop and
    change the list of collision models.

    and you have to figure out a detection that lets you know wich sectors are
    possible to enter next, because they have to be included in your collision
    detection.



    hondo3000 Guest

Similar Threads

  1. Partitioning Postgresql
    By phil campaigne in forum PostgreSQL / PGSQL
    Replies: 3
    Last Post: January 26th, 11:24 PM
  2. Advantage of partitioning?
    By no body in forum Linux Setup, Configuration & Administration
    Replies: 48
    Last Post: July 29th, 09:57 PM
  3. Partitioning HDD
    By Spinner in forum Windows XP/2000/ME
    Replies: 0
    Last Post: June 30th, 04:45 AM
  4. partitioning tables
    By Albert Punsola in forum Oracle Server
    Replies: 2
    Last Post: December 29th, 08:00 PM
  5. debunking partitioning
    By Mikito Harakiri in forum Oracle Server
    Replies: 0
    Last Post: December 5th, 06:53 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