Jump to content



Photo
* * * * * 26 votes

WIP: Visual Pinball in Unity


  • Please log in to reply
813 replies to this topic

#161 StevOz

StevOz

    Pinball Fan

  • VIP
  • 1,721 posts
  • Location:Nirvana

  • Flag: Australia

  • Favorite Pinball: Scared Stiff



Posted 08 March 2020 - 06:35 AM

 

 

 

Tap passes, on the other hand, aren't worth trade-off in terms of latency, in my opinion. They're rarely done, even by the pros. Super dangerous move!


 


 

 

 

I can't speak for everyone else, but I did them as a kid in tournaments all the time.

 

 

I here ya Itchy though comparing an analog to a digital recreation ultimately means some sort of compromises must be made. I might add to feather touch the flipper button to attempt the pass only works on a well maintained machine and even then given two of the same machines side by side that feather touch will be different not to mention left vs right on those same machines.

 

Nothing is impossible though some things are virtually impossible. ;)


Edited by StevOz, 08 March 2020 - 06:40 AM.

Files I have uploaded here...

 

http://www.vpforums....ownloads&mid=34


logoshort.gif


#162 GeorgeH

GeorgeH

    Pinball Fan

  • Members
  • PipPipPipPip
  • 839 posts
  • Location:Arkansas, USA

  • Flag: United States of America

  • Favorite Pinball: Black Rose

Posted 08 March 2020 - 12:19 PM

Has anyone tried Bforartists?  My understanding it is easier to use than Blender and it imports MilkShape files:

 

https://www.bforartists.de/



#163 DCrosby

DCrosby

    Enthusiast

  • Platinum Supporter
  • 125 posts

  • Flag: United States of America

  • Favorite Pinball: Phantom Of The Opera (Currently, may change tomorrow) ;D

Posted 08 March 2020 - 04:11 PM

Attached File  BadCats.JPG   156.64KB   17 downloads

 

So this is Unity running HDRP, with Raytracing turned on (Warning it's not easy to do, there's a lot of hoops to jump though)

 

So this is with the following turned on:
GI, with denoising

Recursive Rendering

AO

Contact Shadows

 

I added some AA as well, but that was because the buzzing was pretty bad.

 

All kind of tossed in without regard for performance, as it is an alpha build, so will most likely change performance characteristics anyhow... so no point in tuning it.
It's cool to see what's possible given enough HP

Also Normal Maps crash the lighting, because I tried to add normals to the flashers, and everytime the whole scene goes black. Like I said it's an alpha.

 

Performance is about 30 fps until we get to the back, and then with the ramps becoming full screen and such it gets pretty gnarly... 10-15 fps

 

https://youtu.be/dcTqBKmZvyU


Edited by DCrosby, 08 March 2020 - 04:15 PM.


#164 Ben Logan

Ben Logan

    Pinball Wizard

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

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

  • Favorite Pinball: System 11

Posted 08 March 2020 - 05:10 PM

Wow! That video is really exciting. Looks astoundingly real. 



#165 rothbauerw

rothbauerw

    Enthusiast

  • Members
  • PipPipPip
  • 345 posts
  • Location:Wisconsin - USA

  • Flag: United States of America

  • Favorite Pinball: Dr Who, Tee'd Off, Jive Time

Posted 08 March 2020 - 07:06 PM

The reflections, the transparency and distortion through the plastic ramps ...

 

Exciting times!



#166 DJRobX

DJRobX

    Pinball Fan

  • VP Dev Team
  • PipPipPipPip
  • 941 posts
  • Location:Valencia, CA

  • Flag: United States of America

  • Favorite Pinball: F14 Tomcat

Posted 09 March 2020 - 05:37 PM

 

I recently did a fairly in depth analysis of flipper behavior and identified a number of areas the current engine either doesn't handle or doesn't handle sufficiently.  I've been able to solve a number of those deficiencies through scripting, although building them into the engine at some point would be ideal.  For example, coil ramp up is linear in VP, while in reality, it should be non-linear.  

 

I tried to convince NFozzy to start looking at these problems at the VPX source, instead of trying to hack around them in table scripts.    If Mukuste were still around I'm sure he would have made short work of fixing it in the engine.        There's a steep learning curve, no doubt, but I've seen enough of your work to know that the two of you are more than capable of working with the C++ code, if you just give yourselves some time to wrap your heads around it.     I think you'd be so much happier with the outcome vs the limited things you can do in table script. 

I sincerely hope you will consider getting involved in the VPE physics at the source level, now that it's being ported to a more friendly C# environment.     Updates probably could even be back-ported back to VPX as fixes are identified.   The kind of analysis you guys are doing is invaluable!  



#167 rothbauerw

rothbauerw

    Enthusiast

  • Members
  • PipPipPip
  • 345 posts
  • Location:Wisconsin - USA

  • Flag: United States of America

  • Favorite Pinball: Dr Who, Tee'd Off, Jive Time

Posted 09 March 2020 - 07:16 PM

I recently did a fairly in depth analysis of flipper behavior and identified a number of areas the current engine either doesn't handle or doesn't handle sufficiently.  I've been able to solve a number of those deficiencies through scripting, although building them into the engine at some point would be ideal.  For example, coil ramp up is linear in VP, while in reality, it should be non-linear.


I tried to convince NFozzy to start looking at these problems at the VPX source, instead of trying to hack around them in table scripts.    If Mukuste were still around I'm sure he would have made short work of fixing it in the engine.        There's a steep learning curve, no doubt, but I've seen enough of your work to know that the two of you are more than capable of working with the C++ code, if you just give yourselves some time to wrap your heads around it.     I think you'd be so much happier with the outcome vs the limited things you can do in table script. 

I sincerely hope you will consider getting involved in the VPE physics at the source level, now that it's being ported to a more friendly C# environment.     Updates probably could even be back-ported back to VPX as fixes are identified.   The kind of analysis you guys are doing is invaluable!

I'm involved and will do my best :)

#168 bord

bord

    Pinball Fan

  • Members
  • PipPipPipPip
  • 603 posts

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

  • Favorite Pinball: Star Gazer, Whirlwind, Frontier

Posted 09 March 2020 - 07:24 PM

 

 

looking at these problems at the VPX source,

I'm involved and will do my best :)

 

This would be a dream come true. Roth's work (and nFozzy's) definitely should be rolled up into standard VP physics.



#169 freezy

freezy

    Member title

  • Members
  • PipPipPipPip
  • 685 posts

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

  • Favorite Pinball: T2, TOM, AFM

Posted 09 March 2020 - 08:18 PM

We definitely have a competent team now :)



#170 JLouLoulou

JLouLoulou

    Enthusiast

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

  • Flag: France

  • Favorite Pinball: Simply play pinball

Posted 10 March 2020 - 08:29 AM

 

And if it can produce better flipper physics eg a tap pass

 

From what I've read here, physics will be ported from VPX, so the core VPX physics engine would need to be enhanced. 

 

I recently did a fairly in depth analysis of flipper behavior and identified a number of areas the current engine either doesn't handle or doesn't handle sufficiently.  I've been able to solve a number of those deficiencies through scripting, although building them into the engine at some point would be ideal.  For example, coil ramp up is linear in VP, while in reality, it should be non-linear.  

 

If you look at Flupper's Totan, Skitso's latest Medival Madness & Twilight Zone, or some of bord's newer tables, tap passes (and a number of other flipper tricks) work on all of those tables.

 

I'm agree with you Rothbauerw, and i add to your exemple, it's the same for return coil that need to be non-linear " Coil Ramp Down "


Edited by JLouLoulou, 10 March 2020 - 08:29 AM.


#171 rzrfreefr

rzrfreefr

    Neophyte

  • Members
  • Pip
  • 1 posts

  • Flag: France

  • Favorite Pinball: revenge from mars

Posted 10 March 2020 - 09:47 AM

 

@chepas what was your bad experience with Unity? What's PinGo? Is it open source? What did you fork? What projects in which solution took time to restore?

Forked the VP engine but each project needed package manager console to install packages.config. Still have a problem restoring Xunit for the unit tests.

 

PinGo is based on PROC board or simulator using godot for display.

 

Does it support GNU/Linux ?

I can try once sources are published

 

Relate-to: https://gist.github....7c65f1b17f3fc40


Edited by rzrfreefr, 10 March 2020 - 09:54 AM.


#172 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 10 March 2020 - 03:23 PM

I was wondering if it would be possible for you guys to plot a road map or to-do list for this project?  Perhaps edit first post in thread to include a rough road map,  I'm sure people who are following this with eager anticipation like myself would appreciate it.  Even if it's just what's planned a few steps ahead or what's already been accomplished.



#173 freezy

freezy

    Member title

  • Members
  • PipPipPipPip
  • 685 posts

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

  • Favorite Pinball: T2, TOM, AFM

Posted 10 March 2020 - 04:39 PM

@dark There are milestones on GitHub that you can follow. They are usually up to date, because they are linked to issues (and code). However, I didn't create issues for everything yet, so it doesn't give the whole picture. I'll work on adding more issues, but the further in the future they are, the less predictable they are.

 

Bigger accomplishments will be announced here in the thread of course.



#174 Ben Logan

Ben Logan

    Pinball Wizard

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

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

  • Favorite Pinball: System 11

Posted 11 March 2020 - 12:21 AM

Has potential for “Best WIP thread ever.”



#175 Mr H

Mr H

    Enthusiast

  • Members
  • PipPipPip
  • 96 posts

  • Flag: Australia

  • Favorite Pinball: Monsterbash

Posted 11 March 2020 - 01:42 AM

Has potential for “Best WIP thread ever.”

 

Has my vote already! Think I'm checking it daily.



#176 freezy

freezy

    Member title

  • Members
  • PipPipPipPip
  • 685 posts

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

  • Favorite Pinball: T2, TOM, AFM

Posted 11 March 2020 - 09:06 AM

So yesterday I was working on getting balls spawned, i.e. creating the mesh, getting and applying the material, and placing it in the scene. It's all taking a bit longer because this part we're not porting directly from Visual Pinball. Instead we're using Unity's new DOTS technology that brings high performance, but is still in beta and thus not very well documented. Once I get the hang of it, I expect better velocity though (it already improved a lot). ;)

 

Getting the physics foundation right is the next goal. The plan is to use Unity's DOTS/Havok physics as a base engine, and customize some of the collider resolution. I think we might be able to get away with just integrating VPX's flipper physics, but that remains to be tested and validated by the community. In any case that's how we'll start, and iterate from there.

 

Finally, I want to say that this is a team effort, ravarcade is diving into this as well, and we have a lot of support from other members of the community. Awesome to work with you guys!



#177 chepas

chepas

    t.me/horsepin

  • Members
  • PipPipPipPip
  • 1,966 posts

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

  • Favorite Pinball: BSD, Tr0n, SW:Stern

Posted 11 March 2020 - 10:40 AM

 

 

@chepas what was your bad experience with Unity? What's PinGo? Is it open source? What did you fork? What projects in which solution took time to restore?

Forked the VP engine but each project needed package manager console to install packages.config. Still have a problem restoring Xunit for the unit tests.

 

PinGo is based on PROC board or simulator using godot for display.

 

Does it support GNU/Linux ?

I can try once sources are published

 

Relate-to: https://gist.github....7c65f1b17f3fc40

 

PinGo was scripted with C# and not in Godots language. C# mono, so why wouldn't it.


Bump maps are the new auto-tune :BDH:
VPX - RSS Updates ---- blog.flippingflips.xyz/en/ -- Visual Pinball No.1 (2021) . Est.2000


#178 chepas

chepas

    t.me/horsepin

  • Members
  • PipPipPipPip
  • 1,966 posts

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

  • Favorite Pinball: BSD, Tr0n, SW:Stern

Posted 11 March 2020 - 10:50 AM

I have got a few days off work and decided to spend a little time with this. I have the solution building now, but what is going on with these unit tests? :)

 

Nowhere it says that you're building x86 in readme or solution.

Test run will use DLL(s) built for framework .NETFramework,Version=v4.5 and platform X86.

 

 

Any test data isn't copied to the following.

`VisualPinball.Engine.Test\bin\Fixtures~\DecalTest.vpx`

 


Bump maps are the new auto-tune :BDH:
VPX - RSS Updates ---- blog.flippingflips.xyz/en/ -- Visual Pinball No.1 (2021) . Est.2000


#179 freezy

freezy

    Member title

  • Members
  • PipPipPipPip
  • 685 posts

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

  • Favorite Pinball: T2, TOM, AFM

Posted 11 March 2020 - 11:22 AM

Hmm what's the error when you run the unit tests? CI seems to be happy, and locally they run through as well. The fixtures are just files used for asserting data is correctly read, they don't need to be copied anywhere.



#180 chepas

chepas

    t.me/horsepin

  • Members
  • PipPipPipPip
  • 1,966 posts

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

  • Favorite Pinball: BSD, Tr0n, SW:Stern

Posted 11 March 2020 - 11:54 AM

Ok, I see. Missed the appveyor badge, cheers!

 

Wasn't able to run from inside VS, but they did pass when pulled down the console runner.

xunit.runner.console.2.4.1\tools\net472\xunit.console.exe VisualPinball.Engine.Test\.build\Release\VisualPinball.Engine.Test.dll
xUnit.net Console Runner v2.4.1 (64-bit Desktop .NET 4.7.2, runtime: 4.0.30319.42000)
  Discovering: VisualPinball.Engine.Test
  Discovered:  VisualPinball.Engine.Test
  Starting:    VisualPinball.Engine.Test
  Finished:    VisualPinball.Engine.Test
=== TEST EXECUTION SUMMARY ===
   VisualPinball.Engine.Test  Total: 113, Errors: 0, Failed: 0, Skipped: 0, Time: 14.185s

 


Bump maps are the new auto-tune :BDH:
VPX - RSS Updates ---- blog.flippingflips.xyz/en/ -- Visual Pinball No.1 (2021) . Est.2000