UMA custom race construction in unity 3d

Posted on 2017-04-20 in unity3d • Tagged with unity3d, uma

This is an old video about custom race construction in UMA for unity 3d.

UMA is one of the character customization systems for unity3d and you can grab it from github. Unity asset store also hosts old version of it, but honestly it is outdated and you should just grab …


Continue reading

Weighted blended transparency in Unity

Posted on 2017-04-19 in shaders • Tagged with unity3d, shaders, programming

A long time ago I uploaded a video showing a WIP approximated order-independent transparency project. Unfortunately, I've run into a few issues, and shelved the project.

Anyway, I decided that it wasn't a good thing that this kind of project is collecting digital dust on my hdd, so I uploaded …


Continue reading

Site generator change

Posted on 2017-04-12 in update • Tagged with update

I've switched away from jekyll to pelican site generator. Migrating content took a bit of time, but as of now all links should be fixed, plus I automated site upload with a few python scripts.

The reason for the change is that I've got fed up with jekyll. I originally …


Continue reading

"Raytraced primitives in unity3d (part 5): distance fields"

Posted on 2016-11-08 in shaders • Tagged with unity3d, shaders, raytracing, distance-fields

After a long pause, I decided to give distance fields a try. Here's result: scene

This is a CSG-based shape. Sphere minus torus minus cube. Positions of the primitives are hardcoded.

Here's the code:

DistanceFields.shader:

Shader "Unlit/RaycastDistanceFields"{
    Properties  {
        _MainTex ("Texture", 2D) = "white" {}
        _Color ("Color", Color) = (1, 1, 1 …

Continue reading

"Raytraced primitives in unity3d (part 4.1): code cleanup"

Posted on 2016-04-13 in shaders • Tagged with unity3d, shaders, raytracing

This is a basic update of previous example.

It is largely the same thing as before:

scene

However, I cleaned up the code.

Basically, I'm thinking about moving from mathematically defined primitives (meaning every figure is defined by a formula) to distant fields which have somewhat simpler definition..

Distant field, basically …


Continue reading

"Raytraced primitives in unity3d (part 4): casting and receiving shadows"

Posted on 2016-04-12 in shaders • Tagged with unity3d, shaders, raytracing

Alright. I expected this to take less time, but things happened.

Here's what I have right now.

All lights on

Point liights, Point light

spot lights, Spot Light

and directional lights Directional Light

are supported and cast shadows.

Getting there, however, was unexpectedly difficult.

Here's the code. It is in need of some refactoring, but it works.

RaycastObject.shader …


Continue reading

"Raytraced primitives in unity3d (part 3): lights, shadows and attenuations"

Posted on 2016-04-01 in shaders • Tagged with unity3d, shaders, raytracing

I originally planned to finish and post this on monday. But stuff happened. So here we go.

Here's what I got at the moment: lit scene with point and spot lights

Good news: I got point and spot lights working. Raytraced sphere receives shadows from external sources. Oh, right, cookies and attenuation now works as well.
Bad …


Continue reading

"Raytraced primitives in unity3d (part 2): lit sphere"

Posted on 2016-03-25 in shaders • Tagged with unity3d, shaders, raytracing

So. Here's what I got at the moment:

lit sphere with several lights

It is the next iteration of shader from before. Here's the mesh geometry of this object:

lit sphere with several lights and wireframe

So, good news:

I got lighting. Attenuation isn't suported (yet), but it interacts with unity's point and directional lights, reads their colors, and also grabs ambient …


Continue reading

"Raytraced primitives in unity3d: sphere"

Posted on 2016-03-24 in shaders • Tagged with unity3d, shaders, raytracing

Alright, quick question. How many triangles are in this sphere?: Sphere

The answer is 12.

Sphere

The sphere is a raytraced primitive, which is actually a box (boundaries of the box are indicated by green wireframe). That's why it has 12 triangles.

Unity 3d shader system, despite having numerous flaws, allows easy …


Continue reading

"Semi-automatic shape transfer between object topologies using 'equivalence maps'"

Posted on 2016-03-23 in programming • Tagged with programming, blender, python, algorithm

Consider this scenario: you're making a game and are using some character creation system, like MakeHuman, Mixamo Fuse, or something similar.

Now, imagine that you're in a situation where you created a nice character in one system, but need to transfer it to another. For example, from MakeHuman to Mixamo …


Continue reading