Eric2575
Apr 5 2006, 10:46 PM
I've been playing around with displacement maps to simulate rivets on a plane's fuselage. The first few attempts are a little puzzling. I've attached a picture to show what I mean. My impression was that a gradient map would make a nice domed effect, but the effect is far from domed.
Has anyone with more experience in bump and displacement maps got any ideas or better results?
Thanks
Rodney
Apr 5 2006, 10:55 PM
Rodger Reynolds once did a test to determine which cases worked best with decal/displaced rivets versus modeled rivets.
His test may still be online but I'm not sure where.
As I recall he concluded that a mixture of geometry and decals did the job well.
Added: I think if you reverse the normal on your patch you'll see something closer to what you are after.
Eric2575
Apr 5 2006, 11:20 PM
Well, you were right about the normals. I flipped them with the following results.
I don't intend to change the geometry, because I want to take advantage of displacement mapping V.13 and the model is already rather patch heavy.
ypoissant
Apr 6 2006, 04:29 AM
From what I can see (do you have alpha channels?), the displacements match quite well the maps you use. However :
- I don't quite understand what you are trying to represent with the large map. Its round border, being half white and half black, seems wicked to me.
- I also find it strange that your bump maps ends in white (are surrounded by white) instead of inding in 50% gray.
This gives me the impression that you don't understand the principles of bump/displacement maps.
Displacement maps represent displacement from the patch surface. 50% gray means no displacement. Lighter gray values represent displacement up (over) from the patch surface and darker gray values represent displacements down (inside) the patch surface.
Eric2575
Apr 6 2006, 11:48 AM
Well, this is my first foray into dispacement/bump maps. After rendering the above pics, I realized something was very wrong. Checking my rivet map, I realized that I had made the rivet with a gradient that had no background color. This in turn had the effect of not lifting the geometry when applied as a dispacement map. That's why the rivets in the pic are so flat.
The problem with the white area surrounding the rivet map comes from the selection tool. When I add an alpha to the rivet pic and select the pic to cut, I always get the halo around the rivet. If I don't use anti alias, the rivet looks jagget, when I do use AA, I get the halo. How do I get a clean crisp rivet/alpha to use as my map?
The pics posted were basically experiments to see what does what. Now, to try and get a cleaner rivet, I selected the rivet with AA, then used the shrink selection option. It's better, but probably not the correct way to do it.
1. Just color
2. Color and displacement
3. Color and Disp. with dark gray model
4. Same as #3 with negative displacement
5. New map with cleaner rivets, neg displ at -200 on gray model.
Edit: I reread your post Yves and think that now I can get rid of the halo effect - just start my displacement map with a background of 50% gray. Since I just want to have raised rivets, that should work fine.
ddustin
Apr 6 2006, 12:51 PM
QUOTE(Eric2575 @ Apr 6 2006, 11:48 AM)

Well, this is my first foray into dispacement/bump maps. After rendering the above pics, I realized something was very wrong. Checking my rivet map, I realized that I had made the rivet with a gradient that had no background color. This in turn had the effect of not lifting the geometry when applied as a dispacement map. That's why the rivets in the pic are so flat.
The problem with the white area surrounding the rivet map comes from the selection tool. When I add an alpha to the rivet pic and select the pic to cut, I always get the halo around the rivet. If I don't use anti alias, the rivet looks jagget, when I do use AA, I get the halo. How do I get a clean crisp rivet/alpha to use as my map?
The pics posted were basically experiments to see what does what. Now, to try and get a cleaner rivet, I selected the rivet with AA, then used the shrink selection option. It's better, but probably not the correct way to do it.
1. Just color
2. Color and displacement
3. Color and Disp. with dark gray model
4. Same as #3 with negative displacement
5. New map with cleaner rivets, neg displ at -200 on gray model.
Edit: I reread your post Yves and think that now I can get rid of the halo effect - just start my displacement map with a background of 50% gray. Since I just want to have raised rivets, that should work fine.
If you are using PS for your editing, make sure the feather setting is at zero, or it will create a feathered edge.
D
Eric2575
Apr 6 2006, 01:06 PM
Thanks for the tip David, I 'll make sure and check that.
MMZ_TimeLord
Apr 6 2006, 01:32 PM
Eric,
Here is the map and a render of a portion of it at 1000% displacement setting.
Not a round rivet head, but you get the idea.
ypoissant
Apr 6 2006, 02:36 PM
QUOTE(Eric2575 @ Apr 6 2006, 03:48 PM)

The problem with the white area surrounding the rivet map comes from the selection tool. When I add an alpha to the rivet pic and select the pic to cut, I always get the halo around the rivet. If I don't use anti alias, the rivet looks jagget, when I do use AA, I get the halo. How do I get a clean crisp rivet/alpha to use as my map?
If you add an alpha channel, then you should not cut the rivet map with the same mask that you used for the alpha channel. This will result in double masking and will produce that halo effect. Just add an alpha mask but leave the rivet map uncut, just ending in 50% gray.
A trick to get exact rivet bump map is to model your rivet then drop a gradient material that goes from 50% gray to 100% white onto it. Orient the gradient material appropriately. Set the rivet model surface ambiance to 100% and the diffuse falloff to 5000%. Render to file and you get your rivet bump map. Now scale the map to suit your requirements. For better bump map results, render in 16bits to a PNG file and make your rivet model much larger than actual size.
Eric2575
Apr 6 2006, 06:12 PM
Steps I am taking that yield this latest result:
1. Create a new PS image with a 50% gray background
2. Use elliptical marquee tool to make rivet outline
3. Fill with spherical gradient 50% gray to white
4. Create new alpha channel
5. Use paint bucket to fill selection with white
6. Save as tga 32 bit file
7. Import as decal to AM, set to displacement and render.
Problems:
1. There is still a dark ring around the outline. I tried shrinking the mask (no diff), using gaussian blurr (no diff), starting with a transparent background (no diff), and searching the web. There is a lot of talk about PS and the halo effect, but I could not get the darn ring to go away. Yves, you even discuss it on your web site and state: "In consequence, when producing an image with alpha channel in Photoshop. it must be produced with the "normal alpha image" rules in mind. This means that all pixels under which the alpha value is not 0 should have their full color. In other words, the pixel colors should not fade to black nor fade to white." Since that's exactly what I need to do for displacement maps, fade to white, does that mean there is no way around this?
2. Can someone give me an idea of how to manipulate the rivet image so that the displacement map does not produce a cone shape? Obviously I would like a concave more rivet like shape, not a bunch of little cones.
Ganthofer
Apr 6 2006, 06:27 PM
QUOTE(ypoissant @ Apr 6 2006, 06:36 PM)

.......
A trick to get exact rivet bump map is to model your rivet then drop a gradient material that goes from 50% gray to 100% white onto it.........
I have used and prefer Yves trick of modeling, appling a gradient and rendering. Not for rivets, but heads of screws and such.
robcat2075
Apr 6 2006, 08:13 PM
QUOTE(Eric2575 @ Apr 6 2006, 09:12 PM)

2. Can someone give me an idea of how to manipulate the rivet image so that the displacement map does not produce a cone shape?
Aside from the model and gradient method mentioned above, you could use the "Curves" adjustment feature in Photoshop to remap any gray level to any other gray level and change the slope of the grays.
It would involve a bit of trial and error.
Eric2575
Apr 6 2006, 10:26 PM
Found out another problem I'm experiencing with Photoshop. The brush I defined from the rendered AM image is not gradiating from foreground to background, but from foreground to transparent. There must be a setting somewhere I'm missing.
MattWBradbury
Apr 7 2006, 01:10 AM
Try not using alpha channels. Applying a 50% gray displacement map to geometry will not affect the height of surfaces.
Gradients on photoshop are linear steps. Each pixel shift is the same slope which means that you would get the cone shape. If you want a shere, build a sphere in A:M and create a displacement map from that model. Do the same thing for your Rivets and you'd have your maps.
Something you need to look at is whether or not these rivets will show up with displacement maps at a distance. I've noticed that in some cases, small details disapear the farther the camera is from the surface or if there is a low resolution on a render.
Paul Forwood
Apr 7 2006, 05:42 AM
Yes, displacement of small details, like rivets, will soon be lost at a distance so you could add a colour map, with rivet details, to your decal.
Eric2575
Apr 7 2006, 06:00 AM
Got the look of the rivet down to where I like it, but found something really weird. After finishing the bump map of the rivets, I also made a separate map for the panel seams. Once both were imported as decals into AM, both maps looked very blocky, like they were at very low res. The maps were the same size, but the panel line map was unrecognizable due to the digital blockyness. This was during the positioning of the decals. Once they were rendered, it was ok, but how can I even position them if I can't even recognize the decals in the first place. These are tricky maps in that they have to line up on several points. I remember some posts a long time ago that dealt with the same issue. The consensus seemed to have been that this was just a quirk of AM in the way it handles decals. Well, in order to save on any more headaches, I just combined the maps and had no problem applying them that way. Like I said, although the maps are the same size, the rivet map was recognizable and stayed that way even when I added the panel map in PS. I did forego the alphas. After thinking about it, I really did not have to have them since, as a couple of you guys pointed out, these maps were just for displacement. A lot of things seem easy, but when I actually get down to them, they are just worms in a can that doesn't want to close. So much to learn.
ypoissant
Apr 7 2006, 06:19 AM
QUOTE(Eric2575 @ Apr 6 2006, 10:12 PM)

1. There is still a dark ring around the outline.
I think we would need to take a look at your bump map file to get an idea of what is going wrong.
QUOTE
2. Can someone give me an idea of how to manipulate the rivet image so that the displacement map does not produce a cone shape? Obviously I would like a concave more rivet like shape, not a bunch of little cones.
A gradient is a linear ramp of gray values so this will produce a cone. Along the lines of Robcat suggestion, once you have a linear gradient in Photoshop, you can change its shape to whatever you want with the curve tool.
Basically, you start with a linear gradient from white to black. Open the curve tool and notice that the default shape of the curve is also a linear gradient. Whatever shape you will give the curve is exactly what your grayscale gradient will look like. So if you reshape the curve to look like a half of a dome, that is what your rivet map should look like.
Additional important notes:
- If you work with the curve tool, your gradient should go from white to black. Not from 50% gray to white. After you have reshaped your gradient, you can use the level tool to remap the black-to-white to a 50% gray-to-white.
- Set your mode to 16bits. The curve tweaks you are going to apply to the gradient is going to be very severe and you don't want to loose any information in your map and produce quantization artifacts. Working in 16bits will prevent that. You can switch to 8 bits just before saving the map to file.
MattWBradbury
Apr 7 2006, 12:01 PM
The steps to make a dome displacement map:
1. Create a black Image in PhotoShop. I used an image that was 51xX512 in resolution.
2. Set the Image mode to a 16-Bit Channel.
3. Set the Foreground color to White.
4. Click on the Gradient Tool and select the Radial Gradient.
5. Select the Foreground to Transparent gradient from the Gradient combo box.
6. Draw a gradient from the very center of the image towards the sides of the image, but do not go all the way to the edge.
7. Open up the Curves Adjustment, and set the curve to a quarter circle. Remember that the curves are based on matrix functions, so you may need to use many points. Here is the curve I used.
[attachmentid=15830]
8. Once it looks like a quarter circle click OK.
9. Open up the Levels Adjustment and set the first Output Level to 128.
[attachmentid=15831]
10. Click okay, and set the Image mode to 8-Bit Channel.
You should get something looking similar to this.
[attachmentid=15832]
If you were to use the 8-bit grayscale image as a displacement map, it would turn up looking like this.
[attachmentid=15833]
To lower the amount of roughness, use a 16-Bit image instead of an 8-Bit image.
Eric2575
Apr 7 2006, 06:27 PM
That's awesome Matt! Thanks so much for the down and dirty. Other people will find this very helpful too, I'm sure.

Yves, I wasn't sure what you meant when you said "Whatever shape you will give the curve is exactly what your grayscale gradient will look like". Now that Matt put the quick tut up, I see exactly what you mean. In the above exchange, we were talking about the halo around the rivet with the Alpha channel. Isn't that what you are talking about here:
http://www.ypoart.com/tutorials/Alpha-about.htm ?
ypoissant
Apr 7 2006, 06:47 PM
QUOTE(Eric2575 @ Apr 7 2006, 10:27 PM)

In the above exchange, we were talking about the halo around the rivet with the Alpha channel. Isn't that what you are talking about here:
http://www.ypoart.com/tutorials/Alpha-about.htm ?
Well. Yes and no. To be sure. I would need to examine the way you do your alpha channel in your bump maps.
Eric2575
Apr 7 2006, 06:54 PM
Would you be able to tell if I post the pic, or can I send you the actual file?
ypoissant
Apr 8 2006, 04:33 AM
The problem with posting the pic, as you did earlier, is that we don't see how he alpha channel is done. Attach the file in the Wip forum so everybody can feedback on it.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.