Jump to content



Photo
* * * * * 26 votes

WIP: Visual Pinball in Unity


  • Please log in to reply
813 replies to this topic

#661 freezy

freezy

    Member title

  • Members
  • PipPipPipPip
  • 685 posts

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

  • Favorite Pinball: T2, TOM, AFM

Posted 22 April 2021 - 08:56 PM

What you've changed from horse to snake now?



#662 chepas

chepas

    t.me/horsepin

  • Members
  • PipPipPipPip
  • 1,966 posts

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

  • Favorite Pinball: BSD, Tr0n, SW:Stern

Posted 22 April 2021 - 09:59 PM

What you've changed from horse to snake now?

 

No, Horse > Snakes. Snakes are not good for logos imo, let the big boys use them.


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


#663 freezy

freezy

    Member title

  • Members
  • PipPipPipPip
  • 685 posts

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

  • Favorite Pinball: T2, TOM, AFM

Posted 22 April 2021 - 10:23 PM

That's what I thought, thanks for clearing this up!



#664 freezy

freezy

    Member title

  • Members
  • PipPipPipPip
  • 685 posts

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

  • Favorite Pinball: T2, TOM, AFM

Posted 23 April 2021 - 07:35 AM

@chepas Other topic, and I'm sorry I know it's unrelated to horses, but would you be willing to help me with VPE skeleton game integration? No hurry, but it would be cool at some point.



#665 chepas

chepas

    t.me/horsepin

  • Members
  • PipPipPipPip
  • 1,966 posts

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

  • Favorite Pinball: BSD, Tr0n, SW:Stern

Posted 23 April 2021 - 08:41 AM

@chepas Other topic, and I'm sorry I know it's unrelated to horses, but would you be willing to help me with VPE skeleton game integration? No hurry, but it would be cool at some point.

 

Yeah sure, I haven't looked how you've done MPF but can you use the python VPCom and just hook up pretty quickly then, similar to VP?


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


#666 freezy

freezy

    Member title

  • Members
  • PipPipPipPip
  • 685 posts

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

  • Favorite Pinball: T2, TOM, AFM

Posted 23 April 2021 - 08:48 AM

Well, we still wanna keep VPE cross-platform so COM is kinda out of the picture (also, it sucks). For MPF we're using a gRPC daemon (code here) that VPE connects to and thus allows to exchange bi-directional messages. That's just for the game logic though, for the media controller we'll need to figure out another solution.



#667 Rajo Joey

Rajo Joey

    Pinball Fan

  • Members
  • PipPipPipPip
  • 1,489 posts
  • Location:Niedersachsen

  • Flag: Germany

  • Favorite Pinball: Attack from Mars, Abra Ca Dabra and many old EM-Tables

Posted 23 April 2021 - 10:08 AM

Simple question: how can I export back to VPX? I can't find a menu entry for this.
And I can't find anything about it in the documentation either.

Thanks.


Rajo Joey - My front-end-files; Hundreds of Audio- and Videorecordings in high quality for Playfield (4k/60FPS) and Backglass (HD), Wheels & POV-Files: The Media-Post

https://www.facebook...02697096474910/

https://www.facebook...oups/VPAddicts/

https://www.facebook...oups/VPjunkies/


#668 freezy

freezy

    Member title

  • Members
  • PipPipPipPip
  • 685 posts

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

  • Favorite Pinball: T2, TOM, AFM

Posted 23 April 2021 - 11:23 AM

Simple question: how can I export back to VPX? I can't find a menu entry for this.
And I can't find anything about it in the documentation either.

Thanks.

Select the root node of the table in the hierarchy, and you'll have a button in the inspector.

 

aIONwh2.png

 

EDIT: I wanted to write an editor tutorial that covers VPX features for a while now, but there's still too much stuff changing. It's gonna be one of the first ones though!


Edited by freezy, 23 April 2021 - 11:26 AM.


#669 chepas

chepas

    t.me/horsepin

  • Members
  • PipPipPipPip
  • 1,966 posts

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

  • Favorite Pinball: BSD, Tr0n, SW:Stern

Posted 23 April 2021 - 11:25 AM

Well, we still wanna keep VPE cross-platform so COM is kinda out of the picture (also, it sucks). For MPF we're using a gRPC daemon (code here) that VPE connects to and thus allows to exchange bi-directional messages. That's just for the game logic though, for the media controller we'll need to figure out another solution.

 

Yeah, I don't want to go too deep into it now, you already had me thinking about it.

 

Proto buffs, can't get into them and I avoid, there's always been something else to use but I'm not trying to interop Python all the time and have the freedom not to.

 

But the proto you already have there, I don't have to worry about that as you probably have all Skeleton game covered.


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


#670 freezy

freezy

    Member title

  • Members
  • PipPipPipPip
  • 685 posts

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

  • Favorite Pinball: T2, TOM, AFM

Posted 23 April 2021 - 11:35 AM

We can also use a pipe. Advantage of the protobufs is that they have been designed already, there are code examples, and it would be trivial to implement them in VPE since I've already done the ground work for MPF.

 

Not sure what you mean by Skeleton being covered.



#671 chepas

chepas

    t.me/horsepin

  • Members
  • PipPipPipPip
  • 1,966 posts

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

  • Favorite Pinball: BSD, Tr0n, SW:Stern

Posted 23 April 2021 - 12:24 PM

Not sure what you mean by Skeleton being covered.

 

Covered in proto because any "interfacing" endpoints skeleton would need is already there. (as in I wouldn't even need to go there).

 

You're on your own if you want frames from SDL. I gave up on that idea a while ago when trying to put it on a VP script dmd.

 

It was only a matter of converting the texture layer but that was too much of a ballache at the time. Using Ctypes in python, just couldn't get head around converting the frame, I may have the work somewhere where it was pretty much that one line to finish it.


Edited by chepas, 23 April 2021 - 12:29 PM.

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


#672 freezy

freezy

    Member title

  • Members
  • PipPipPipPip
  • 685 posts

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

  • Favorite Pinball: T2, TOM, AFM

Posted 23 April 2021 - 12:42 PM

Ah okay, gotcha.

 

MPF-MC is using Kivy, which is built on OpenGL. We don't have a solution yet to share some kind of frame buffer between Unity and Kivy, but that's the next thing and Jan sounded optimistic. If we get this working, and SDL renders to OpenGL as well, we might be able to use the same approach for Skeleton. Otherwise at least for cabinet mode I suppose letting Skeleton render its own thing would be acceptable as well.

 

Anyway, let me know if or when you have time to play with it.



#673 chepas

chepas

    t.me/horsepin

  • Members
  • PipPipPipPip
  • 1,966 posts

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

  • Favorite Pinball: BSD, Tr0n, SW:Stern

Posted 23 April 2021 - 12:51 PM

MPF-MC is using Kivy, which is built on OpenGL. We don't have a solution yet to share some kind of frame buffer between Unity and Kivy, but that's the next thing and Jan sounded optimistic. If we get this working, and SDL renders to OpenGL as well, we might be able to use the same approach for Skeleton. Otherwise at least for cabinet mode I suppose letting Skeleton render its own thing would be acceptable as well.

 

Anyway, let me know if or when you have time to play with it.

 

I've used Kivvy myself a long time ago to make a UI in python and thought that was a strange choice to begin with. 

 

It won't be as difficult to do that for SDL / Python, I think the trouble was converting it to get compatible with VP

 

Yeah I will do because I want to revisit that again. It would allow for fullscreen VP + SG on desktop.


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


#674 fripounet

fripounet

    Pinball Fan

  • Platinum Supporter
  • 1,030 posts

  • Flag: China

  • Favorite Pinball: .les miens

Posted 26 April 2021 - 11:21 PM

il faut lancer mpf avec la console ou bien c'est vpe qui lance mpf ?

car mpf ne s'affiche pas dans vpe , pourtant il est bien installé.

 

ça correspond à quoi value 1,2,3 game logic ?

 

trad. google

you have to start mpf with console or is it vpe which launches mpf?

because mpf is not displayed

 

140.jpg

 

213.jpg

 

37.jpg


Edited by fripounet, 27 April 2021 - 07:15 AM.


#675 freezy

freezy

    Member title

  • Members
  • PipPipPipPip
  • 685 posts

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

  • Favorite Pinball: T2, TOM, AFM

Posted 27 April 2021 - 07:38 AM

Maybe read the doc?



#676 freezy

freezy

    Member title

  • Members
  • PipPipPipPip
  • 685 posts

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

  • Favorite Pinball: T2, TOM, AFM

Posted 30 April 2021 - 10:00 PM

So I've tested the UPM setup and this combination (all latest) works here:

 

kMx0L9t.png

 

Otherwise I've merged a PR that does a lot of groundwork for display handling. We now support DMDs and segment displays, and they are very flexible. Documentation here if anyone interested.

 

Both the DMD and the segment display render with a shader entirely on the GPU, so they are quite performant. They are also both integrated into Unity's shader graph, which lets anyone create all kind of cool effects without having to write actual shader code:

 

unknown.png

 

unknown.png

 

Many thanks to @ravarcade who helped me a lot with the segment display shader (it was actually for dmdext at the time). It looks pretty good now and we will tweak it further more.

 

That's it, that was basically what I've spent my time in April on. ;)

 

EDIT: Oh, eye candy, I forgot. Here a few shots from Rowlan from a few weeks ago:

 

Goldorak_1.jpg

 

Goldorak_2.jpg

 

Goldorak_8K.jpg


Edited by freezy, 30 April 2021 - 10:02 PM.


#677 TerryRed

TerryRed

    Pinball Fan

  • Silver Supporter
  • 1,922 posts

  • Flag: Canada

  • Favorite Pinball: Too many to choose...

Contributor

Posted 30 April 2021 - 10:04 PM

Time well spent... from both you and ravarcade!



#678 fripounet

fripounet

    Pinball Fan

  • Platinum Supporter
  • 1,030 posts

  • Flag: China

  • Favorite Pinball: .les miens

Posted 30 April 2021 - 10:07 PM

le fait d'être sur unity 2020.3.6f1 lts pose problème sur l'utilisation de vpe ?

faut-il être absolument sur l'ancienne 2020.2 ?



#679 strikekat

strikekat

    Hobbyist

  • Members
  • PipPip
  • 24 posts

  • Flag: United States of America

  • Favorite Pinball: BSD, GNR

Posted 30 April 2021 - 10:21 PM

Freezy - Excellent work. I was impressed with your work on the older JS port (I actually compiled+demoed it at a local user group back then). Of course, like web dev, I'm also not really familiar with Unity3D :P

Do you guys have testers on Linux, do you need help on that side of things?



#680 freezy

freezy

    Member title

  • Members
  • PipPipPipPip
  • 685 posts

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

  • Favorite Pinball: T2, TOM, AFM

Posted 30 April 2021 - 10:24 PM

@strikekat Oh, nice to hear! Which user group? We don't have any developer using Linux, but we build for it in our CI. If you want, give it a try! AFAIK the Unity editor for Linux is still labeled "experimental", you might encounter a few bumps on the road..