Jump to content

Unsatisfying baked texture resolution


Nacy Nightfire
 Share

You are about to reply to a thread that has been inactive for 3615 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

There's something I'm not understanding here.  I've spent a few days/many hours testing this out AND doing search/research of past forum threads and still I have no idea what's going on. I'm using Blender.

If I take an image that is 1024x1024 and tile it a set number of times to a mesh plane using the SL texture parameters, I get very good close-up resolution.  However if I take the very same plane and use either a 1024x1024 or even a 4096x4096 version of the same texture and within blender I identically tile it and then bake 1024x1024 "textures" only (no shader effects, etc.) I get a much blurrier result then in the first instance.  (Of course this is for comparison,  I wouldn't use blender for simply baking out the texture, what I'm leading up to is getting good resolution when advancing to using shader settings, ao, etc.)

I tried using Modo and got similar blurry results, although I'm not too up to speed with Modo, so it could be human error.

Is this just a universal thing with using bake?  Is there some setting I'm missing? Is the Blender Render just not all that great for baking? Am I inputting the wrong texture type (png) into blender, am I exporting the wrong texture type OUT of blender (bmp)?  Any help would be appreciated.  Thanks!

Link to comment
Share on other sites

Think about the mechanics of what's happening.  Say you tile that source texture 10 times across the surface.  The surface is now 10,240 texels wide, meaning each texel (texture pixel) is really tiny.  So, of course, it still looks great when you zoom in on it.  Now, you bake a new texture from the surface, and the end result is only 1024 pixels wide.  You've reduced the resolution by 90%.  Each new texel is an amalgam of 100 others.  So, of course the new texture will be blurry, compared to the tiled original.

It's the same thing that would happen if you tiled the image 10 times in Photoshop, to produce a picture 10 times as wide, and then you reduced the size of the whole thing by 90%.  It would end up relatively blurry in that case, too.

  • Like 1
Link to comment
Share on other sites

Thanks so much for your speedy response Chosen.   I understand your explanation, however why is this not also the case when I repeat the texture right in SL?  Is something different going on with the SL texture thingy (technical term) which preserves resolution when you ask it to repeat the exact same texture the exact number of times in SL?

edited to add:  I mean also in Photoshop before you commit the texture to 1024... are both SL and PS showing the texture as  1024 x the number of repeats in actual pixels?  I think that's what you said, but I would have thought SL reduced the texture to 1024 after you asked it to repeat it x number of times.

 RE-editing to add: I realize I didn't understand the difference between texels and pixels (actually I never heard of a texel before).   So I'll study up on the topic and I'm sure your explaination will become much clearer to me (and now I admit I thought I understood what you wrote,  but clearly I didn't because I'm missing some important technical info here)

Again, thanks very much for the help!

Link to comment
Share on other sites


Nacy Nightfire wrote:

Is something different going on with the SL texture thingy (technical term) which preserves resolution when you ask it to repeat the exact same texture the exact number of times in SL?

Not sure if you already grasped it, but the 1024x1024 (or any other size) repeated in Blender, 3ds Max, Maya or SL stays 1024x1024. That's why you can get away with a lot less resource use when you repeat them. A 2x2 texture repeat on a 1024x1024 texture gives the detail of a single 2048x2048 for a quarter of the memory use. The downside of course is, you can only repeat, so lighting effects or shadows or anything are difficult to bake in. That's why people are asking for a seperate light map in the/a new material system. Then you can repeat the diffuse texture and keep a single (small) map for the shadows and such.

(What I'm going to say isn't entirely accurate as far as terms go, but it does explain how it works)

A texel is a texture pixel on an object, unlike a "normal pixel", which is a pixel on screen. It's as simple as that. Imagine a plane with a 256x256 texture on it, when you zoom in so it covers the entire height of your screen (roughly 1000 pixels), every pixel on screen will be about four times smaller than the texel, giving a blurry effect. If you use a 1024x1024 texture on that plane and zoom in so it covers about a quarter of the height of your screen, every pixel on screen is about 4x4 texels big. The texture will appear sharp, but you use 4x4=16 times more memory than needed.

  • Like 1
Link to comment
Share on other sites

You're welcome, Nacy.  Let me respond to your additional questions. :)

 


Nacy Nightfire wrote:

why is this not also the case when I repeat the texture right in SL?

When you repeat the texture, whether it be in SL, or in Blender, or anywhere else, you're not doing any resampling of the image.  Each instance of the image remains at its full resolution. 

Again, if you take a texture that is 1024 texels wide, and you repeat it 10 times across the surface, you end up with a surface that is 10,240 texels wide. Image-wise, it's no different than if you applied the texture to a plane, and then rezzed 10 copies of the plane, side by side.

 


Nacy Nightfire wrote:

I mean also in Photoshop before you commit the texture to 1024... are both SL and PS showing the texture as  1024 x the number of repeats in actual pixels?

Short answer: yes.

In my Photoshop example, you'd be creating an image 10,240 pixels wide, and putting 10 instances of a 1024-pixel-wide image in it.  It's no different when you repeat a texture in a 3D program.  The surface has no way of limiting how many texels are on it.  If you repeat the texture 10 times, you just get 10 times as many texels.  Each individual repeat remains at its original resolution.

 


Nacy Nightfire wrote:

I think that's what you said, but I would have thought SL reduced the texture to 1024 after you asked it to repeat it x number of times.

It sounds like you were thrown off by the fact that SL's texture image size limit is 1024.  That only applies to the actual image files themselves.  It says nothing about what happens when an image gets applied to a surface.

Again, the surface has no way to know or care how many texels in total are on it, and the texture has no way to know or care how many times it gets repeated.  The texture itself remains the exact same image, whether it's repeated once, or a hundred times, or 1/100 of a time.

If it actually did work the way you were thinking, a complete re-bake to a brand new file would be required every time you change the number of repeats.  That would require an enormous amount of extra processing and storage, and would be awfully slow, not to mention would largely defeat the visual purpose of using repeats in the first pace.

 


Nacy Nightfire wrote:

RE-editing to add: I realize I didn't understand the difference between texels and pixels (actually I never heard of a texel before).   So I'll study up on the topic and I'm sure your explaination will become much clearer to me (and now I admit I thought I understood what you wrote,  but clearly I didn't because I'm missing some important technical info here)

"Texel" is just a term of clarification, to distinguish between the pixels that make up a texture, and the pixels that make up other things, like your screen.  If we only used the word "pixel" every time, it would be harder to keep it straight.

  • Like 2
Link to comment
Share on other sites


Porky Gorky wrote:

One trick I have used a few times now is to repeat the texture in SL, then layer another  plane right on top with a baked alpha shadow. You retain resolution from the repeats in SL and also get the shadowing, however it obviously pushes the LI up slightly.

Good tip, Porky.  I've also been doing that for years. It's really the only solution in a lot of cases, given SL's extreme limitations.

Hopefully, SL will get lightmap support some day, and we won't have to use those kinds of hacks anymore.  The three things on my wishlist for the materials project were normal maps, spec maps, and lightmaps.  Looks like we're getting the former two, but not the latter.  That's a shame.  While normal and spec will allow for tremendous improvements in the overall look of models in SL, which will be wonderful, lightmaps would not only contribute just a much, but judicious use of them could also cut SL's texture overhead by well over 90%, which is arguably far more important.

Link to comment
Share on other sites

From my researching everything related to this on the forum before posting I think alot of folks who are really experienced builders are following your practice.   My instincts told me (and probably incorrectly) that the alpha sorting issue might be an issue with this technique, but I'm not really a builder of large objects so it's not something I've personally tested.  Apparently the small li increase and possible alpha issues are worth the price to get good resolution and add those baking passes.  So it's a big lightbulb that clicked on over my head when  Kwakkelde explained this is the reason folks are eagerly anticipating those extra image maps.  It just didn't dawn on me that retaining good resolution via tiling in SL was a big part of the reason, if not exactly the reason.

Link to comment
Share on other sites

The use of bump maps always look "gummy" to me. Very unsatisfying.  Will the normal maps be influencing bump or actual displacement?  

Re: bump, I suspect people frequently resort to a greyscale version of their diffuse image, but that can't possibly be accurate, since not all white in a texture is meant to be "up" and the reverse with black.  So getting good results from this kind of map takes some real skill, I'm guessing.

Link to comment
Share on other sites


Nacy Nightfire wrote:

Will the normal maps be influencing bump or actual displacement?  

Neither. Bump maps, displacement maps, and normal maps are three different things :)

Bump is a one-dimensional effect.  It just simulates height (protrusions or intentations in the surface).  Normal mapping is a fully three-dimensional effect.  It not only simulates the height of surface detials, but also the direction they're facing in 3D space, for a much more convincing look.  You can think of a normal map as a bump map on steroids, if you like.

Displacement maps are different.  They move the actual geometry of the model.  Sculpt maps are displacement maps, for example, as are some of the channels in RAW terrain maps. 

If you have enough polygon density in a surface, you can use a displacement map to do the same thing a normal map can do on a much lower-poly model.  But for real-time purposes, that wouldn't be terribly useful.  The point in using a normal map is to simulate the look of a high-poly model, while actually using a low-poly one.

 


Nacy Nightfire wrote:

Re: bump, I suspect people frequently resort to a greyscale version of their diffuse image, but that can't possibly be accurate, since not all white in a texture is meant to be "up" and the reverse with black.  So getting good results from this kind of map takes some real skill, I'm guessing.

Correct.  A grayscale version of the diffuse texture can sometimes work, but certainly not always.  Not only do the lights and darks in the diffuse coloring not always correspond perfectly to the height of the surface details, it's often the case that they simply don't correspond at all. 

The keyboard that I'm typing on right now, for example, is white with black letters on it, and it has matted surfacing.  The black letters are not indented, but under bump-map rules, they would be, so that correlation is out, right away.  Further, the white and black areas all share the same level of bumpiness, as the whole thing has the same kind of matting all over it.  If I were modeling this keyboard, and using a bump map on it, the bump map would be just be a noise map, which would have nothing at all to do with the diffuse color map.

You're right that it takes skill to create and use the various kinds of maps effectively.  There are, however, tools out there that can help simplify the process.  CrazyBump, for example, is a fantastic tool.   A lot of the existing filters available for FilterForge include channels for matching bump, spec, and normal maps, and the software also allows you to create your own. 3D paint programs like Zbrush and Mudbox allow you to paint bump, spec, normal, and other kinds of maps, right as you paint the diffuse coloring.

None of these are "for dummies" tools, though.  Time-saving as they are, it still does take brain power to operate them.  Those in search of the ever-elusive "make it easy" button will remain in out of luck.

  • Like 1
Link to comment
Share on other sites

I'm tempted to steal that "Searching for the ever-elusive "make it easy" button..." and making that my forum signature :matte-motes-bashful-cute-2:  I do have Zbrush, filterforgeand I recently downloaded crazybump (which I haven't delved into yet).  If you factor how much time it takes to learn these feature-rich programs, then yes, they might appear to be timesavers, and certainly they are fun to use, but I don't think any of them ultimately adds up to saving any time.

You, and other kind folks on the mesh forum, have helped me so much in understanding this process.  I've been chipping away at it since I joined SL '07.  Prior to that I've had no training or understanding of 3d graphics.  It's been a very interesting ride, but a very slow and tedious process and I find I have many, many gaps and areas where I think I understand something, but clearly have the wrong idea about how some things work.   Unfortunately this means when I offer advice to people who know even less then I do on this topic, I'm often wrong, and yet I don't realize it.  My intentions are good, but I hope I haven't disseminated too much garbage.  I'm very humbled by how much I don't know and actually pretty happy there's more of this mountain to climb since the learning part is even more interesting to me then the actual making of stuff.

  • Like 1
Link to comment
Share on other sites


Chosen Few wrote:

Bump is a one-dimensional effect.  It just simulates height (protrusions or intentations in the surface).  Normal mapping is a fully three-dimensional effect.  It not only simulates the height of surface detials, but also the direction they're facing in 3D space, for a much more convincing look.  You can think of a normal map as a bump map on steroids, if you like.

Still with a bump map you can get a real 3D effect by using gradients and you can even bake them into normal maps. I thought the big difference was the way and moment they were calculated in the rendering process. Bump maps using less storage space (and therefor streaming time), normal maps using less render time.


Displacement maps are different.  They move the actual geometry of the model.  Sculpt maps are displacement maps, for example, as are some of the channels in RAW terrain maps. 

If you have enough polygon density in a surface, you can use a displacement map to do the same thing a normal map can do on a much lower-poly model.  But for real-time purposes, that wouldn't be terribly useful.  The point in using a normal map is to simulate the look of a high-poly model, while actually using a low-poly one.

For realtime rendering displacement maps are pretty much useless, no argument there. One small addition though, in the current 3ds Max materials (so I bet also in Maya and other programs), you don't need the dense geometry for a displacement map. This is a material feature though, not a modifier, that does need the actual geometry.

Since in the final render (with the displacement material) surfaces are moved, I suspect to the renderer it looks like there's extra geometry. I'm not exactly sure how that works.

Link to comment
Share on other sites

So from reading this thread it sounds like it is possible to bake an alpha full bake map using blender? How is this possible? I've read elsewhere enough that it can't be done but people figured out how? No matter what I try I always get a white background when trying to bake anything alpha.

Link to comment
Share on other sites


Syle Devin wrote:

No matter what I try I always get a white background when trying to bake anything alpha.

The background color is irrelevant.  Color is just color; it says nothing about transparency.  The transparency map is the alpha channel, so what matters is whether or not an alpha channel is present in the image.  Is there one?

Link to comment
Share on other sites


Kwakkelde Kwak wrote:

Still with a bump map you can get a real 3D effect by using gradients and you can even bake them into normal maps. I thought the big difference was the way and moment they were calculated in the rendering process. Bump maps using less storage space (and therefor streaming time), normal maps using less render time.

I think you might have missed my meaning of "one-dimensional effect".  The point is there's no way with a bump map to get a single texel on a surface to face any particular direction.  All you can do is raise it or lower it, along the surface normal.  With a normal map, the texel can not only be raised, but also rotated.  There's a huge difference there.

You're right, of course, that with a gradient, you can create the apearance of a slant in a group of texels, by increasing the rise incrementally from one to the next.  But still, each individual texel faces the same direction as the surface normal.  So, it's basically a staircase, rather than a ramp.  Assuming the resolution is high enough, the steps can appear smoothed out, but since no single texel can be turned to reflect along a tangent like it can with a normal map, the results won't be as realistic as they could be.

As for normal maps using less render time, I'm not completely sure on that one, but it makes sense.  Theoretically, the more information is precalculated, the less has to happen in real time.

 


Kwakkelde Kwak wrote:

For realtime rendering displacement maps are pretty much useless, no argument there. One small addition though, in the current 3ds Max materials (so I bet also in Maya and other programs), you don't need the dense geometry for a displacement map. This is a material feature though, not a modifier, that does need the actual geometry.

Since in the final render (with the displacement material) surfaces are moved, I suspect to the renderer it looks like there's extra geometry. I'm not exactly sure how that works.

Yeah, Maya's had that capability for a while now.  It can even create geometry directly from a displacement map, which makes for a really fast way of modeling complex surfaces. 

It's all useless for real-time, of course, since obviously the game engine can't use Maya's internal features.

Link to comment
Share on other sites


Chosen Few wrote:

I think you might have missed my meaning of "one-dimensional effect".  The point is there's no way with a bump map to get a single texel on a surface to face any particular direction.  All you can do is raise it or lower it, along the surface normal.  With a normal map, the texel can not only be raised, but also rotated.  There's a huge difference there.

You're right, of course, that with a gradient, you can create the apearance of a slant in a group of texels, by increasing the rise incrementally from one to the next.  But still, each individual texel faces the same direction as the surface normal.  So, it's basically a staircase, rather than a ramp.  Assuming the resolution is high enough, the steps can appear smoothed out, but since no single texel can be turned to reflect along a tangent like it can with a normal map, the results won't be as realistic as they could be.

As for normal maps using less render time, I'm not completely sure on that one, but it makes sense.  Theoretically, the more information is precalculated, the less has to happen in real time.

I understood your meaning of 1 dimensional, I know that a bump map in essence "tells" the renderer how high the texel should be, nothing more, nothing less. What bothers me though, is the fact 3ds Max (and again I bet the other programs as well) can convert a bump map to a normal map. You can even turn a bump map into a normal map in Photoshop. In order to do that, the software needs to calculate normals, or the entire surface would be "normal blue". This might be the reason why you can have a 3D light effect with bump maps, but it takes more calculation to get the result on screen, obviously resulting in the longer render time.

 

Link to comment
Share on other sites

Kwak, you've well accounted the fact that tere's really nothing a bump map can do that a normal map can't.  However, your argument doesn't seem to have considered that there's a lot a normal map can do that bump map can't.

Say I want single texel to face sideways, without raising or lowering any of its neighbors, there's no way to do that with a bump map.  A normal map, on the other hand, can do it with ease.

Granted, that's a purely academic example, since I probably would never have actual cause tilt just one texel.  The result wouldn't even be representative of anything possible in the real world.  But when you extrapolate the principle across the whole of a textured surface, the possibilities are huge.

Take a look at the two images below.  They're both the same flat plane, with the same map applied to them.  The one on the left has the map applied as a 3-channel normal map, and the one on the right as a single-channel bump map (using just the height channel from the normal map).  You can see the difference is rather extreme.

bumpVsNormal3.jpg

On left, every angle is fully is expressed, from the subtle curvanture of the slight depressions in the sky area around the worm, to the ramped sides of the worm itself, to the rounded edge along the crest of its height above the surface.  On the right, it's a totally different story.  Because the lateral/angular information cannot be conveyed by the bump map, only the height of each texel, the curvature just isn't there.  The concave parts of the sky are flattened out.  The sides of the worm are unable to slope nearly as much, since they can only step from height value to height value, rather than tilt.  The crest flattens out, rather than forming that steep rounded edge. Further, the grass area looks a lot more uniform in the right hand image.  In the left image, it appears to sweep rightward a little, as if there's a gentle breeze blowing on it.  In the right image, it just doesn't do that.  Plus, much of the subtlety of the various shapes within the grass are lost on the right.  Without the length and width vectors, and with only the height vector present, there just isn't enough information to convey the composition as intended. (Not that it's a particularly good composition in the first place, but hey, for the whole 30 seconds I spent on it, it's a masterpiece, dammit!)

If I really wanted to take the time, could I beat that bump map into submission, to get the result on the surface to match that of the normal map?  Perhaps.  But keep in mind, it's a really simplistic example, and it would take an enormous amount of work, just for that.  Imagine what it would take for something really complex, like a character skin.  It could be days worth of tweaking, if it could even be done at all.

  • Like 2
Link to comment
Share on other sites

Syle   - check these settings:

 

In the render (camera) palette, make sure in "Output" you have RGBA checked (In this picture its not turned on).

Screen Shot 2013-02-16 at 12.21.30 AM.png

Then make sure when you add your texture you have checked "Alpha":

Screen Shot 2013-02-16 at 12.21.47 AM.png

Finally in the UV window next to where you see "view"  there are 3 icons.  Turn on the middle one to see alpha transparency in your bake.

Screen Shot 2013-02-16 at 12.22.05 AM.png

 

 

 

 

Link to comment
Share on other sites

I'm well aware the normal map does more than a bump map. Reading back my posts I understand that wasn't very clear. Either way it never hurts to show the difference. btw I tried turning some bump maps into normal maps. The effect between the two is not exactly the same, afterall they aren't the same, but it's safe to say you can't get the effect of a directly baked normal map this way.

One thing I'm curious about though. You say you took the height channel from the normal map and used it as bump map. I suspect that would be the A channel, a channel not always included in a normal map and from what I understand not something that will be implemented in the new material system. The only reason to include this channel would be (I think it's called) parralax mapping. To my best knowledge all a normal normal map does is change the direction of the normal. Height is suggested by the normals, not by actual height data. The way I thought I had it figured out was the R, G and B value determine a point on a hemisphere. The direction of the normal is then from the center of this sphere to the RGB point.

Link to comment
Share on other sites

  • 1 year later...


Porky Gorky wrote:

One trick I have used a few times now is to repeat the texture in SL, then layer another  plane right on top with a baked alpha shadow. You retain resolution from the repeats in SL and also get the shadowing, however it obviously pushes the LI up slightly.

I've read this a few times now and I'm not entirely sure what you are doing.  Could you show some examples of the textures and how you use them in Second Life to do what you are explaining?

 

Thanks.

Link to comment
Share on other sites

I do it with floors Ele -- I bake a floor AO then in Gimp turn the white to alpha.  Then I make two floors -- one with whatever wood or tile texture I want, and another one on top of it with the shaded prim. 


Eleanora Newell wrote:


Porky Gorky wrote:

One trick I have used a few times now is to repeat the texture in SL, then layer another  plane right on top with a baked alpha shadow. You retain resolution from the repeats in SL and also get the shadowing, however it obviously pushes the LI up slightly.

I've read this a few times now and I'm not entirely sure what you are doing.  Could you show some examples of the textures and how you use them in Second Life to do what you are explaining?

 

Thanks.

 

Link to comment
Share on other sites


Pamela Galli wrote:

I do it with floors Ele -- I bake a floor AO then in Gimp turn the white to alpha.  Then I make two floors -- one with whatever wood or tile texture I want, and another one on top of it with the shaded prim. 

Eleanora Newell wrote:


Porky Gorky wrote:

One trick I have used a few times now is to repeat the texture in SL, then layer another  plane right on top with a baked alpha shadow. You retain resolution from the repeats in SL and also get the shadowing, however it obviously pushes the LI up slightly.

I've read this a few times now and I'm not entirely sure what you are doing.  Could you show some examples of the textures and how you use them in Second Life to do what you are explaining?

 

Thanks.

 

Hi, Pamela, so this is primarily for prims where you're doing the ao over the seamless texture?  Is this to allow you do add a seamless texture that can be changed since the AO would be fixed?  Would you work with meshes the same way?  If you did it with mesh, you would in essence duplicate the mesh, yes?  So not always an optimal thing to do.

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 3615 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...