7 Replies Latest reply on May 3, 2006 8:41 AM by Mazuho

    Exporting data from 3dsMax file

    Mazuho
      This is a kind of side problem I have to deal with before I can contiune with what I have going in my previous thread.

      I've been reading around and I have realized that for AI pathfinding I'm going to go with setting up nodes (dummies in my 3dscene) for the AI to use. So I understand I need to export the information concerning the nodes from 3dsmax and then store that in a text member in Director? Well... how do I do that?
      Thanks
        • 1. Re: Exporting data from 3dsMax file
          Level 7
          You can write a custom MAXScript in order to read the dummies transforms and
          output them to a XML file.


          • 2. Re: Exporting data from 3dsMax file
            Mazuho Level 1
            I can't help but see this as a very daunting task. Is this the only way? It wouldn't be possible to do it director? I have no experience at all with maxscrpting... What I'm thinking is to store all the transforms necessary in a text cast member only once, and deactivate the script afterwards. Am I missing something completely here?
            • 3. Re: Exporting data from 3dsMax file
              Level 7
              Yes, you could just do it in Director. You could export your w3d with only
              the nodes in it, then import that into Director. Create a script that grabs
              the transform info from each of your nodes and stick that into a text
              member.

              --
              Dave -
              Adobe Community Expert
              www.blurredistinction.com
              www.macromedia.com/support/forums/team_macromedia/


              • 4. Re: Exporting data from 3dsMax file
                PpHammer Level 1
                Why would you want to use dummies in the first place?
                Max dummies are normally exported as groups. Don't know if you can use their info? But you can always use simple boxes (or even simpler (geometry) objects) as your nodes. Store the data in a list and remove/delete your nodes. Or simply make them invisible if you still want to keep them for future references.
                • 5. Exporting data from 3dsMax file
                  Mazuho Level 1
                  Reply to nr 4:

                  Yeah, I thought about doing that.. my pseudo code goes something like this:

                  x = number of nodes
                  repeat with i = 1 to x
                  cast ray out in x and y and count only the nodes hit (if wall is hit don't count)
                  save all the other nodes hit as neighbor to the casting node
                  save the worldposition of node

                  It might work no? So I'm only going to execute this script once on every level in authoring to get the info I'm after. Please post any comments and suggestions you have!

                  Reply to nr 5:
                  I'm quite sure it is possible to get the data of groups... I think it's possible to count them (groups.count) and store their worldposition. But do you think I'll get better control with normal cubes instead?
                  • 6. Re: Exporting data from 3dsMax file
                    PpHammer Level 1
                    After a quick glance I think you can retreive usefull data from groups as well.
                    Personally I'd still go for simple geometry as nodes in the first place. I don't think you'll get much more control with it, but it is easier to work if you can see your nodes as objects in your w3d scene. Dummies are not as easy to spot.
                    The geometry nodes don't have to be there for ever. If everything works fine you can always hide/delete (after storing their data) them.
                    • 7. Re: Exporting data from 3dsMax file
                      Mazuho Level 1
                      Very good point Pphammer. For debugging purposes I clearly see the advantage of having visible geometry as nodes. Thanks for being a step ahead of me ^^
                      I'll have a go at my pseudo for the next few days, if I succeed, I'll add this part to the tutorial I'm going to write. Thanks everyone!