Jump to content




Photo
* * * * * 13 votes

VP physics overhaul


  • This topic is locked This topic is locked
1002 replies to this topic

#621 BigBoss

BigBoss

    Pinball Fan

  • VP Dev Team
  • PipPipPipPip
  • 722 posts

  • Flag: ---------

  • Favorite Pinball: Attack From Mars, Metallica, Theatre Of Magic, Shadow, Star Trek

Posted 18 May 2014 - 11:13 AM

Sure, why not. I don't think it will fix all your problems since this was a new bug in phymod4 and you already had many problems in physmod3, but let's see how it shakes out.

Cool. There's a chance that the ball-dropping-off-the-table bug you fixed helps also.

#622 mukuste

mukuste

    Pinball Fan

  • VP Dev Team
  • PipPipPipPip
  • 854 posts

  • Flag: ---------

  • Favorite Pinball: Centaur

Posted 18 May 2014 - 11:24 AM

Download a test build of the physics mod below.

Press F11 to get a visualization of ball spin.

Old VP tables will not work with this version unmodified!

 

Changes since physmod4:

  • Bugfix to keyboard nudging, ball now returns much closer to its original position. Nudge Time should also be set a bit higher now, 10-20 seems ok.
  • Fixed ball dropping through table when hitting walls at a certain angle.
  • Fixed ball dropping through table when hitting upper edge of walls from the outside.
  • Fixed bug with start/end posts of ramps being located at the wrong height.
  • Default table is now included in the executable, use File > New to load it.

This version also has the latest updates from VP 9.9.0.

 

Basic instructions for adapting tables: https://github.com/c...to-vp10-physics

Description of physics parameters: https://github.com/c...ki/VP10-Physics

Attached Files


Edited by mukuste, 18 May 2014 - 04:49 PM.


#623 BigBoss

BigBoss

    Pinball Fan

  • VP Dev Team
  • PipPipPipPip
  • 722 posts

  • Flag: ---------

  • Favorite Pinball: Attack From Mars, Metallica, Theatre Of Magic, Shadow, Star Trek

Posted 18 May 2014 - 11:34 AM

Thanks so much. Now to get started on testing :)

#624 unclewilly

unclewilly

    sofa king.....

  • VIP
  • 4,716 posts
  • Location:Baltimore, Maryland

  • Flag: United States of America

  • Favorite Pinball: tz, tom, big hurt, who dunnit



Posted 18 May 2014 - 11:38 AM

Sweet. I'm off tomorrow. I can play with this a bit after working on fire.
Want to get a mb and fire physics mod versions set up

"it will all be ok in the end, if it's not ok, it's not the end"
 
Monster Bash VP10 WIP https://dl.dropboxus... (vpx)WIP15.vpx

uw2.gif


#625 BigBoss

BigBoss

    Pinball Fan

  • VP Dev Team
  • PipPipPipPip
  • 722 posts

  • Flag: ---------

  • Favorite Pinball: Attack From Mars, Metallica, Theatre Of Magic, Shadow, Star Trek

Posted 18 May 2014 - 02:15 PM

Ok. Here is an emptied table you can see some ramp issues. If you play with physmod2, the ramps are great. If you play on physmod4, you cant make the ramps at all. The problems seems to be:

Right ramp:
Wall65. This is the metal wall that holds the gate, which is implemented as a spinner. The metal is bottom 87 top 90 height. The ramp below it is 0-5. Should be plenty of clearance. If you delete wall65, right ramp is fine.

Left ramp:
This has multiple issues. First is wall34. Same as right side. Delete this and you can enter the ramp. Without deleting that, the ramp is blocked like a wall is in front. 

Once wall34 is removed....then the ball will fly off the ramp. The ramp goes from 0-70 (LRamp), 70-90 (Ramp370), 90-120 (Ramp390). If you right click on ramp390 you can see there is also another ramp above it, ramp 371. This is at height 150-180. This is also a collidable ramp. If you disable the collision property on this ramp371, the ball is fine and the ramp works. But 150-180 should be plenty high for a ramp 90-120 below it. I suspect somehow it transitions from ramp370 at 90 to ramp 371 at 150 and flies off the end. But even that doesn't make too much sense to me since ramp371 curves. The ball should follow that curved path.

Finally, if you delete wall34 and ramp371, there is still some really weird friction or momentum on the ball after hitting these ramps and failing shots. Almost to the point I thought my analog nudge sensor was on the fritz.

 

Here's the table. Just hit launch ball to have a ball come out (you can hit again if ball drains or gets stuck or if you want more) and make the shot with flippers.

Attached File  arfmbug.vpt   17.05MB   69 downloads


Edited by BigBoss, 18 May 2014 - 02:17 PM.


#626 mukuste

mukuste

    Pinball Fan

  • VP Dev Team
  • PipPipPipPip
  • 854 posts

  • Flag: ---------

  • Favorite Pinball: Centaur

Posted 18 May 2014 - 02:54 PM

BB: I can't run that table at all, no matter which version... I can load it, but when I hit Play, it flashes briefly and then quits the player back to the editor. I've never seen that before, have to figure out what's going on...



#627 ringorian

ringorian

    Enthusiast

  • Members
  • PipPipPip
  • 193 posts

  • Flag: Germany

  • Favorite Pinball: road show

Posted 18 May 2014 - 03:19 PM

Maybe Global overwrite physic Set on with some number ?

Gesendet von meinem HTC One mit Tapatalk



#628 Slydog43

Slydog43

    Pinball Wizard

  • Platinum Supporter
  • 2,545 posts
  • Location:Hackettstown, NJ

  • Flag: United States of America

  • Favorite Pinball: Addams Family, All Williams 90's Games

Posted 18 May 2014 - 03:28 PM

after hitting F11 I don't see the green dots on the ball anymore, I actually liked watching the ball spin and its cool to show people how this version is so much better than standard VP 9.9.   Thanks for the update



#629 BigBoss

BigBoss

    Pinball Fan

  • VP Dev Team
  • PipPipPipPip
  • 722 posts

  • Flag: ---------

  • Favorite Pinball: Attack From Mars, Metallica, Theatre Of Magic, Shadow, Star Trek

Posted 18 May 2014 - 04:20 PM

BB: I can't run that table at all, no matter which version... I can load it, but when I hit Play, it flashes briefly and then quits the player back to the editor. I've never seen that before, have to figure out what's going on...

Oops sorry, try disabling the global physics override in backdrop. I think it was based off one of the first where I thought it was a good idea to have a set global override so I could globally tweak all my physics. If you don't have a set imported, VP crashes instantly.



#630 Sunskift

Sunskift

    Enthusiast

  • Members
  • PipPipPip
  • 96 posts

  • Flag: Sweden

  • Favorite Pinball: TBD

Posted 18 May 2014 - 04:28 PM

Tested melons CFTBL again after updatong to physmod5.
Now the CFTBL test table plays normal and the earlier stuck ball in the outer loop is fixed.
The general feeling playing physmod5 is AMAZING !
The overall description is controll. You can make the shots you see in your mind. You just work the flippers and it happens! Being the newbee I am, I imediately made a new high score. I think a trippled my earlier score right of the bat.
Physmod5 is also the smoothest version I have tried.
This is really prommising for the future of VP!
Thanks for all your efforts!
46", 32", PinDMD2-Vishay DMD, MK MSI Z87-G43 ATX Motherboard, Intel Core i7 4770K 3,5 GHz Processor, 16GB, ASUS GTX760 for the Playfield, ASUS GT610 for the Backglass (driver 334.89), Intel 530 SSD 240GB, Windows 7 x64, VirtuaPin Digital Plunger Kit. VP 9.9.0a and PinballX 1.84

#631 mukuste

mukuste

    Pinball Fan

  • VP Dev Team
  • PipPipPipPip
  • 854 posts

  • Flag: ---------

  • Favorite Pinball: Centaur

Posted 18 May 2014 - 04:50 PM

after hitting F11 I don't see the green dots on the ball anymore, I actually liked watching the ball spin and its cool to show people how this version is so much better than standard VP 9.9.   Thanks for the update

 

Whoops, forgot to enable it for this build! I just uploaded a new build in the same post which has it again.



#632 LoadedWeapon

LoadedWeapon

    The Night Owl..

  • Members
  • PipPipPipPipPip
  • 2,399 posts
  • Location:South Carolina USA

  • Flag: United States of America

  • Favorite Pinball: Star Trek TNG



Posted 18 May 2014 - 05:41 PM

Man thx for all your work I have yet to get to test these but I will try tonight... thanks again!

#633 JavaJack

JavaJack

    Enthusiast

  • Members
  • PipPipPip
  • 175 posts

  • Flag: United States of America

  • Favorite Pinball: Diner

Posted 18 May 2014 - 08:17 PM

In physmod5, with spin visualization enabled, when I cradle a ball, it slowly spins magically in place around the x-axis, like it's trying to roll downhill while stationary. I'm pretty sure that wasn't intended :)



#634 mukuste

mukuste

    Pinball Fan

  • VP Dev Team
  • PipPipPipPip
  • 854 posts

  • Flag: ---------

  • Favorite Pinball: Centaur

Posted 18 May 2014 - 08:45 PM

Ok. Here is an emptied table you can see some ramp issues. If you play with physmod2, the ramps are great. If you play on physmod4, you cant make the ramps at all. The problems seems to be:
[...]

 

The problem there isn't actually the high wall that you mentioned; it's the base plate (Wall332) and the two screws (Wall333 and Wall334) which are set to collidable. The base plate creates a step of height 5, which is enough to send the ball airborne and then creates all the other issues. Previous VP versions couldn't simulate the effect of such a step, but the latest updates now take this into account. If you set these three walls to non-collidable, everything is fine.

 

The same applies to the left ramp; disable collisions on the base plate and the screws, and the entire ramp behaves as it should.

 

 

In physmod5, with spin visualization enabled, when I cradle a ball, it slowly spins magically in place around the x-axis, like it's trying to roll downhill while stationary. I'm pretty sure that wasn't intended :)

 

This happened in all physmod versions as far as I know; it's an artifact of the not-quite-accurate way friction is calculated when the ball is in contact with more than one object. Doing this completely correctly would make the code significantly more complex and also slower, and this is a rather minor bug which doesn't really interfere with gameplay, so for now I'll leave it as it is. Maybe I'll come up with a workaround at some point.



#635 Pinbotfan

Pinbotfan

    Hobbyist

  • Banned
  • PipPip
  • 49 posts

  • Flag: United States of America

  • Favorite Pinball: Pinbot

Posted 18 May 2014 - 11:21 PM

The ball has never stood still, if the decals are any indication. It's hard to imagine where a ball would be in contact with more that two objects for any extended period of time, and that's counting the playfield or something on the playfield that the ball rolls on.

 

But counting the floor, and the wall the ball is hugging, for example, a hit of/to a third object would have an effect on spinning if any spinning was happening, regardless of duration.

 

It does look bad though, and I have never used the green dots, only faint decals as dust and scratches, and I would not have those if anything else would suggest the ball rolling. They, the decals, generally do conform to the ball movement, if not as snappily as could be.

 

Why could the whole routine not be wrapped up inside an if speed > 0 or If Speed > min speed that those green dots move?



#636 freezy

freezy

    Member title

  • Members
  • PipPipPip
  • 355 posts

  • Flag: ---------

  • Favorite Pinball: T2, TOM, AFM

Posted 19 May 2014 - 06:21 AM

Maybe someone with a math degree could help? ;)



#637 mukuste

mukuste

    Pinball Fan

  • VP Dev Team
  • PipPipPipPip
  • 854 posts

  • Flag: ---------

  • Favorite Pinball: Centaur

Posted 19 May 2014 - 08:04 AM

The ball has never stood still, if the decals are any indication. It's hard to imagine where a ball would be in contact with more that two objects for any extended period of time, and that's counting the playfield or something on the playfield that the ball rolls on.

 

But counting the floor, and the wall the ball is hugging, for example, a hit of/to a third object would have an effect on spinning if any spinning was happening, regardless of duration.

 

It does look bad though, and I have never used the green dots, only faint decals as dust and scratches, and I would not have those if anything else would suggest the ball rolling. They, the decals, generally do conform to the ball movement, if not as snappily as could be.

 

Why could the whole routine not be wrapped up inside an if speed > 0 or If Speed > min speed that those green dots move?

 

Three objects happen exactly in the cradling situation: playfield, wall, flipper. Two objects are even more common and happen whenever the ball is rolling along a wall or the flipper.

 

I don't understand your second sentence.

 

I also don't understand what you mean by "the decals [...] do conform to the ball movement, if not as snappily as could be"; ball spin and ball movement are two different variables, and they are not supposed to be in perfect unison all the time since the ball can slide on the playfield.

 

The workaround you mention is too simplistic since it doesn't allow for the gradual decay of rotational inertia which is supposed to happen due to friction and would mess with the sliding/rolling dynamics. The spin you see on the ball isn't just a visual effect, it's an integral part of the physical simulation in the new physics, so changing it with such hacks is likely to come around and bite you in the backside in other situations which you didn't foresee.



#638 Pinbotfan

Pinbotfan

    Hobbyist

  • Banned
  • PipPip
  • 49 posts

  • Flag: United States of America

  • Favorite Pinball: Pinbot

Posted 19 May 2014 - 01:54 PM

The second sentence was not clear, I agree. It was intended as agreement with you that the concern of multiple contact is appreciated.

 

The decals I was referring to are the older ones that show roll, not your new ones that show spin. They too never stop.

 

The overall point is that it is understood that the spin physics are physics and not just graphical effect. That fact is the concern of only a ball spinning without a stimulus factor.



#639 BigBoss

BigBoss

    Pinball Fan

  • VP Dev Team
  • PipPipPipPip
  • 722 posts

  • Flag: ---------

  • Favorite Pinball: Attack From Mars, Metallica, Theatre Of Magic, Shadow, Star Trek

Posted 19 May 2014 - 03:00 PM

So on flipper physics, whats the max friction value that's accepted? I put in 300 and I don't see any real difference from 0.8.  I was thinking that more friction might help backhand power a bit.



#640 jpop

jpop

    Hobbyist

  • Pinball Legend
  • PipPip
  • 36 posts

  • Flag: United States of America

  • Favorite Pinball: Capt. Fantastic

Posted 19 May 2014 - 03:06 PM

more than happy to test and offer insight...Jpop