Skip to content

Instantly share code, notes, and snippets.

View jtomori's full-sized avatar
👨‍🌾
It ain't much, but it's honest work.

Juraj Tomori jtomori

👨‍🌾
It ain't much, but it's honest work.
View GitHub Profile
@jtomori
jtomori / m3f formulas sorted by complexity
Created December 14, 2017 10:43
list of formulas from Mandelbulb3D sorted by number of instructions, formulas: https://github.com/thargor6/mb3d/tree/master/M3Formulas
_GenCWarp.m3f (2042 instructions)
General.m3f (2003 instructions)
ABoxVSShapes.m3f (1450 instructions)
RandCubesIFS.m3f (1122 instructions)
Ikenagabulb.m3f (1094 instructions)
TetraFolding Pow2.m3f (1062 instructions)
_MobiusTpx.m3f (953 instructions)
ATetraVS.m3f (884 instructions)
_IFS_tess.m3f (796 instructions)
_coordvspow.m3f (790 instructions)
@jtomori
jtomori / Launchers and aliases.md
Last active November 22, 2018 14:50
Launchers and aliases

Houdini

  • ~/h17.0.352.sh
    #!/usr/bin/env bash
    
    my_dir=$(pwd)
    cd /opt/hfs17.0.352/
    source houdini_setup
    cd $my_dir
@jtomori
jtomori / Nuke barebones.md
Last active July 2, 2019 15:17
Initial setup for Nuke

env.bat

@echo off

rem set globals
set "ROOT=//isilonai/LAFM"

rem set nuke config path
set "NUKE_PATH=%ROOT%/010_pipeline/software/nuke"
set "NUKE_PATH=%NUKE_PATH:\=/%"
@jtomori
jtomori / OPmenu.xml
Last active May 8, 2019 11:37
"Save as New Version" tool in Houdini right-click menu on nodes, for https://jurajtomori.wordpress.com/2018/12/22/houdini-tip-save-modified-asset-as-new-version/
<?xml version="1.0" encoding="UTF-8"?>
<menuDocument>
<menu>
<scriptItem id="opmenu.save_as_new_version">
<insertAfter>opmenu.saveoptype</insertAfter>
<label>Save as New Version</label>
<context>
<expression>
<![CDATA[
float dist = chf("dist");
int voxels = chi("voxels");
int mode = chi("voxels_dist_mode");
float voxel_size = volumevoxeldiameter(0, 0) / sqrt(3);
float val;
if (mode)
val = dist;
else
import ptvsd
# allow other computers to attach to ptvsd at this IP address and port, using the password
try:
ptvsd.enable_attach("SFds_KjLDFJ:LK", address = ('localhost', 3000))
print("Not attached already, attaching...")
except ptvsd.AttachAlreadyEnabledError:
print("Attached already, continuing...")
<?xml version="1.0" encoding="UTF-8"?>
<menuDocument>
<menu>
<subMenu id="open_in">
<label>Open in...</label>
<insertBefore />
<context>
<expression>len(kwargs["parms"]) > 0 and kwargs["parms"][0].parmTemplate().type().name() == "String"</expression>
</context>
# our cam object
cam = hou.pwd()
# get 4x4 matrix representing transformation of our camera
cam_xform = cam.worldTransform()
# get position of our camera
cam_pos = hou.Vector4(0, 0, 0, 1) * cam_xform
cam_pos = hou.Vector3(cam_pos)
# view axis of our camera
view_axis = hou.Vector4(0, 0, -1, 0) * cam_xform
@echo off
rem houdini launcher
rem source global vars
call \\network_drive\current_project\00_pipeline\globals.bat
rem set Houdini paths
rem variables PIPELINE, ROOT were set in globals.bat
set "HOUDINI_VERSION=Houdini 15.5.632"
set "HOUDINI_PATH=&;%PIPELINE%/houdini"
#!/usr/bin/env bash
# find location of this script, move one level up
ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && cd .. && pwd )"
# set up env vars
export HOUDINI_DSO_PATH="${HOUDINI_DSO_PATH}:&:$ROOT/dso"
export HOUDINI_DSO_ERROR=2
# run testing scene