Jump to content



Photo
- - - - -

3D Model/primitive pivot point explanation.

3D primitive pivot

  • Please log in to reply
5 replies to this topic

#1 dark

dark

    3D model-man

  • VIP
  • 1,936 posts
  • Location:Toronto

  • Flag: Canada

  • Favorite Pinball: Star Wars, AbraCadaBra,MB, LAH,JPark...too many to choose!

Contributor

Posted 18 August 2014 - 04:10 PM

Okay I've decided to make this thread as an explanation of how pivot points on 3D mesh's are determined for VP since I keep having to re-explain it time and time again, I figured it would be easier for me to just make a thread that thoroughly explains how it works that I can use for future referencing.

 

In 3D software, in my case 3D Studio Max, you can move the pivot point where ever you like, typically you center it to object but some times it may need to be some where else, like for example for a door, the pivot needs to be where the hinges are instead of center so it acts like a door with hinges and not a revolving door.

 

The thing is, once you export the object/model as a .obj for importing into VP, it will ignore this pivot point and use the world axis center as the pivot point instead.  The world axis is the center point of the 3D world environment which is highlighted in yellow in this pic below.  In this pic the object is lined up so that its pivot point center is lined up with the world axis center, you can see where the objects pivot is by the XYZ arrow/move gizmo.

pivot1.jpg

 

So as this is currently, we can rotate it on the X axis and it will rotate like a roller, but if we rotate it on the Y or Z axis it will rotate end over end.

Like so...

pivot2.jpg

 

If we have our object off center from the world axis center (the center of the grid) it will throw off the rotation of the object in VP.  In this next pic I have moved the objects pivot point to be at the world axis center while the object is moved away from the world axis center to demonstrate this.  An example of when you would intentionally want this, is Uncle Willy's Dracula in Monster bash, since he moves on an arc his pivot needs to be set away from him.

pivot3.jpg

 

So when we rotate this object on the Y axis it will go around the center world axis like so:

pivot4.jpg

So if you were ever wondering why objects when imported into VP are half way into the floor or rotate the way they do, hopefully this clears up any confusion on the subject.



#2 freneticamnesic

freneticamnesic

    A Faint Ghost Through the Raindrops

  • VIP
  • 3,369 posts
  • Location:Portland, OR

  • Flag: United States of America

  • Favorite Pinball: Star Trek, Black Hole, AFM, Fast Draw, Tron, AMH

  • 360 Gamer Tag: sixgunsounddd

Posted 18 August 2014 - 04:22 PM

Thank you! I spent a bit of time this weekend trying to get the pivot point working in blender for a gate primitive, and no matter where I moved the pivot point, it was still rotating center on the object. I finally figured out it was rotating at the center of the axis and move the object to line up with x/y 0,0 and it worked. It was so dumb.



#3 dark

dark

    3D model-man

  • VIP
  • 1,936 posts
  • Location:Toronto

  • Flag: Canada

  • Favorite Pinball: Star Wars, AbraCadaBra,MB, LAH,JPark...too many to choose!

Contributor

Posted 18 August 2014 - 04:29 PM

Thank you! I spent a bit of time this weekend trying to get the pivot point working in blender for a gate primitive, and no matter where I moved the pivot point, it was still rotating center on the object. I finally figured out it was rotating at the center of the axis and move the object to line up with x/y 0,0 and it worked. It was so dumb.

 

I first figured this out making that suitcase for you, which frustrated me to no end until I made the connection.  So if this thread can save even just a few people some time and frustration it will have been made worth while.

 

Happy to help.



#4 Shoopity

Shoopity

    Pinball Fan

  • Members
  • PipPipPipPip
  • 691 posts
  • Location:Colorado

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness

Contributor

Posted 18 August 2014 - 05:40 PM

Don't forget, also, depending on your software, you may have the option of exporting what is "Up" and what is "Forward".  In Blender, my default settings for exporting WaveFront is -Z Forward, Y Up (don't know if I set this or not).

 

Using your first picture as an example, with those settings it would import into VP like you see it; it would be like a log standing up on its end (halfway through the table).  Blender, by default, usually works with the z-axis being up.  I know I have to change it so that it is Y Forward, Z Up.

 

In VP, the X axis is left and right as expected.  The Y axis is up and down the table (towards the drain and away from the drain).  The Z axis is higher and lower (towards and away from the glass or the ground).

 

Again, just trying to save someone some time in the future if they're working in whatever 3D software they use, and they import the into VP and it's in a different orientation than what they working with.  You can either change the rotation/transposition in VP to compensate, or just export from the 3D software so as to match up the model's axis with VP's axis.



#5 dark

dark

    3D model-man

  • VIP
  • 1,936 posts
  • Location:Toronto

  • Flag: Canada

  • Favorite Pinball: Star Wars, AbraCadaBra,MB, LAH,JPark...too many to choose!

Contributor

Posted 18 August 2014 - 06:34 PM

Well XYZ directions should be universal between 3D software but in VP it's different which is why objects often need to be rotated by 90 when first imported (put on their backs).   The orientation of models have been the same between blender and 3DSmax in my experience, any time I import something from blender to max or reverse they appear in the same direction.

 

Views are like this:

 

3D software                            Visual Pinball

Top view              =                    Front view


Edited by dark, 18 August 2014 - 06:36 PM.


#6 penman

penman

    Hobbyist

  • Members
  • PipPip
  • 21 posts

  • Flag: United States of America

  • Favorite Pinball: Scared Stiff

Posted 29 December 2015 - 10:15 PM

I'm new to making Visual Pinball 9 tables as well as working with 3d models.  I was wondering how I can rotate the model?  Thank you :)


I'm new to making Visual Pinball 9 tables as well as working with 3d models.  I was wondering how I can rotate the model?  Thank you :)

Then again, I'm sorta able to figure it out.  Still, a ton of stuff I have to learn.







Also tagged with one or more of these keywords: 3D, primitive, pivot