Skip to content

Instantly share code, notes, and snippets.

View csprance's full-sized avatar
🐝

Chris Sprance csprance

🐝
View GitHub Profile
@csprance
csprance / barycentric_coordinates.c
Created February 9, 2021 01:53
How to calculate barycentric coordinates in houdini using vex given 3 points making up a triangle and a point p we want to get the coordinates for
// This is the point we want to find barycentric coordinates of
vector p = point(0, "P", 3);
// These are the vertices of the main triangle we want to find coordinates for
vector v1 = point(0, "P", 0),
v2 = point(0, "P", 1),
v3 = point(0, "P", 2);
// Edge Vectors of the main triangle
vector e1 = v3 - v2,
@csprance
csprance / ServerInstallInstructions.md
Last active January 23, 2024 09:21
Instructions for setting up a Miscreated Self Hosted Server

Self Hosted Servers

During the entire beta phase of Miscreated self hosted servers are NOT officially supported and will mostly likely be changed during each update.

Due to the fact that self hosted server admins can adjust item spawns the Items tab on Amalgamated kiosks is disabled on self hosted servers - the Skins tab remains fully functional.

It's recommended server admins join our community Discord server for help: http://discord.gg/miscreated - Help requests go in the #server-admin-help channel.

START INSTALL INSTRUCTIONS - CUSTOMIZE TO YOUR NEEDS

NOTE: This document describes the manual steps needed for setting up a Miscreated server. It is highly suggested most users instead use Spafbi's Simplified Miscreated Server Setup script to handle setup, updating, and running of the server.

@csprance
csprance / nodemon.json
Created November 10, 2018 08:55
nodemon typescript config
{
"watch": ["src"],
"ext": "ts",
"ignore": ["src/**/*.spec.ts"],
"exec": "cross-env NODE_ENV=development ts-node --files --project tsconfig.json src",
"inspect": true,
"verbose": true
}
@csprance
csprance / CSprance_Resume.md
Last active November 16, 2023 14:22
Chris Sprance - Character Technical Director - Resume

Chris Sprance

Character Technical Director/Web Developer/SysAdmin

My name is Chris Sprance. I am an artist, programmer, maker, and man of many hats. Proficient in the next-gen game art workflow with a deep understanding of the technical and procedural content pipeline including the constraints that revolve around games and real-time content. With over 13+ years of experience working in the AAA and indie games industry I've been a part of a lot of problem solving and enjoyed every second of it!

Work

@csprance
csprance / CreateLODS.ms
Last active August 23, 2023 13:22
Lod Tool for CRYENGINE using 3ds max Maxscript and proOptimizer
-- Define the UI Rollout
try (destroyDialog EILodMaker) catch()
rollout EILodMaker "Lod Maker" width:150 height:250 (
label lbl_num_lods "Number of Lods"
spinner num_lods_spinner "" across:2 offset:[20,0] width:124.05 usePercentageWidth:true percentageWidth:82.7 enabled:true type:#integer range:[0,6,2]
checkbox chk_collapse "Collapse?" pos:[18,52] checked:false
group "Advanced Options" (
spinner spinner_lod1 "LOD 1" range:[0,100,50] type:#float
spinner spinner_lod2 "LOD 2" range:[0,100,24.5] type:#float
spinner spinner_lod3 "LOD 3" range:[0,100,11.4] type:#float
@csprance
csprance / Snippets.md
Last active April 6, 2023 16:59
VEX Snippets for Houdini
// Detail Wrangle
vector bbsize = getbbox_size(0);
v@size = bbsize; // For reference

s@x = sprintf('%.3f', bbsize.x);
s@y = sprintf('%.3f', bbsize.y);
s@z = sprintf('%.3f', bbsize.z);
@csprance
csprance / OldServerSetup.md
Last active February 14, 2022 00:41
Miscreated dedicated server instructions. Deprecated

Self Hosted Servers

This is an alternate method of installing the server. You should instead install directly from the Steam Library During the entire beta phase of Miscreated self hosted servers are NOT officially supported and will mostly likely be changed during each update.

Due to the fact that self hosted server admins can adjust item spawns the Items tab on Amalgamated kiosks is disabled on self hosted servers - the Skins tab remains fully functional.

It's recommended server admins join our community Discord server for help: http://discord.gg/miscreated - Help requests go in the #self-hosted-help channel. It's also recommended players wishing to run a server use the Simplified Miscreated Server Setup script as that script sets up a server, and it keeps a server properly updated and running.

START INSTALL INSTRUCTIONS - CUSTOMIZE TO YOUR NEEDS

@csprance
csprance / MiscreatedCVARHelp.md
Last active November 12, 2021 14:11
Miscreated Servers RCON commands and server configuration help

Miscreated Servers

RCON commands and server configuration help

Available Commands:

  • sv_servername "Name of server in quotes"
  • wm_timeScale 3 How Fast time moves
  • wm_forceTime -1 Force a current time
  • g_pinglimit 0 Ping required to join
@csprance
csprance / select_by_weight.py
Created October 24, 2021 04:49
A modo script to select verts whose selected weight maps fall within a given range. To use Select a mesh and then select a weight map. Then specify a min and a max value for the range
import lx
import lxu
import modo
import sys
def get_selected_weight_maps():
"""
Get the selected weight maps from the scene
:return: List of selected weight maps
@csprance
csprance / bezier_from_control_points.py
Last active March 26, 2020 03:27
Given a set of control points create a bezier curve with n amount of points
def binomial(i, n):
"""Binomial coefficient"""
return math.factorial(n) / float(
math.factorial(i) * math.factorial(n - i))
def bernstein(t, i, n):
"""Bernstein polynom"""
return binomial(i, n) * (t ** i) * ((1 - t) ** (n - i))