Video

How to create low-poly hair for Unity 3D using Blender 3D and Hair Factory (tutorial)

In this tutorial I want to show you how to create low poly hair for Unity 3D using Hair Factory. Below you’ll find a link to the Hair Factory project as well as the code for the Transparent, Double Sided Unity Shader.

Shader "Transparent/Double-Sided Vertex Lit" {
    Properties {
        _Color ("Main Color", Color) = (1,1,1,1)
        _MainTex ("Base (RGB) Trans (A)", 2D) = "white" {}
    }

    SubShader {
        Tags {"RenderType"="Transparent" "Queue"="Transparent"}
        // Render into depth buffer only
        Pass {
            ZWrite On
            Blend SrcAlpha OneMinusSrcAlpha
            ColorMask RGB
            Cull off
            Material {
                Diffuse [_Color]
                Ambient [_Color]
            }
            Lighting On
            SetTexture [_MainTex] {
                Combine texture * primary DOUBLE, texture * primary
            }
        } 
    }
}

IMPORTANT: If you’ll find ant improvement in the shader or any faults in the video, please let me know.

How to install Gitolite and Gitoweb on Ubuntu 14.x

Gitolite and Gitweb allow anyone to have its own private repository with ssh access and configuration via simple text files and git commits. Today I have set on journey of installing it on our production server. Configuring gitolite was a breeze, following the manual specified below, but making Gitweb work was major pain, because of my lacking skills as Linux admin. Here is a short manual to save time to everyone else.

  1. Follow this fantastic tutorial to setup git and gitweb. This tutorial leaves you with everything installed correctly, excpet for the configuration of Apache.

  2. If you are working on a clean install of Ubuntu, it is very probable that CGI is not enabled on your server, and only fcgid is enabled. Enable CGI typing:

    sudo ln -s /etc/apache2/mods-available/cgid.load /etc/apache2/mods-enabled/
    sudo ln -s /etc/apache2/mods-available/cgid.conf /etc/apache2/mods-enabled/
    
  3. What remains is to configure the Apache server modifying the file /etc/apache2/sites-enabled/000-default.conf:
    </VirtualHost>
      ServerAdmin webmaster@localhost
      DocumentRoot /var/www/
    
      ScriptAlias /cgi-bin/ "/usr/share/gitweb/"
      Alias /cgi-bin/static "/usr/share/gitweb/static"
    
      <Directory "/usr/share/gitweb">
        Options Indexes FollowSymlinks ExecCGI
        AllowOverride None
        Order allow,deny
        Allow from all
      </Directory>
    
      ErrorLog ${APACHE_LOG_DIR}/error.log
      CustomLog ${APACHE_LOG_DIR}/access.log combined
    </VirtualHost>
    
  4. Restart Apache using sudo service apache2 restart

  5. That’s it! Now your application is available at http://localhost/cgi-bin/index.cgi

  6. I was having problems with css and javascript not loaded properly since Gitoweb was trying to access the files on non-existing url. While it should normally work, in case you have a similar problem, you have to modify the /usr/share/gitweb/gitweb.cgi file as following (we are adding backslashes):

    # URI of stylesheets
    our @stylesheets = ("/static/gitweb.css");
    # URI of a single stylesheet, which can be overridden in GITWEB_CONFIG.
    our $stylesheet = undef;
    # URI of GIT logo (72x27 size)
    our $logo = "/static/git-logo.png";
    # URI of GIT favicon, assumed to be image/png type
    our $favicon = "/static/git-favicon.png";
    # URI of gitweb.js (JavaScript code for gitweb)
    our $javascript = "/static/gitweb.js";