Johnny G Junior's NoteBook Treasures: 2009

Tuesday, November 10, 2009

Mental Ray Soft Shadow Test

This entry is all about shadow settings. This is not a step by step tutorial as to how to make your scene lighting great and its not for exact shadow values. Instead this is a render study so that you can understand some of the settings. I hope this helps anyone out.

1. I setup a simple scene with a ball and a plane. This is being rendering in the Mental Ray Render and i have a MR Spot light with Mental Ray Shadows turn on.

2. Quick render and you will see that the shadow doesn't look so great.

3. LEts adjust the Map Size and and render again. Now you will notice that the shadow looks a bit better around the edge.

4. Lets bump it up again and you will see its even more clear.

5. Lets bump up the sample Range and see what happens.

6. NOTICE HOW GRAINY... lets bump up the Samples to fix this.

7. Finally the thickness of the shadow.

............ NUFF SAID.

Saturday, October 24, 2009

Using Namespace in MotionBuilder to add or subtract Name

1. Under Navigator: Right Click the element you want to add namespace infront of and go to ADD/REMOVE NAMESPACE....

If you want to do a group, right click and SELECT BRANCHES first, then go to the option you want.

2. Add or Remove Namespace


Example: Maya adds Namespace to files you are REFERENCING. This feature makes it possible to change your animation to a file that requires namespacing.

Import/export FBX MotionBuilder (Mobu) to Maya with FullBody Ik: FBKI

There are a few steps in this that are crucial to make this work.

1. Maya 2009 Export Model with FBIK
IMPORTANT: Make sure Character Definitions are checked so we can transfer the Fullbody IK (FBIK) to Mobu. If you dont see this option, click the + sign next to the word ANIMATION.

2. Open up Mobu and go to File FBX IMPORT to bring in the model.

3. You will know if this is working correctly if under Character, you see the Rig.

4. Load animation. You can do this 2 ways. You can use Story to import your animation (add character animation track and use dropdown to point to rig), or go to Load Animation under your character controls.
IMPORTANT: whichever way you choose to load animation, you need to plot the animation onto the CONTROL RIG ONLY.

5. Save file (DO NOT PLOT TO SKELETON) and Re-import into Maya. Make sure Character Definitions are check and Bake animation to layers.


Working with multiple cameras in MotionBuilder (MoBu)

Setting up camera's in motionbuilder is pretty straight forward, but how do you setup multiply Cameras and have them switch in realtime.

1. Add a camera by going to: Asset Elements and drag the Camera icon into the viewer window.

Place camera in your desired position

2. Again, bring in another camera by clicking and dragging into your viewer.

3. Open up your story tab on your navigator and ALT Drag a camera into the Shot Track

In the shot track, you can set the duration by grabbing the begining or end of the icon and trim it in.

4. Do the same thing with the second camera.

5. Once you have your duration for each camera, Just turn your view to the CAMERA SWITCH under VIEW on the viewer.. or press ctrl-I. this will use your Shot track to cut between camera.

This will work for animated camera. Thats just what it is there for. Simple Notes my friends.

Thursday, August 13, 2009

Removing Black from Footage: Afterfx

You may find that one day you will have to remove black from footage for one reason or another. The most common use for this is special effects. Most special effect are filmed on black and in order to use it, you must remove it. :)

Here is a quicktime video to show what some of the techniques look like when executed.

click here to watch the explosive techniques

Before i go forward with how these were removed, i must give a shout out to source of this explosion. This is from ACTION ESSENTIALS 2: 2K. What a great libaray of effect... the great thing is, it comes PRE-KEYED...

Anyhow, lets look at the footage with the matte ignored for the sake of this excersize.

These are not steps.. each number represents that one look. each is separate as a technique.

#1. This is the source file.

2. This footage has a few effects on it. Start with teh CHANNELS SHIFT. Take the Alpha Channel and point it to the RED channel. This will removed the black by using the red channel as a reference. You then add come color correction as desired. LEVELS CURVES HUE and SATURATION. This Method gives you the most SOLID LOOK. works great for fire. may not work well with other objects.

#3. This has a No of effects on it. First the footage was duplicated. With the bottom layer selected, Go to the (BLENDING MODES TAB) Track Matte and use LUMA KEY. this removed the black. Duplicate that layer, insuring the the duplicated footage is also LUMA KEYED to the footage above. This will help solidify footage. You can continue that duplication method if you want to solidify it more.

#4. Change BLENDING MODE ADD - removes black but leaves it semi-transparent

#5. Change BLENDING MODE ADD then duplicated footage, the bottom footage was turned to LIGHTEN. THis helps to solidify the explosion more. Reference #4

#6. Change BLENDING MODE SCREEN - removes black but leaves it semi-transparent

Not one technique works for all. Please experiment and have fun.


Maya Export Error...

NOOooooooo........ Got this error when exporting mesh with rig in Maya...

[ERROR ] The Plug-in has detected mesh nodes with unsupported operators that affect the vertex count. The following nodes will not be processed: [mesh name]... malfunction... dying... dead. now what do I do?

PANIC.. j/k

Delete your history:
EDIT Delete All by Type and click on "Non-Deformer History"

This will freeze the effect on all the additional history nodes such as the triangulate but will NOT affect any of the DEFORMATION.
Now try to export again..... it should work fine

3Ds Max - Biped setup for MotionBuilder. Import + Export + Import

Lets get started and give these bones some life.... WHAHAHAHAHAAHAHAH...

1. Lets start up 3dsmax, and create a biped (street talk: bi-Piddle)

2. Important... this is very important .... for things to work correctly in Motionbuilder... YOU MUST start your biped in T-Stance before exporting. Rotate the shoulder pivot to get the bidped into the right pose.

3. now lets export once you are set. FILE EXPORT as an FBX. Once exported, save the 3dsmax file because we will need it later.

4. Lets fire up Motionbuilder. Also another important step. When importing this, we MUST use FBX plug-in Import. FILE FBX Plug-in Import.. if you use the regular import, it wont work.

5. Now we need to Characterize this biped. Because Biped 3dsmax has a naming convention for their bipeds, we dont have to worry about renaming the rig..... THANKS TO 3Ds MAX Biped Template. In the Asset Browser - go under TEMPLATES CHARACTERS 3DS MAX BIPED TEMPLATE. Drag this onto the HIPS of the biped.

6. Lets go STORY to import some animation. Right Clip and go to INSERT CHARACTER ANIMATION TRACK

7. Choose some animation and Set the CHARACTER dropdown to 3ds max biped template... or the name that it came in on. WAHLAH.... the biped should now have the animation attached to it. It should now be controlled by your story track.

8. Once you are set. PLOT THAT BAD BOY. first to the Control Rig... you can edit the motion, then PLOT to the SKELETON to finalize. Save this file and we are ready to reimport this back into max.

9. Lets go back to max and lets open the 3dsmax file of the biped you saved eariler. Go to FILE IMPORT and choose the FBX file you saved from motionbuilder. BOOM, DONE.
important notes to keep in mind.
1. in 3dsmax, export the biped in centimeters as a unit. this avoides errors.
2. when importing into 3dsmax, the rig should be the same. if the character you are importing and the biped in max have different naming conventions.... it just wont work.
3. you can use a bidped for a skeleton for your real models..... just use the biped as the rig...
im out.

Saturday, July 18, 2009

Terms and Light Theory

Notes of Light Theory from various sources.

Inverse Square Law:
Easily explained by an example of fire. If you walked slowly towards a fire, you would feel yourself getting gradually hotter. However the rate at which you would get hotter would NOT increase uniformlyas you approached; you would feel a slow increase early on, but as you got closer and closer to the fire, you'd feel a very rapid increase in heat. This is the inverse suqre law in action. The way in which light fades from its source also obeys this law.

Lights luminosity does not change; it alters in lights brightness as perceived by the viewer. As light travels further away from its source, it covers more area and this is what makes it lose its intensity, fading according to the reciprocal of squares of the distance. DAMN!

Laws of Reflection:
how light reflected from a surface. Tge abgke if reflection equals the angle of incidence, which is measured relative to surface normal at the point of incidence. The simulation of this law in cg takes place using a rendering process called RAYTRACING which simulates accurate reflections and refractions.

How light bends which concerns tranparent and semi-transparent objects. Think pencil in a cup in water... This number is calculated by taking the speed of light in a vacuum and dividing it by the speed of light in a material. Light never travels faster than in a vacuum, this value never goes below 1.0. As the value increases, the amount of distortion increases.

Index of Refraction (IOR)
Air................................ 1.0003
Alcohol .......................... 1.329

Wednesday, July 15, 2009

Color Temperature Chart

COMMON COLOR TEMERATURES. For those looking at lighting in 3d.

: ) ENJOY.

Candle Flame ..............................................1900K
Sunlight:Sunset or SunRise..........................2000k
100-Watt household Bulb.............................2865k
Tungsten Lamp (500w-1k)............................3,200k
Flurescent Lights ............ ............................3,275 - 34,000k
Sunlight: Early Morning/Late afternoon.......4,300k
Overcast Sky................................................6,000 - 7000k
Summer Sunlight plus blue sky....................6.500k

Sunday, May 10, 2009

Photoshop (very useful Shortcuts)

B - (Brush Tool)

[ - (Brush Tool - smaller brush)

] - (Brush Tool - bigger brush)

[ + shift (Brush Tool - softern brush edge)

] + shift (Brush Tool - Harden brush edge)

[ + alt - (select layer DOWN)

] + alt - (select layer UP)

G - (paint bucket - add shift to cycle to the gradient tool)

F - (cycles Screen Modes)

Tab - (Hides Toolbars to max. screen room)

Spacebar - (Hand Tool)

X - (Switch Colors between Forground/Background Colors)

D - (Default Colors) brings forground/background colors to White and Black. Great for editing masks

Ctrl + Shift + N - (New Layer [with dialogue])

Ctrl + [+ or -] - (Quick Zoom in Zoom out)

Ctrl + S - (Save)

Shift + Backspace - (Fill dialogue) Good when working with MASKS

Ctrl + T - (Free Transform)

Ctrl + E - (Merge Current Layer with layer beneath it)

Alt + Click Mask - (Toggle Mask Visibility)

Ctrl + J - (new layer using copy) copies selection or layer to a new layer

Q - (toggles Quickmask)

Wednesday, April 29, 2009

3DS Max Color Key: Materials ID colors

when rendering out a scene in 3ds max... you might want to render off a pass using Materials ID as a matte. This is a color key for the # assignments.

Monday, April 27, 2009


This is a painting i did while hanging out with my laptop one night. it was fun :)

Sunday, April 26, 2009

Photoshop - Non Destructive Matting using Channels

Here is an example of Non destructive masking using the channels panel to help. For this example, we will remove the sky background from this chicageee image ...

Step 1: Open your photo... :)

Step 2: Click on the channels tab and search through each channel to see which one gives you the best contrast difference between the objects you want to matte out. In this case, the BLUE CHANNEL works great for this particular image. (1) Drag the blue channel down to "Create New Channel" icon. (2) is created

Step 3: while the "blue copy" or the channel you copied is selected, go to IMAGE | ADJUSTMENTS | LEVELS

Step 4: Adjust the levels to blow out the lights or darks. You don't want to go to hard because you still want some of the fine details, for example the flag poles in this image. The idea here is to get a really good separation line between the 2 items.

Step 5: Now that we have a good amount of white, its time to blacken out the opposite area. We can do this very quickly by making a selection and filling in the dark area with black. lets start by selecting the magic wand and select the white area.

Step 6: Inverse the selection, press SHIFT + f5 to pull up the FILL command. YOu want to make sure that BLACK is the foreground color... then click OK.

**** NOTE, you can also use the PAINT BRUSH on this channel to add or remove some details.. use black and white and or feathered brushes.. *****

Step 7: This is the result after the fill.

Step 8: Turn the RED, BLUE and Green channels back on and turn off the BLUE COPY layer.

Step 9: Lets go back to the layers panel and now lets LOAD the selection we just created. From the file menu go to SELECT | LOAD SELECTION

Step 10: Choose the channel you want to select from.

STEP 11: Make sure your selection is right. You MAY need to inverse this selection. In this example we needed to. If you wanted to avoid this step, in step 10 there is an INVERSE check box... you could just select that and you'd skip this step all together.

STEP 12: while the selection is still active, click on the "ADD LAYER MASK" (1) and it will create a Matte on the layer (2). The

The rest of the image is not deleted, but rather is is masked away on this channel. You can still modify the matte by clicking on the image on the layer that represents the matte and paint using the paint brush, black or white. Black makes 100% transparent, white makes it 100% solid. Anywhere inbetween white and black adds opacity to the image.

Saturday, April 25, 2009

AfterFX Expression: Rotation driven by position

While surfing the web, i run into many great resources that help make life a whole lot easier to live. For example this expression for after fx from

Use this expression to figure out the spin rotation rate of a wheel compared to the movement(translations) of the BODY its attached to. EXAMPLE (car, tracker, wheelborrow, BIKE).

Alt Click on ROTATION to set an expression and add this.

rot = 360/circ;



Math is great - especially High School Math. circumference of a circle is circ = pie x diameter.

[pie = 3.14 (Math.PI), diameter = width = pixels]. rotation is for every (CIRC) we want it revolve 1 REVOLUTION (or 360 DEGREES).. Rotation = 360/circ * pixels traveled on x

The scaler variable comes in just incase you want to change the scale of an object without throwing off the script.

it whole equation is Rotation = (360/circ) * pixels traveled / scale.

[d, pi, circ, rot, movex, scaler] are all variables. They are just storage names that are referenced throughout the script.

[rot*movex/scaler] is the equation.

Sunday, April 19, 2009

Logout script php

whats a login script good for unless you have a logout script to follow it.
$header ("Location: http://YOUR URL YOU WANT TO GO TO ONCE LOGGED OUT");    

Simple Username and Password Login PHP/MYSQL

I place NOTES in the actual script.... notes start with /// which are disabled in the script

 header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');   
 header('Cache-Control: no-store, no-cache, must-revalidate');   
 header('Cache-Control: post-check=0, pre-check=0', FALSE);   
 header('Pragma: no-cache');  
 /// NOTE FOR YOU - write a connection to your mysql   
 $user = $_POST["username"];  
 $pass = $_POST["password"];  
 $table = "WRITE TABLE HERE";  
 $field = "WRITE FIELD HERE";  
 if(isset($_POST['op'])) {  /// if the form is submitted  
   //// if Username is NOT Empty and Password is NOT EMPTY  
   if (!empty($_POST['username']) && !empty($_POST['password'])){  
 /// create an SQL variable to check username and password  
 $sql = "SELECT $field FROM $table WHERE username='$user' AND password='$pass'";  
 $result = mysql_query($sql);  ///  QUERY  
 $num = mysql_num_rows($result); //// evaluate the # of entries from $result  
 if ($num == 0 || $num > 1) { //// if $num = 0 or is greater than 1   
 //// if posted username is NOT equal to username OR posted password is NOT equal..  
 if ($_POST['username'] != 'username' || $_POST['password'] !='password'){  
 $msg = "Bad Login - Try again"; /// create a variable called $msg to store message  
 $_SESSION['valid'] = 'invalid'; // SESSION = invalid  
 } else { /// else if the post IS equal  
 $_SESSION['valid'] = 'yes'; // SESSION = yes  
 header('location:'); // change location  
 exit; // exit the rest of the script  
 } else {  //// if you didnt enter in anything in either the user or password field  
 $msg = "Please enter username AND password";  

Lets make a form now in the same PHP file.. QUICK NOTE.. this form is missing quotes because i could not get this to publish without some modification. Create a form and add the php script and hidden elements just like the form below.


Tuesday, March 17, 2009

Resolution Displays for HD: whats it all mean anyway?

Ever wonder what resolutions are in HD, what sizes are they and where are they used... Wonder no more.

Resolution Pixels Aspect Ration Video Format Description

1024x768 786,432 16:9(non-sq) 720p/xga used for Plasma Display HDTV with non square Pixels (xga in simple is your computer display)

1280x720 921,600 16:9 720p/wxga used for Digital TV, DLP, LCD and LCOS production HDTV display (wxga - wide xga)

1366x768 1,049,088 16:9 720p/wxga - st HD used on LCD/PDP HDTV (HD ready, 7220p, 1080i) [1080i is hd video. 1080 is number of horizontal scan lines - 1080 lines of vertical resolution]

1024x1080 1,105,920 16:9 (non-square pixels) 1080p used on PDP HDTV display (full hd, hd ready 1080p) [1080p - p stands for progressive... NOT INTERLACED)

1280x1080 1,382,400 16:9 (non-square pixels) 1080p used on PDP HDTV displays(full hd, hd ready 1080p)

1920x1080 2,073,600 16:9 1080p-HDTV standard used for all types of HDTV technologies (Full HD, HD ready 1080p)

3840x2160 8,294,400 16:9 2160p DCI cinema 4k standard format Quad HDTV, there is no HD ready 2160p Quad HDTV format)