Sucked into the vacuum of a black hole: Unity Shader Graph

One of the effects I’ve liked in games is the “everything being sucked into a black hole vacuum” look. What are the correct words to describe it? Does this effect already have a proper name or keyword? In Virtual Virtual Reality, the conceit is that you’re the human employee pruning and vacuuming some machine’s lovely domestic abode and suddenly without warning it is as if you have done a terrible thing; you’ve accidentally sucked the first layer of the world away by mistake!…

Today, I was reminded of it again whilst watching the (ever inspiring) devlog for the indie game Farewell North, so I wanted to figure out how it was made. In Farewell North, it seems like it is being used in the playback scene for memories; the visual effect of being sucked back into the projector is exactly what makes them feel like ethereal memories being played back.

This evening I spent a while trying to figure it out. The answer seems to be using Unity’s Shader Graph (which I’ve actually never properly used before, but it reminds me of Blender’s shader nodes, so I guess roughly get the node based system). I looked around for examples and explanations of how it was created. I am glad to say that with all the power of the internets and online resources, it was indeed possible for me to understand how one can recreate the “sucked into a vacuum” effect. Lerp refers to linear interpolation and the value will change from a to b over t. There’s a Vector3 to set the origin point of the “BlackHole” or where everything will be sucked into / spat out of. And then there is a slider property for the “Effect” (a bit like “time” in this case) which can be helpfully tweaked in Inspector for testing purposes. “Range” is a fixed value. There’s obviously a lot more I can experiment with Shader Graph. But for now… a working example of the “Sucked-into-a-blackhole-vacuum” Shader Graph looks like this:

My basic version of the “Sucked-into-a-blackhole-vacuum” look…

Imagine my Spheres and Cubes teleporting endlessly from this world to another world and then back again – oh wait now you don’t even have to imagine it, here’s an actual visual representation of it!

Low Poly 3D People of Second Life

Despite being a long-time casual Second Life user, I have always been using a Macbook Pro which has always consistently seemed nearly unable to handle the graphics for Second Life. You would think that I would just switch up to a proper gaming pc by now, but somehow despite having tried to switch to Windows, I still have a preference for the Macbook Pro…

The price for sticking to the Mac is that in order to avoid lagging in Second Life I have gradually turned the Quality lower and lower, and the Draw distance smaller and smaller, until I’ve even on occasion set it to a ridiculous 64m. It means that things in the distance (a range which I can clearly see) do not load until they are within 64m of my virtual self. When I zoom in and out, things appear and disappear, meshes load and unload.

So in Second Life there’s the concept of “Land Impact” of how when you upload certain meshes in certain scales, even if you thought it was a low poly model in Blender, it may be interpreted as a complex mesh due to the “level of detail” settings on the model at the point of importing. So a lot of shops on SL Marketplace sell their wares by advertising the low land impact that their items have. No use having something beautiful but can’t be loaded by many people because it uses too many resources. There’s a very interesting post here about how ‘detailed’ meshes can be uploaded with low land impact and there’s much to understand how about the scale at which one imports the file and the LOD rings ( level of detail) which affects how the object is viewed from different distances.

So recently whilst walking around the “Village de Provence” in La Garde-Aris in Stringray Bay, I encountered a holiday scene of visitors to a village tourist spot. Lest you feel lonely in this beauty spot, like many other places in Second Life, they’ve scattered lots of 3d people all over the place so you can feel like one with the other holidaymakers and shoppers…

But don’t worry, these low poly people are just about to load up properly!!

Yeah, don’t you go imagining some fantastic hi res metaverse experience when I tell you about me walking about in Second Life… because this is actually what my Second Life experience is like sometimes on this machine… <insert sweatdrop>

 

 

Breastfeeding and Coding

Breastfeeding and coding – were there ever two more unlikely words to be smushed together?

My breastfeeding journey is still going strong and baby is almost 2 now. It definitely occupies a huge part of my day and night, and even when I go into the office I still am pumping milk and there is so much logistical hassle that comes with it. I’ve done so much research into it, that maybe one day I should write a post just about breastfeeding and breast pumps… (wait, who is the audience of my blog anyway? Any breastfeeding mums here?)

I encountered a paper in which they tried to run an experiment testing the hypothesis that breastfeeding women are the victim of bias. The results pointed to negative societal perception of breastfeeding, with breastfeeding mothers were rated as being significantly less competent in maths (Source: Smith, J. L., Hawkinson, K., & Paull, K. (2011). Spoiled Milk: An Experimental Examination of Bias Against Mothers Who Breastfeed. Personality and Social Psychology Bulletin, 37(7), 867–878. https://doi.org/10.1177/0146167211401629)

If someone is a working breastfeeding mother it often means they have had to rearrange much of their lives in order to accomodate this, and the experience will probably make them even more awesome at time management. I look back on the years before the Bean came along and realise that I’ve squandered so much time in the past on frivolities. Breastfeeding and wanting to do it all (career-wise) really does means you have to be extremely careful with how you manage the finite resource of time – I’ve never been more focused and productive at work, because I only have one shot at things now! I don’t have time to faff about!

It is true that the logistics of breastfeeding (when done directly) is such that it can be difficult to do work with your hands. But I was resolved to become a better coder despite also having to spend an inordinate amount of time breastfeeding my baby. I like to follow various Python MOOCs whilst lying down breastfeeding baby, with just my phone (for coding) and tablet (for the MOOC). All this seemed to point to the importance of having a cloud-based service where you could code, and to have the right coding-oriented keyboard on mobile.

The solution? Google Colab + Codeboard (a coding-oriented keyboard for Android) to play around with Python on the cloud and on your mobile!

Seems fitting that this post is being posted on Mother’s day. Big up to all the hardworking mums out there, it sure is a lot of work to raise a child!