LaGrande Noodle

This is about Blender nodes (“noodles”); and “LaGrande” means “The Great”.

The material that was here originally is now obsolete. Rather than dump those contents, they have been moved for their historical value. Essentially, the original idea was to have color keys representing materials. The artist would paint using these color keys, and LaGrande would key onto them and substitute the real material channels. The idea was (partially) abandoned simply because it is much easier to pick materials from a Blender library and apply them to the model, then bake textures. However, I say “partially” abandoned because we might still use this idea for detail work such as greebling and detailing. The prior contents are here:

* La Grande Noodle (semi-obsolete, original idea)

LaGrande is named suchly because the original idea was that it was going to be one HUGE Blender noodle that you feed it all your textures at the input and final textures come out of the output. Now I know that was a dream.

First of all, Blender crashes hard if the textures are too big and/or the nodes are too numerous. It turned out thus technically necessary to split the thing into many small noodles.

Secondly, you, the artist, may want to check the output of each stage and make corrections as necessary, and, more importantly, you may want to modify intermediate textures –adding details or personal touches.

The following is, as of this writing, the first, tentative listing of each LaGrande sub-noodle. They are listed in order of application, briefly described, and the list of input and output textures is presented. There's also suggestions for artistic input after each noodling step.


Splitter Noodle:

The Splitter takes the three Blender material bakes and splits them, so that independent channels, such as dielectric constant, have their own (gray-scale, in this case) textures. Probably the simplest noodle.

Input textures:

  albedo_bake.tga         RGB            Baked from Blender's diffuse material
  specular_bake.tga       RGBA           Baked from Blender's specular material
  misc_bake.tga           RGBA           Baked from Blender's mirror material

Output textures:

  diffuse_1.tga           RGB
  specular_1.tga          RGB
  dielectric_bal_1.tga    (gray-scale)
  dielectric_k_1.tga      (gray-scale)
  shininess_1.tga         (gray-scale)
  detail_mod_1.tga        (gray-scale)
  glow_in_1.tga           RGB

Artistic input:

This is the prime opportunity for artistic input, and the main reason for splitting the textures. This is where you would typically go beyond material bakings and add greebles and construction details like trimmings and rivets and pipes and bracings, and where you'd color diffuse and specular black where bumpmap grooves represent deep grooves, for example. Emblems and logos and painted text also go here.

* La Grande Splitter Noodle (in more detail)


Bump Filter Noodle:

The bump-map or height-map is an artist-supplied texture that encodes texture relief. 50% gray represents the “normal” or “ground” level. Brighter means higher; darker means lower. To simplify the texturing process, we standardize the white represents an altitude equal to four pixel widths, and black represents a depth of four pixel widths, also. This means that from black to white we span 8 pixel widths of level change.

But our normalmap encoding can only represent normal angles in the range of +/-arctan(2.0), or +/-63.4 degrees. A sudden change or sharp boundary between black and white is therefore not representable. The shortest blur zone for going from black to white is 4 pixels, in fact; but it is 8 pixels at the working resolution, because the normalmap will be a 50% reduction from the working resolution.

The Bump Filter node “tent”-blurs the bump-map to ensure that level changes are representable. Additionally, it applies a small radius Gaussian blur to smooth transitions a bit further.

Input textures:

  bump_map_in.tga         (gray-scale)

Output textures:

  bump_map_2.exr          (gray-scale)

Artistic input:

If you need extra blurring in some areas of the bumpmap, this is your last chance.

* La Grande Bump Filter Noodle (in more detail)


Normalizer Noodle:

The Normalizer's first purpose is to convert the bump-map to a normalmap; but there's more to it… As mentioned earlier, Blender can bake a corrective normalmap for us, given a coarse mesh and a high quality subdivision mesh, such as it produces using Catmul Clark interpolation in Multires. This makes our ship to shade, in-game, as smoothly if it had 10 times as many polygons as it actually does.

But we also have a manually produced bump-map that needs to be converted to a normalmap. The two normalmaps have to be combined. But how? Well, there is only one “correct” way of doing it, and that is to convert both to angles, add the angles together, and then convert back to our favorite representation. The Normalizer noodle does all this.

Input textures:

  bump_map_2.exr          (gray-scale)
  normals_in.tga          RGB

Output textures:

  normalmap_3.exr         RGB

* La Grande Normalizer Noodle (in more detail)


Radio Mixer Noodle:

When doing radiosity bakings, it is 200% wise to do one light at a time, or one light type or color at a time. Radiosity bakings look gorgeous but take like forever, so you don't want to do too many lights at once and then find they are not balance; or one little detail is not right, and have to do it all again. However, radiosity bakings need to be very smooth and precise for pseudo-specularity tricks in the CineMut shader to work, so you wouldn't want to save them to 8-bit texture formats. And you can't mix 16 or 32-bit Open EXR textures in Gimp, so you need a noodle. I save my radio bakings usually to a bunch of files named sort of like red_radio.exr, green_radio.exr, blue_radio.exr, yellow_radio.exr and maybe miscellaneous_radio.exr. Then I make a copy or radio_mixer.blend, put it in the folder, rename the file io nodes, and then start mixing and tweaking till it looks right. The output is called “radio_in” because mixing radiosity colors is not really a LaGrande thing; just a helper noodle to come up with an input file for the glow map.

Input textures:

  red_radio.exr           RGB
  purple_radio.exr        RGB
  orange_radio.exr        RGB

Output textures:

  radio_in.exr            RGB

Artistic input: None, hopefully.


Light Bumper Noodle:

Bump-maps and normalmaps are textures that give us dynamic effects that depend on the light and view vectors. But… we shouldn't neglect the fact that static light baking should also be sensitive to surface bumpiness. That is, not all lighting of bumps should be dynamic. Bumps are statically illuminated by static light sources. Last but not least, the ambient occlusion is a kind of static lighting: In most cases, where the ao is some shade between black and white, the bulk of the shadowing comes from one side, so the bulk of the light comes from the other. PRT's also should be put through the light bumper. One at a time: First the radio bake, then the ao, then the PRT's. Noodles are re-usable :) You just have to change the names of the files in the input and output nodes, then hit Use Nodes. Don't forget to turn Use Nodes off before you experiment with something. And always change the names of the output file nodes first. If Use Nodes is on, and you change the name of an input file, it will overwrite whichever file was already set up as output.

The Light Bumper noodle does static bump illumination, by modulating by N dot L both: the radiosity baking and the ambient occlusion. But, how does know the light vector?

It doesn't; but it uses an ad-hoc algorithm that works pretty well; –well, two, actually: The darker the baked light, chances are, the more horizontally the light is arriving; but the algorithm is very sensitive to vertical and horizontal light differentials: whichever direction light seems to increase, that's probably the direction the light is coming from.

Input textures:

  bump_map_2.exr          RGB
  radio_in.exr            RGB
  ao_in.exr               (gray-scale)
  xN_PRTp.exr             RGB
  xN_PRTn.exr             RGB

Output textures:

  radio_4.exr             RGB
  ao_4.exr                (gray-scale)
  PRTp_4.exr              RGB
  PRTn_4.exr              RGB

Artistic input:

None, really, but you might want to load these two textures onto your ship in Blender and verify that the the bump lighting modulation isn't too strong or too weak. There's a couple of parametric inputs on the left side of this noodle you might want to play with to get the bumps to shade just right.

* La Grande Light Bumper Noodle (in more detail)


Bleacher Noodle:

Most artists tend to obsess about little details, but what our eyes really look for, first of all, are subtle gradients. If a color seems too uniform, we immediately realize the thing is “not real”, no matter how much details we may see. It is important then to identify possible sources of color gradients in the real world and try to apply them to models. One such source is the effect of long-term sunlight exposure on paints. Paints are kind of “bleached” by sunlight.

The Bleacher noodle simulates this by reducing the blue component of paint color a little bit, and equalizing red and green; –in proportion to exposure, of course, which is defined as the cube of the ambient occlusion. It deduces whether a material is a “paint” by looking at dielectric constant and balance channels. It modulates diffuse and specular colors. Radio baking is not modulated, since it will be multiplied by diffuse later.

Input textures:

  ao_4.exr                (gray-scale)
  diffuse_1.exr           RGB
  specular_1.exr          RGB
  dielectric_bal_1.exr    (gray-scale)
  dielectric_k_1.exr      (gray-scale)

Output textures:

  diffuse_2.exr           RGB
  specular_2.exr          RGB

Artistic input:

None, except you can tweak the strength of the bleaching via the parametric input provided.

* La Grande Bleecher Noodle (in more detail)


Heat Oxidizer Noodle:

Another subtle gradient we can introduce is based on frontal exposure. For ships that are capable of flying into atmospheres, front-facing surfaces are likely to show signs of exposure to oxygen at high temperatures.

Well, frankly, when the Space Shuttle descends through the atmosphere, it doesn't do so facing forward, but rather with its belly forward. That's why all the ceramic heat tiles are on the bottom. But as it slows down through Mach 4 or Mach 3 it turns to face forward. But, realism aside, high temperature rusting of forward facing surfaces looks good :) I did that with the Demon (pictured in the previous article: Texture bakings from Blender3D). I like to model heat rusting on the way titanium rusts: Titanium rusts very slowly at ambient temperatures; but if you put a blow torch to it, it rusts pretty quickly. Now, titanium features a number of different rusts, which take on different hues. Around the spot you hit with a blowtorch you might see a “rainbow” of hues: red, orange, purple… And the hue tends to vary with angle (iridescence), but we can't do iridescence effects with the CineMut Opaque shader.

What we *can* do is mix in a bit of dielectic constants and blends. Metals are by definition non-dielectric; but metal oxides are usually dielectric. Frontal exposure is taken from the frontal radio bake. It also uses the ambient occlusion for a bit of extra modulation. Back-facing surfaces get NO heat-rust at all. This noodle is only applicable to ships; not to stations.

Input textures:

  heat_oxidizer_mask.tga  (gray-scale) (used to select which metals show hi-temp rusting)
  heat_oxidizer_pat.tga   RGBA         (LaGrande-supplied texture with colorful perlin noise)
  frontal_bake_in.exr     RGB
  ao_4.exr                (gray-scale)
  diffuse_2.exr           RGB
  specular_2.exr          RGB
  dielectric_bal_1.exr    (gray-scale)
  dielectric_k_1.exr      (gray-scale)

Output textures:

  diffuse_3.exr           RGB
  specular_3.exr          RGB
  dielectric_bal_3.exr    (gray-scale)
  dielectric_k_3.exr      (gray-scale)

Artistic input:

None, except you can tweak the strength of the rusting via the parametric input provided.

* La Grande Heat Ruster Noodle (in more detail)


Ferrous Oxidizer Noodle:

In all honesty, this noodle shouldn't be. There is no air or rain in space, so no reason to have iron rust. But… it can look good; and besides, some day we might have 3D bases and ground vehicles.

The Ferrous oxidizer applies a perlin noise pattern of oxidation. Oxidation is represented by removal of specular color, adding red to diffuse, lowering shininess and setting dielectric constant to that of rust. Rusting also causes paint to peel. All you need to provide is a ferrous rust mask. Black for none.

In addition to red rust, this noodle adds a little bit of green to the mix, in proportion to the underlying material's specularity. This is because steel alloys, which are brighter than iron, feature rust colors of ochre and orange tones, as opposed to iron's pure red rust. Finally, if the underlying material shows any red or orange tint, denoting a copper alloy, the rust will be some shade of cyan. So, the ferrous oxidizer goes a bit beyond just ferrous metals.

Input textures:

  fe_oxidizer_mask.tga    (gray-scale) (used to select which metals show hi-temp rusting)
  fe_oxidizer_pat.tga     (gray-scale) (LaGrande-supplied texture with gray-scale perlin noise)
  diffuse_3.exr           RGB
  specular_3.exr          RGB
  dielectric_bal_3.exr    (gray-scale)
  dielectric_k_3.exr      (gray-scale)
  shininess_1.exr         (gray-scale)

Output textures:

  diffuse_4.exr           RGB
  specular_4.exr          RGB
  dielectric_bal_4.exr    (gray-scale)
  dielectric_k_4.exr      (gray-scale)
  shininess_4.exr         (gray-scale)

Artistic input:

None, except you can tweak the strength of the rusting via the parametric input provided, or you might want to adjust your rust mask and run the noodle again.

* La Grande Ferrous Ruster Noodle (in more detail)


Translucent Oxidizer Noodle:

We're misleadingly told that “aluminium doesn't rust”. Aluminium does rust, but a) Aluminium rust is non-peeling, so it forms a protective layer that prevents further rusting; and b) Aluminium oxide is translucent, so it's not easy to see, unless you know what you're looking for.

The best way to model the look of aluminium rust is to mix in a bit of dielectric blend, at the dielectric constant of aluminium oxide, and lower the shininess a bit. Aluminium oxides looks “cloudy”, and a LaGrande supplied texture mimics those clouds. All you need to supply is a mask for where to apply translucent rust.

Needless to say, it would make no sense to overlap translucent and ferrous or high temperature rust mask zones. Also, any rust mask zones that overlap painted areas will peel the paint, and rust some metal underneath.

Input textures:

  tr_oxidizer_mask.tga    (gray-scale) (used to select which metals show hi-temp rusting)
  tr_oxidizer_pat.tga     (gray-scale) (LaGrande-supplied texture with cloudy perlin noise)
  diffuse_4.exr           RGB
  specular_4.exr          RGB
  dielectric_bal_4.exr    (gray-scale)
  dielectric_k_4.exr      (gray-scale)
  shininess_4.exr         (gray-scale)

Output textures:

  dielectric_bal_5.exr    (gray-scale)
  dielectric_k_5.exr      (gray-scale)
  shininess_5.exr         (gray-scale)

Artistic input:

None, except you can tweak the strength of the rusting via the parametric input provided, or you might want to adjust your rust mask and run the noodle again.

* La Grande Translucent Ruster Noodle (in more detail)


Streaker Noodle:

Whenever I take a plane, I pick my seat on the window side, preferably close to a wing. I'm fascinated by the the complexity of airplane wings, even more so since I got into modeling and texturing. The first thing that makes a wing look like a wing is strategically placed grooves surrounding rectangular areas of different metals that make up ailerons, flaps, stabilizers and air-brakes. The second thing that makes a wing look like a wing is the wind-stretched streaks of “dirt”, mostly lubes from the hinges and mechanisms that get sucked or pushed out by the violent wind conditions. Most such streaks begin where there are grooves or seams between panels, and fade backwards.

I developed a methodology in Gimp to produce streaks: Take the bumpmap, paste it on itself as a layer, but displaced one pixel down; use a bit of blending magic to get that one pixel line selected. This would produce thin lines at the backs of grooves. Use this as a mask on a clumpy noise texture, to get “lines of dust”, then begin the long and arduous task of stacking layer upon layer with vertical displacements and decaying alphas to get long, fading streaks.

Since the advent of Blender noodles, this whole process can be greatly simplified and automated. Furthermore, it can be made to look a lot more realistic.

The streaker noodle begins by detecting where grooves and other bumpmap depressions make a sharp come-back to normal level, and selects such places as candidates for streak birthing points. Additionally, it modulates the strength and length of streaks by the angle of the normal to the ship's forward vector. The “more front-facing” surfaces are, the stronger the streaks, but also the shorter. Surfaces parallel to the forward vector get faint but long streaks. Streaks get “cut off” by bump-map prominences (raisings) along their path; and get temporarily interrupted by depressions in the bumpmap. Streaks come in various shades of brown in diffuse, but only darken specular color on metals. They also feature random dielectric constants hovering in the dielectric range for oils, in general. The diffuse and dielectric blending modes are overwrite. The specular and shininess blending modes are darken-only. The dielectric_blend blend mode is addition.

This noodle fades streaks “down” in the texture; so, for streaks to fade towards back on the model, it is imperative the the UV islands on the unwrap be oriented so that the side nearer the front of the ship appear higher up on the texture. That is, the nose of the ship should point up; the back should point down. If any island is rotated, its streaks will appear rotated, which will look ridiculous. You've been warned. Back-facing surfaces get no streaks at all. This noodle is only applicable to ships; not to stations.

Input textures:

  frontal_bake_in.exr     RGB
  dirt_in.tga             RGBA            LaGrande-supplied noise texture.
  diffuse_4.exr           RGB
  specular_4.exr          RGB
  dielectric_bal_5.exr    (gray-scale)
  dielectric_k_5.exr      (gray-scale)
  shininess_5.exr         (gray-scale)

Output textures:

  diffuse_6.exr           RGB
  specular_6.exr          RGB
  dielectric_bal_6.exr    (gray-scale)
  dielectric_k_6.exr      (gray-scale)
  shininess_6.exr         (gray-scale)

Artistic input:

None, except you can tweak the strength and length of the streaking via the parametric input provided.

* La Grande Streaker Noodle (in more detail)


Scratcher Noodle:

Scratches work in fairly similar ways to those of streaks. They start at some place and fade backwards. The differences are a) Scratches start anywhere, –not just at grooves; and b) the blending mode: Blending mode changes with depth or intensity of the scratch. At the lowest level, a scratch overwrites material shininess. At the next level it removes dielectric blend. At the next level it additionally darkens diffuse and brightens specular. At the next level it additionaly dents the normalmap. Thus, scratches have the highest priority of all features, as they may scratch paint, and even remove rusts. Back-facing surfaces get no scratches at all. This noodle is only applicable to ships; not to stations.

Input textures:

  frontal_bake_in.exr     RGB
  impacts_in.tga          (gray-scale)    LaGrande-supplied, sparse noise texture.
  diffuse_6.exr           RGB
  specular_6.exr          RGB
  dielectric_bal_6.exr    (gray-scale)
  dielectric_k_6.exr      (gray-scale)
  shininess_6.exr         (gray-scale)

Output textures:

  diffuse_7.exr           RGB
  specular_7.exr          RGB
  dielectric_bal_7.exr    (gray-scale)
  dielectric_k_7.exr      (gray-scale)
  shininess_7.exr         (gray-scale)

Artistic input:

None, except you can tweak the strength and length of the scratching via the parametric input provided, or you might want to turn or flip the impact texture provided, if you want to try different locations for the scratches.

* La Grande Scratcher Noodle (in more detail)


Damager Noodle:

It won't damage your texturing; don't worry :) The Damager noodle prepares texture channels needed for ship damage representation. It reads in the ambient occlusion and damage ambient occlusion bakes, and spits out ao_darkener and damage normal channels that are used by the shader to represent surface deformation.

Input textures:

  ao_in.exr               (gray-scale)
  damage_ao_in.exr        (gray-scale)

Output textures:

  ao_darkener_7.exr       (gray-scale)
  damage_dUdV_7.exr       RGB

Artistic input:

None, except you can tweak the strength of the warping via the parametric input provided; or you might feel dissatisfied with the locations, sizes or shapes of damage areas and want to make a new damage ao bake and run this noodle again.

* La Grande Damager Noodle (in more detail)


Packer Noodle:

The packer noodle takes the large collection of textures we've generated and packs them into five textures of four channels each, in CineMut shader texture packing format.

Input textures:

  diffuse_7.exr           RGB
  specular_7.exr          RGB
  dielectric_bal_7.exr    (gray-scale)
  dielectric_k_7.exr      (gray-scale)
  shininess_7.exr         (gray-scale)
  damage_dUdV_7.exr       RGB
  detail_mod_1.exr        (gray-scale)
  ao_darkener_7.exr       (gray-scale)
  radio_4.exr             RGB
  ao_4.exr                (gray-scale)

Ouput textures:

  texture0.exr            RGBA
  texture1.exr            RGBA
  texture2.exr            RGBA
  texture3.exr            RGBA
  texture4.exr            RGBA

* La Grande Packer Noodle (in more detail)


Finalizer Noodle Texture0 ... through ... Finalizer Noodle Texture4:

These are five separate noodles because the various output textures need slightly different treatments. What “finalizing” involves is a few odds and ends:

  1. The textures need to be padded. They were originally padded roughly by setting Blender's Margin to 32; but we can improve on that by blurring through a mask of the background: One pass at radius of 32, two passes at a radius of 16, three passes at a radius of 8, four passes at a radius of 4, and 5 passes at a radius of 2. These blurs do not even touch the the official texture islands; they only affect the background surrounding them. The reason for doing this is extending the color of islands onto their surroundings, so that there may be less artifacts caused by mipmapping and anisotropic filtering reading from invalid texture areas.
  2. We need a little bit of global blurring prior to scaling the textures down to final size, to reduce sampling frequency artifacts.
  3. Textures are then scaled down to final size (50% reduction for the normalmap; 25% reduction for the rest).
  4. Dithering noise is added to reduce quantization artifacts (banding) when converting to DDS format. The noise comes from a texture supplied by LaGrande. The noise is applied just with the strength necessary to dither each channel according to the precision of DXT compression for the channel: 1/32 for red and blue channels; 1/64 for green channels; 1/256 for alpha channels. Also, to reduce the final visibility of the noise, it is applied with opposite polarities to all diffuse versus specular components. The polarity of the noise is also applied with opposite polarities to red and blue channels, versus green, so as to dither chroma while keeping luma constant, when possible. Finally, the amount of dithering injected is slightly modulated by the detail blend channel, as, the more detail we have on a given surface, the less visible the dithering will be; so we apply as little as 50% of calculated dithering where detail level specified is zero.

And there are other final items, such decreasing shininess with bumpmap concavity, etceteras.

Input textures:

  detail_mod_1.exr        (gray-scale)
  normalmap_3.exr         RGB
  texture(N).exr          RGBA

Output textures:

  texture(N).png          RGBA

* La Grande Finalizer Noodles (in more detail)


(End of LaGrande noodles.)




A Gimp script is provided to convert texture0.png through texture4.png to texture0.dds through texture4.dds.


wc_info/modding/texturing_noodle.txt · Last modified: 2008/09/20 21:28 by monkhouse