Archive for the ‘Notes’ Category

Create a regular placing and shaping guides description
add guides to create the basic shape either by importing or shaping them by hand



Read Full Post »

Thanks to Francis Bezooyen for doing this.  Follow the instruction the process may take a long time depending on how many verts are selected but better than nothing.


Version: 1.0
Date: february 21st, 2016
Author: Francis Bezooyen
Credits: This is a very quick retooling of the bb_snapToClosestVert script that can be found here: http://www.creativecrash.com/maya/script/bb_snaptoclosestvert-mel
Changes were made to make it function in Maya 2016 (The original version was made for Maya 6). 

Purpose of this script: This script snaps each selected vertice of one mesh to the closest vertice of a given reference mesh.

How to use:
Note: As this is a quick retooling the gui has been removed 

1. Copy the text of this script into a mel tab of your script editor
2. Copy the name of the reference mesh to which selected vertices will be snapped (Note: the name must be unique in the scene), and paste it in place (within the "") of "referenceMeshName" at the bottom of the script
3. Set Tolerance value (currently set to 10000. Reduce this value to limit the distance that the vertices can be moved)
4. Select vertices to be snapped
5. Execute the script (select all of the text of the script and either execute the "play" button at the top of the script editor, or hit the keypad "enter" key on your keyboard)
global proc fbb_SnapToClosestVert(string $refObject, float $tolerance){
string $vertices[] = `ls -sl -fl`;

for ($each in $vertices)
	fbb_runSnapToClosestVert $each $refObject $tolerance;


global proc fbb_runSnapToClosestVert (string $vertex, string $refObject, float $tolerance){

//find the world space position of the vertex.
float $vertPosition[] = `pointPosition -w $vertex`;

//find out how many verts are in the reference object;

int $refVertCount[] = `polyEvaluate -v $refObject`;

//find the shape of the reference model.
string $refShape[] = `listRelatives -f -s $refObject `;

int $i;

float $closestDistance = 10000;
string $closestVert;
float $closestPosition[];

	//for each vertex in the reference model.
	for ($i = 0; $i < $refVertCount[0]; $i++)
		//find the world space position of the vert on the reference model;
		float $refVertPos[] = `pointPosition -w ($refShape[0] + ".vtx[" + $i + "]")`;

		//find the difference between the two positions.

		float $xValue = $vertPosition[0] - $refVertPos[0];

		float $yValue = $vertPosition[1] - $refVertPos[1];

		float $zValue = $vertPosition[2] - $refVertPos[2];

		vector $difference = <<$xValue, $yValue, $zValue>>;

		//find the distance between the two points
		float $distance = `mag $difference`;
		//if the distance between the verts is lower than the distance between the previous vert.
		if ($distance < $closestDistance)
			//store the closest distance so far.
			$closestDistance = $distance;
			//store the name of the closest vertex so far
			$closestVert = ($refShape[0] + ".vtx[" + $i + "]");
			//store the closest position so far.
			$closestPosition = $refVertPos;

if ($closestDistance < $tolerance)
		move -ws  $closestPosition[0] $closestPosition[1] $closestPosition[2] $vertex;


fbb_SnapToClosestVert("referenceMeshName", 10000);

Read Full Post »

If you’re a developer of 3D games, then you’ve probably come across the terms forward rendering and deferred rendering in your research of modern graphics engines. And, often, you’ll have to choose one to use in your game. But what are they, how do they differ, and which one should you pick?

The difference between forward rendering and deferred renderingDeferred Rendering for many lights (Image courtesy of Hannes Nevalainen)


Read Full Post »

Reference: from siggraph 2004 and ATI presentation from Thorsten Scheuermann

kajiya-kay and Marschner lighting model



Read Full Post »

parallex hair

Fluffy fur used for this helmet.
Polycount Forum thread Fur breakdown.
Image by Joost Vanhoutte.

Read Full Post »

Read Full Post »

Oren Nayar reflection

This post is a complete copy and paste directly from “Renderman Portfolio” All credits go to Kevin George.

Source: https://sdm.scad.edu/faculty/mkesson/vsfx755/wip/best/spring2012/kevin_george/final/index.html

The dielectric shader I created earlier in the quarter afforded me an opportunity to re-learn the relevant computer graphics maths, but was not particularly concerned with physical correctness. My blurry reflection and refraction was just due to a large number of samples in a widening cone around the reflection/transmission direction, with all samples weighed equally. As I have continued my explorations with shading, I have discovered that this is not particularly physically-based, nor is it efficient.

For my independent project, I plan to build on these concepts and create a physically-plausible material along the lines of the mia_material_x (mental ray) material. There are several stages to implementing a shader of this type. First, I plan to implement a number of diffuse and specular models to better understand the underlying maths and practice implementation of a microfacet-based BRDF. Next, I will add reflection functionality, but by importance sampling the specular BRDF instead of the standard cone around the reflection vector.


Read Full Post »

Older Posts »