LogoLogo
  • Home
  • Projects
  • About
  • Contact

Unity Machine Learning and a Good Riddance to 2020

by Devon O.· December 30, 2020· in Life, Unity3D· 0 comments tags: ai, machine learning
So it’s been just over a year since my last post here. As you may imagine, I’ve had a bit on my mind over that time though. I don’t think it’s a very controversial thing to say, that 2020 has been the suckiest year in my life time. Like many others, I have been working from home since March. I remember 12 March packing up a desktop, laptop, monitor and a few other bits and bobs thinking to myself, “This sure seems like a lot of overkill considering we’ll be back in the office in a week or two.” Psych! Should’ve bewared those ides. Over the Christmas holiday though, I picked up a new computer for my birthday and started digging into Unity3D machine learning. Just yesterday, I sat down and thought I’d get a kart that could follow a track. I copied the cart and cart code from the Unity Karting Microgame project (which does have it’s own ML code and agents – but I completely ignored that to figure it out on my own), found these fantastic race track assets, watched a few youtube video tutes, and finally came up with this: After getting that working, I then […]
Read More

Using Attributes for Property Validation

by Devon O.· December 24, 2019· in Unity3D· 0 comments tags: Editor Scripting
Programmers are always looking for ways to write safer more bullet proof code. For that reason, at work it was a convention for us to use Unity’s OnValidate() callback to validate the public and serialized properties of our MonoBehaviour components. So for example we would typically write code like: [crayon-603b351550961663383717/] Now, generally speaking, this works great. Essentially, what the above snippet will do is log an error in the Unity console every time the a property of the Monobehaviour is updated, the code is changed (i.e. the scripts reloaded), or until, (the desired goal), the property is set using the Unity Inspector and someTransform is no longer null. This is an excellent way to be sure properties that are meant to be set in the Inspector window are kept to expected parameters (e.g. not null). Programmers, though, are also very lazy. It wasn’t long before the nice clean assumption above turned into something more like: [crayon-603b351550972618360695/] Logically speaking, that works just as well and does the basically the same thing and works just as well (sans the nice output), but it wasn’t long before even that condensed version felt like too much boilerplate code to be worth writing. I wanted […]
Read More

Custom Post Processing with the LWRP

by Devon O.· September 15, 2019· in Shaders, Unity3D· 1 comments tags: lightweight rendering pipeline, LWRP, post-processing
About a week ago, someone posted a comment on this old post asking if I could update the ripple effect so that it would work with Unity’s Lightweight Render Pipeline and 2D lighting. This seemed like a good opportunity not only to familiarize myself with the LWRP and the post processing stack, but to clean up some pretty ugly and ancient code. The final result can be seen here. The red and yellow lights drifting around are point lights being reflected off a Sprite instance (i.e. 2D lighting). There is also a built in Unity Post Processing vignette effect added. And by clicking on the game screen, you can see the rubbery ripple effect which is a custom post effect similar to the one from the previous post. To create that effect, you have to start with setting up a project. I won’t bother to go over a lot of detail in project set up, but basically, you need to create a new project and, using the package manager, install the Lightweight RP package (this will automatically bring in the Core RP Library and Post Processing packages as well).  Create a Lightweight Render Pipeline asset and add it to your […]
Read More

Liquid On Screen Effect

by Devon O.· February 24, 2019· in Shaders, Unity3D· 0 comments tags: liquid
I really wasn’t sure what to call this Unity3D post processing effect, but it’s a pretty nice one that creates a splash of liquid across the screen. It could be used in racing game when driving through a puddle, a boating game at any time, change the color to red and you’ve got a nice blood or lava splash, or easily modify it to have liquid dripping down the screen for rainy scenes, etc. etc. Just to have an idea of what I’m talking about, you can check out a WebGL example here – just click on the Unity scene to trigger the effect. If it seems useful, I’ll try to describe it below. The effect starts with a particle system, so we’ll create that first. Start with a circular texture (say, 128×128) with a red/green normal map. Feel free to use the one here for simplicity’s sake. I know it looks pretty weird, but we’ll use those colors later to create a faky refraction effect you typically find in water drops. Create a new material using an alpha blended particle shader and set that texture as the material’s particle texture. In your Unity scene create a particle system using […]
Read More

Dissolving Particles with Custom Vertex Streams

by Devon O.· February 03, 2019· in Shaders, Unity3D· 0 comments tags: particles
Here’s a quick little tip/idea to demonstrate using custom vertex streams and custom data in your Unity3D Particle Systems to create some pretty interesting VFX such as dissolving particles. Doing some googling, there didn’t seem to be a lot of information out there about custom data in particle systems, so hopefully this will help out a little. From a high level, what this entails is creating a particle system that will automatically send some data to the shader of the particle material via the shader’s vertex stream. So, as you might guess, the first thing we’ll need is a shader that will be able to handle the data sent. Even sooner, though, let’s get a couple textures together. For the particle we can just use a basic particle png that has a radial gradient that goes from white in the center to full full alpha along the outer edge. We’ll also need a dissolve texture, which in this case can just be some quick perlin noise. You can make both in Photoshop or Gimp in about 5 minutes or just nab them here if you’d like to just try this out quickly. Of course, since the effect we’ll be looking […]
Read More
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
Devon O. Wolfgang

AIR | Unity3D | AR/VR

Unity Certified Developer

Technical Reviewer of “The Essential Guide to Flash CS4 AIR Development” and “Starling Game Development Essentials”

Reviewer of “The Starling Handbook”

Unity Engineer at Touch Press.

Categories
  • Actionscript (95)
  • AIR (16)
  • Flash (99)
  • Games (7)
  • Liberty (13)
  • Life (53)
  • Shaders (20)
  • Unity3D (21)
Recent Comments
  • MainDepth on Unity Ripple or Shock Wave Effect
  • Devon O. on Unity Ripple or Shock Wave Effect
  • Feral_Pug on Unity Ripple or Shock Wave Effect
  • bavvireal on Unity3D Endless Runner Part I – Curved Worlds
  • Danielius Vargonas on Custom Post Processing with the LWRP
Archives
  • December 2020 (1)
  • December 2019 (1)
  • September 2019 (1)
  • February 2019 (2)
  • December 2018 (1)
  • July 2018 (1)
  • June 2018 (1)
  • May 2018 (2)
  • January 2018 (1)
  • December 2017 (2)
  • October 2017 (1)
  • September 2017 (2)
  • January 2017 (1)
  • July 2016 (1)
  • December 2015 (2)
  • March 2015 (1)
  • September 2014 (1)
  • January 2014 (1)
  • August 2013 (1)
  • July 2013 (1)
  • May 2013 (1)
  • March 2013 (2)
  • December 2012 (1)
  • November 2012 (1)
  • September 2012 (3)
  • June 2012 (2)
  • May 2012 (1)
  • April 2012 (1)
  • December 2011 (2)
  • October 2011 (3)
  • September 2011 (1)
  • August 2011 (1)
  • July 2011 (1)
  • May 2011 (2)
  • April 2011 (2)
  • March 2011 (1)
  • February 2011 (1)
  • January 2011 (2)
  • December 2010 (3)
  • October 2010 (5)
  • September 2010 (1)
  • July 2010 (2)
  • May 2010 (5)
  • April 2010 (2)
  • March 2010 (7)
  • February 2010 (5)
  • January 2010 (5)
  • December 2009 (3)
  • November 2009 (1)
  • October 2009 (5)
  • September 2009 (5)
  • August 2009 (1)
  • July 2009 (1)
  • June 2009 (2)
  • May 2009 (6)
  • April 2009 (4)
  • March 2009 (2)
  • February 2009 (4)
  • January 2009 (1)
  • December 2008 (5)
  • November 2008 (2)
  • September 2008 (1)
  • August 2008 (6)
  • July 2008 (6)
  • June 2008 (9)
  • May 2008 (4)
  • April 2008 (3)
  • March 2008 (4)
  • February 2008 (9)
  • January 2008 (7)
  • December 2007 (6)
Copyright © 2021 Devon O. Wolfgang