Normal and Specular maps with CrazyBump

Tutorial collection, comprehensive listings on main site.

Normal and Specular maps with CrazyBump

Postby Tutorial on Sun Sep 27, 2009 6:44 pm

category
Texture Creation

description
Use CrazyBump to generate Normal / Specular maps for the Source Engine

keywords
normal, maps, specular, normal maps, crazybump, bump, crazy, textures, texture.

Here's a little tutorial on using CrazyBump to generate Normal / Specular maps for the Source Engine. It's a nifty program, which can make awesome normalmaps and speculars for you quickly (just don't try it with UVmap textures. They tend to confuse it a lot)

A few notes on Maps, before we begin:
Source doesn't natively support Parallax Mapping (it's there, but disabled unless you have a coder come in to re-enable it), so the Displacement Map option can be safely ignored.
Specular maps from Crazybump will be used as $envmapmasks by the engine. See here for info on adding Specular cubemap reflections, and here for info on the $envmapmask options (which you'd be using CrazyBump to generate)
Normalmaps will be saved in a separate texture. They're referred to by the material vmt file (which you'll need for any texture anyway). See here for how to add bumpmapping to textures
Source does not support Ambient Occlusion, but you can still 'bake' it into the texture by copying it into a top layer and setting it to 'Multiply'

Map Generation / Workflow
I use Photoshop and CBump when making Source Engine textures. Usual pipeline is thus:
  • Make the Diffuse texture in photoshop. This could be as simple as a touched up photo, or something built entirely in photoshop.
  • Flatten the Image, select all, copy it and then paste it into Crazy Bump
  • Go back into Photoshop and undo the flatten command to get all your layers back.
  • Fiddle the sliders around in CrazyBump as necessary. Then start copying maps by right-clicking and selecting 'Copy <Map> to Clipboard'
  • Return to photoshop. The Ambient Occlusion map usually goes in a top layer set to Multiply, with the opacity fiddled with until I'm happy with it.

This is where things diverge, depending on what we're doing.

  • If you just want a Normalmap, then that's saved as a seperate VTF file. Usual naming conventions is yourtexturename_bump, but it doesn't really matter what you call it. You'll have to reference it in the .vmt file for Source to know it's there. Again, see $bumpmap for more info
  • If you just want a specular map (which you'll be using as an $envmapmask), then you can save it to your texture's alpha channel (assuming it's not already using it for transparency). Due to a bug, you'll have to invert this for it to be read correctly. Save the diffuse texture as an ordinary Compressed Texture with Alpha, and use $basealphaenvmapmask 1 in the vmt to specify that's where it is.
  • If you want to have both a Normalmap and Specular map, you MUST save the specular map to the alpha channel of the Normalmap. Source won't read it otherwise. Save that as yourtexture_bumpspec (naming conventions don't really matter, I just find it helps to mention in the name of the texture if the normalmap also contains a specular map) using the Normalmap with Alpha preset. In the vmt, use $normalmapalphaenvmapmask 1 to specify you're using the normalmap's alpha channel as the envmapmask

Because Specular maps are greyscale, it's best to save it as an alphamask rather than as a separate, standalone texture. If it's saved as standalone, it'll be in RGB format (you can't save as Greyscale with vtf, unfortunately) with three channels, whilst as an alpha channel for another texture, it only takes up one, which reduces filesizes.

NOTE: Due to bugs with the Photoshop VTF plugin, bear in mind these two things:
Once you've used the Normalmap or Normalmap with Alpha preset, the exporter will be 'stuck' on that preset, always saving in that format (specifically, with the 'Normalmap' and 'Trilinear' flags) whatever you set it to, until you restart Photoshop. It's a pain in the neck, to be honest, and can really break things if it's anything other than a normalmap. Fortunately, you can uncheck those two flags in VTFEdit.
The plugin will not save alpha channels if you haven't flattened the image beforehand.

A good way of knowing if Source knows about your specularity texture is in Hammer. If you set the 3d view to 'Textured' (as opposed to 'Textured, Shaded', which has a few bugs and won't display certain texture shaders correctly), you'll see the texture is visibly 'shiny'. It doesn't load the $envmapmask, so you'd have to use some debugging methods ingame to check those.

Guessmyname
- Don't send PM's to this user -
Tutorial
Not A Real User
 
Joined: Sun Mar 06, 2005 11:00 pm

Re: Normal and Specular maps with CrazyBump

Postby AverageJoe on Sun Sep 27, 2009 10:13 pm

I love CrazyBump. But almost $300 for a small program like this seems ridiculous.
We are not but a parade of crystalline machines, performing as programmed.
User avatar
AverageJoe
Regular
Regular
 
Joined: Sat Sep 26, 2009 4:24 pm
Location: Western Massachusetts, USA

Re: Normal and Specular maps with CrazyBump

Postby Zipfinator on Mon Sep 28, 2009 12:07 am

ARRRRGHHH.

It's a very nice program though, my textures wouldn't be nearly as good without it.
Image
|Pipe Dream|City 17: Episode 1|
User avatar
Zipfinator
Veteran
Veteran
 
Joined: Thu Dec 21, 2006 6:03 pm
Location: California

Re: Normal and Specular maps with CrazyBump

Postby Guessmyname on Mon Sep 28, 2009 10:17 am

AverageJoe wrote:I love CrazyBump. But almost $300 for a small program like this seems ridiculous.


O_o

I paid £30-ish for it, from the site itself. Student license ftw.

The $299 one is for professional companies and such who are expected to make money from it.
User avatar
Guessmyname
1337 p0st3r
1337 p0st3r
 
Joined: Sun Mar 27, 2005 10:38 pm

Re: Normal and Specular maps with CrazyBump

Postby AverageJoe on Mon Sep 28, 2009 6:53 pm

Yeah independent developers and modders/mappers fall into an ambiguous category.
It's not commercial work, but it's not really professional work either.
http://crazybump.com/buy.html
We are not but a parade of crystalline machines, performing as programmed.
User avatar
AverageJoe
Regular
Regular
 
Joined: Sat Sep 26, 2009 4:24 pm
Location: Western Massachusetts, USA

Re: Normal and Specular maps with CrazyBump

Postby soulburner on Thu Oct 01, 2009 10:27 am

Wait, so the specular map generated with CrazyBump needs to be inverted in Photoshop before saving to vtf? Is it CrazyBump's error or Valve's?
soulburner
Member
Member
 
Joined: Tue Mar 25, 2008 12:40 pm

Re: Normal and Specular maps with CrazyBump

Postby Surfa on Thu Oct 01, 2009 9:45 pm

It depends where you use the spec map if you put it inside the diffuse alpha channel you need to invert it but if you have it inside the bump map's alpha channel there is no need to invert it. But mostly it is valves fault.
Surfa
May Contain Skills
May Contain Skills
 
Joined: Sun Dec 30, 2007 3:04 pm

Re: Normal and Specular maps with CrazyBump

Postby MayheM on Fri May 03, 2013 9:12 pm

I finally just broke down and paid the 49 bucks for the education license. Sometimes it pays to work at a school since I can list myself as a teacher. I have been using the demo for a while on several different computers and it is awesome! This tutorial did actually point out a few things I had missed though. So thanks for that...
Image
User avatar
MayheM
Veteran
Veteran
 
Joined: Tue Oct 16, 2007 7:46 pm
Location: Lancaster SC

Re: Normal and Specular maps with CrazyBump

Postby MrTwoVideoCards on Sat May 04, 2013 12:45 am

Should of went with ndo2 instead. But for good spec and height Knald is pretty rad, and it's free right now.
User avatar
MrTwoVideoCards
Monothetic
 
Joined: Thu Aug 02, 2007 11:18 am
Location: IN YOUR SOUL

Re: Normal and Specular maps with CrazyBump

Postby Epifire on Sat May 04, 2013 1:17 am

Only thing it really sucks with is when trying to make really great normals when you have lots of split up UV islands on a model. Cause even if it's not supposed to look so separate on the model, crazy bump normals can only be so strong before the edges become really apparent. Great for seamless tile textures though cause you really can't go wrong when you need a good material quickly.
Image
User avatar
Epifire
Senior Member
Senior Member
 
Joined: Fri Mar 25, 2011 8:54 pm
Location: Minnesota, where you're froze 24/7

Re: Normal and Specular maps with CrazyBump

Postby jimonions on Sat May 04, 2013 3:07 am

Might I interest you gentlemen in another map creation program with the ability to calculate ao directly from models utilizing a complete gpu powered interface. for free.

https://www.knaldtech.com/

oh and make sure your drivers are updated before trying this otherwise it may cause your pc to freeze.
User avatar
jimonions
Regular
Regular
 
Joined: Tue Feb 01, 2011 10:41 am

Re: Normal and Specular maps with CrazyBump

Postby Black_Stormy on Sun May 05, 2013 8:57 am

I have been using Knald for its concavity and convexity maps, they are really helpful for metallic textures to emulate shine.
User avatar
Black_Stormy
May Contain Skills
May Contain Skills
 
Joined: Sun Nov 28, 2010 6:03 am
Location: Cairns, QLD, AUS

Re: Normal and Specular maps with CrazyBump

Postby WhiteDevil on Sun May 05, 2013 12:33 pm

Nice, I haven't heard about Knald before. Seems perfect for the metal things what I'm working on now.
User avatar
WhiteDevil
Been Here A While
Been Here A While
 
Joined: Sat May 28, 2005 1:09 pm

Return to Tutorials

Who is online

Users browsing this forum: No registered users