Showing latest posts tagged in "Tips"

Top Facebook Twitter Comments

Light baking and automatic UV unwrap with Max

Having a big mesh composed of a multitude of simple geometry shapes can be long and painful to map UVs for light baking and rendering advanced lighting into a texture can save up a lot of resources when rendering static meshes in real time.

In this tutorial, I'll show you how to automatically unwrap UVs and bake advanced and cost-heavy lighting components (Ambient Occlusion, Shadows, Caustics, Global illumination) into a lightmap texture using Max's RenderToTexture function for later use in a real time rendering pipeline.

Head past after the break to read the complete tutorial.

Read more
Top Facebook Twitter Comments

A quick Performance.now() polyfill

(function(w){
	var perfNow;
	var perfNowNames = ['now', 'webkitNow', 'msNow', 'mozNow'];
	if(!!w['performance']) for(var i = 0; i < perfNowNames.length; ++i)
	{
		var n = perfNowNames[i];
		if(!!w['performance'][n])
		{
			perfNow = function(){return w['performance'][n]()};
			break;
		}
	}
	if(!perfNow)
	{
		perfNow = Date.now;
	}
	w.perfNow = perfNow;
})(window);

// Usage
console.log(window.perfNow());

Just a quick performance.now() polyfill since the ones I found were producing "Illegal invocation" errors. This polyfill wraps the performance call inside a function to avoid this.

Performance.now() polyfill on GIST

Read more
Top Facebook Twitter Comments

(WebGL) Volumetric Light Approximation in Three.js

This article will be covering the technique behind the volumetric light approximation (VLA) aka godrays I used in my latest OpenGL project to simulate sun shafts, but this time in WebGL, with a point light.

Check out the demo and the code after the break.

Read more
Top Facebook Twitter Comments

(WebGL) Animated selective glow in Three.js

This time I'm going to explain a way to make specific parts of your 3D object glow, and how to animate those. For this I'll be using THREE.EffectComposer to render the glow passes.

Check out the demo and the code after the break.

Read more
Top Facebook Twitter Comments

(WebGL) Max to Three.js workflow tips and tricks

Ever since I started working with the WebGL technology, I've been trying out a few frameworks like SpiderGL and SceneJS.

Most recently, I've been giving a try to Three.js, and it is by far the best WebGL framework I've ever tested. So as I'm advancing on my learning of this framework, I'll be giving out on this blog a few tips and tricks that I found useful when using Three.js. The first one being an advice on the Max-to-Three.js workflow, readable after the break.

Read more
Top Facebook Twitter Comments

(PHP) Late static binding and child attribute declaration

Late static binding is one of the most useful feature brought to us by the PHP team on version 5.3. It enables access of child static variables from parent classes.

Understanding the exact behaviour of this feature is crucial when dealing with static class inheritance.

Read more
Top Facebook Twitter Comments

(CSS) Prevent @font-face variants render issue

/* CSS Document */
@font-face
{
    font-family: comfortaa;
    src: url('comfortaa.eot');
    src: local(comfortaa), url('comfortaa.ttf') format('opentype');
}

While @font-face custom fonts on websites is an accessible alternative to Cufon, some web browsers tend to render font variants differently. This can sometimes be quite painful for the standard UI/UX designer.

Read more
End of items timeline.