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
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
#!/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
@jtomori
jtomori / globals.bat
Last active March 1, 2019 21:19
Redshift config
...
rem rs for houdini
set "RS_ROOT_PATH=%PIPELINE%/%RS_VERSION%"
set "HOUDINI_PATH=%RS_ROOT_PATH%/Plugins/Houdini/%HOUDINI_VERSION%;%HOUDINI_PATH%"
set "PATH=%PATH%;%PIPELINE_WIN%\%RS_VERSION%\bin"
set "REDSHIFT_COREDATAPATH=%RS_ROOT_PATH%"
set "REDSHIFT_LOCALDATAPATH=%HOME%/%COMPUTERNAME%/redshift"
set "REDSHIFT_LICENSEPATH=%PIPELINE%/redshift-lic/"
set "redshift_LICENSE=%PIPELINE_WIN%\redshift-lic\redshift.lic"
@echo off &&^
%RR_ROOT%\bin\win64\rrClientcommander.exe -Abortdisable &^
call \\network_share\project\pipeline\houdini\houdini_remote.bat &&^
pushd \\network_share\project &&^
cd "Production\shot\task" &&^
hbatch -c "render -Va /obj/geo1/rop_geometry1 ; quit" "project_file_v003.hipnc" > "bat\project_file_v003.hipnc.rop_geometry1.bat.log" 2>&1 &&^
move "bat\project_file_v003.hipnc.rop_geometry1.bat.log" "bat\project_file_v003.hipnc.rop_geometry1.bat.log.finished" &&^
popd &&^
%RR_ROOT%\bin\win64\rrClientcommander.exe -Enable
@jtomori
jtomori / env.sh
Last active March 5, 2019 17:52
A collection of bash scripts to help with managing VCA for remote rendering, for https://jurajtomori.wordpress.com/2019/03/05/setting-up-houdini-on-a-headless-linux-server/
#!/usr/bin/env bash
printf "\n\nInitializing pipeline environment \nyou can disable it by commenting out the last line in ~/.bashrc\n\n\n"
# Libs
export LD_LIBRARY_PATH=/var/lib/iray/juraj/local/usr/lib64/
# RS
export REDSHIFT_COREDATAPATH=/var/lib/iray/juraj/redshift_2_5_67
PATH=$PATH:$REDSHIFT_COREDATAPATH/bin