# Logarithmic spiral party trick!

If you aren’t familiar with logarithmic spirals, you’ll likely still recognize the form. It’s found throughout the natural world at vastly different scales. The same shape can be seen in sea shells and also universes which is seriously profound if you ask me. You can read all about this type of spiral including the geeky math bits here… http://en.wikipedia.org/wiki/Logarithmic_spiral

Now for the 3D modeling trick! You can draw a logarithmic spiral using a radial array of lines and the ability to snap to perpendicular intersections. I used Rhino which has some handy Osnaps to make this extra easy.

It’s important to draw an interpolated curve so that the control points you place pass through the perpendicular intersections. Just continue to snap to the next 90° intersection making your way around the array of lines as you spiral inward.

Using a vector based program is best for this so that you can continue to zoom infinitely in as you go. The resulting curve can be used for anything you like and will have a natural symmetry that is… um… universal.

# Bump and more bump

Tags

There are two common approaches for making a material look bumpy when using most 3D rendering programs. These are “bump” mapping and “displacement”. A bump map makes a surface look as though it has high and low areas based on how light strikes the surface. Whereas displacement actually creates new geometry based on your model.

Below are two planar surfaces which have each been assigned a reflective material.

A procedural “noise texture” will be used to give one surface a bump map and the other displacement. Noise textures are often installed by default in render engines and come in a variety of types, this style is called “Perlin”.

The grayscale values in the image are used by both bump and displacement to create peaks and valleys and as a result, give the flat surfaces a physical texture. The difference is that the displaced version is truly no longer flat. Look at the edges of the surface on the right to see how they undulate compared to the bump mapped version which remains flat along the edge silhouettes.

Bump maps will also have a limit on just how three dimensional they can look. Usually this value is set in percent with 100% being the maximum amount. The reflection value a material has can aid in the effect but for the extreme appearance of bump, displacement should be used. In this way, the white values in the source image can be assigned a physical height as shown in the image below where they are now raised by a value of twenty units in the model.

# Surface vs. Poly

Tags

The two main geometry languages used today in 3D modeling are “Polygons” and “Surfaces/Solids”. It’s common for any beginning 3D artist or designer to get confused by where to use each of these two different representations of geometry. I’ll try here to explain it as simply as possible by starting with a comparison of some well known design tools.

Adobe Photoshop and Adobe Illustrator can both be used for making art and graphics but they have vastly different strengths. Photoshop is a rastor based program which means it works with pixels or small square blocks of color. If you paint an image or edit a photo in Photoshop and then realize that it prints far smaller than you intended, you may try to enlarge it. The artwork, since it is pixel based, will lose resolution when scaled up. Illustrator in contrast is a vector based program and the artwork created in it can be scaled up without a loss of resolution. This is because the line work and any color is based on math and not pixels.

This same separation of rastor and vector exists in the 3D world as well. Surface based programs such as Rhino, SolidWorks, ProE, UG, Catia, Alias etc. are like Illustrator in that the content created is scalable without loss of resolution. Polygonal modelers like 3ds Max, Maya, Blender, Zbrush and more will require subdivision if scaled up in order to be smooth.

The image below of a torus modeled as a surface shows the same perfectly smooth geometry at two different scales. The radius dimension of the cross section circle for each is shown. Surface geometry is synonymous with “NURBS” or Non-Uniform Rational B-Splines.

A torus modeled from polygons will only be as smooth as the number of polys used to describe it. To scale the polygonal torus will result in a larger version of each polygon or flat face seen.

Polygonal modelers therefore have “subdivision levels” of detail to allow for each flat facet in the polygonal structure to be split into additional faces. This allows for a smoothing effect but the underlying geometry will still be comprised of flat polygons… just smaller ones.

3D modeling programs will often support both geometry languages but it is usually the case that they are better at modeling with or more well known for one type. Poly modeling is mostly used in film and games while NURBS is the language of engineering and manufacturing.

# Light through stuff…

sounds a lot less complicated than “Index of Refraction”, so I’ll go with that as a title for this post.

When light passes through a transparent medium (water, glass, diamond etc.) it gets bent. Just how much the light bends is measured in what is called an IOR or index of refraction. Rendering engines (a.k.a. programs) use this value to simulate a wide range of materials. You can start with a standard glass material in most renderers and change the IOR value to create gemstones, water or even air. The latter not being all that impressive as you’ll see below.

Here are three transparent spheres sitting on a checkered plane for comparison. The first is set to an IOR of 2.45 which is the same as diamond.

The second has an IOR of 1.55 which corresponds to Glass.

Finally, a transparent sphere set to an IOR of 1 is shown below. This is the same as air but I promise there is a sphere here.

You can do a quick search online for the IOR of any material you wish to render. For instance water is 1.33. Congratulations, you are now more of a geek than when you began reading this post.

# Making seamless textures

Tags

When patterning a texture on a 3D model for rendering, it becomes important to understand the concept of what it means for an image to be tileable. Essentially, if you make copies of your texture and line them up side to side as well as up and down, they should blend together without breaks or seams between them.

Here’s how to prepare images as seamless textures using Photoshop. You could probably use the open source “Gimp” program as well with this technique.

1- Make a new image at a square resolution such as 1024×1024 72dpi and crop any photo into this aspect ratio.

2- Use Filter>Other>Offset and offset the image in both directions at half its width and height (512×512).

3- Use the Clone Stamp tool to blend out the seams sampling appropriate areas from within the image as you work.

4- Scale the image to 50% its size and position a few copies side by side to check your work.

That’s it! The rest is time and patience… I only spent ten minutes on this sample and it’s admittedly so so, but I don’t use many cheetah patterns anyways.

# UV mapping explained

Tags

When you apply a two dimensional image (like a photo of marble) to a three dimensional model, the process is called “mapping”. The easiest way to understand the concept is to think of putting a sticker on your lunch box or anything else with rounded edges you wish to decorate. The sticker is flat when you peel off the backing but it will bunch up if you try to stick it over any complex curvature… like the corner of your lunch box. This same problem exists in 3D rendering but can be overcome by means of what is called “custom UV mapping”. Think of U as one direction on a piece of graph paper (side to side) and V as the other (up and down). These directions are used to map or stick your image on the 3D model. Anytime you apply an image in a material and then apply that material to your model, you are using UV texture mapping.

So if you don’t specify how a texture in a material will map to your model, how does it know how to stick to the surface and where? This depends on the default settings in the rendering program you are using to add materials to your model.

In the image below, the model is a NURBS polysurface. With this type of geometry, the seams shown indicate separate surfaces and each surface will by default have its own UV texture space. The image or sticker in the material will not pass seamlessly across these edges.

This break in the marble texture across seams in the model is due to each surface having its own unique structure. As if they each came from a uniquely sized pad of graph paper and were then taped together.

In order to make the marble texture blend smoothly across the seams, the UV space of the model can be changed from the default of “Surface” to another style. You can for instance apply six copies of a texture simultaneously from different directions. This method is called “Box” mapping and is one of the common primitive options.

Notice how the texture changes along the interior curvature of the basin in this model. This is caused by the separate faces of the box mapping widget (highlighted in yellow) intersecting as they project inward and wrap over the model.

There are other primitive projection options as well such as planar, cylindrical and spherical which is shown below.

Each primitive option has its own appropriate use but on a complex form such as this sink basin, a different style of mapping is required for the texture to be believable.

In advanced texture mapping tools, there is often an option to “Unwrap” the model. This is like flattening out a bunched up piece of cloth before you iron it. Most custom UV unwrapping algorithms allow the user to select seams in the model that can rip apart in the process of flattening. In the case of polygonal modelers, these seams will be “edge loops” in the mesh and marked as seams prior to unwrapping the UVs.

The unwrapping process will smooth out the texture space for the model without overlapping the individual surfaces or polygons. The texture in the material can then be stuck on the 3D model using this custom mapping information for position and scale.

Image

# Neon with Rhino Render (v5)

Tags

There is a new ‘Real Time’ renderer on the scene for Rhino users called “Neon”. Click on the image above to download.

Neon is a particularly interesting tool for visualization because the feature sets change depending on what the active render engine in Rhino is set to. For instance, the two I’ve been using with it so far are the default Rhino Renderer in the v5 beta (used for the samples here) and Brazil. The latter has a massive amount of options where as the Rhino Renderer is fairly simple. Neon will use what it has available to it and simply pump the features set through a raytraced display mode. In the examples shown here, an HDRI was used in the environment as well as a couple rectangular lights and a single directional light. The materials are all based on the basic v5 Rhino material. Transparency with index of refraction (IOR), gloss color, emission color, bump mapping and procedural textures are all working in the current build.

After you install Neon, you’ll have a new display mode for activating it in the viewport. It’s all CPU based currently so a special GPU is not required. It’s a working mode too if you like but you may need to customize display settings like isocurve visibility and edge thickness to see what you’re doing.

Neon is also Free!!

# 0,0,0

The “World Origin” is the point where the zero locations on the X, Y and Z axes coincide. This center of the Cartesian coordinate space is present in most if not all three dimensional modeling programs. It is at once a starting point for the simplest and the most complex creations. The world origin is numerically 0,0,0 which in itself is pretty neat if you like numbers. I might have called this blog “000” if not for the insistence of WordPress that letters play a part in any blog name. Regardless, it’s unlikely that a name that cool would even have been available so I’ll instead use it for my first post.

The world origin is an important location when modeling pretty much anything and is the spot I almost always center a model around. There are a variety of reasons this is useful. The first being that many designs are symmetrical. If you center the model at zero, you can mirror your work to complete the form. This is not only true of most product modeling but also the case in organic shapes as well such as portraits. Even if some small asymmetries were applied for realism, a perfect symmetrical form would be required first.

Another useful observation of the world origin can be seen in architectural modeling. If a model is very far from this location, the polygonal meshes used to shade or render the model may look less than perfect. I’ve seen this issue repaired many times by simply moving the model closer to zero.