Progress Update #29

 Ahead of Schedule


    This week I managed to get all the features done before the end of the sprint and even managed to make a dent in next week's work as well.


Overview Overhaul

    The main focus of this week's sprint was to redo the overview UI. Like I said last week, this remodeling essentially makes the highlight UI that I worked on obsolete. This is not necessarily a bad thing though as, in my opinion, it is much more easy to understand and interact with.
    The essence of the new design was to have a collapsing sidebar that would have three sections: Bodies, Asteroids, and Simulation Settings. The bodies tab would have all of the information that was in the old highlight but now in an easy to read vertical list. This tab would also house the "Add Body" button that was made last week. The asteroids tab would have settings for the asteroids that are aimlessly wandering the solar system as well as specific settings for individual asteroid belts. From this tab the player would also be able to add and remove asteroid belts like they can with celestial bodies. Finally the simulation settings tab will have options for dictating how the simulation is run. For now the only settings her will be the gravitational constant (G) and the orbit visualization settings.
    Implementing this was much simpler than I thought. For the most part I was able to reuse functionality from the highlight in this new side bar. Additionally I went a little overboard and accidently finished the asteroid editability which was scheduled to be done in next week's sprint. 
    Here's what the final product looks like:


    One thing to mention about the overhaul is that I do somewhat miss the highlight ring around the planets as it did a nice job of calling attention to where they are in 3D space. Because of this I might work on an alternative at some point, possibly like a shader or something. 


Better Movement of Bodies

    Ever since I implemented the first iteration of moving bodies I knew that it would not be the last. As a refresher, the previous version hijacked the pan input of the overview character and used it to pan the selected body relative to the rotation of the camera. What I wanted to do was basically recreate the movement tool in every 3D program; a mesh with three unit vectors, one for each dimension, and colored accordingly. 
    For the first time in my game development career I made a 3D model all by myself.  I used blender to make my model and I must say, opening blender was the first time since starting Unreal that I was overwhelmed with a UI. It took a few hours to learn, but eventually I managed to get through it and this was the result.


    For the texture I did what I think is a clever move and moved all the UV coordinates for everything of the same color to the same location and just painted with little regard for staying inside the lines. I have no idea if this is bad practice or not but it works so I'm happy.


    The import to UE4 was a breeze and I made a material with no depth test so that it would render on top of everything in the scene like I learned to do with the world space highlight last week. When I did this I noticed a very prominent ghost-like trail behind the actor when it moved around. Some quick googling lead me to this thread which pointed out that it's an anti-aliasing issue. Changing the AA method in the project settings from "TemporalAA" to fast-approximate (FXAA) fixes the ghosting at the cost of the final image looking slightly worse in some areas due to the blurring that FXAA incurs.
    I then implemented the functionality based mostly off this thread which shows how to click and drag an actor to move it. I did have to make some tweaks to snap it to the axes but here's what it looks like in blueprint:


And in-game:


    I am really quite happy with how it works. The only thing I think I could fix is the fact that when you click and drag it will instantly set the position to wherever your mouse is. This would be fixed if I applied an offset equal to the difference in position of the mouse and the actor when the mouse is first clicked. 


Asteroid System Editability

    There really isn't much to say here as most of the functionality was mentioned in the overview overhaul and was copied from the previous version of highlights. However, there is a very small list of things that I do want to mention but don't want to put the effort into expressing them each in paragraph form:
  • Moving the asteroid belt will reset the simulation of the belt as it requires moving the Niagara actor then reinitializing the system. 
  • Changing a property on the asteroid belt will reset the simulation of the belt because the system needs to be reinitialized with the new values.
  • Though you can set Niagara variables, I have found no way to get them. Seriously, how is this not part of the engine!? As a result of this, newly spawned belts might be initialized with values that are misaligned with the UI. 
  • I have absolutely no clue how to save the state of a Niagara system in the scene. This means that whenever the scene is reloaded, the asteroid belts' simulation will be reset. 


Improving the Orbit Visualization

    This feature was actually scheduled for next sprint but I had a spur of the moment idea and just had to try it out. The idea was to "animate" the ribbon visualization by using time as an input in the material:


Here's what it looks like in-game:

Comments

Popular posts from this blog

Polishing the Foundation

Progress Update #13

A New Chapter