BG1, PRELOAD BG2, PRELOAD

Results 1 to 10 of 10
  1. #1

    Default Indestructible material

    Dark matter is indestructible, but it's also immutable. It would be fantastic to have a material that cannot be broken by physical stress (material that won't go "crunch") that is also moveable.

    There a few applications this has. The big one I can think of is for making intentional collisions between two solid objects, where you don't want your objects breaking by accident in the process. Another case is when using small loose objects in and around large machinery bits... smaller objects are more brittle than large objects and can easily get broken if they snag on the larger object.

  2. #2
    Nope! It's Chuck Testa Gilgamesh's Avatar
    Points: 31,646, Level: 54
    Level completed: 73%, Points required for next Level: 304
    Overall activity: 0%
    Your First Group 10000 Experience Points 5000 Experience Points 1000 Experience Points 500 Experience Points
    PSN
    Jirugameshi
    Join Date
    Nov 2008
    Location
    Montreal
    Posts
    2,659
    Blog Entries
    81

    Default

    I've done some tests on material destructibility myself.

    It seems the general rule the engine follows is :
    -Lighter objects are crushed by heavier objects.
    and
    -Smaller objects are crushed by bigger objects.

    Through my experiments I've also noticed that the whole "crushing" aspect may be a method to avoid weird behavior with collision detection in the physics engine.

    For instance, I made a pipe shape out of stone and made it spin incredibly fast. I put random objects in it to see how fast the pipe had to spin in order to destroy what was in it. When big chunks of stone were put inside the pipe, they would actually phase through the pipe walls and spin outside of the pipe for a moment before being crushed, this happened with golf balls also and is definitely an oddity of the collision detection. Additionally, if the piece of stone was big enough, the pipe was crushed instead of the stone piece.

    For this reason, I think if some materials could be made indestructible, they would reveal flaws in the collision detector and things would be phasing through objects. It would be fun to be able to make grabable objects "near" indestructible (like stone) though.
    Last edited by Gilgamesh; 03-03-2009 at 03:25 PM.

    Midnight Revenge

    SackMech II
    Training

    SackMech I
    Trailer | Mission 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7

  3. #3
    DNA Reprogrammer Thegide's Avatar
    Points: 20,467, Level: 43
    Level completed: 69%, Points required for next Level: 283
    Overall activity: 0%
    7 days registered 5000 Experience Points 1000 Experience Points 500 Experience Points 250 Experience Points
    PSN
    Thegide
    Join Date
    Dec 2008
    Location
    Canaderp
    Posts
    1,611
    Blog Entries
    9

    Default

    I have a hunch you're absolutely right on this. As soon as the collision detection finds that one object has violated the space occupied by another object it destroys one of them.

    But, we have dark matter which never breaks, even though objects can collide into it, so its theoretically possible...

  4. #4

    Default

    Dark matter just trumps the other objects, so they break instead of it.

  5. #5
    Nope! It's Chuck Testa Gilgamesh's Avatar
    Points: 31,646, Level: 54
    Level completed: 73%, Points required for next Level: 304
    Overall activity: 0%
    Your First Group 10000 Experience Points 5000 Experience Points 1000 Experience Points 500 Experience Points
    PSN
    Jirugameshi
    Join Date
    Nov 2008
    Location
    Montreal
    Posts
    2,659
    Blog Entries
    81

    Default

    I get the feeling Dark Matter is a special case. I feel it isn't calculated in the physics engine at all, but it is calculated in collision detection. I have seen objects phase through Dark Matter when given enough stress though.

    I've also recently come across an odd bug that caused two pieces of Dark Matter to exist in the same place at the same time, while remaining two different pieces.

    Midnight Revenge

    SackMech II
    Training

    SackMech I
    Trailer | Mission 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7

  6. #6
    DNA Reprogrammer Thegide's Avatar
    Points: 20,467, Level: 43
    Level completed: 69%, Points required for next Level: 283
    Overall activity: 0%
    7 days registered 5000 Experience Points 1000 Experience Points 500 Experience Points 250 Experience Points
    PSN
    Thegide
    Join Date
    Dec 2008
    Location
    Canaderp
    Posts
    1,611
    Blog Entries
    9

    Default

    Even if dark matter does trump other objects, it wouldn't be impossible to implement an indestructible material.

    Once the collision system detects a crash, reverse the trajectory vector of the mobile object(s). Instead of destroying the object, make it bounce back, despite the fact it may have violated another object's space.

    Right now I get the feeling that the fact objects break from collisions is more of a band-aid solution to cover up a suboptimal collision detection algorithm than it is to imitate reality.

  7. #7

    Default

    Quote Originally Posted by Thegide View Post
    Even if dark matter does trump other objects, it wouldn't be impossible to implement an indestructible material.

    Once the collision system detects a crash, reverse the trajectory vector of the mobile object(s). Instead of destroying the object, make it bounce back, despite the fact it may have violated another object's space.

    Right now I get the feeling that the fact objects break from collisions is more of a band-aid solution to cover up a suboptimal collision detection algorithm than it is to imitate reality.
    Objects do bounce back. The times they don't is because something is telling them that they must move in that direction. For example, being on a piston that is pushing the object through another material.

    The crushing mechanism isn't a property programmed into the materials. It's an error detection system utilized by the game that destroys objects that are acting in a manner the physics simulation cannot otherwise handle.

  8. #8

    Default

    No, the collision detection is not the major problem. The system works a bit like you describe as "bouncing back" - all collisions and inter-object connections are seen as motion constraints. The system tries to relax all constraint violations by gradually "bouncing back" a couple of times. If not all constraints could be satisfied within a couple of iterations, the game will start breaking things to achieve this goal, starting with the weakest object or connection.

    Since the computing capacity - and therefore the number of relaxing iterations possible per time frame - is limited, an unbreakable object is only possible if it's either immutable or if it cannot collide with other objects.

    For more background info, there's always http://en.wikipedia.org/wiki/Verlet_integration.

  9. #9
    DNA Reprogrammer Thegide's Avatar
    Points: 20,467, Level: 43
    Level completed: 69%, Points required for next Level: 283
    Overall activity: 0%
    7 days registered 5000 Experience Points 1000 Experience Points 500 Experience Points 250 Experience Points
    PSN
    Thegide
    Join Date
    Dec 2008
    Location
    Canaderp
    Posts
    1,611
    Blog Entries
    9

    Default

    Hmm, very interesting read.

    But what then about a more forceful approach if a constraint cannot be relaxed after x iterations, such as relocating the object to the last unconstrained location?

    Obviously other games have successfully handled this, but none have been anywhere near as open-ended as LBP in terms of what they were designed to accommodate.

  10. #10

    Default

    Quote Originally Posted by Thegide View Post
    Hmm, very interesting read.

    But what then about a more forceful approach if a constraint cannot be relaxed after x iterations, such as relocating the object to the last unconstrained location?

    Obviously other games have successfully handled this, but none have been anywhere near as open-ended as LBP in terms of what they were designed to accommodate.
    This would not work. As described it would just create a crash loop, with the object basically freezing instead of being destroyed. Crushing is an absolutely crucial part of the LBP game engine. When two things get told to move into the same space, one of them is crushed. The game can't decide to change the instructions the level creator gave it and start having, for example, pistons move in a different direction. That's not possible. No game does this. Some games use ragdoll physics for very simple predefined objects that are free to move as force is applied. No game other than LBP is entirely run off a user defined physics simulation.

    I'm not sure what people are even thinking of using this for. I have yet to have something break on me that wasn't caused by creator error (typically forgetting to set a piston stiff). The only thing that could be done is to have a material that was just under dark matter in the crushing priorities calculation. This would not stop crushing, it would just make it so the other object was crushed. For example, you could drag the indestructible object to use as a door jam and it would crush the door instead of being crushed by the door.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •