Quick Texturing in Blender with Bump Maps

In the following video I show how to quicky texture (and preview) a mesh object with bump maps and normal maps in order to give your 3d objects more realism and “pop”. Basically, the issue with a flattened texture on a 3d object is the complexity. To the human eye, inconsistencies and defects make something look more “real”. Sometimes the

Remove Duplicates in Text File

So I have a list of names, but the names are duplicated down the page. Each name is on a new line by itself. If I want to remove all the duplicates and just find out who is included in the file, I can simply do: [pastacode lang=”bash” manual=”awk%20′!seen%5B%240%5D%2B%2B’%20filename” message=”” highlight=”” provider=”manual”/] This will remove duplicates and print them to

WebStorm Encoded my HTML File as UTF-16BE

If you use webstorm you’ve probably run into this issue before. It use to happen more in past versions when I would add non-UTF-8 characters to my files. Basically, webstorm would output the wrong file encoding. To get around this you really only have one option. To re-encode your file content and filter it yourself. If you simply copy the

Normalize/Reset Object’s Scale in Cinema4D

In the gif below I show how to normalize the objects scale so you don’t need to re-scale when copying and pasting. Otherwise the workflow would be to copy the object and re-scale the object from original size every time. This is problematic when working more with models that need to be 3D printed than web stuff. WebGL things need

Simple Shader with ThreeJS

Ok folks, it doesn’t get easier than this. If you want to start writing shaders in the browser but can’t figure out how to create your shader program, ThreeJS has you covered. To write a shader in GLSL (oenGL Shading Language) you first need to let the browser know where you’re going to put your program. Some the shader stuff

Finding the cause of a horizontal scrollbar on your site

I was super tired when I posted this. It’s a old trick but one for the record books in terms of usefulness. Basically, if you’re a web developer, there will be many times in your career that a site ends up with a gross unintended horizontal scrollbar. It’s always a content/layout issue and usually something you didn’t expect to take

Finding A Pixel in Canvas Image Data

I never have time, so this will be quick. Let’s say we want to find a pixel index amoung all that image data canvas returns with: [pastacode lang=”javascript” manual=”var%20imgData%20%3D%20ctx.getImageData(x%2Cy%2Cw%2Ch)%3B” message=”” highlight=”” provider=”manual”/] The formula is simple: [pastacode lang=”javascript” manual=”var%20y%20%3D%20%5BROW%5D%3B%0Avar%20x%20%3D%20%5BCOLUMN%5D%3B%0Avar%20w%20%3D%20imgData.width%3B%0Avar%20pixIdx%20%3D%20(y%20*%20w%20%2B%20x)%20*%204%3B%0Avar%20pixel%20%3D%20imgData%5BpixIdx%5D%3B” message=”” highlight=”” provider=”manual”/] Basically, you need to draw this one out. Let’s say we have a 3×3 image. Each pixel would

Mars VR Demo

Just wanted to post this. The source is pretty self explanatory and i’ll put up a github later once I clean up a few things. I’ll explain later. Be patient, it takes a second to load. DEMO –>

XHR Doesn’t Return responseURL in iOS8

So you’ve been making ajax calls and everything is going great. Your onSuccess message looks something like this: [pastacode lang=”javascript” manual=”var%20onSuccess%20%3D%20function(data)%20%7B%0A%20%20%20%20console.log(data.xhr.responseURL)%0A%7D” message=”” highlight=”” provider=”manual”/] All of a sudden your QA professional says things aren’t working in iOS8! No prob, bob. It’s actually that iOS8 and below doesn’t return a “responseURL” attribute of the xhr object. Look at the difference: iOS8