freezy Posted April 27, 2019 Share Posted April 27, 2019 Hey guys, I was working on analyzing VPX files in a more efficient way, and while going through the primitive meshes I thought hey why not export them to something readable by the browser?The first prototype was quick, but getting all the remaining table elements as well (ramps, surfaces, triggers, spinners, flippers, lights, and many more) finally took more time than I thought. Then I had to work to get the 100+MB VPX data down to something under 10MB preferably so it wouldn't take ages to load. Thanks to PNG crushing and Draco compression, the model files are now under 10MB in average. Finally, the 3D model needed to be displayed in the browser, preferably with somewhat dynamic lighting, textures and proper materials. Three.js is one of the best frameworks for doing exactly that, and now, when browsing a release on VPDB, you have another "3D View" button below the download button where you can explore the table in 3D. It's pretty awesome because it allows you to appreciate the author's attention to detail and explore parts of the table you usually don't see. You can also play with the lights and toggle every type of playfield element. There are a few more things to do in my mind like bake shadow maps into the model, play with environment maps, and who knows, maybe one day we can hook this up to a ROM simulator. Enjoy! 1 1 Quote Link to comment Share on other sites More sharing options...
scutters Posted April 29, 2019 Share Posted April 29, 2019 Forget pretty, that is bloody awesome! Can you plug it into pinballx somewhere as a table explorer option?!?! Slight issue with popeye though; Other tables i looked at look great though. Quote Link to comment Share on other sites More sharing options...
freezy Posted April 29, 2019 Author Share Posted April 29, 2019 Well, this is the web, PinballX isn't Maybe bake a GLTF viewer into PinballX, given the data is available. Not sure how it would work with the controls though. Yes, Popeye is the one of the table with issues. The problem is that in general there is a lot of z-fighting going on due to meshes posed on top of each. One solution is to basically pick one randomly, that worked for all tables but Popeye. It's actually a hard problem because you first need to identify which faces overlap, and then which one to prioritize. Both are hard problems, because the can only overlap partially, and then there isn't really a heuristic which one is supposed to go on top. Anyway, I might be able to solve this at least for the playfield mesh, because I can do more educated guesses about which to render. Quote Link to comment Share on other sites More sharing options...
scutters Posted April 30, 2019 Share Posted April 30, 2019 Well i was kinda kidding about pinballx!, but hey it would be great if it could be done even if it was if cab online only to a cut down version online. I reckon if you disabled most pinballx functionality while viewing it you'd have 7 buttons on mast cabs availbale, flippers, magna's, add player, add credit & plunger, leaving Exit to go back to pinballx. Don't know how you'd know the exact version of a table being played though. Thanks a lot for it on vpdb anyway Quote Link to comment Share on other sites More sharing options...
simbamame Posted May 15, 2019 Share Posted May 15, 2019 @freezy as @scutters said this is bloody amazing and awesome, really makes you appreciate the effort the author put into the tables. Thanks for adding it to VPDB. ian Quote Link to comment Share on other sites More sharing options...
freezy Posted May 16, 2019 Author Share Posted May 16, 2019 Thanks! I actually don't think many people have noticed yet! Quote Link to comment Share on other sites More sharing options...
Fulltilt Posted September 4, 2019 Share Posted September 4, 2019 On 5/15/2019 at 6:06 PM, simbamame said: @freezy as @scutters said this is bloody amazing and awesome, really makes you appreciate the effort the author put into the tables. Thanks for adding it to VPDB. ian Wow! What a great addition to VPDB, thanks Freezy! To get it noticed a bit more maybe a quick video showing some tables, with explanations of navigating and zooming functions ..? Its pretty easy to navigate, but showing it might help newer people see how easy and awesome it really is. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.