Posts

Unity Shader: Dissolve Shader

Image
In this article I'd like to show you a quick and easy way to implement the dissolve effect. Mind you, the code is not optimized to make it easier (hopefully) to understand. Let's begin! The Dissolve Texture First of all we need a dissolve texture and we can generate it ourselves using Photoshop Cloud filter. Here's mine: The Shader Add a new Standard Surface Shader in Unity. Add two new input properties to our shader: 1 2 3 4 5 6 7 8 Properties { //...Other shader properties //Dissolve Shader Properties _DissolveTexture ( "Dissolve Texture" , 2D ) = "white" {} _Amount( "Dissolve Amount" , Range( 0 , 1 )) = 0 } _DissolveTexture is where we put our dissolve texture _Amount represents the progress of dissolving our object (0 = visible, 1 = disappeared) In the surf function is where the magic happens! We get the  dissolve_value by sampling the color of our _DissolveTexture using the

Zbrush: My first attempt at sculpting a super villain mask

Image
Yeah I'm a programmer but I'd love to be a 3D Artist 😁 My girlfriend Giulia bought me a Wacom Intuos tablet bundled with ZBrush Core and in my spare time I've started learning this amazing software. Here's my first attempt at sculpting a super villain mask 😃 Please enjoy!

Spherical Coordinates

Image
A spherical coordinate system is a coordinate system where the position of a point in 3D space is specified by three numbers: a radial distance r an azimuthal angle  θ ( theta ) a polar angle  φ ( phi ) Spherical coordinates comes in handy to implement an Arcball Camera . Imagine to have a virtual ball behind your screen, by clicking with your mouse you pinch the ball and by dragging the mouse you make the ball spin around its center. We can map the mouse x coordinates to be the θ angle and the mouse y coordinates to be the φ angle. We also assume that our virtual ball is a unit sphere so the radial distance is always 1. The problem is that we can specify the position of our camera only using cartesian coordinates so how do we convert spherical coordinates to cartesian coordinates? Polar Coordinates Polar coordinates are like spherical coordinates but in 2D.  We can specify the position of a point using two numbers: a radial distance r an

Android OpenGL ES 2.0 OBJ Loader with Lambert Shading

Image
For this experiment I've developed my own OBJ parser in Java which support parsing of vertex positions, normals, texture coordinates and indices to remove duplicated vertices before uploading them to the vertex buffer object. To test normals I've also implemented a simple lambert lighting system using OpenGL ES 2.0 GLSL shader language.

80s sci-fi soundtrack song!

Image
I was a child of the 80s, born and raised and that incredible decade. I'm mainly a guitar player and death metal is what I hear and compose the most but I'm a sucker for 80s sci-fi-cyberpunk movie soundtracks. Recently I've tried this free VST Synth called Synth1  and I've started to experiments with its settings! It's a great plug-in if you love those 80s synth sounds! So to cut a long story short, I've put on "The Terminator" on mute and played along and this what has come out! Please enjoy!