Researching the world of tabletop gaming I became entranced by elegance with which some of them create experience with very limited set of mechanics. While digital gaming does all the math for you instantly, offers a list of options for the next action, board games can't have players look all over the board, consulting the manual and doing addition in their mind just to know if they can do something or not. While it is tempting to think that all those limitations result in detrimental experience, it would be wrong as tabletop setup is an excellent opportuni...


Now that Professional(Dark) theme is available for us mortals, the first action in your Unity window should be Edit->Preferences->General->Edit Theme: Change to Professional. Now you can be a professional without paying hundreds of $/month.


While you are there, this next one depends on your personal preference and may be a bit advanced, but I usually make project in a way that when scripts recompile and scene gets Serialized and then Desterilized back, the project keeps working correctly where I left off. So Script Changes Whi...

Usefulness of the examples below highly depends on your screen and brightness (crank it up). In perfect conditions, the first image should contain visible lines radiating from the upper left circle. But they aren't supposed to be there. Everything should have been smooth as a newborn baby's butt. So what happened?

There are no textures used, so compression is not the reason. Graphic is generated by shader in real time, and there is no room for floating-point precision error. 

Some may want to make an educated guess on where those lines are coming from. This w...

1. What is Node Notes

In 2014 I made an experimental forum role-play detective game (a failed experiment, people didn't play it much), it was called Mainstream. In it, instead of creating a topic for each Act or for each group of players, I created a topic for each place. And in each place/topic there were links to places nearby. The benefit for such approach was ease of content creation. I would fill topics with descriptions whenever I feel inspired. And whenever players return to the place in their respective stories, all the location-specific information...


You can find some useful snippets code snippets in my gists. And there is a complete solution. You'll need to download the enire tools folder but feel free to ignore EXAMPLES subfolder. This will give you a solution for some tricky pixel perfect effects. For example: a single pixel line that scales with screen resolution. I think the only way it can be done is if you send an exact coordinate of the line to the shader trough a vertex data. Which is what my RoundedGraphic.cs is doing. So all the shaders in that folder require that component exclusiv...

I ran into this when using my Playtime Painter Asset on transparent textures, and noticed the same effect in cases when graphics rendering is involved. Here is a quick solution and explanation: 

In the picture in this article the upper part demonstrates what you see when Alpha is used as transparency, and the image bellow shows what is actually recorded into color channels. Before the red and green stroke were applied, the texture was "empty" black. On the left part I did a simple blit of 4 channels R,G,B and A, so red and green color were blitted...

A wrapper class that makes coding your own editors super easy.

I figured this one out a while back, but wasn't sure if the complexity worth the effort. It may be more optimal to just create a mesh with sub-meshes and apply a different materials to them - not good for performance, but an optimal solution for character models, which also happen not to have tiling in most cases, so regular texture atlasing is a viable solution for performance optimization. Plus, on modern PCs, and I think also Playstation 4, Xbox One there are texture arrays, which could be used instead of my texture atlasing method. But I still decided to exp...

iCfg class is a very manual way to Save (Encode) and Load (Decode) data. I developed it to overcome a challenge of a modular project, with a large team may be developing and using it at the same time. Classes, their structure, method and field naming is constantly changes while their values should not be lost in the process. It works in synergy with my very-fast-to-write inspector methods PEGI.

It is a bit difficult to properly explain what this class do. And I don't think I made a good job of it in this article....

Microdetail is not visible in the first image of this article. But What micro detail does, is keeping the magic ON when you inspect surface up close:

I used my Playtime Painter to combine a bunch of maps into one.

Using detaI maps is relatively performance friendly addition, texture sampling is the one taking up the most time. By packaging up to 4 masks into RGBA texture you reduce that up to 4 times. Also it's a good way to overcome the texture limit. Sure, in some cases you may want to have different tiling and/or offset for different masks, and also different c...

I like cool glossy lighting. It makes virtual environment look real. But what really breaks immersion is when light illuminates object that sits on the other side of the wall from given light. That is why you'll see "Light Range" property for light sources in Unity and Unreal. Property which doesn't make too much sense physically since photons from even the tiniest candle may still affect surface far away. You would tune those to be constrained within the single room and never cast light onto objects outside of it. Range property is also there for performance re...

 Originally, the Color Bleed effect was noticed in photography. As you take a photo of something colorful, with high brightness, the color in photo may get a bit washed - closer to white. This effect wasn't too unwanted, and sometimes even simulated in 3D rendering software to make images more photo-realistic. I added the effect to each of the Shaders of my Playtime Painter Asset (optional, can be toggled ON/OFF globally). Basically it's just a simple operation of:

    float3 mix = col.gbr + col.brg;
    col.rgb += mix * mix*bleedStrength;...

Damage shaders uses texcoord2 coordinates which usually contains UVs for Baked Light. Which means no segment of the texture will not be repeated twice on a mesh. Mesh on the screenshot was created in ProBuilder - now a free editor extension for Unity.  

The example, included with Playtime Painter, has scripts for playtime destruction. When using World Space brush, all painting is done with Render Textures - so no texture uploading to GPU, just a regular rendering - very fast. Also the size of the brush will be in world space, which means a perfectly spherica...

A Beveling which requires only a single face added in place of an edge, while still providing a smooth result. 

This is not related to my Bevel Shader, this is not even a Shader effect. Its actually quite simple and effective. Still haven't found any videos of how to do this in Blender, but there should be, I can't be the only one who thought of this.

I made my own tool for modifying meshes in Unity to do some kinky stuff. And with that tool, as shown in the video below, I can select Dominant Corners. Basically when mesh is rebuild, I calculate a normal for the tr...


Simulating Bevel effect in Shader requires additional normal vectors for each vertex:

1. Smooth normal - calculated as if all vertices were shared between triangles.

2. Sharp normal - calculated normally, since all triangles are made of unique vertices.

3. 2 Normal vectors, one for each of triangle lines attached to the vertex.

4. Also one float3 is needed to package edge detection data. 

Vertex count and triangle count remains the same. Transforming the mesh is a matter of selecting a correct mesh profile. In Profile image to the right you can see 3 Line...

Please reload

Facebook icon
Instagram icon
GitHub icon
Discord icon