Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Bump Maps!!!

Grim Lupis
Dark Wolf
Join date: 11 Jul 2003
Posts: 762
07-26-2003 08:30
Don't all of the specified video chipsets support bump maps directly?? If so, couldn't we get bumpmap support without a noticable performance decrease??
_____________________
Grim

"God only made a few perfect heads, the rest of them he put hair on." -- Unknown
Darwin Appleby
I Was Beaten With Satan
Join date: 14 Mar 2003
Posts: 2,779
07-26-2003 08:41
That might put just a tad more stress on the servers...

Unless bumpmapping is completely and totaly local. Then I say horrah!
_____________________
Touche.
Ama Omega
Lost Wanderer
Join date: 11 Dec 2002
Posts: 1,770
07-26-2003 09:48
It would probably hit bandwith most. Essentially it is 1 more texture you have to download.

Another issue is making bump maps look good. Hehe. I don't think the results of adding bump maps will be as great as a lot of people think. I actually do want it and think it could be cool, but ...

If I understand correctly, when a major game studio uses bump maps they aren't drawn in photoshop. Rather the scene itself is rendered on an insane level of detail that even the workstations they use to render them can't do in real time. Another program then goes through and produces the appropriate bump maps to produce the same scene with a lower polygon count.

I'm not saying that bump maps aren't good, or that people can't make things that look good with them. I just think it will be harder, and less perfect than some imagine to create good bump maps.
Grim Lupis
Dark Wolf
Join date: 11 Jul 2003
Posts: 762
07-26-2003 15:42
I was thinking simple, like the bumpmap you would wrap around a cylinder to make a sculpted (lathed) bedpost, urn, lamp, etc.
_____________________
Grim

"God only made a few perfect heads, the rest of them he put hair on." -- Unknown
Ama Omega
Lost Wanderer
Join date: 11 Dec 2002
Posts: 1,770
07-26-2003 15:58
Ah its true, I want them too. Some neat things could definatly be done with them. And SL residents always do impress.
Gwydeon Nomad
Registered User
Join date: 1 May 2003
Posts: 480
07-26-2003 20:23
Grim, Need lathed bed posts? Come find me in game :)
Grim Lupis
Dark Wolf
Join date: 11 Jul 2003
Posts: 762
07-27-2003 02:24
OK, let me restate:

I'd like to have lathed bedposts that use one prim, instead of 5.

:-P
_____________________
Grim

"God only made a few perfect heads, the rest of them he put hair on." -- Unknown
Chip Midnight
ate my baby!
Join date: 1 May 2003
Posts: 10,231
07-30-2003 14:30
From: someone
Originally posted by Ama Omega
If I understand correctly, when a major game studio uses bump maps they aren't drawn in photoshop. Rather the scene itself is rendered on an insane level of detail that even the workstations they use to render them can't do in real time. Another program then goes through and produces the appropriate bump maps to produce the same scene with a lower polygon count.


What you're talking about isn't bump mapping, although it's very similar. It's more a type of displacement mapping. I think it's called "normal mapping" There are currently no games (that I know of) using this tech, but there are some coming down the pike like Doom3. Only the newest generation of video cards have any native support for this. Displacement mapping actually changes the topology of the model so that a flat polygon can be rendered to look like a much more complex group of smaller polygons. Bump mapping is a rudimentary form of this, but all it does is change the shading of each pixel to make it appear raised or lowered. The polygon itself is still rendered flat. Not sure that makes any sense but there's a big difference between the two.
_____________________

My other hobby:
www.live365.com/stations/chip_midnight
Grim Lupis
Dark Wolf
Join date: 11 Jul 2003
Posts: 762
07-30-2003 16:03
Thanks for that explanation, Chip. My experience with bumpmaps is limited to POV-Ray. In POV-Ray the term is used commonly for what I describe. (If I remember correctly, which I might not, actually.)

In that case, I guess it isn't feasible at this time.

shame, that.

:-(
_____________________
Grim

"God only made a few perfect heads, the rest of them he put hair on." -- Unknown
Ama Omega
Lost Wanderer
Join date: 11 Dec 2002
Posts: 1,770
07-30-2003 18:44
Chip a bump map *is* a normal map.

And you are right and wrong at the same time! woot!

:)

How Shadows are Calculated:

First keep this in mind, the whole goal of the 3D model and a lighting system is to figure out what color to draw a pixel on your screen. That is important. Froma 3d grpahics standpoint at least, not talking physics.

Very general: You take a polygon and you fand what way it is facing. You create an vector in that direction - perpinidcular to the surface of the polygon. That is the normal. Now in simple shading you just compare that one normal to the vector of the direction of light. Based on how close they are, the polygon is brighter or darker, because if they point right at each other then the light is hitting it full on. If they are 90deg or past then no light hits it at all.

More advanced: Phong shading is a step up from this. The above method clearly shows the different polygons, because the whole polygon is uniformly shaded. So what you do instead is look at vertices - places where the polygons meet at corners. Now each of the vertices you make a new normal vector - a normalized sum (sort of an average) of the normals of the polgons touching that corner.

Now is the trickier part, you start with the normal at one corner and work your way along the edge creating a new normal for each pixel. This new normal is somewhere between the normal you started with and the normal you are going to. You do this along all the edges then along each row of pixels connecting opposite edges.

The effect is amazing, in a light shodowed model with fairly low polygon count you get a *very* smooth looking picture! The polygon edges are rounded and even the polygon is rounded. Its not good for cubes etc of course.

So bump maps or normal maps.... Here is the idea. Since making all those individual normals like that smooths and rounds it out so nicely.... what if you could nudge some? You know, make them point in a slightly different direction as if the polygon (in that spot only) was pointing a different direction? Since it is really just this normal that is determining the shade/color drawn there, then there would be little to no difference from a very high polygon rendering of the same thing.

And that is what a bump map is. It is a gray scale image and depicts where and how to nudge those normal vectors to get a nice image. And yes some development companies do go through the process of creating insanely high polygon count models, running em through some processing software to end up with a bump map that looks very similar but without the performance hit.

Wanna know how to tell if something is bump maped? Look at the edges. Even though the object will appear more detailed 3d, the actual shape of the object doesn't change so the edge is still there. A perfect example is a golf ball. Which can look amazingly real with good bump maps but will have a perfectly round edge - no dimples in the edge.

Now there is another tech called displacement mapping or terrain mapping. The idea is similar. Instead of adjusting the normals though, you create a map of the hieghts (off the base shape) of the object. Then you look at where on that image those verticies lie (the corners of the polygons) and adjust their hieght based on that image.

How is that any better from just modeling? You can create a dynamic system that only renders things as detailed as they need to be. It is primarily used, or designed for?, terain. So lets say you render a complex world with a huge mountain range. The mountain range is 100,000 polygons. Now your world is big so you can see the mountain range from 100 miles off. With traditional modeling your poor little computer is rendering 100,000 polygons, or going through the process of, to decide what color to draw about 10 pixels on your screen. That doesn't make sense does it? So you use texture maping, and as you get closer the detail gets upped, drawing more and more polygons. That way you can still see the mountain from a great distance without killing your computer.

Both are great technologies with different uses and different places. Bump mapping support is built into most graphics cards these days but I don't think terrain mapping is (maybe GeForce 3 or later...hm).

Anyways hope thats as clear as mud! Don't want you all becoming computer graphics people, invading on my territory and all. And yes I built a 3d modeler and renderer from the ground up including a phong shader. No it didn't support bump maps or terain maps LOL though it did have primitives, swept polygons, surface patches and surface sweeps.
Grim Lupis
Dark Wolf
Join date: 11 Jul 2003
Posts: 762
07-30-2003 19:00
Hey, AMA. How about taking all that 3d modelling knowledge you have and writing us an out-of-world building app.

It wouldn't generate a file that could be uploaded straight to your inventory as an object, but an LSL script file, that can be attached to a prim, allowing the prim to generate the build in-world on command.

If it included texture support, we could even tweak our textures out-of-world, so we only have to pay the upload cost once, instead of once for each correction.

Feel up to it? ;-)
_____________________
Grim

"God only made a few perfect heads, the rest of them he put hair on." -- Unknown
Ama Omega
Lost Wanderer
Join date: 11 Dec 2002
Posts: 1,770
07-30-2003 19:25
All of the unique features of a prim (cut, hole, tilt, top size) are not modable via script.
Chip Midnight
ate my baby!
Join date: 1 May 2003
Posts: 10,231
07-31-2003 09:23
From: someone
Originally posted by Ama Omega
Chip a bump map *is* a normal map.

And you are right and wrong at the same time! woot!


hehe, yeah... I know I gave a half assed explanation. What you were talking about in your original post isn't bump mapping though (creating a high detail model and creating normal maps that can be applied to a low poly object to make it render like the high poly object). That technique is more akin to micro-poly displacement because the physical location of pixels are changed, not just their shading. Bump mapping (and also smoothing - where poly edges are blended to hide the edges between polys) is a 2D technique. If you look at a bump mapped poly from the side it's still a flat poly so bump mapping falls apart if the view angle becomes too coplanar to the surface being viewed. The technique they're using in Doom 3 is a different beast than standard 2D bump mapping. It's more like micro-poly displacement because it's a true 3D effect. They physical rendered shape of the object changes, not just the shading.

The next version of Zbrush will have this ability. You can bring in a low poly model, use the tools in Zbrush to make it far more detailed (up to around a million polygons) and then export displacement maps that can be exported and used in a renderer capable of micropoly displacement such as Vray, Mental Ray, or Renderman. It's my understanding that Doom3 and some other next-gen engines use essentially this same technique.

Check out this sample from the Zbrush forums for a good example of this technique in action :) (drool!)

http://www.pixolator.com/zbc-bin/ultimatebb.cgi?ubb=get_topic&f=1&t=011757
_____________________

My other hobby:
www.live365.com/stations/chip_midnight
Grim Lupis
Dark Wolf
Join date: 11 Jul 2003
Posts: 762
07-31-2003 09:46
From: someone
Originally posted by Ama Omega
All of the unique features of a prim (cut, hole, tilt, top size) are not modable via script.


Bummer. Hadn't gotten that far with scripted creation, just knew that several people do build things this way.

How about a list of the polys involved, and their significant settings?

cylinder:
pos <0,0,0>
size <0.025, 0.025, 0.500>
rot <0,90,0>
start <0.00>
end <1.00>
hollow <85>

etc. With an option to offset the base position, this would still greatly decrease the amount of in-world time involved in building more complex builds. Which is always good if you're building in a social zone.

Not to mention, if I'm spending 3 hours building offline and 30 minutes building online, as opposed to 3.5 hours (plus interruptions) building online, this has to be better for lag, bandwidth, etc.
_____________________
Grim

"God only made a few perfect heads, the rest of them he put hair on." -- Unknown
Ama Omega
Lost Wanderer
Join date: 11 Dec 2002
Posts: 1,770
07-31-2003 18:07
I was fairly sure that there were tools that would take a high polygon count model and create the appropriate bump map to simulate it on a low polygon count model. And no the physical location of the pixels does not need to be changed, not on the low polygon count model.

I am not saying there aren't similar tools for displacement maps or that Doom 3 is using Bump maps and not Displacement maps. I was just under the impressions that in professional applications bump maps are not drawn by hand.
Chip Midnight
ate my baby!
Join date: 1 May 2003
Posts: 10,231
08-01-2003 07:58
From: someone
Originally posted by Ama Omega
I was just under the impressions that in professional applications bump maps are not drawn by hand.


Usually they are drawn by hand or they're derived from the diffuse color map through some photoshop trickery (for example taking the texture map, running a high pass filter on it to remove specular highlights and uneven lighting, and then adjusting the contrast ratio... that way the bump map lines up perfectly with the diffuse map becuase it's just a filtered variation of the same image. Then it's touched up by hand. You're thinking of displacement maps as described above where an app like Zbrush can take a high poly model and render displacement maps for use on a low poly model. But back to the original post... bump map support in SL would be a wonderful thing. And how about pixel shaders too? :)
_____________________

My other hobby:
www.live365.com/stations/chip_midnight
Grim Lupis
Dark Wolf
Join date: 11 Jul 2003
Posts: 762
08-01-2003 08:46
I would even be willing to pay tax on them.

Considering that you could use one or two prims and a couple of good displacement/bump maps to create an object that would normally take about 10 prims to even come close, AND the mapped version will look better, I think it would be well worth it.

Especially if implementation can be offloaded to the client and/or the vid card. Fewer prims used = fewer resources used on the sim = better sim performance. + better looking builds.

I'm sure there's an application somewhere that can convert blobs to base prims + displacement maps + textures. If not, we can probably convince our 3d programmers here to build one and sell it as shareware. Every SL resident that's the least bit serious about building would want it.
_____________________
Grim

"God only made a few perfect heads, the rest of them he put hair on." -- Unknown