This file contains hidden or 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 bpy | |
| from mathutils import Vector, Quaternion | |
| import numpy as np | |
| import bmesh | |
| import glob | |
| import os | |
| os.system('clear') | |
| def lerp( t, a, b): | |
| return a + t * (b - a) |
This file contains hidden or 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
| float fovx; //field of view in X - | |
| float fovy; //field of view in Y - | |
| float aperature_x; //aperture in X 41.4214 | |
| float aperature_y; //aperture in Y - | |
| float focal; //focal length 50 | |
| float resx; //pixel resolution in X 320 | |
| float resy; //pixel resolution in Y 243 | |
| float pixel_aspect; //pixel aspect (width/height) | |
This file contains hidden or 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
| #pip install opencv-contrib-python --user | |
| import cv2 as cv | |
| import numpy as np | |
| import argparse | |
| import sys | |
| import imutils | |
| import glob | |
| import os | |
| import json |
This file contains hidden or 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
| node = hou.pwd() | |
| geo = node.geometry() | |
| import os | |
| import glob | |
| geo.addAttrib(hou.attribType.Point, "id", 0) | |
| geo.addAttrib(hou.attribType.Point, "corner", 0) | |
| geo.addAttrib(hou.attribType.Point, "name", "") | |
| geo.addAttrib(hou.attribType.Point, "dimx", 0) | |
| geo.addAttrib(hou.attribType.Point, "dimy", 0) |
This file contains hidden or 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
| useFrame((state,delta)=>{ | |
| let pi = Math.PI | |
| const keyframes1_position = [[new THREE.Vector3(0,0,0),0],[new THREE.Vector3(0,0,0),0.5],[new THREE.Vector3(0,0,0),1.0]] | |
| const keyframes1_rotation = [[new THREE.Vector3(),0],[new THREE.Vector3(),0.5],[new THREE.Vector3(),1.0]] | |
| const keyframes2_position = [[new THREE.Vector3(0,0,0),0],[new THREE.Vector3(0,0,0),0.5],[new THREE.Vector3(0,0,0),1.0]] | |
| const keyframes2_rotation = [[new THREE.Vector3(),0],[new THREE.Vector3(),0.5],[new THREE.Vector3(),1.0]] | |
| const offset = (1 - scroll.offset) | |
| const offset2 = scroll.offset -2 |
This file contains hidden or 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 bpy | |
| mat_name = "pointcloud2" | |
| materials = bpy.data.materials | |
| if materials.get(mat_name) is None: | |
| print("creating pointcloud material") | |
| mat = materials.new(mat_name) | |
| mat.use_nodes = True | |
| materialtree = mat.node_tree.nodes | |
| materialtree.remove(materialtree.get("Principled BSDF")) | |
| materialtree.remove(materialtree.get("Material Output")) |
This file contains hidden or 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
| "csg" : | |
| [ | |
| [ | |
| { | |
| "type" : "cube" | |
| "mode" : "add" | |
| "rgb" : "153 204 255" | |
| "round%": "0.25" | |
| "r" : "1 0 0 0 1 0 0 0 1" | |
| "t" : "0 0 256" |
This file contains hidden or 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 bpy | |
| import random | |
| #matcol = bpy.data.materials["Material.001"].diffuse_color | |
| #for m in bpy.context.object.material_slots: | |
| for obj in bpy.context.selected_objects: | |
| bpy.ops.object.mode_set(mode='OBJECT') | |
| matname = bpy.context.selected_objects[0].material_slots[0].name | |
| #specialColor = bpy.data.materials[matname].diffuse_color | |
| specialColor = bpy.data.materials[matname].node_tree.nodes['Principled BSDF'].inputs[0].default_value |
This file contains hidden or 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 PIL | |
| from PIL import Image | |
| import math | |
| from datetime import datetime | |
| #from skimage.color import rgb2hsv | |
| #from skimage.color import hsv2rgb | |
| import os | |
| import colorsys | |
| inputDirectory ='C:/Users/Reference/Desktop/raylib-live/games/pixel-runner/conversion-in' #specify a directory of source images | |
| exitDirectory = 'C:/Users/Reference/Desktop/raylib-live/games/pixel-runner/conversion-out' #where to put output images |
This file contains hidden or 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
| MIT License | |
| Copyright (c) 2019 Richard Hale | |
| Permission is hereby granted, free of charge, to any person obtaining a copy | |
| of this software and associated documentation files (the "Software"), to deal | |
| in the Software without restriction, including without limitation the rights | |
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| copies of the Software, and to permit persons to whom the Software is | |
| furnished to do so, subject to the following conditions: |