XNA Creators Club Online
Page 1 of 1 (5 items)
Sort Posts: Previous Next

Either a really wierd glitch or a newbie glitch

Last post 08-28-2008 6:40 AM by lonestar. 4 replies.
  • 08-24-2008 2:59 AM

    Either a really wierd glitch or a newbie glitch

    Hi I would like to start by saying this is my first time ever posting on a forum, so forgive me if I don't have the exact edicate down. My glitch is kinda strange and I have been racking my brain trying to figure it out. Anyways when I import the .x or .fbx it centers all the objects to together and doesn't have them in respect to where they originally where when I modeled it.

     

    Here is the picture of the way it should look in side 3ds max

     

    and the way it looks inside xna(you can see the cylinders inside the model)

     

     

     

    Any help or ideas would be appreciated, thanks in advance.

  • 08-24-2008 3:36 AM In reply to

    Re: Either a really wierd glitch or a newbie glitch

    Looks like when you did your model you draw the Cylinders and then rotated and moved them to where you wanted them displayed. Doing this sometimes leaves your pivot points where the object was first drawn.

    I would make sure that all of the pivot points in your model are central to the main object. You have to remember that in code all of the onjects will rotate around the origin and the central pivot point for the models objects.

    One way that I normally work is to set up an empty object and make each of the other objects a child of the main. Then in code you place the main object in the position and the children will automaticly get placed in relation to the parent.

  • 08-24-2008 11:43 PM In reply to

    Re: Either a really wierd glitch or a newbie glitch

    Thanks for the reply. I am much closer to getting the result I want. Now I just need to figure out the math on how to get all the objects to rotate around a central point.
  • 08-25-2008 2:50 PM In reply to

    Re: Either a really wierd glitch or a newbie glitch

    We have been using single .fbx files exported from MAX that have several meshes in them.  Naturally, we have the same problem where all of the meshes that were exported into the same fbx show up at the origin with an unexpected orientation and scale (if we scaled them inside of MAX).

    We overcome this problem as such:

    1.) Build your scene inside of MAX as normal.  Do all your moving and scaling and rotating as you have already done.

    2.) Individually convert everything to an editable mesh if you haven't done so already.

    3.) Select the box in the center and then go to the Modify tab.  Click the 'Attach List' button and select the other meshes that will be part of the export (the two cylinders in your case).

    4.) At this point, you have sort-of one big mesh. Depending on how you use it, this may or may not be enough for you.  Most of the time you will want to break it back apart into the individual components.  If so, proceed to step 5.

    5.) Select the Editable Mesh, expand it under the Modify tab and select "Element".  This will let you select the individual pieces that you attached.  Select each element then click the "Detach" button and give it a name.  Repeat as necessary for each element you originally attached.

    Once you are done, each mesh will be properly oriented in your exported FBX.

     

    Granted, this is far from ideal in that it is a tedious process and is almost unusable if you have a large number of individual elements, but it has served us well over the last project.  We tried moving the pivot points manually and could not seem to get it right.  Then again, I'm no 3ds MAX expert :-(

     

    Good Luck!

    -Jeff


  • 08-28-2008 6:40 AM In reply to

    Re: Either a really wierd glitch or a newbie glitch

    Awesome man thanks for the advice I see how that would work. What I ended up trying was getting all the absolute bone references from the mesh which sets everything in its rightful place. But that led to a new problem everything rotates around its own point not around a center point (but the movement was correct). So my remedy to this was to choose a bone set each bone to that location, rotate, and then set it back to its original position. I now seek a more processor efficient way to achieve the same effect.
Page 1 of 1 (5 items) Previous Next
var gDomain='m.webtrends.com'; var gDcsId='dcschd84w10000w4lw9hcqmsz_8n3x'; var gTrackEvents=1; var gFpc='WT_FPC'; /*<\/scr"+"ipt>");} /*]]>*/
DCSIMG