Batch Processing Files in Directory with ffmpeg

Easy peasy… Let’s say I have a bunch of .tiff files and I want to covert them to pngs: The first thing to note is that we can make use of a loop structure in bash “for in”. It will designate a variable called “$file” for every “.tiff” file extension it finds. So if you run it in a directory

ThreeJS Setting the Right Aspect Ratio for the Camera

One quick note for myself and anyone who will ever use this… If you are working with an abnormal size canvas, you need to do some math to set the size of the renderer to be correct with the aspect ratio: [pastacode lang=”javascript” manual=”let%20rect%20%3D%20this.renderer.domElement.getBoundingClientRect()%3B%0A%09%09camera.aspect%20%3D%20rect.width%20%2F%20rect.height%3B%0A%09%09camera.updateProjectionMatrix()%3B%0A%09%09renderer.setSize(%20rect.width%2C%20rect.height%20)%3B” message=”” highlight=”” provider=”manual”/] Basically, you are working out the bounding box in which the scene will

Finder Won’t Show Image Dimensions

Let’s say normally you get your image dimensions by looking at the image in Finder. It should contain information about the file size as well as dimensions. However, lately Finder has been annoyingly omitting the file dimensions. This is a bug and not intentional. Here’s what my screen looks like:                    

iDevice Continuously Reconnects USB

Sound familiar? You plug in your iphone/ipad and it just continuously reconnects… some people say its the cord others say its privacy settings I say its the disk utility… To fix this just disconnect and open Disk Utility > First Aid and run it, then reconnect the device. voila NOTE: This site is all about helpful hints tricks and tips.

Photoshop paste into a layer mask

You want to create a layer mask and paste an image into it copy the image you want in the mask create a new layer and put black over the whole thing add a layer mask and option click it to get into the mask edit mode cmd + optn + shft + v to paste the image into the

Find the (x,y) coordinates of an index value in an array

Web graphics often require us to work with images (bitmaps) in the form of a giant array of rgb values. However translating between the index of the array and the x,y coordinates of the bitmap can be confusing. I’ve written a couple formulas below to help you translate from index to x,y and vice versa. Let’s say you have an

How to show transparency on Blender texture

Sometimes I will use transparency on a blender texture only to find the preview in blender doesn’t show it. Below I’ve written a bit about how to get your transparency to show up. You will need to map UV’s to do this. If you want show transparency on a blender texture and it’s not showing up when you set the

Learn how to map a sphere with a texture in Blender

In the following video I show how to map a texture to a sphere in blender. The concept would be the same with more advanced and complex objects, however, in those cases your textures would need to be modified to match the geometry. This is a simple example to show the basic mechanical process for blender texture mapping. One thing

How to assign two materials to an object in Blender

In the video below I show how to assign more than one texture to an object in blender. This process is useful if you going to use transparency on your objects and need to have multiple layers to create an effect. It can also be useful later if you’re doing work with blending texture programatically or if your using a

Export GLTF Format From Blender to ThreeJS

In the following video I show how to export textures/meshes from blender into the new(ish) gltf format. This is a binary format that contains the mesh and images in a very small file size which works well for exporting to webGL contexts. It’s sort of the new collada exporter and very easy to use with libraries such as threejs. As