BelleIIVR

The ICAT SEAD grant funding for the project BelleIIVR – Subatomic Particle Physics in VR, is coming to a close.  Over the last year, we successfully created a virtual reality visualization of the Belle II detector, and tested it in the Cube with physics students.  Now, we’re working to integrate the interactive visualization into the undergraduate nuclear & particle physics curriculum at Virginia Tech.  We made a video to describe the project and show off our new footage:

When BelleIIVR is used at Virginia Tech, we have the privilege of using the Cube as a lab for untethered, locomotive VR.  However, we would also love for people around the world to be able to learn and get excited about particle physics using this visualization.  So, we’ve created versions that can work just with the Oculus and a controller, or even just with mouse and keyboard at a computer.  Eventually, we may even release a version for mobile platforms.  Leo Piilonen will be taking an Oculus version of the simulation to the Belle II General Collaboration Meeting, for the Belle II team as a whole to see.  Besides becoming part of the curriculum at Tech, we’re also excited to apply for additional funding to continue building out the simulation and adding more features.

ICAT Day 2017

Yesterday was ICAT Day!  A lot of amazing projects at the nexus of science,  engineering, art, and design from around the university were exhibited.  Check out the Flickr photo roll here:

ICAT Creativity and Innovation Day 2017

Also, some local news stations were there!  Here is their coverage:

http://www.wdbj7.com/content/news/Virginia-Tech-researchers-give-community-sense-of-place-on-ICAT-Day-420945803.html

http://www.virginiafirst.com/news/local-news/vt-research-project-allows-people-to-experience-life-during-world-war-i/704397021

Two of the major projects I’ve spent time on this year, VR Physics and Vauquois, were present at ICAT Day.  I will be posting more soon showing the outcomes of these projects as we finish wrapping up for the semester, but for now I will just post a couple of photos from ICAT Day.

VR particle physics update

We’ve made a number of tweaks and user interface adjustments to this project, and it’s time to share them.

  • We now have sprites and colors for EVERY type of particle.  It makes it look so much more amazing.  Jesse toiled over this during Thanksgiving break.  Thanks Jesse!
  • The user interface is now diegetic, existing in the world of the virtual environment rather than as a heads-up display or thru a physical tablet.  Right now it just hangs out at a particular spot.  But when the user is in VR, being motion-captured in the Cube, they will be holding an Xbox controller which will also be tracked.  The virtual menu will take the position of the Xbox controller – so essentially users just need to look at their hands to look at the menu.  They then select whatever part of the menu they are looking at with a simple look-and-click interface.
  • We’ve also added the ability to select particles by looking at them and pressing a button.  When you select them, a display pops up over the particle, showing key info.  On that display, if you click the Save button, the info for that particle gets saved to a display up on the wall (which is still in the works).
  • The Model section now has a preset subsection, so you can save and load different configurations of the BelleII model being on and off, along with the relative transparency values.
  • There are also two “scoreboards” on the Cube walls now.  One shows the current simulation time, so you can glance at it from anywhere in the room.  The other allows the user to start and stop a timer with a press of a button on the Xbox controller.
  • At Leo’s request, we’re also now showing “dead” particle sprites.  Instead of a particle sprite disappearing after the data for the sprite has ended, a “shell” takes its place, showing where the particle was when it … passed away?  This has caused some new frame rate issues that I’m struggling with.  30k is a lot of individual sprites!  They’re not correctly batching right now, which is what I spent most of my day trying to figure out.  I learned a few things that increased the frame rate here and there, but it’s still not great yet.  It gets worse as the simulation goes on, because more and more sprites are added.

Additionally, the educational side of this project is really starting to kick into gear.  Instead of spending most of the meeting time talking about features for the simulation, we’re talking about lesson plan development, which is awesome!  That’s exactly where we want to be moving in to next semester.  We plan on piloting this thing with Society of Physics Students folks immediately following spring break!

Subatomic particle physics update

This project just keeps getting cooler every week.

Come see it in person on the Cyclorama in the Cube, *this Saturday!*

Virginia Tech Science Festival, October 8, 2016, 10am-3pm.

Since the last update, we have:

  • Made a few new events (datasets that represent a particle collision)
  • Made sprites for each of the particles present in those events
  • Colored in the pathlines and trails for the particles to be the same as the color of those sprites
  • Optimized, optimized, optimized!  Runs at 60FPS!
    • I dumbed down the mesh to only be about 100 objects instead of many many thousand.  We get some depth sorting issues with transparency still in certain situations, but it’s way better than it was originally and there are no frame rate issues when doing it like this.
    • I cleaned up the particle controller code to eliminate generic lists, remove unnecessary GetComponent calls, and do better OOP.  That was a dramatic FPS improvement
    • The purchase order for the FastLineRenderer package from the Unity Store finally went through, and so now I’m rendering the 200k+ lines of the paths with that.  When I do that, the lines are made into a mesh, which is the a single super fast draw call.  That was also a dramatic FPS improvement.
    • Probably some other stuff too I’ve forgotten about…
  • Also!  Tanner is working on the sound element now, and is getting the basic framework in place.  It’s super exciting hearing that come together.

Particle Physics Project Update

We’ve been working extremely hard on the particle physics project.  A work-in-progress version of the simulation will be at the Science Festival!  Saturday, October 8th, 10am-3pm.  This simulation will be in the Cube.  Come check it out!

Before I dig into what we’ve been working on, insert obligatory pretty video:

The main to-do list we’d like to accomplish before the Science Festival:
1. Me – Get all the particle sprites for the different kinds of particles
2. Me – Color code the path lines in coordination with the particles
3. Me – Get the full Belle II detector model in, albeit combined and completely opaque.
4. Tanner – implement draft of sound (OSC communication of particle data is complete, so he can pick it up and make it sound awesome)
5. Topher, Jesse, Sam – Make a flyer for audience to pick up on their way in
6. Topher, Jesse, Sam – Make all the images for the particle sprites, so I have them to import (there’s around 120 different kinds of particles!)

We’ve had 3 team meetings now, which are extremely helpful now that we have a full team on board.  This includes:

Christopher (Topher) Dobson – senior, physics education
Jesse Barber – junior, physics
Samantha (Sam) Spytek – senior, physics education
Tanner Upthegrove – ICAT staff, sound
Zach Duer (me) – ICAT staff, visualization / organization
Dane Webster – faculty, school of visual arts
George Glasson – faculty, school of education
Leo Piilonen – faculty, physics
Nicholas Polys – faculty, computer science
Todd Ogle – master of all things, TLOS

Just in the past few weeks, Sam and Topher have picked up on the game very quickly and set out with Jesse to do a lot of work developing the educational aspect of the simulation.  In the next update I will go into more detail on that.

In the meantime, I’ve been working my butt off optimizing the simulation to keep a decent frame rate. There were 3 major bottle-necks.  I’ll detail them here, along with the solutions:

  1. The model, with all its 400,000+ individual objects slowed the frame rate down to about 10FPS.  It’s a CPU problem – the GPU breezes through it, since it’s only about 2million polys.  The CPU is struggling with this due to the number of draw calls.  A lot of the objects are duplicates (the same mesh with the same material, but a different transform).  This lets Unity reduce the number of draw calls by batch rendering, but just the process of doing that batching slows it way down.  To maintain 60FPS, the full draw cycle has to happen in 16 milliseconds or less, so if there’s one thing that takes 0.01 milliseconds but it happens a few thousand times, it’s a huge problem.  I’m still working on this, but in the meantime, I’m combining each major layer of the BelleII detector into a single object and setting it to an opaque material.  Although this process takes some time, after I’m done the frame rate should be back up to a steady 60FPS
  2.  The lines rendered to show the paths that the particles will take over the course of the simulation, the “pathlines” as I’m calling them, take too long to render if rendered individually.  For the complex events, we’re talking about something like 4 million lines.  Even if they’re done in one draw call, it’s still just too slow if done every frame.  With just rendering these lines, it dropped the framerate to about 3FPS.  So, instead I purchased a package from the Unity Store called FastLineRenderer.  Since all the lines are known when the simulation starts, I can send them all to FastLineRenderer, and it converts them into a series of meshes (something like 64k lines per mesh).  This shoots the framerate back up to almost 60FPS.
  3. I needed to optimize the script controlling particle movement.  Yesterday and today, I completely rewrote the thing to eliminate the need for certain loops that were bottlenecking.  I won’t go into any more detail now, but the resulting code is, in my opinion, much cleaner and easier to read, AND it’s a lot faster.

All that put together, and you can how smooth the above video is.  Not all the meshes from the Belle II detector are finished combining, so I just threw in the Electromagnetic Calorimeter for that video.  The framerate never dropped below 50FPS.  I’m pretty proud of that.

Oh, and I put Lucas Freeman’s (mostly complete) Cube model in the project too, so that vastly improves the aesthetic quality.

 

Particle Physics Simulation Update

The particle physics simulation project is coming along quite nicely!  We have the vast majority of the Belle II model imported into Unity and looking good now.  There’s still plenty to work on, but check out how it looks as of right now:

Dr. Leo Piilonen has been extremely helpful in working to produce FBX files for the Belle II model rather than VRML files, and Jesse Barber, a physics undergraduate, has been working closely with me to get the model looking great.

Some of the things on my immediate to-do list:

  • Finish importing Belle II (passive EKLM)
  • Make another scale slider for scaling the Belle II without also repositioning it relative to the viewer
  • Fix the opacity slider bug that I’m getting sometimes
  • Fix the particle trails so that when the Belle II is moved they don’t generate trails for that movement itself and stay consistent within the Belle II model
  • Try to improve the framerate when the entire Belle II is displayed

Belle II particle physics simulation update

We have some exciting updates from the particle physics simulation we’ve been working on for the past month!

First, we now have Unity scripts that read the particle data from a CSV file, sort it correctly, and use it to spawn and move particles.  It’s a very important first step – in fact, a lot of everything from this point on is frills.  Although there’s lots of frills.  But this is the *meat* of the project – taking particle data and visualizing it.  There’s a (slightly confusing to watch, but proof of product) video below:

ALSO, Jesse Barber (Physics sophomore) and Kaelum Hasler (high school student worker) have been working with me to get the VRML model of the Belle II organized.  We had to combine a lot of objects in order to get the object count down to something manageable (it was at something like 300k to begin with), but we also had to CUT a lot of the cylinders into four parts, in order to solve a transparency depth-sorting issue in Unity.  They spent almost all of last week working on that, and we now have a model in Unity!  This model is still incomplete because the VRML export that we’re working with doesn’t quite have the full model, but we’re almost there, and we can really see what it’s going to look like now when it’s all done!  See below for another video of that.

Particle Physics Education – Belle II model

One of the new ICAT SEAD grants for 2016-2017 is a pedagogical particle physics simulation in the Cube.  One of the first steps, is to get the Belle II model working in Unity.  This is a bit of a task.

Transparency view of a small portion of the Belle II model
Transparency view of a small portion of the Belle II model

One of the PIs, Leo Piilonen from the VT Physics department, has to first export the model from an arcane format that the researchers (at KEK?) use, to a more readable format, like VRML.  VRML itself is an old open format that had some hype in the 90s but never really took off.  Thankfully, 3DS Max can import it, so I can organize and do any necessary edits to the meshes.  That’s also a task.  The meshes are all separated out into the smallest possible unit.  I’m not exactly sure at this point, but I think there might be somewhere around 500k.  3D modeling software can handle high polygon counts, but it’s not used to dealing with so many different objects.  So, I have to do some manual combination, etc, rename the materials so that they’re unique, etc.

Cutaway view of a small portion of the Belle II model
Cutaway view of a small portion of the Belle II model

Anyway, after some headache, we can import the meshes group by group into Unity.  I’ve only imported a small amount so far, just to make sure my pipeline works and to adjust as needed.  The next two issues will be

  1. Decide how to deal with transparency and depth-sorting (every object has a transparent material, so I have to make some decisions here).
  2. Write a script that allows the user to zoom in on the object by scaling up the model of the detector while seemingly keeping the user at the same position.

More to come soon!