Jump to content



Photo
* * * * * 25 votes

WIP: Visual Pinball in Unity


  • Please log in to reply
811 replies to this topic

#541 mickman

mickman

    Hobbyist

  • Members
  • PipPip
  • 13 posts

  • Flag: New Zealand

  • Favorite Pinball: Adam's Family

Posted 16 October 2020 - 06:36 PM

Is there a link to the VPE Discord channel within this forum topic ?   

Some newbie questions I have might better be asked on Discord so as not to distract others here.  

Might be worth dropping a link in the Creator's Guide as well. 


Edited by mickman, 16 October 2020 - 06:38 PM.


#542 Ben Logan

Ben Logan

    Pinball Wizard

  • Members
  • PipPipPipPipPip
  • 2,275 posts
  • Location:California

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

  • Favorite Pinball: System 11

Posted 16 October 2020 - 07:57 PM

Thanks for your video, mickman. Well done 



#543 mickman

mickman

    Hobbyist

  • Members
  • PipPip
  • 13 posts

  • Flag: New Zealand

  • Favorite Pinball: Adam's Family

Posted 16 October 2020 - 08:25 PM

Just wanted to get some support rolling for Freezy..  

 

note: check out "Tilt5" sometime.. I envisige playing VPE powered tables in Tilt 5 & VR of course. 

 

ATM - I was trying to get a ball interacting with the flippers as seen in Freezy's intro video. 

 

I started out adding rigid bodise (nad idea) to the base table and to each flipper but I feel this might be the wrong approach give VPE incoporates ECS / DOTS.

 

note: DOTS system does not use rigidbodies etc.. its the old school method...   might want to check this video for Unity 2020 that walks you through setting up Physics for DOTS as its a preview package.  I installed the HAVOK physics 

 

 CLICK HERE

 

btw this will probably change in coming months as Unity is forever evolving in terms of  ECS & DOTS

 

Any thoughts


Edited by mickman, 16 October 2020 - 09:20 PM.


#544 freezy

freezy

    Member title

  • Members
  • PipPipPipPip
  • 683 posts

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

  • Favorite Pinball: T2, TOM, AFM

Posted 16 October 2020 - 09:25 PM

No need to add any rigid bodies - those come as part of the VP physics. I'm currently working on a PR that adds separate components for those to make it more obvious and more flexible.

 

The Tilt5 tech looks great - no sure how you would trigger the flipper buttons though. With two controllers?

 

BTW it's "ECS" for entity component system. DOTS is Unity's new stack that includes ECS, their job system and the Burst compiler.



#545 mickman

mickman

    Hobbyist

  • Members
  • PipPip
  • 13 posts

  • Flag: New Zealand

  • Favorite Pinball: Adam's Family

Posted 17 October 2020 - 01:52 AM

yeah was just looking over ECS ...

 

I have a basic table loaded now      

 I've added a ball and applied Havok physics to both it and the flippers. It rolls fine and collides with the flipper but then launches up and off the table. The flipper gets pushed away as well.. SO I   applied a hinge constraint to it and then it required a rigid body. 

 I'm prob. over engineering here and might even drop Havok for Unity Physics as there's next to no documentation on using Havok. 

 

on a side note:  I just soldered three extra buttons into my PinSim  


Edited by mickman, 17 October 2020 - 06:48 AM.


#546 freezy

freezy

    Member title

  • Members
  • PipPipPipPip
  • 683 posts

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

  • Favorite Pinball: T2, TOM, AFM

Posted 17 October 2020 - 08:28 AM

Again, no need to add any Havok/Unity physics, VPE uses VP's physics out of the box. If you want to port it to Havok that's a significant effort. BTW I've sent you a PM for Discord yesterday.



#547 blindpeser

blindpeser

    Enthusiast

  • Members
  • PipPipPip
  • 419 posts

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

  • Favorite Pinball: WCS94

Posted 17 October 2020 - 04:51 PM

Does this asset maybe have something inside that could be helpful for VPE?

https://assetstore.u...772#description

I doubt the creator earns tons of money with that asset. Maybe he would like to join the team and help to create something real huge.

Edited by blindpeser, 17 October 2020 - 04:58 PM.


#548 toxie

toxie

    VPF Veteran

  • VP Dev Team
  • PipPipPipPipPipPip
  • 5,659 posts
  • Location:berlin, germany

  • Flag: Germany

  • Favorite Pinball: AFM

Posted 17 October 2020 - 07:25 PM

In your re-working of interaction with PinMAME has there been discussion about moving up to the current version of MAME itself?  Is that viable?  There have been a considerable number of improvements to the audio system via Aaron Giles' work recently, and of course older DCS fixes for the snap and popping at high volumes.

Just poured through this whole thread after just finding out about it, very excited by you and the team's great work.

Actually we're (PinMAME) even farther in that regard. We already use highend resampling and mixing since a while (which is still missing, but at least now possible, in MAME).



#549 wiesshund

wiesshund

    VPF Legend

  • Members
  • PipPipPipPipPipPipPip
  • 11,790 posts

  • Flag: United States of America

  • Favorite Pinball: How many can i have?

Posted 18 October 2020 - 04:55 AM

 

In your re-working of interaction with PinMAME has there been discussion about moving up to the current version of MAME itself?  Is that viable?  There have been a considerable number of improvements to the audio system via Aaron Giles' work recently, and of course older DCS fixes for the snap and popping at high volumes.

Just poured through this whole thread after just finding out about it, very excited by you and the team's great work.

Actually we're (PinMAME) even farther in that regard. We already use highend resampling and mixing since a while (which is still missing, but at least now possible, in MAME).

 

 

I have some roms that both MAME and PinMAME can both read
PinMAME kind of sounds better, mind you no work has been done on MAME towards those roms in a long time

 

Video wise, not really fair to compare, i dont think much consideration has been given to proper display and placement of graphics 
for non Video machines.

 

And as far as mechanicals go, it would seem MAME is behind PinMAME
as it reports some of the rom sets as broken or not yet working, but then those things are not really their target audience.

If it has Fruit though, MAME can run it! <jk>


If you feel the need to empty your wallet in my direction, i dont have any way to receive it anyways

If you really want to get rid of money you can donate to this

Athena's Wildlife Sanctuary


#550 freezy

freezy

    Member title

  • Members
  • PipPipPipPip
  • 683 posts

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

  • Favorite Pinball: T2, TOM, AFM

Posted 28 October 2020 - 09:02 PM

I've just merged the code I've been working the last few weeks, so time for a small update :)

 

It's nothing spectacular, but I've been refactoring the way the editor handles colliders and meshes, and you can now mix and match them. That's pretty cool, it allows you for example to replace the standard flipper meshes with custom meshes without writing any code (and it's very efficient). Same for colliders. For more details, read the GitHub issue or the documentation.

 

Then @Pandeli started working on a PBR material library for VPE. The goal is that table creators have an easily accessible collection of pinball-related materials they can use and/or tweak. In order to get the most realistic results possible, he's going to actually scan real-world pinball materials with a technique explained here. As far as I understood, the goal is to isolate the reflectance and thus estimate the surface normals of a material. It's a technique used by many established asset resources like Megascans. If anyone of you with a real-world pinball machine has the needed gear and wants to join the effort, feel free to ping us. I think the results are going to be spectacular.

 

Then we got our switch manager and coil manager set up and working (a lamp manager will follow). This allows you to hook the playfield elements up to the ROM without having to code anything at all. @jsm174 just got his WPC emulator running, and while the graphics still look a bit weird on his Mac, it's still awesome:

 

 

Remember this is still without any table script. Also it's to test the emu, switches and coils. So no lighting, or any graphical or physical tweaks.

 

Lastly a screenshot with RTX on (thanks @Rowlan) to compensate for the Christmas tree above ;)

 

tj2.jpg

 

Cheers!


Edited by freezy, 28 October 2020 - 09:08 PM.


#551 blindpeser

blindpeser

    Enthusiast

  • Members
  • PipPipPip
  • 419 posts

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

  • Favorite Pinball: WCS94

Posted 29 October 2020 - 10:25 AM

Thanks for your update and explanations! It is always stunning to see, which new technologies are added. Please keep the updates coming.

#552 hitman2304

hitman2304

    Enthusiast

  • Members
  • PipPipPip
  • 102 posts
  • Location:Poland

  • Flag: Poland

  • Favorite Pinball: AFM,Monster Bash,Medieval Madness,TOM.

Posted 29 October 2020 - 11:07 AM

Looks like everything is going in right direction :tup:



#553 Slydog43

Slydog43

    Pinball Wizard

  • Platinum Supporter
  • 3,006 posts
  • Location:Hackettstown, NJ

  • Flag: United States of America

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

Posted 30 October 2020 - 03:33 AM

I follow a few things that I'm obsessive about (pinball, rc toys, computers, darts, pool, etc)  This though is my favorite thing to follow nowadays, as I think this is such a game changer.  Thanks guys!


Edited by Slydog43, 30 October 2020 - 03:34 AM.


#554 toxie

toxie

    VPF Veteran

  • VP Dev Team
  • PipPipPipPipPipPip
  • 5,659 posts
  • Location:berlin, germany

  • Flag: Germany

  • Favorite Pinball: AFM

Posted 04 November 2020 - 05:48 AM

I don't know if this has been posted already somewhere, but here ya go.. Shows how far all pinball simulations are still away from even the most basic stuff (=ball<->flipper interaction):

 

 

(so much more work left for us still ;))



#555 JLouLoulou

JLouLoulou

    Enthusiast

  • Silver Supporter
  • 201 posts
  • Location:Center of France

  • Flag: France

  • Favorite Pinball: Simply play pinball

Posted 04 November 2020 - 07:35 AM

This video show a parametre which i would like to have in VPX... a coil ramp and coil ramp down for bumper.. 

 

We can see pop bumper have not already the time to go back to position "0" when the ball have lot of velocity between 2 pops, so Pop have less strength in this case.

 

This is not the case in VPX. Lot of table have pop bumper like rifle and became unrealistic after the first collision, because even if strenght value is good, it's only good for the first collision...Meanwhile in reality, more the ball take velocity between 2 pop bumpers, less strentgh they have, but ball keep his velocity due to his kinectic energy.

 

hope you understand what i mean


Edited by JLouLoulou, 04 November 2020 - 07:36 AM.


#556 toxie

toxie

    VPF Veteran

  • VP Dev Team
  • PipPipPipPipPipPip
  • 5,659 posts
  • Location:berlin, germany

  • Flag: Germany

  • Favorite Pinball: AFM

Posted 04 November 2020 - 07:52 AM

what i think is actually more scary in that context is how slow the bumper triggering can be in simulation/emulation, compared to what would be needed in practice sometimes.

 

plus the harshly deforming rubber which explains A LOT of the effects one sees in real pins. i expected this to be a major factor, but seeing it like this in slomo makes it seem like the dominating factor in some situations.



#557 JLouLoulou

JLouLoulou

    Enthusiast

  • Silver Supporter
  • 201 posts
  • Location:Center of France

  • Flag: France

  • Favorite Pinball: Simply play pinball

Posted 04 November 2020 - 07:57 AM

Lol. you're right! It's very surprising for me too when i see the rubbers deforming!!! Things that you can't see in realtime with your eye. Very impressive and instrutive.



#558 freezy

freezy

    Member title

  • Members
  • PipPipPipPip
  • 683 posts

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

  • Favorite Pinball: T2, TOM, AFM

Posted 04 November 2020 - 07:57 AM

@toxie Thanks for posting the link, I came across it a few days ago.

 

For me, main take away was how much everything vibrates, contrarily to current sims where nothing moves a single pixel when hit. I did a test adding subtle vibrations in the hit normal's directions to surfaces in VPE, and it's definitely something to exploit further.

 

In terms of flippers, the double tap and wobbling rubber is interesting but definitely above my skillset to implement.

 

The bumper ramp up should be doable relatively easily though.

 

I'll dive into those things at some point, but right now I'm optimizing the quadtree generation because it's becoming a drag when starting a game.



#559 wiesshund

wiesshund

    VPF Legend

  • Members
  • PipPipPipPipPipPipPip
  • 11,790 posts

  • Flag: United States of America

  • Favorite Pinball: How many can i have?

Posted 04 November 2020 - 08:09 AM

Outside of a purely visual effect, the real time physics of what the rubber is doing would probably be an extremely process intensive affair


If you feel the need to empty your wallet in my direction, i dont have any way to receive it anyways

If you really want to get rid of money you can donate to this

Athena's Wildlife Sanctuary


#560 hitman2304

hitman2304

    Enthusiast

  • Members
  • PipPipPip
  • 102 posts
  • Location:Poland

  • Flag: Poland

  • Favorite Pinball: AFM,Monster Bash,Medieval Madness,TOM.

Posted 04 November 2020 - 08:50 AM

One is for sure, digital simulation will never replace a real table but the current pinball emulators are much better than even 10 years ago, especially for people who don't have opportunity to play the real machine.


Edited by hitman2304, 04 November 2020 - 08:53 AM.