Recently in 3D Computer Graphics Category

spriteRGB.jpg
So I divided this image

spriteAlpha.jpg
by its own perfectly fitting alpha channel

spriteDIVIDE_PS5.jpg
and I got this mess.

I was expecting this mess.

And I was expecting it to replicate the behavior of the John Knoll Unmult After Effects plugin.

Oh well, I hear The Gimp does it.

UPDATE

It turns out that in the mathematical expression you want the RGB in the numerator and the ALPHA in the denominator, but in Photoshop you want the alpha image in the upper layer.

spriteDIVIDE2_PS5.jpg

Success. I think. :)

So if you layer mask that hot mess above by the original grayscale alpha key at the top of this thread then all the ugly parts go away and you should be left with a beautiful comp.

-- using a layer mask. (which you could 'apply' if you wish)

COMP.jpg

The side on the right has the ugly RGB element which makes the nice comp results.

(more conversation here)

UPDATE

wildthings.jpg

There is an old use of the divide blend mode from 1983 that I know of in the Disney / John Lasseter cg test for a film based on Maurice Sendak's Where the Wild Things Are.

(youtube)

It involved drawing shapes with hard lines, blurring them to look like CG, and dividing the blurred shapes by their own masks so that the interiors had nice soft 'shading' but the blur didn't introduce darkness around the edge of every shape because the edges received equal blur and were given the 'divide' treatment.

The interior of the masks were white. Anything divided by white (1) is unchanged (left blurry)

The edges were normalized back to their original colors by being divided by the soft masks.

The divide blend mode is written to skip pure black pixels, as division by zero is undefined.

One-Armed Bandit

| No TrackBacks

Devin_v18_900.jpg

Model Devin Coffin (who has only one arm) has a little fun with the 'one-armed bandit' concept in this latest entry to my 'Nothing is Real but the Girl' series.

About her modeling she says...
I want to show the world that women with limb deficiencies can still be beautiful!

Chrome Reflection Mapping

| No TrackBacks

In the early 80's, Gene Miller and Christine Change went into the parking lot of MAGI, one of the major TRON CG vendors, and photographed a Christmas ornament.

ChromeBall.jpg

They imagined the sphere as reflecting the interior of an infinite cube, which caused the sphere to be divided into 6 regions, one for each face of the cube. The far cube face is squashed into the yellow zone at the glancing angle outline of the sphere.

spinChrome.gif

Notice how on other objects the analogous relationships are maintained: the upper plane (in blue here) is always on top. The right plane (in red here) is always on the right...

70s-Airbrush-Chrome.jpg

Classic '70's airbrush art chrome, as in this Sorayama 'sexy robot,' are actually reflecting warm earth and cool sky separated by a dark horizon.

...as is the chrome hubcap in the inset photo.

UPDATE 3/25/2010

GoldRings.jpg

Maxwell Render Gold test with roughness values of, 33, 66, and 99

Xanthia_Hokusai.jpg

The fifth image in my Nothing is Real but the Girl series.

Hokusai's Great Wave off Kanagawa is so iconic that I think it works well magnified and made somewhat more abstract - somewhat similar to the way Landor Associates handled the corporate ID program and signage for General Electric. Large and cropped.

Lisbeth_Pompeii.jpg
click photo to enlarge

Pompeii: AD 79, in the shadow of the volcano Vesuvius.

In this third image in my Nothing is Real but the Girl series, model and singer Lisbeth Boada Phelps poses on a set designed to evoke the Lares Shrine at the House of the Vettii in Pompeii -- the same Lares Shrine mentioned in the Siouxie and the Banshees song, Cities in Dust.

What's New Pussycat?

| 2 Comments | No TrackBacks

What's New Pussycat?

The second in my 'Nothing is Real but the Girl' series. Jennifer Anne Black a/k/a Jenny Chaos poses in a 3D set designed after the now defunct Pussycat Theaters and rendered in the Maxwell Renderer.

If random points on a plane are post offices, then Voronoi Diagrams divide the plane into the most efficient zip codes.

I found a Voronoi diagram on the internet. I duplicate its calculation here using Photoshop's 'Lighten' blend mode and some radial grads.

Voronoi-Photoshop.jpg

Voronoi Diagram by Paul Herron

UPDATE 9/16/2009

How to: Draw the Voronoi Diagram

UPDATE 9/27/2009

Visualizing the Distance to the Nearest McDonalds Restaurants

Weather Sealed: Where the Buffalo Roam

UPDATE 10/6/2009

This Voronoi Diagram traveling matte effect is pretty cool.

A brief 2D simulation of metaballs, a/k/a 'blobbies,' using Photoshop, a gradient map, and various blend modes including the linear dodge (add), lighten, screen and difference blend modes.

Maya Incandescence

| 7 Comments | No TrackBacks

Maya-incandescence.jpg

Maya models 'incandescence' by pumping flat cartoon color into an object to mimic light radiating equally in all directions, but it looks like from this photo that even a radiant ball like the sun actually has falloff at the edges.

Maybe Maya should build in a 'facing ratio' light contribution option.

photo credit: (NASA/Thierry Legault)

The little dot the gray arrow points to is actually the space shuttle.

UPDATE

Maxwell-Sun-Test.jpg

...although when I 32-bit HDR-dim-down a finely-smoothed Platonic solid emitter in Maxwell, I see no signs of falloff. So maybe what I see in the sun photo is due to something other than how many rays from a given area get sent toward the camera.

I noticed that every time you apply certain filters to an image they run differently each time. I thought it might be fun to check out the image stacking in Photoshop's new 'extended' versions.

I chose coarse settings for the pixelate > crystallize filter - course enough to disguise the photo. Below is a stack of 8 such images averaged together. The more you use, the less the filter disguises the original.

Image-Stack.jpg

Here is a (tedious) method for stacking images without the extended version of Photoshop

High ISO Noise Reduction by Image Averaging

UPDATE
I was playing around with this. For image averaging you don't actually need Photoshop Extended. You can do it in any version of Photoshop that supports 32-bits:

Stack the images in layers. Use the LINEAR DODGE (ADD) blend mode to sum all the layers. You will blow out the image way past white. No worries. Kick into 32-bit mode and dim the sum (no pun intended :D ) back into a usable range. For a true average, dim it by a factor of (1 / N layers)

blur-with-layer-mask.jpg
(click on image to take a close look)

The obvious method: combine a blurry and sharp version of the same image using a layer mask. In most cases this is good enough, but look how the blur behaves through the transition.

blur-through-alpha.jpg
(click on image to take a close look)

Blur through a selected alpha channel instead and the blur radius actually grows in proportion with the brightness of the alpha channel. Nice.

This 'ramping up the parameters' behavior is true in other Photoshop filters, as well.

Ocean-Ripple.jpgUPDATE

Actually, Photoshop seems to be inconsistent on this issue.

wave-ramp.jpg

Some filters, like Ocean Ripple, do not ramp up, while others, like Ripple, do ramp up their strength based on alpha.

What a mess.

This effect may remind you of Quicktime VR, or the Black Eyed Peas video for 'Lets Get it Started' (which makes me think Google Street View: The Movie)

I've written about this before, but never made a video, or gathered everything into one place.

More after the jump...

Philips-CDI.jpg
click to enlarge

Liquid metal morphing and dinosaurs for Philips CD-i discs in this 3 spot campaign. What more could you want?

Millimeter-Magazine-86.jpg

For Disney's 'The Living Seas' (1985) at Epcot Center we needed to matchmove a computer animated undersea city to a live action sea floor. (Everybody loved the green, glowing wireframe back then)

In the days before programs like Boujou, much effort was put into using CG data to drive motion control systems, and vice versa. (Another notable example of this technique, also from 1985, can be seen in the video to the Mick Jagger song, Hard Woman.

More portfolio material (this was my first big job) after the jump...


I needed a clean, high resolution version of the public domain image known as the Flammarion Woodcut, so over the course of several days this week I completely redrew it in Adobe Illustrator. I am returning this particular version under CC license. (a reasonably close comparison will show that virtually every line in the image is different from the original) So if you like it, you'll find a high resolution version of it by clicking on it and going to the flickr page. Just keep in mind it's not the original version.

Sort of clockpunk, I think.:D

grayscale-Mandelbrot.jpg

Here is a grayscale fractal Mandelbrot set image generated by Alex Calothis (he offers his generator for download)

Mandelbrot sets are graphs that describe the rate of a certain behavior of points in the complex plane. Colors are assigned to them arbitrarily.

color-Mandelbrot.jpg

One common method over the years for assigning color to Mandelbrot sets resembles the functionality of the Photoshop gradient map.

Above is what happens if you use a Photshop gradient map to colorize a grayscale Mandelbrot set fractal.

UPDATE 4/27/2009

In a way, everything gets 'gradient mapped' by our brains, since nothing is actually 'colored.' Things just reflect (combinations of) wavelengths on a scale from lower to higher.

bt_moon_anim.gif

If you planar project or camera project the image of a planet or moon onto a sphere, you can push in and get 10 or 20 degrees of rotation out of it before you hit a seam.

bt_moon_anim_2.gif

In the version above I threw in some bump mapping.

This may seem simple or obvious, but it can be very effective. I used this technique for all the Moons and Earths in Independence Day (ID4) - even the oblique Earth views with dramatic cloud formations in the foreground. In a movie you don't always have to solve the general case (a full CG Earth viewable from all angles) - you just need to solve the problems actually posed by the shots and camera angles in the film.






surfBoards, originally uploaded by jfrancis.


I've been going through old hard drives and uploading to this Flickr set anything that seems worthwhile.



"You never know what you gonna get..."

DazMayaMatch.gif

I'm finding DAZ Studio 2.3 more useful to me than Poser was. For one thing, DAZ handles the 'background reference image plane' issue better than Poser does. For another, the one character provided, Victoria, can assume all kinds of shapes - even male - with more variety and control than Poser provides. I understand there is a way to get a rigged Victoria from DAZ into Poser but I couldn't easily figure it out.

Anyhoo. To match AZ and Maya cameras and scales:..

DazScaleSG.jpg
click image to enlarge

Scale is easy. The native DAZ unit is the centimeter. Note in the image above that to make two 1-cm cubes kiss face-to-face I had to move one of them 1.00 DAZ slider units.

The translation sliders read out in centimeters. So import your .obj files into DAZ using the Maya option, or any other option that sets the scale to 100% (no change)

DazCubeArraySG.jpg
click image to enlarge

As with Poser, the DAZ Studio camera has an (undocumented) horizontal film aperture of 1 inch. I chose a 15mm lens crazy-close for this test, so if I were wrong, it would have shown immediately.

So all of that talk about film formats within DAZ is really just a fancy way of describing nothing more than aspect ratios. They seem to put no effort into matching those film formats to their actual film format sizes - a key ingredient in calculating accurate angles of view. Most users likely have no basis for comparison and so don't notice the difference.

MayaCubeArraySG.jpg
click image to enlarge

In summation - to match Maya and DAZ Studio:

  • Work in centimeters in DAZ Studio
  • Set your Maya horizontal film aperture to 1.0

To match Poser to Maya, set Maya's film back to 1 inch and work in PNU's in Poser

VisiblePowerCord.jpg

I picked up the April, 2009 issue of Spin Magazine to pass the time on my flight back from Easter with the family. On page 37 I got a bit of a surprise: a campaign for the 60th anniversary of Onitsuka Tiger designed by Amsterdam Worldwide featuring a visually ambiguous model of a sneaker-slash-island (the island being Japan)

Layout_v06_FPO_256_JPG.jpg

The image caught my eye because I'm currently working on an ambiguous island model of my own, only mine will have a tropical 'tiki' motif, complete with a volcano and small trees rendered in Maxwell. (don't go too much by the illustration above - it's for position only, at the moment)

One thing I noticed was the decision in the sneaker print ad to frame so loosely as to reveal the edges of the painted sky backdrop. The other thing that really stood out to me was the subtle, but visible electrical cord in the ad. The volcano in my image will be internally lit and I also plan to incorporate a visible (CG) electrical cord into the composition.

In the same way that I hung my Tiki Moon on unnecessary 'wires,' or built my CG hot rod flames within the limitations of 4' x 8' sheets of virtual plywood, I like to add these misleading cues to my computer graphics.

"My philosophy is to use 3D CG to 'fly under the audience's VFX radar.' No matter how well you render a robot, the viewer will evaluate the work as VFX. If you render a painted wooden wall and some throwing knives, hopefully the viewer will evaluate the work as an image -- one with nice production value and a healthy budget for props and styling, but an image nonetheless."
-- A quote from my cgsociety.org gallery

More on multi-plane theatrical backdrops and photography.

More un CG celestial bodies on unnecessary wires: Paper Moon (game)

fresnelLens.jpg

I had originally assumed a Fresnel lens would be too hard to make work, but I decided to give it a shot, anyway. I grabbed a cross section from wikipedia and made a surface of revolution from it.

It functioned quite similarly to the plano-convex lens - exactly as advertised.

fresnelLensWire.jpg

I nudged the light source closer and farther until the beam looked fairly parallel. No calculations involved.

Here is the Maya / Maxwell file

FresnelLens_test.mb

UPDATE 1/8/2010

Here is the lens in .obj format

FresnelLens-OBJ.obj

planoConvexLens.jpg

I had planed to model a Fresnel lens, and while searching for a good cross-section technical drawing of one I came across some interesting work from Adam Donovan from 2007 that is in many ways similar to explorations I'm making now.

I'm mainly interested in creating light modifiers for use in a Maxwell environment, so it doesn't matter to me what the lens looks like, only what kind of beam it throws.

The main advantage of a Fresnel lens is that it is thin and lightweight compared to a bulky, heavy plano-convex lens of equivalent power. [glass Nd = 1.51]

In CG I don't care about bulkiness or weight, so I opted to dispense with the Fresnel lens and use its plano-convex equivalent.

collimatingLensWire.jpg

I used a portion of a sphere for a lens, and found the focal point by trial and error. A sphere doesn't have perfect focus, but a little spherical aberration is acceptable to me in a light source.

UPDATE

Changed my mind. I simulated a Fresnel lens after all.






wings_DSCN1904, originally uploaded by jfrancis.


Matte Painting Reference - Feathers and Wings...

The brightly colored front- and back-lit feathers in the rest of the flickr set were reference photos I took in order to create some test animation for the 'Glowbird' for the 3D stereo film 'Journey to the Center of the Earth.' The job ended up being awarded elsewhere.






clouds_DSCN1897, originally uploaded by jfrancis.


Matte Painting Reference:

Skies and Clouds.






smoke_DSCN0152, originally uploaded by jfrancis.


Matte Painting Reference:

Some photos from May 2001 of a fire in Hollywood, California. The location of the fire is La Brea Avenue somewhere between Hollywood Blvd and Santa Monica Blvd.






debris_DSCN0086, originally uploaded by jfrancis.


Matte Painting Reference:

Some older images taken with a Nikon Coolpix 990 consisting of various demolition sites under sunny and overcast skies. Could be useful as reference for digital matte painting work.

**************************************************************************************************

**************************************************************************************************

Architectural and Design Briefs Debris_DSCN0033.tif Image Submission

**************************************************************************************************

**************************************************************************************************

8 Bits vs 16 Bits

| No TrackBacks

8Bits_vs_16Bits.jpg

When you use them as displacement maps (I used Mental Ray) you can really see the difference between 8- and 16-bit images. The 16-bit displacement maps creates a smooth surface. The 8-bit displacement map gives rise to lego-like terrace artifacts in the surface.

A lot of people say, 'I get it right in camera, so I don't need to push the images very far. Originating in 8 bits is fine for me.'

But what if you change your mind later and you need to create a key from a flesh colored arm against a not too different background. I think in that case you'll be glad to have the extra bits in between when you push one of those regions black and the other white.

8bit_full.jpg
(click for a closer look - note the artifacts)

16bit_full.jpg
(click for a closer look - smooth)

Digital Matte Painting

| 1 Comment | No TrackBacks

MattePtg_night.jpg

3D CG model with additional Photoshop handpainted details. More after the jump.

Blue Light

| No TrackBacks

blueLight.jpg

Maxwell Render light transport and depth of field test. I like the look of it.

Poser2Maya.jpg

Export a model from Poser to Maya using to .obj format and he seems to import very, very small. This is because Poser uses something called Poser Native Units.

PoserNativeUnits.jpg

According to Poser's documentation, a Poser Native Unit, or PNU, is 8.6 feet.

This means that a 6'6" man would be 6.5 / 8.6 = 0.756 PNU's tall. (six feet six inches = 6 point five feet)

When Maya imports the man, Maya doesn't know about PNU's. Maya just sees that the man is 0.756 units tall, so in Maya, which I have set to centimeters, the man comes in smaller than a sugar cube.

To match DAZ Studio to Maya, set Maya's film back to 1 inch and work in centimeters in DAZ Studio

ReflectorDemo_parabola2.jpg

A parabolic reflector carefully modeled with a Maxwell Render emitter placed at the calculated focus point of the parabolic reflector. As expected, a strong beam of light emerges.

People often ask what the difference is between a silver and a white beauty dish. I have heard it said that beauty dishes are designed to be white, and that silver beauty dishes are a marketing department afterthought. Others say that silver dishes are more contrasty, and have more 'snap,' and so have their place in the photographer's studio.

The Maxwell Renderer is quite accurate at simulating the behavior of light. I thought it might be instructive to use the Maxwell Renderer to investigate the differences between a highly polished near perfect mirror-coated beauty dish (which as far as I know does not exist in the market), a typical silver beauty dish, and a white one.

To reveal the light paths, I ran a wall right through the center of the dishes, bisecting them in half like wall sconces. The virtual beauty dishes are ellipsoids - squashed hemispheres. They are not scientifically designed. The light is placed within the dish by eye, not at any special focal point, and no particular brand of beauty dish is being emulated here.

Remember: these are virtual tests. Not real ones. You may, nonetheless find them worthwhile to see.

BD_Presentation_2A.jpg
click thumbnail above to enlarge

BD_Presentation_2B.jpg
click thumbnail above to enlarge

BD_Presentation_2C.jpg
click thumbnail above to enlarge

UPDATE 9/30/2009

Walter Melrose with mola-light.com on Silver Beauty Dishes

"A silver surface is much cooler in colour temperature and tends to add a cyan cast....The silver surface does not allow the light to follow the contours of the reflector as they were intended. Although the silver surface gives the impression of greater output it does not apply to function, our white surface is 90% reflectance and very efficient."

I remember this quote from the primary source, the Mola site, but right now I can only find secondary references to it on flickr and photo.net

When you shoot using your camera in a vertical aspect ratio, you don't do anything special but turn your camera. To match Maya to your DSLR you need to make an extra little adjustment. When you swap the resolution x and y, you have to swap the horizontal and vertical film aperture values as well...

vLens1.jpg

Here is a rectangular polygon mesh just the right size and shape to fit into a Maya camera resolution gate after it has been set to mimic a Nikon D200. (as described here)

A horizontal Nikon D200 full resolution frame is 3872 x 2592.

vLens2.jpg
. . . if you simply change the resolution . . .

vLens3.jpg
. . . and if you simply rotate your plane 90 degrees you'll see it still no longer fits . . .

VerticalMaya.jpg

You need to swap the values in the 'Horizontal and Vertical Film Aperture' fields as well. It may seem obvious, but it's easy to forget.

Another solution is to leave the 'Film Aperture' values as if for a horizontal camera match, and change the lens from a 50 mm (in this case) to (it turns out to be) a 33.5 mm lens. But who wants to do the necessary work to figure that out?

So to match a horizontal D200 to a Maya camera, don't forget to set the

Horizontal Film Aperture = 0.622047244, which is 15.8 mm in inches

Vertical Film Aperture = 0.929133858, which is 23.6 mm in inches

Then your Nikon D200 lens should match your Maya lens.

---

A 'full frame' Nikon D700 has a chip size of 36 mm x 23.9 mm.

At 1.417" x 0.945" Maya's default camera back equates to 36 mm x 24 mm. So Maya default cameras equate directly to Nikon D700 lenses.

Don't forget to swap places with the 1.417 and the 0.945 values when you go vertical with the resolution.

A Nikon D200 uses a standard DX size sensor. (23.6 x 15.8 mm)

Maya's 'film' is described by two measurement: Horizontal Film Aperture and Vertical Film Aperture

According to Nikon's online documentation:

Horizontal Film Aperture and Vertical Film Aperture are the height and width of the camera's aperture or film back, measured in inches. The Camera Aperture attribute determines the relationship between the Focal Length attribute and the Angle of View attribute. The default values are 1.417 and 0.945.

---

Now, why Maya uses the word 'aperture' to describe this should have been my first clue that something was wrong, but I always assumed that Maya's default camera mimicked 4-perf movie film, just like most people shoot and project. It would have been the obvious thing for them to have done.

Turns out I was wrong.

135_film_perforations.jpg

All these years Maya masked its values by expressing them in inches, and all these years I never bothered to check the math, but it turns out that Maya's default width, the mysterious 1.417 works out to be 36mm.

All these years Maya has been modeling an 8-perf camera as its default. As if it were a 'full frame' still camera like a Nikon D700 or a Canon 5D Mark 2

VistaVision_8_perf_35_mm_film.png

...or as if it were Vistavision.

So to match a horizontal D200 to a Maya camera, set the

Horizontal Film Aperture = 0.929133858, which is 23.6 mm in inches

Vertical Film Aperture = 0.622047244, which is 15.8 mm in inches

Then your Nikon D200 lens should match your Maya lens.

-----

A 'full frame' Nikon D700 has a chip size of 36 mm x 23.9 mm.

At 1.417" x 0.945" Maya's default camera back equates to 36 mm x 24 mm. So Maya default cameras equate directly to Nikon D700 lenses.

Scatter Brush in Photoshop

| No TrackBacks

scatterBrush.jpg

After I completed the image of Apnea - The Knife Thrower's Assistant, I realized the target looked previously unused. It needed a history of knife impacts. After trying to place impact holes manually, I realized I could create a Photoshop brush to scatter the holes around.

I used a stock Photoshop 'sponge' brush squeezed into a slit shape. I turned the scatter way up, and introduced some random rotation. Finally I added some noise and additional image processing to the scatter cloud to give some degree of unique shape to each impact hole, so they wouldn't all look essentially identical.

UPDATE 10/28/2009

FakeFiberglassDemo.jpg

I'm starting a flickr set devoted to textures built up with the scatter brush. At the moment I'm interested in faking fiber densities in fiberglass lampshades for thin SSS rendering in Maxwell 2.0 - I want to make some 1950's fiberglass lamps.

Post 3D Render Photoshop

| No TrackBacks

PSpostMaxwell.jpg

Note the edge of the yellow ring. Sometimes I apply additional surface 'modeling' post 3D render via Photoshop. After all, it's only a single image. It doesn't have to track or animate.

Here's an example from a feature film.

Nothing is Real but the Girl

| No TrackBacks

Apnea_Knives_sfw_v04.jpg

Apnea poses as The Knife-thrower's Assistant. Part of my Nothing is Real but the Girl series of high production value images.

Tiki Moon

| 6 Comments | No TrackBacks

tikiMoonGreen.jpg

A tiki in a classic "Man in the Moon' crescent. I've never seen another. Could this be the first?

In spite of the hanging wires and irregular seams the image is completely computer-generated. The lighting approximates 'Rembrandt portrait lighting' and the fill is accomplished with a white off camerabounce card thanks to the radiosity of the Maxwell Renderer.

Eye Illustration

eyeBase_v10_r26.jpg

Here's a diagram I created using Maya, Photoshop, and Illustrator to illustrate a technical article authored by a local scientist and University professor.

flamesWIP_5.jpg

I plan to devote a lot of energy to making art pieces that combine figure photography from my new Nikon D200 with virtual backgrounds produced in the new Maxwell Renderer.

Here's a sneak peek at where this is all going.

flamesWIP_1.jpg

The surface treatments of the virtual objects will be as real as I can make them. I think the Maxwell Renderer, with its complex surface shader capabilities and subtle light transport algorithms, will be the best path to photorealistic CG in need to really make these projects work.

flamesWIP_2.jpg

Part of the charm of the work I'm doing is the attention I plan to devote to modelling mundane details. It's almost a joke within a joke - misalignened trim, missing screws, loose nails, halfway-hidden electrical cords - seemingly cheap and haphazard construction meticulously modelled that way on purpose in CG.

flamesWIP_3.jpg

I want the viewer to believe I constructed the sets not in CG, but after a trip to a hardware supply store. These images are going to be dramatic, kitschy, theatrical and fun.

flamesWIP_4.jpg

Stay tuned. More to come as it develops.
flamesWIP_6.jpg

flamesWIP_8.jpg

flamesWIP_9.jpg

UPDATE 6/9/2007

Now that Maxwell v1.5 has been released I have returned to this project in earnest.

WIP_flames08.jpg

I used ArtRage 2.2 to simulate the paint. I want it to look like a set piece from a burlesque show or a carnival.

WIP_flames10.jpg

WIP_flames11.jpg

It's hard to light highly saturated colored objects in a sophisticated manner, even when (and one might say especially when) using saturated light.

Suppose I have a bright red flag. Further suppose I wish its shaded areas to fall into a rich dark purple.

Easier said than done.

render1_2.jpg

My first attempt might entail filling the dark areas of my waving red flag with a saturated purple light. As you can see from the images above, saturated purple light has no effect on a saturated red object because saturated red (1 0 0) times dark purple (.5 0 .5) only equals dark red (.5 0 0)

What I need to do is use the lighting of the flag as a matte into another texture map - a purple one.

twoFlags.jpg

First a create a second texture map in a deep rich purple.

shaderNetwork_v1.jpg

Next I use surface luminance to control a blend between the red and purple flag textures.

render3.jpg

It's not a bad idea. The only problem is Maya continues to LIGHT the flag. See how dark the shaded area still is? I don't want that effect.

shaderNetwork_v2.jpg

I compensate for the lighting by DIVIDING the object's color by its own luminance. This effectively turns the Lambert lighting into a surface shader.

render4.jpg

Ah, that's more like it! See how nice and purple the shaded region is? It's not just a darker version of the red flag; it's a whole other hue. Very painterly. Not at all CG-ish.

UPDATE 5/29/2006

If this line of thinking interests you, be sure to explore Maya's Ramp Shader, which addresses the issue of hue falloff in CG lighting.

pureYellowBall.jpg

Here's a pure yellow ball sitting on a white table in Maya. Since the table is white, it takes on the color of the light shining upon it, so in this image, the light is also white.

Here's a question for you:
What would happen to the yellow ball if I change the light color to pure blue?

pureBlueBall.jpg

Depending on what you think happens to colored objects under colored light you might guess that the ball would become green. You might also guess that the ball would become white.

You probably would not guess that the ball would become black, but that's exactly what happens. Maya multiplies the light color by the object's diffuse color. (1 1 0) times (0 0 1) equals (0 0 0).

unsatBlueBall.jpg

If you desaturate the blue light so that there is some green in it - then you will get a nice green ball.

It's very hard to light highly saturated objects.

It's very hard to light with highly saturated light.

In the real world, colors are usually not so pure.

Maya Double-Sided Shader

| 1 Comment

doubleSidedShader.jpg

The samplerInfo node has a flag called flippedNormal that returns either a 0 or a 1 depending on which side of a single-sided surface you are seeing.

Many people use this to drive a Maya conditional node and so create something called a double-sided shader - a single surface with one texture on one side and another texture on the other side.

The syntax for the conditional node can be confusing to some Maya users. If you'd like an easier to remember alternative, consider using the flippedNormal flag to drive a blendColors node instead.

Faking Simple Volumetric Fog

| 2 Comments

redMistPlane.jpg

Here's an old school way of faking volumetric fog. I'm not sure who invented the idea, but we used to do it this way back in the Eighties.

noFogPlaneRGB.jpg

Set up a scene.

noFogZ16.jpg

Use a camera-based grad to fake a Z-depth render. Let gray represent distance from camera - the further, the brighter. Render in 16 bits.

FogPlaneRGB.jpg

Slam in a ground plane. This will represent the height of the top of your ground mist.

FogZ16.jpg

Render out another 16-bit Z-depth image with your elevated ground plane in place.

fogSubtraction.jpg

Subtract one 16-bit Z-depth image from the other. This will give you an image of fog ray traversal lengths - exactly as if you ray-marched through the volumteric fog.

processedMask.jpg

You can tweak the contrast if you wish.

fogLayerMask.jpg

Use this volumetric ray-marched mask as a key mix between your rendered scene and an image of pure fog color. (I chose pure red for my full fog image)

redMistPlane.jpg

Here are the results again. You can adjust fog density to taste by adjusting the density of the Z-depth difference mask.

This technique is pretty old-school. For it to work you have to stay out of the fog.

Nodal Point Pan - Apollo 17 Panorama

2dMoonStitchDemo.jpg

When the Apollo astronauts were on the moon they took images suitable for stitching into panoramas. In fact, some have even created Quicktime panoramas from these images.

Did you know you can do this sort of work in 3D without actually stitching the images together? Here is a partial panorama I "stitched together" in 3D space directly within Maya. It is a practical example which builds upon ideas I laid out in 3 previous blog entries.

Prerequisite Reading

Nodal Point Pan and Tile Part 3

Nodal Point Pan and Tile Part 2

Nodal Point Pan and Tile Part 1

A Partial Apollo 17 Panorama

1stSetup.jpg

Map a photo onto a plane within Maya. Make sure the plane has a shape proportional to the resolution of the image so that in mapping the plane you neither stratch nor squeeze the image.

Set Maya up to show high quality texture maps in hardware preview.

Place the photo far enough away from a Maya camera so as to fill the resolution gate with the plane. Make sure the Maya camera is at the ORIGIN of the world space.

Group the image so that its parent is a group centered at the ORIGIN.

2ndSetup.jpg

Make a copy of the first image group.

Put a second image on the plane which is part of the second group.

View both groups from your ORIGIN camera.

Use your eye to ROTATE the second group about the ORIGIN such that the second image seems to tile with the first image.

2ndSetupB.jpg

Here's what you should see. You may find it useful to make one plane semi-transparent in order to help alignment. BE CAREFUL when using transparency to look for this alignment, however. The planes WILL and SHOULD only line up at the edge where they meet.

3rdSetup.jpg

Repeat the process with a third image group.

Did the photographer use an panoramic head to carefully level the camera as it pans across the horizon? No, he didn't? Who cares? It doesn't matter.

3rdSetupB.jpg

As long as the photographer only panned and tilted when he took his photos it doesn't matter if he was level or not, as you can see from the example above.

You can repeat this process until you have a faceted shell of desired coverage.

Why does a faceted shell work? Why don't we see the sharp corners? Why isn't this a continuous sphere?

All good questions -- and all answered here:

Nodal Point Pan and Tile Part 3

Nodal Point Pan and Tile Part 2

Nodal Point Pan and Tile Part 1

Idea for making a continuous single image panorama

You usually don't need a single image for pan and tile work. If you insist on having one, you might be able to use a Mental Ray lens shader to render out the faceted shell into a single lattitude/longitude image.

UPDATE 7/29/2006

Microsoft Photosynth

Paul Haeberli's early work on automatic merging

colorTransDemo.jpg

A colored, transparent object derives its color from the degree to which it filters (multiplies) the background that color.

If you put most of the color of an object into its diffuse component, and make it "transparent" by dropping its alpha channel, or putting gray into the transparency channel, you'll get muddy-looking CG.

Here's a comparison of two approaches to colored transparency using Maya.

Real Time Lighting in Shake

| 6 Comments

dotProdLyt2.jpg

I like techniques that push from Maya into Shake some tasks traditionally considered the purvue of a renderer (such as UV mapping) so when I saw Derrick Dressel's NormalLight3D on the highend3d.com forum, I wanted to play around a bit with the general idea of using Shake to light an image of normals.

dotProduct.jpg
I didn't develop the idea very far, or write a macro, but I put together a simple Shake node tree that implements the mathematical function, the dot product.

Dripping Blood Maya Mel Script

| 8 Comments

dripDemo.jpg

Oozing blood? Scary swamp moss? Maybe just some festive icicles?

This MEL Script maps a particle's position along a curve to a noise function and uses it to control its initial velocity to creepy effect.

cgObjects4Comp.jpg
The thing about 3D CG is it usually is rendered on black with a precisely-fitting alpha channel. We typically call this "premultiplied" CG.

Suppose you want to cut and paste it onto a background using Photoshop.

Here's a workflow which preserves soft edges and avoids matte lines.

Hue Falloff in Maya Lights

| 2 Comments

hueFalloffDemo.jpg
The typical CG light only loses luminosity as it rolls off from direct to oblique illumination. That can look dull.

Here's a technique for introducing angle-based hue falloff into the light for a richer look.

Maya 7

| 7 Comments

AliasAgua05.jpg

Alias unveiled Maya 7 before a large and enthusiastic crowd at its SIGGRAPH '05 Alias Users Group meeting in Los Angeles tonight. Maya 7 looks to be a great update of the popular product.

This is by no means a comprehensive review, but here are a few new features that caught my eye:

uvMapSharp.jpg

uvMapBlur.jpg

With a little tinkering and the right movie as input, you can make a displacement node perform UV mapping within Shake, putting an ordinary still image into motion.

hypnoDisk.gif
Make some waves with this custom Maya shader which uses a MEL script to generate concentric spherical waves of animated light and darkness. It's a 3D texture, so it will flow over any objects you create. The waves emanate from a Maya locator.

Motion Blur

motionBlur_demo.jpg
Suppose you want to go at a linear rate from point A to point B in four frames. Where would you be at frame 1? At frame 2? At 3? At 4? You probably imagine points along a line similar to one pictured above.

Here's the thing, though: frames are not points in time. Frames are periods of time. It's not even meaningful to use the phrase at frame 1. Saying at frame 1 is like saying at September.

Think of it this way:

Suppose you wanted to walk from New York to Los Angeles over the course of a year. Suppose you set out at the beginning of the first day of winter. Where would you be at winter? At spring? At summer? At fall?

This confusion over how to represent time is why most 3D packages have a "fencepost error" that causes them to handle motion blur in a kludgey way.

Here's a link to an old (pre-blog) web page of mine that develops this motion blur idea further.

***

The earliest known fence-post error in history?

In the araeostylos [style of temple] it is only necessary to preserve, in a peripteral building, twice the number of intercolumniations on the flanks that there are in front, so that the length may be twice the breadth. Those who use twice the number of columns for the length, appear to err, because they thus make one intercolumniation more than should be used.

- Vitruvius via Robert K. Moniot

Final Gather Rim Light

| 5 Comments

rimLight.jpg
Need to render that climactic "end of act 3" dash from the exploding building or self-destructing mothership?

With Final Gather, you can make some nice rim lighting.

Renderman for Maya

| 9 Comments

rMan4Maya.jpg
I attended the unveiling of Pixar's Renderman for Maya product at the Gnomon school in Hollywood last night. The event was well-attended and the presentation took place in a sound stage large enogh to accomodate a large screen video projection system which showed the software to good effect.

Maya users looking for a sophisticated alternative to the native Maya renderer have been able to use Mental Ray for some time now, and at no additional cost. The Renderman route was until now a relatively expensive and somewhat more difficult one.

Before the advent of Renderman for Maya, the "friendliest" front-end for Renderman within a Maya context, to my knowledge, was the SLIM plugin. The basic workflow for SLIM users entailed leaving the Maya renderer as soon as possible, and using SLIM-based shaders and mapping coordinate systems developed not within the Maya hypershade, but within a node-based environment known as a SLIM palette.

Maya for Renderman obviates the need for this additional shader design environment. Maya users will now build Renderman shaders within the Maya hypershade. The "feeling" of using Renderman for Maya appears to be similar to that of using Mental Ray. The familiar Maya interface remains largely the same, with the addition of new Renderman-specific tabs and attributes.

Renderman has many well-known strengths. It looks great, and (having been forged in the fires of Pixar's hardcore production demands) can handle complex displacements and extensive camera and object motion blur without suffering a big performance hit. Renderman executes all of its particle rendering within software, which allows the user to do more sophisticated, shader-driven control than does some of Maya's (hardware-rendered) particles. Renderman's "Deep Shadows" technique gives the Maya user access to beautifully rendered shadows from particles, fur, and hair.

This is a tempting plug-in with some small drawbacks:

Unlike Mental Ray, Renderman for Maya costs an additional $995/seat.

While Renderman does have a subsurface scattering algorithm, and an occlusion shader, it does not seem, on the whole, to place as much emphasis on Global Illumination techniques as does Mental Ray.

Renderman for Maya is designed to put the production-proven power of Renderman into the hands of the small to medium PC- and Mac-based CG houses. Pixar has no immediate support for a Linux version.

Sample a Maya File Texture

| 3 Comments

uvSampleShader1.jpg
To sample a Maya file texture node at a certain pixel, you need to feed the file node the correct U and V values.

uvSampleShader2.jpg
In this example, the middle pixel of the texture map, at the place where U = V = 0.5, is a rusty brown color.

I've created a ramp with the color (0.5, 0.5, 0.5) and mapped the R and G output values of the ramp to the U and V input values of the file texture node. The result? The very brown color you'd expect.

Let's try something a little more interesting...

Jittered Tiles

| 4 Comments

rippledTiles.jpg
Continuous noise in red and green, when applied to the offsetU and offsetV attributes of a tiled UV map, can create the impression of "digital ripple glass."

Download continuousNoise.mb Maya 6 scene file

jitteredTiles.jpg
Discrete noise, when similarly applied, can shake a repeating array of UV-mapped textures seemingly "out of its grid," adding variety to your 3D CG work.

Download discreetNoiseUV_8.mb Maya 6 scene file

done2.jpg
This image was created with 3 randomly shuffled tiles. It uses discrete tiled noise

3Tiles2.jpg
...and a limited set of texture map tiles to create the illusion of randomness and variety.

Discrete Tiled 2D Noise

| 8 Comments

tiledNoise.jpg
If you quantize the noise function into discrete tiles, you can do all sorts of fun things with it. Let's look at how to do this here, and why you'd want to do this in the next entry.

Lollipop Mapping

| 2 Comments

monopoleUVTop.jpg
When you UV map a sphere, you normally expect distortion at the North and South poles. If you preprocess your texture map in the right way, you can hide the North pole completely, at the expense of an "extra bad" South pole.

Think of it as wrapping paper over a lollipop.

Transparency Mapping and Matte Lines

| 6 Comments

spriteDemo.jpg
When your Maya transparency map's RGB channels precisely fit its alpha channel, you must take special steps in order to avoid matte lines. Here's how to use the multiply/divide node to "unpremultiply" the RGB channels, and how to use the conditional node to avoid "division-by-zero" errors.

Nodal Point Pan and Tile: Part 3

| 1 Comment

comboView.jpg
In this simple tutorial I take two images and stitch them together into a continuous nodal point camera pan. To keep things simple, I'm using images from a computer generated scene, but the principles apply just as well to live action.

ColorTalk

colorTalk1.jpg
Although I only recently learned about the "secret" functionality while browsing an art forum, Painter seems to have been playing with the idea of adding a programmer-friendly procedural image creation and manipulation function called ColorTalk to its famously artist-oriented software since version 3.

I decided to take a closer look at ColorTalk as it continues to unofficially exist in Painter IX.

Camera Projection Fun

| 21 Comments | No TrackBacks

camProjSwoop.gif
Here, for fun, is a short tutorial on how to turn a 2D photograph into a 3D animation using Maya camera mapping. The move you see is entirely virtual. This technique forms a useful basis for "view-dependent texturing" of foreground objects, as well as for imposing a 3D move on a 2D matte painting background.

UPDATE 4/18/2009: The high res photos are on flickr for you to play with.

Camera Projection Misalignment

camProjDemo1.jpg
You can have a lot of fun with camera mapping. Here's a Maya camera mapping tutorial I put together. I find, however, that setting up an accurate Maya camera projection is more confusing than it should be. Using the default settings introduces a misalignment between the rendering camera and the projecting camera.

ugly3D.jpg
A standard shader has a boring color falloff. Most painters, when rendering a surface which turns away from light, will identify (or invent) a reason to introduce a shift in the hue of a surface as it darkens. One way you can do this in 3D is to map a color ramp to light falloff.

Nodal Point Pan and Tile: Part 2

sphrProj2.jpg
A good way to set up a nodal point pan and tile is to camera project a series of images onto the inner surface of a sphere from a projection point in the exact center of that sphere.

Nodal Point Pan and Tile: Part 1

A level camera creates vertical lines that are vertical. An upwardly tilted camera creates vertical lines that converge to a vanishing point high above.
keystoning.jpg
It's hard to imagine how to stitch those together. For a good intuitive grasp of what goes on in nodal point pan and tile work, try this simple experiment in Maya.

About this Archive

This page is an archive of recent entries in the 3D Computer Graphics category.

Animation is the next category.

Find recent content on the main index or look in the archives to find all content.