This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function LateUpdate () { | |
if ( collision.grounded ) { | |
IKOn = true; | |
} | |
else { | |
IKOn = false; | |
} | |
ik.solveLegIK (); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Shader "Custom/Skin Shader" { | |
Properties { | |
_Color ("Main Color", Color) = (1,1,1,1) | |
_MainTex ("Diffuse (RGB)", 2D) = "white" {} | |
_SpecularTex ("Specular (R) Gloss (G) SSS Mask (B)", 2D) = "yellow" {} | |
_BumpMap ("Normal (Normal)", 2D) = "bump" {} | |
// BRDF Lookup texture, light direction on x and curvature on y. | |
_BRDFTex ("BRDF Lookup (RGB)", 2D) = "gray" {} | |
// Curvature scale. Multiplier for the curvature - best to keep this very low - between 0.02 and 0.002. | |
_CurvatureScale ("Curvature Scale", Float) = 0.005 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEditor; | |
using UnityEngine; | |
using System.IO; | |
// PLACE IN EDITOR FOLDER | |
class CombineNormalMapsWizard : ScriptableWizard { | |
public Texture2D baseNormal = null; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Wizard to convert a cubemap to an equirectangular cubemap. | |
// Put this into an /Editor folder | |
// Run it from Tools > Cubemap to Equirectangular Map | |
using UnityEditor; | |
using UnityEngine; | |
using System.IO; | |
class CubemapToEquirectangularWizard : ScriptableWizard { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Place this file into a directory called Editor inside of your Assets directory. | |
// Unity 5.3+: | |
// Models imported after you do that will have: | |
// - Normals set to Import. | |
// - Set the bool "useMikk" to true: | |
// Tangents set to Calculate Tangent Space (MikkTSpace). | |
// - Set the bool "useMikk" to false: | |
// Tangents set to Split Tangents (UnityTSpace). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# To install this plugin, simply copy this file (selectAxisUVs.py) into folder called "lxserv" in your modo scripts folder (and restart modo, if it's open). | |
# If you are unsure where your modo scripts folder is, you can open modo, then select System > Open User Scripts Folder. | |
# If there is no folder called "lxserv" in your MODO Scripts folder, simply create one and then put this file in there. | |
# Once MODO has been restarted, you can run the command via ffr.selectaxisuv | |
# | |
# Any issues, please drop me a line at jamesohare@gmail.com. | |
# | |
# James O'Hare |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// A couple of things to make life easier. | |
#define MIN_UV_GAP 0.0000005f | |
#define LXx_V2NEARLYEQ(a,b) ((abs((a)[0]-(b)[0]) < MIN_UV_GAP) && (abs((a)[1]-(b)[1]) < MIN_UV_GAP)) | |
typedef std::vector <LXtPolygonID> PolygonList; | |
// The visitors we'll use. | |
// Visitors allow us to iterate over elements and filter that iteration by flags set upon them, known as mark modes. | |
// Simple one to set the supplied mark mode on polygons. | |
class MarkPolys : public CLxImpl_AbstractVisitor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import math | |
# Given a matrix, return euler angles of rotation as (X,Y,Z) in radians. | |
# Matrix is assumed to be either a lx.object.Matrix or a list[3][3] of floats. | |
def matrixToEuler (matrix, rotOrder): | |
if type(matrix) != list: | |
m = matrix.Get3 () | |
else: | |
m = matrix |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import lx | |
import subprocess | |
import os | |
# Paths for xNormal. | |
path_xnormal_basedir = r'C:\Program Files\Santiago Orgaz' | |
path_xnormal_exedir = r'\x64\xNormal.exe' | |
path_xnormal = r'C:\Program Files\Santiago Orgaz\xNormal 3.18.9\x64\xNormal.exe' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import lx | |
import lxu | |
import lxifc | |
import lxu.command | |
class ListUVMaps (lxifc.Visitor): | |
def __init__ (self, meshmap): | |
self.meshmap = meshmap |
OlderNewer