Tech Support Blog

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Tuesday, 24 February 2009

Hard Object Weirdness (or Don't Count On Bugs)

Posted on 10:19 by Unknown
ATTR_hard is the OBJ attribute that makes the geometry of an object mesh interact with X-Plane's physics engine.  ATTR_hard object has a long history of weird behavior, and its behavior in X-Plane 930 is no exception.

The History
  • Before X-Plane 815, hard surfaces acted horizontal regardless of the actual OBJ geometry.
  • From X-Plane 815-922, sloped hard surfaces work as expected, but vertical hard surfaces do not work.  Animation is ignored for hard surfaces.
  • Starting with X-Plane 930, animation commands affect hard surfaces.  However, vertical surfaces still do not work, and an animated surface does not create friction under the plane.  
(In other words, if you put the plane on a platform and move the platform horizontally, the plane will be pulled with the platform due to friction between the platform and the wheels.)

In all of these cases, what we have is a limited implementation that doesn't correctly capture all expected behaviors.  Why don't we have a better implementation?  There are two factors.
  1. In some cases a more correct implementation might take significantly more CPU power. It is important that we not raise the CPU requirements of X-Plane mid-version run.
  2. In some cases, we simply don't have a better implementation coded yet.  Remember that X-Plane is primarily a flight simulator.  My pilot friends tell me that it is bad form to collide the airplane with anything during flight.  So the goal of OBJ collisions is more to detect poor flying than to correctly model the resulting aftermath.  X-Plane is not GTA4!
What Do You Do With a Buggy Feature?

Very simple: don't use it if you can avoid it!  I don't mean "don't use ATTR_hard" - it has legitimate uses.  Rather I mean: don't depend on the buggy behavior as a feature.

For example, before 930, animation would affect the drawn but not physical OBJ.  I would say that given that bug, the only safe thing to do is to not animate hard objects.  Animating hard objects to take advantage of the schism between drawing and physics would be assuming that the bug will stay buggy forever.

What Can You Do Now?

In X-Plane 930 hard object animation is a lot better than it used to be, but still not quite correct.  The remaining limitations are:
  • There is no friction.  If you move a platform horizontally, the plane is not dragged along. So you can't really build horizontal elevators.  (You can build a platform that moves vertically and move the plane around that way.)
  • There is still not support for vertical hard surfaces.  Like before, to make a solid "wall", make the wall thick and make the top of the wall hard.  But bear in mind that the collision detection in this case is catastrophic; your plane will be heavily damaged by even minor contact with the wall.  X-Plane doesn't support horizontal collisions right now.
  • Hard surfaces are ignored for vehicles.  If you are replacing the car set, don't add hard surfaces - it might turn out that some future implementation does look at them - if that happened, how would you know what the CPU hit is?
Even given this limitation, you can now make a building with limited access controlled by animation; using a "deck" for the roof and a hard surface for the tops of the walls and the doors (which are animated) you can control access.

Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Posted in modeling | No comments
Newer Post Older Post Home

0 comments:

Post a Comment

Subscribe to: Post Comments (Atom)

Popular Posts

  • Developer Hardware
    So...just how awesome is my main development machine? Not that awesome. Periodically users ask me what my setup is. Usually the user wants...
  • That's one biiiiig polygon
    Something I'm seeing now that WED is in beta: airport layouts with the entire taxiway structure made from one really complex polygon. I...
  • Caught With My Pants Down
    My friends say I have become a technological curmudgeon...whenever a new gadget or device or operating system comes out, I just grumble abo...
  • Who Am I?
    This week we've seen an increase in questions from new users, potential customers (both in the consumer and professional spaces) and thi...
  • Mirrored Normal Maps
    Normal maps in X-Plane 940 have a funny property: if you flip the normal map horizontally or vertically, the bumps change direction. Things...
  • What is a panel region?
    X-Plane 9 introduces a new OBJ feature: panel regions. The basic idea is this: In X-Plane 8 you could use the 2-d panel as a texture in you...
  • The Future of WED
    WED 1.0 has gone RC . The on ly change from beta 5 is that I have the latest manual changes from Tom (including Cormac's illustrations ...
  • The 3-d Panel Is Not Always Necessary
    There is no need to use the 3-d panel if you only want 3-d cockpit. That might be the most counter-intuitive statement in the entire univers...
  • OS X 10.6.3 Performance
    OS X 10.6.3 is out. Besides adding a bunch of OpenGL extensions*, it looks like vertex performance is improved on nVidia hardware. My quic...
  • Bad Alloc Crashes in 920 - Bad Timing
    I just received a series of reports today that certain converted scenery will cause X-Plane to crash with a "bad alloc" error. Ba...

Categories

  • absurdly cute
  • Air Traffic Control
  • aircraft
  • Android
  • animation
  • announce
  • cockpits
  • documentation
  • drivers
  • file formats
  • global scenery
  • Goofy Screenshots
  • hacks
  • hardware
  • hobbies
  • inside x-plane
  • installer
  • ipad
  • iphone
  • legal
  • localization
  • modeling
  • off topic
  • palm pre
  • panels
  • performance
  • plugins
  • political
  • scenery system
  • tools
  • X-Plane 10
  • XSquawkBox

Blog Archive

  • ►  2011 (12)
    • ►  February (1)
    • ►  January (11)
  • ►  2010 (111)
    • ►  December (4)
    • ►  November (4)
    • ►  October (10)
    • ►  September (9)
    • ►  August (12)
    • ►  July (8)
    • ►  June (4)
    • ►  May (13)
    • ►  April (13)
    • ►  March (11)
    • ►  February (12)
    • ►  January (11)
  • ▼  2009 (130)
    • ►  December (16)
    • ►  November (11)
    • ►  October (6)
    • ►  September (16)
    • ►  August (12)
    • ►  July (11)
    • ►  June (9)
    • ►  May (5)
    • ►  April (10)
    • ►  March (9)
    • ▼  February (9)
      • Separate Specular Hilites and Per-Pixel Lighting
      • Hard Object Weirdness (or Don't Count On Bugs)
      • VOR Range
      • When To Cut a Beta
      • The Dangers of Wandering in the Desert
      • Scripting: A Line In the Sand
      • X-Plane 930 Beta
      • Catalyst Drivers - Get 9-1
      • Stuff I'm Looking At
    • ►  January (16)
  • ►  2008 (147)
    • ►  December (18)
    • ►  November (10)
    • ►  October (7)
    • ►  September (11)
    • ►  August (15)
    • ►  July (9)
    • ►  June (14)
    • ►  May (9)
    • ►  April (14)
    • ►  March (13)
    • ►  February (6)
    • ►  January (21)
  • ►  2007 (100)
    • ►  December (17)
    • ►  November (13)
    • ►  October (13)
    • ►  September (9)
    • ►  August (17)
    • ►  July (7)
    • ►  June (4)
    • ►  May (6)
    • ►  April (9)
    • ►  March (2)
    • ►  February (3)
Powered by Blogger.

About Me

Unknown
View my complete profile