Category: Gamedev

A Sanic is Born: Custom Avatars in VR Chat

do-you-want-to-build-a-sanic-frozen.jpg

The cold never bothered me anyways.

Do you want to build a Sanic?

There are those who would blame digital anonymity and online handles as a major enabler of cyber bullying and harassment.  This may very well be, but I feel digital personas and avatars can also be very beneficial in allowing us to express and reinvent different aspects of ourselves, as well find common ground with other users.  Right now it feels like hyper-Comicon, and users can share their love of a character even if they could never cosplay as a 30 foot tall Stay Puft Marshmallow Man (actually, someone might have already tried that: cosplay is crazy).

In setting out to make my own avatar, I decided I wanted something approachable, funny, and physically impossible for me to otherwise be.  I dug deep into my childhood, and realized my spirit animal is Sonic.  Well, not really, but I grew up with Sonic.  The character has really transformed over the years from a cool dude with a ‘tude, to a dude with a ‘tude who liked chilly dogs, to a cartoon dude who likes human women, to a meme dude who likes Shrek.  I think most of us feel sympathy for Sonic: he is Ozymandias fallen, the mighty brought to ruin simply by the ravages of time (well, a few terrible games and the Internet).

sonic-statue

Look at my works, ye mighty, and despair

Despite my love of the original character, I felt like Sanic, as portrayed in hilariously bad fan art, was more fun to be in a digital metaverse.  I modeled my version off of this piece of fan art, which M. Lovecraft improved upon with masterful placement of offset, asymmetric googly eyes.

 

SanicGift.jpg

The gift that keeps on giving.

3D Modeling: Gotta Go Fast Edition

The original basemesh took me around an hour or two to make.  The shapes are really simple, but took a lot of soft selection editing and ironing (smoothing the verticies of the polygons to get good flow) to get something that looked cute yet derp’tilda.

refining-mesh

Not pictured: existential dread

When modeling a character, you have to make sure that the topology (how the polygons are structured over the mesh) has organic looking loops.  For example, its often best for the polygon vertices to form an even ring around the circumference of the arm.  Sanic loves rings.  Also, try to put more loops where the model is likely to bend or deform (like elbows and knees).

I like to keep things as low poly for as long as I can, using what C4D called a ‘hypernurbs’ object (don’t ask) to smooth put the polygons further and add more mesh detail by subdividing the mesh.  They actually call this a ‘subdivision surface’ now, but I just like saying hypernurbs because it sounds like I’m doing something cool. (They’re so cool that I actually forgot to add them in the end. Whoops.)

 

Boning Sanic

yougetusedtoit

You get used to it.

After using C4D’s UV Wizard and body paint to slap color on the model, I grabbed a rig from one of the Unity Adam models and started deforming the joints to fit the cancerous blob that is my Sanic.  I used that rig hierarchy so that everything would be compatible with the Unity Mecanim Humanoid Rig, which you need to ensure is referencing the right bones in your rig.  After that I put a VRC_AvatarDescriptor component on the model from the VR Chat Developer SDK., and uploaded it from within Unity (props to the VR Chat devs for making this so easy!)

Within a few hours I was ready to paint the virtual town red!  Most other users found me repulsive and definitively ‘not sonic,’ but it was super fun to run around the environments and chat with others about the importance of going fast.  I set the character height to around 3.5 feet, which forced me to look up at other users (probably good for my back after spending all day on the computer) and had the unintended side effect of making lots of other characters chase me around, attempting to pick me up.  Special thanks to Poplopo on VR Chat for snapping some amazing pictures of me at the Majora’s Mask Milk Bar.

fearws

fearcu

Even Sanic Can’t Outrun the Past

In regards to web anonymity and bullying, the issues are extremely difficult to tackle. The VR Chat code of conduct is a great manifesto, but even Socrates (it’s under ‘so-crates) and Glaucon were talking about digital anonymity in their ancient Greek debate on the web-ring of Gyges.  I have the feeling this struggle between absolute freedom and accountability will persist throughout the ages… well at least until Facebook or some hacker turns on your Oculus Constellation Sensor and spies on you.

 

Porting Hyrule into VRChat

This weekend I got a small taste of how VR could impact communication on a game changing level. Long story short, I 3D modeled a world, uploaded it to my account and explored it with people from all over the world within the span of a few hours. This could really impact notions of ownership, property and material possessions in a huge (and I think beneficial) way. (But more on that later.)

img_1435

We’ve been blown away by the community from Reddit, to UploadVR to Twitter to the Nerdist – our passion project surpassed beyond our wildest expectations and we decided to share it another way: on the social platform VRChat.

Speaking of, we’ll be guests on their upcoming show TONIGHT! – Tuesday, February 21st at 7PM Pacific. Keep in mind that you can install VRChat and watch, even without a headset! (Cool, eh?) You can check out archives of the show here and follow them on Twitter.

Why not re-purpose again?

I didn’t model the environment with game engines in mind. My work flow in porting it has largely been the path of least resistance (i.e. putting mesh colliders on any of the huge/complex object the players should be able to stand on and ignoring colliders on the thousands of individual objects). Exploring the map with an enthusiastic group on VR Chat showed me just how many places a user could get stuck in a pit or run into an invisible collider that stuck everyone to the ground like glue. Despite these bugs, running around the world still felt like a huge adventure, and made me reflect on a fast approaching future in which engineers or designers will explore structures collaboratively in a group. Or Minecraft.

The Unity hurdles and Experience with the VRChat SDK

Unfortunately we encountered some problems using our current Unity version 5.6, and found that we had to downgrade in order to use the VRChat SDK (which it kept telling me in a warning message, but I’m stubborn and getting really tired of computers telling me what to do).

Luckily Unity keeps an archive of older versions of their application, and we were able to get it working fairly quickly. The VRChat SDK is really well designed and intuitive: its clear it was designed for creators of all skill levels, and I would highly recommend checking it out!

For this version of the model, I removed the post processing look and locomotion code from the scene (it’s good practice to make the build less than 200MB). VRChat has its own incredible locomotion options, so everything hooked right into that.

Gunter, a really great member of the VRChat community who has been helping me develop the map, suggested that I add portals, as well as a high vantage point to ease in allowing users to find each other, and facilitate easy movement across the vast expanse of digital space.

What struck me was that VR enables layers of communication that aren’t present in any other medium (or in life itself). Players changed their avatar to suit the environment: a huge area that would be well beyond cost prohibitive for me to build to scale in real life. We can design spaces, write code and alter ourselves in a really full expression of creativity. It’s not just virtual reality: it’s a shared reality, and it’s one that we can shape to our hearts’ content.


VRChat on Steam: store.steampowered.com/app/438100
Official VRChat website: www.vrchat.com
Gunters Universe on Twitter: twitter.com/guntersuniverse

The Legend of Zelda: LTTP World Map VR

‘There’s not that many unique objects… shouldn’t be that hard to make.’ -A Fool

‘There’s not that many unique objects… shouldn’t be that hard to make.’ -A Fool

It’ll Be Fun They Said

One of my friends sent me a link to a sketchfab contest that challenged creators to make a VR-ready model inspired by the Legend of Zelda.  I’m a big fan of the series, and I have been dying for an opportunity to port one of the MANY Game of Hyrule models I made into virtual reality.  The project seemed like a perfect fit…

https://hrinsider.ca/wp-content/uploads/2014/02/177274989.jpg

My creative process.

And it many ways it was, although in practice it was also a harrowing exercise in extreme tedium and madness.

Hyrule Hysteria

The original map was painstakingly built up using manually drawn splines, extrusions and box modeling for each of the 50+ unique objects in the set.  There might be a few errors, but nearly every element on the overworld map has been recreated and placed in 3D space.  While this process was laborious, it doesn’t even compare with the optimization process.  Well, I say that because I built the map a year ago and the pain is mostly gone.  Mostly.

It Makes Sense Trust Me.PNG

It makes sense, trust me…

I got the impression that having over 5 thousand individual models, grouped under a multitude of nulls and hiearchies would probably kill real-time performance (gotta hit that 90 fps), so I decided to merge all the geometry that shared a common texture.  This way, retexturing the model would also be way easier to do in subsequent engines, as you only had to apply one material per piece of geometry.

Objects.PNG

For more information about the map, click here

It turned out to be a huge ordeal to combine the thousands of individual meshes as some of my models had their own hierarchy, or polygon selections that applied two different materials to one object (perish the thought).  In the end I had to manually combine, change texture tags, and clean individual objects for a full day.  Luckily some of the objects were instances, so I could fix up and ungroup the original model, but even still there was a mountain of mind-numbing monotony ahead.

Even getting the file size down to the Sketchfab basic (‘I haz no monies’ version) requirement of below 50mbs was a horrifying task.  I found that deleting some of my textures and UVs freed up just enough space for me to get a barely passable version up on Sketchfab.  N-gons (polygons with more than 4 verticies) saved space, but became digital nightmare shards in my uploads to the site, so I had to convert critical objects to tris.

 

https://www.studentnewsdaily.com/wp-content/uploads/2015/05/clowns.png

Only slightly less scary than trying to fit over 1 million polygons into a sub 50mb file.

But hell, I slogged through hours of optimization and tidying, and I wanted to see it in it’s full VR glory.  Unity to the rescue.

Help me Unity3D, you’re my only hope

I was able to rebuild the textures from my original Game of Hyrule map intro using the incredible UBER shader by Tomasz.  I was expecting a performance hit from the complex, multi-texture shaders I built, but everything worked flawlessly… so I wasn’t satisfied until I threw as much post processing/image effects onto the camera as possible.  I used the godlike Volumetric Fog & Mist by Kronnect to create some atmospheric perspective and even a subtle amount of sunshafts (dare I say ‘tasteful amount’).  I added filmic post-processing from Scion to the camera, and found the performance hit acceptable for how cool it made everything look.  Oh yeah, and I added AO because bitches love AO.

As far as the ‘coding’ I used VRTK for teleportation and Playmaker for the player scaling.  I’ve been spending so much time working on learning ‘code’ and game logic for other projects that it was a welcome excursion to just make something look good (often the only requirement in 90% of my freelance work).  Coming from a VFX background, I am still shocked at the real time performance of modern game engines.  1-3 hours per frame?  What is this, 2015?  I’ll render in Unity, thank you (well, Unity or Octane, OR BOTH #LaterThisYear #OctaneInUnityForever).

Anyways, all the boring, mindnumbing work was worth it if you guys enjoy playing around with the map!  I hope I can export some other models for you to play around in soon… I just hope someone invents some crazy, flawless texturing baking solution for C4D/Octane in the meantime.

The final product

You can download the small Zelda map experience on itch.io, or navigate to the Downloads section.  In the meantime, here’s a quick look:

 

Unity VR Development: Scope, Tools and Limits

thefutureofsexyA World Without Limits

Congratulations!  You are one of the adventurous few, daring enough to explore the infinite reaches of VR: a bold new experiential platform that some have called ‘The Final Medium.’  No other art form I have seen requires as many disparate and varied skills to pull off, but it is my hope that through this series that I can elucidate some of the more powerful tools and techniques I have found that allow you to realize (a place others into) your vision as fast as possible.  Before we get virtual, however, let’s take a moment to go over our unfortunate IRL (meat space) limitations.

Scope (A World With Some Limits)

The tools and pipeline of content creation will vary greatly on what kind of project you are making, but one of the consistent challenges is reflected in the inescapable triangle of compromise:

thatdamntriangle

Just as a note, the triangle is relative: if you are a skilled artist working for yourself you can do great work quickly at low cost, however you won’t be as fast as TWO or THREE skilled artists working on the same project.

Anything you make costs something, but not all costs are worth taking.  A project can cost your good health, finances, opportunity for growth/expansion, personal relationships or your confidence in the very fabric of reality.   Limiting the scope of your project early on can hopefully prevent you from sacrificing anything of value down the line.  Making something is almost ALWAYS better than making nothing unless you are endangering something important in your life.

The Tools (Each Software Has Its Limits)

Most VR experiences are developed using1044718_10101281695494028_346839149685239778_n1 game engines such as Unreal or Unity.  Coming from a VFX background, I was shocked to learn that these programs are essentially free to use, often only requiring a small licensing fee if you make over $100,000 in annual revenue from use of the program (sounds like it won’t be a problem for me).  Personally, I use Unity for 3D animated experiences, and will speak to that pipeline throughout this series.

There are a ton of Unity tutorials out there, but I like Brackeys because he sounds nice: https://youtu.be/IlKaB1etrik

As impressive as these engines are, you often have to make art assets in an external app.  I love using Cinema 4D for creating 3D models, but really you can use almost anything that exports a mesh to an obj or fbx (Unity can import a staggering amount of file types).  If you aren’t comfortable with 3D asset creation or simply don’t have the time, there’s a ton of great places to find models like the Unity Asset store, Turbosquid and tf3dm.com.  Costs, aesthetics and usage right might vary per model, but depending on where you sit with the triangle of compromise, these cheap/free assets can be your fastest way to a product or protoype.  Hell, you could steal crayons from Denny’s, draw assets on toilet paper, scan them in at the library and have 2D cut-outs placed in 3D space for characters if you wanted to.  This is VR.  There are no limits (#ThereAreActuallyLimits #StupidTriangleOfComprimise).

htc-vive-room-scale-1459874611-aNSF-full-width-inline[1].jpg

To me, VR is about interacting with a digitally generated space, so I decided that I want to focus on roomscale experiences with head and hand tracking.  Rather than learn a traditional scripting language, I opted to pick up Playmaker from the Unity Asset store which is an incredibly powerful visual scripting tool based on functional state machines.  Some ‘pros’ swear against using visual coding add-ons, but I find the solution fits my typical fast/good triangle considerations and $65 dollars is a steal for such a robust and fun system.  Who would have thought that making games feels a lot like playing a really satisfying puzzle game?  In future articles I will elaborate on how you can use Playmaker, but if you are eager to learn about the system in a game design context I highly recommend Mdot’s incredible tutorial series: “The Strange School.”  Just don’t parent the VR playspace to the character motor script (or go for it, #nolimitsVR2017).

I actually wouldn’t have learned 3D modeling if it wasn’t for M dot Strange, and I definitely wouldn’t have got into Unity without him!  He’s a great guy who really seeks to empower the artist in everyone (on top of being an engaging/hilarious teacher).

I develop for the HTC Vive, so I use the SteamVR package on the Unity Asset store combined with Frame Tale Studios SteamVR Playmaker Toolkit, which allows you to easily map controller inputs to your state machines.  This will allow you to shoot cats out of your hands when you press the trigger.  It might have other uses, but for now that’s all I can think of (#TheOnlyLimitIsImaginationAndRentMoney). Another amazing tool is the community project headed by TheStoneFox, VRTK, which is a collection of scripts and interaction systems made by developers for developers.  VR is challenging enough: why try to reinvent the wheel when you can focus attention on to making that deep-sea dating simulator you’ve always dreamed of making?

Anglerfish-deep-sea-fish[1].jpg

Sorry, no relevant links for this one, I just think deep-sea fish look funny.  Also, you can call your game ‘Another Fish in the Sea.’  Title’s on me.

The World Is Yours (Within Limits)

Obviously, there are as many tools as there are workflows and aims, but with a VR Headset and $100 USD you can get started developing VR RIGHT NOW (even cheaper if you learn C# code)!  The experience of walking through the halls of your own digital creation is exhilarating, cathartic and mind blowing.  Subjecting other people to the horrors of your digital Garfield and Saved by the Bell Crossover Museum: priceless.  Follow along with this blog as we delve more into my ever-evolving workflow, and specific tools that help you git’er done.  Just remember to design responsibly, because…

TheNewGod.jpg

Well… you know what could happen.