Because its Halloween or something...

Discuss the Wing Commander Series and find the latest information on the Wing Commander Universe privateer mod as well as the standalone mod Wasteland Incident project.
Post Reply
DualJoe
ISO Party Member
ISO Party Member
Posts: 387
Joined: Tue Mar 21, 2006 2:37 pm
Location: Netherlands
Contact:

Post by DualJoe »

Already you've got that WC-feel to the texture. Maybe I went a bit overboard on the achieving a realistic look for the Hornet, I like the cartoonish-style better.

Wait a second, now I see what's different. I suspect you didn't use the Csp-option(Color-specular) with your spec-texture and that's why you're spec-maps are white only and too bright. I recall that only plastics have a white specular-component.

Give me some time to dig up those textures I made and I'll post them. That stuff is on my home computer and I'm currently at the academy. I could even post the original photo's I used to make them.

About the tileable-plugin; I'm tempted to say don't bother. I've gotten better and more detailed results doing it manually.
In the gimp, first make/take your image scale/crop it to the proper dimension (multiple of 2) and then press Ctrl+Shift+O. Make sure wrap around is enabled and press the button with "x/2 and y/2" on it. Now hide the visible seam (clone, smudge etc) and repeat the offset-step.
The problem with tiling is that you have to sacrifice detail for it to work.

Btw. you can get away with quite some tiling, because of the relative small surfaces you use of the texture. Just make sure that it's not obvious on the larger surfaces. When the large surfaces are painted it becomes even less of a problem.
mkruer
Site Administrator
Site Administrator
Posts: 1089
Joined: Thu Jan 02, 2003 10:07 am
Contact:

Post by mkruer »

I had that same feeling when I first saw the Hornet. The textures just seem out of place compared to everything else. For me there tends to be three types of textures.

First one is the overly “Cartoonâ€
I know you believe you understand what you think I said.
But I am not sure you realize that what you heard is not what I meant.

Wing Commander Universe Forum | Wiki
Wing Commander: The Wasteland Incident
DualJoe
ISO Party Member
ISO Party Member
Posts: 387
Joined: Tue Mar 21, 2006 2:37 pm
Location: Netherlands
Contact:

Post by DualJoe »

At the very least we should have similar styles for every WC-season.

However when I did the Hornet, the consensus was that we would go for as realistic as possible. The idea being that the cartoon-style of the early WC-versions probably had more to do with technical limitations of the time. This is also supported by the higher photo/video-realism in the later versions. My Hornet is actually very close to the concept-drawings and blueprints. The only real difference is that the screenshots were made with Klauss' magical but very realistic shaders instead of the old cell-shading.

Chuck I fogot to mention in the previous post. You can bake any texture to another unwrap, because Blender now also supports multiple uv's. So just bake the un-mirrored texture to the mirrored-unwrap or vice versa.

Now all we need is for Blender-devs to code high->low-poly baking. Won't be long I suspect, looking at the new sculpt-tools and multi-res. It's the one thing that will make the retopo-tool complete. Check out this demo video. I'm really looking forward on using that to make some new LOD's.

EDIT
Well well, check out these feature-videos on the blender-site. Especially the ones for multiple-uvs and also the projection-modifier looks promising.
chuck_starchaser
Elite
Elite
Posts: 8014
Joined: Fri Sep 05, 2003 4:03 am
Location: Montreal
Contact:

Post by chuck_starchaser »

DualJoe wrote:Wait a second, now I see what's different. I suspect you didn't use the Csp-option(Color-specular) with your spec-texture and that's why you're spec-maps are white only and too bright. I recall that only plastics have a white specular-component.
No, no, I do have Csp ON; you're probably looking at my last shot, in which
I swapped the diffuse and specular texture's roles. The diffuse texture has
much less contrast than the specular, because it uses the square root of
the ambient occlusion as modulator, whereas the specular texture uses the
ambient occlusion squared. When the roles are swapped, something really
weird happens: The exaggerated self-shadowing baked into the diffuse
suggests that the actual color of the surface is varying, --that it's black soot
dirty or smokey towards the more shadowey areas. Which by itself is not
entirely unacceptable. But the low contrast of the specular component in a
way contradicts the soot dirt assumption, by showing pretty even specularity.
The only explanation your brain finds, then, is that the surface is unevenly
darkened by some oily kind of dirt, that still reflects a lot of light specularly
at the interface.
Hold on: No, I didn't post this shot with the swapped textures, actually; here
it is:

Image

Okay, so you were looking at "Isometal" then. Still, the same argument applies to it in a lesser measure, because there the specular plays the roles
of both: specular and diffuse. So it looks dirty. But there I had specularity also control hardness, and so, towards the shady areas, specular spots grow
dimmer but wider, so it also presents a more flat curve of total specular
energy coming back.

Here are the current textures; you'll see what I'm talking about; check out
the ambient occlusion component, and compare the contrasts:
http://deeplayer.com/dan_w/WCUships/Demon/diffuse.jpg
http://deeplayer.com/dan_w/WCUships/Demon/specular.jpg
http://deeplayer.com/dan_w/WCUships/Demon/lightmap.jpg

But Csp is on, for sure; and all my material colors are set to black, just in case.
Chuck I fogot to mention in the previous post. You can bake any texture to another unwrap, because Blender now also supports multiple uv's. So just bake the un-mirrored texture to the mirrored-unwrap or vice versa.
That's an idea, but I'll probably lose some info in the process, if I do that, as it has to interpolate between texels. Something to try tho, for sure.
Now all we need is for Blender-devs to code high->low-poly baking. Won't be long I suspect, looking at the new sculpt-tools and multi-res. It's the one thing that will make the retopo-tool complete. Check out this demo video. I'm really looking forward on using that to make some new LOD's.
I'll check them out tonight. By the way, last night I discovered Normals bake.
They are not tangent space normals, but on the other hand, if you subtract one global space normal map from another, the result ought to be tangent
space, or tangent space equivalent. Something I'm planning to try, anyways.
EDIT
Well well, check out these feature-videos on the blender-site. Especially the ones for multiple-uvs and also the projection-modifier looks promising.
I will, thanks. Need to overcome this fear of learning new things. I finally
tried the paint mode and there was nothing to it; pretty useful to mark
locations for texture references. But I'm paranoid frozen of stuff like multires; tho it's definitely the way to go for managing LOD's.

@MK:
Good analysis. My direction is as Joe says, realism, tho. Why? I think it's
much easier to judge objectively than any subjective interpretation of
artistic style, and therefore easier to standardize to. And, personally, I'm
not artistic at all; I have more of a scientific mind, such that I couldn't even
try to judge my work if I was aiming for any particular artistic feel. I just
don't have that feel. And also, from experiments I made using 512 x 512
versions of the textures, it seems to me that we can get a more retro look
simply by lowering the resolution. Detail isn't totally lost when doing so; it
rather becomes subliminal but is still there.
chuck_starchaser
Elite
Elite
Posts: 8014
Joined: Fri Sep 05, 2003 4:03 am
Location: Montreal
Contact:

Post by chuck_starchaser »

Here's an example of a render using 512 textures:

Image

I used 77% sharpening after scaling down, which is way too much, and is
causing the artifacts around the exhausts, but just to get an artifactual idea.
The normal map is still full rez, tho; --2048.

Anyways, to me this looks "cartoonish" in a WC kind of way, while still retaining
realism in terms of shading. Even small details that seem lost, like the streaks
of dirt trailing the grooves, I'm willing to bet are still visible and would be more
noticeable if you saw the ship in motion.

And of course it has the added advantage of lessening the load on the
videocard's memory bus, which should result in a smoother frame rate.

The biggest problem with reducing, though, is aliasing of non-orthogonal
lines, like the rectangular grooves on the engine. There's only one
solution for that: NOT to have non-orthogonal thin lines in the texture.
Happily for me, I'm having to redo the whole bumpmap and paint layers,
to match the original model Origin used; and none of their lines require
non-orthogonality in my own UV layout. :D

EDIT:
I was just thinking that there maybe a better use for a detail texture than to modulate diffuse or specular components. One very salient characteristic of real materials is the noisy scatter of reflected light around the fringes of specular highlights. At one point I was suggesting to Klauss that we should have detail normal mapping, so as to randomly scatter surface normals. I'm thinking now that what might achieve the same thing a lot more cheaply would be to modulate surface shininess. More cheaply because for each normal we modulate, we need three parameters, encoded as RGB; but for shininess modulation we only need a single parameter, so this detail texture could be monochrome.

More importantly, it would look more realistic, because the noisy scatter look of highlights on real materials is probably more related to shininess scatter than to actual bumpiness.

Finally, this is rather common to all surfaces, so we could apply it globally.

And if we apply it globally, it could be combined with this texture Klauss uses to replace some computation in his shaders. The perlin noise square tile could be thrown into its alpha channel, and so we save one texture unit.

And finally, again, :P, because this detail is only noticeable around the fringes of highlights, it is much less likely that one could notice tile repetition.

EDIT:
And even more finally, phong shading is, historically, an empirical approximation of specular reflection, rather than a formula based on hard theoretical foundations; and to whatever extent it is not exact, I'm sure it could use the help of a bit of random scatter to fool the eye.
DualJoe
ISO Party Member
ISO Party Member
Posts: 387
Joined: Tue Mar 21, 2006 2:37 pm
Location: Netherlands
Contact:

Post by DualJoe »

Well it seems I've misplaced the original photos. I can extract the base metal-texture I generated for the Hornet and will post that soon. I'm also unable to take new pictures for a while, because of the bad weather over here and not much worn aluminum-plating to be had without moss growing on it.

Very impressive glow-map. How did you do that one? I should make one for the Hornet as well.

My conclusion in my earlier post about too bright and too white was completely wrong. I did some research and checked your material reference link and it seems that metal usually has an extremely high spec-value (but not white). And when I compare your spec-map to mine, yours is much darker overall. I posted the hornet-textures a while ago so you can compare if you want.

I'm not saying my specmap is the way to go, because the specular part is still troubling me with the Hornet. In Blender they separated material hardness, specular-color and amount of specular-reflection, whereas in Vegastrike you just have the one texture and I just can't get it to look right. I think this is largely because of the env-maps and lighting ingame making it very hard to spot where the problem lies. Even with a black specmap in my copy of vegastrike the models still look wet and shiny and I haven't been able to fix it.

Some kind of more clinical test-environment ingame would be of great help in this stage.
chuck_starchaser
Elite
Elite
Posts: 8014
Joined: Fri Sep 05, 2003 4:03 am
Location: Montreal
Contact:

Post by chuck_starchaser »

DualJoe wrote:Well it seems I've misplaced the original photos. I can extract the base metal-texture I generated for the Hornet and will post that soon. I'm also unable to take new pictures for a while, because of the bad weather over here and not much worn aluminum-plating to be had without moss growing on it.
No rush. And I think the idea of usinge tileable noise for the detail texture modulating shininess will do lots to improve the finish, but I'm curious to see good photos of metal, if only to see if there's anything to glean from them.
Very impressive glow-map. How did you do that one? I should make one for the Hornet as well.
Thank you; most certainly you should. Notice however that I put a dim ambient occlusion multiplied by the diffuse texture in it. Since the glow map is additive, this adds ambient light. However, the new engine with Klauss' shaders will compute ambient illumination in a smarter way, so this glow map is officially for the old engine.
The way I did it was kind of stupid and labor-intensive. Instead of making a baking, I thought I could save myself that work by simply inverting the ambient light map. But the linearity is not the same, and some of the surfaces had less ambient lighting than others, so I ended up compensating by hand by selecting regions and playing with the color curves. Also, originally I had red glow in the outer groove and white glow in the main exhaust, but I didn't like it so I ended up playing with color curves even more. Finally, some of the surfaces were just not right, so I ended up painting redness by hand and smearing it with multiple blur passes...
My conclusion in my earlier post about too bright and too white was completely wrong. I did some research and checked your material reference link and it seems that metal usually has an extremely high spec-value (but not white). And when I compare your spec-map to mine, yours is much darker overall. I posted the hornet-textures a while ago so you can compare if you want.
You probably need to play with the shininess. Try a value of 20 or 30 to get very broad specular highlights.
The way the story goes with specular colors is that metals have the exact same color in specular or difuse. Well, exact same hue and saturation, though the intensity may vary. Chrome and silver are basically black in diffuse and white in specular. Gold is a dim yellow in diffuse and brighter yellow in specular. And so on.
Plastics are white or greyscale in specular, regardless of their diffuse hue.
Paints vary, but most of them are closer to metals than to plastics. I.e.: Where you have green paint in diffuse, put green paint in specular, but lower the saturation a bit.
I'm not saying my specmap is the way to go, because the specular part is still troubling me with the Hornet. In Blender they separated material hardness, specular-color and amount of specular-reflection, whereas in Vegastrike you just have the one texture and I just can't get it to look right. I think this is largely because of the env-maps and lighting ingame making it very hard to spot where the problem lies. Even with a black specmap in my copy of vegastrike the models still look wet and shiny and I haven't been able to fix it.
Not sure which VS version you're testing with, but I know that people have done weird things in the past. When I first came up with a texture for Brad's original Demon mesh, I was testing it using one of the WCU releases, and it was a disaster. There was a high amount of ambient light everywhere that didn't make any sense. Or maybe it was that one was supposed to set ambient light in the mesh file and I forgot. (You want ambient = 0; Diffuse = Specular.) Can't remember. But don't expect things to be right by default. Everything is wrong by default.

Having said that, you're saying metals have very high specular value but not white. That is indeed the case, but "very high" includes specularity values such as 0.6 or even 0.5; not just 0.9. I like to reserve 90% white for chromes and such. With 99.99% of materials having specularity less than 0.1, even glossy ones, having specularities below 0.25, 0.5 is pretty high.
But even metals aren't always highly specular: I'm looking at my open case computer to my right, and the exposed metal parts are mostly diffuse grey. They do have a bit of specularity, but nowhere nearly as much as the glossy black paint on the outside.
Besides, just because a ship is made of metal doesn't imply that the metal is highly polished, --or even clean, for that matter. My "Isometal" render looks notoriously unclean and oily, but still looks like metal.
Finally, what I'm doing with the specular intensity is multiplying it by the square of the ambient baking, which gives me a wide range of specularity values across the surfaces. Which is indeed why they look smokey or unclean. And the reason I'm doing that is to get a rough hint of specular self-occlusion. What this means is, I'm trying to deal with a problem you won't see in Blender renders, but you will see in-game: Suppose that a part of the surface of the ship you're looking at is reflecting a star or nebula in the skybox. What projects the skybox as reflections is called environment mapping. So far so good. Now, suppose that there's a wing or greeble that stands between that spot and the star or nebula it reflects: The star should be blocked out from the reflection, right? But it won't be. So I'm trying to lower the specularity in areas where that's more likely to happen, to at least lower the intensity of the artifact.
Some kind of more clinical test-environment ingame would be of great help in this stage.
No kidding. Where's Klauss?

P.S.: New paint shop and groovy work taking shape..

Image

Image
Last edited by chuck_starchaser on Wed Mar 07, 2007 5:40 am, edited 1 time in total.
klauss
Elite
Elite
Posts: 7243
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Post by klauss »

Chuck, you're doing an amazing job.
About the material, don't worry. I know my materials... really. I somehow am able to get the right look without even trying.
So, send a texture set and I'll try to cook it up for you. Both... shader-driven and old-engine driven.
The old engine supports most of what I need, only perhaps texturable shininess could be useful (specular exponent), but I can manage without it.

BTW: Also tell me what you're going for. I always go for a semi-matte rugged metallic look (ie - a bit banged up), because that's what looks less synthetic, but you tell me and I'll accomodate.

BTW2: Noise actually is a panacea for quantization. But you have to add noise before quantizing, and what you do is add after quantizing. It won't work. If you could bake or render high bit-depth versions, noise them up, and then convert to lower bitdepth, it would be better. You know about S/D modulation? That's just adding noise. Noise shaping, they call it. You can do that to pictures, but imaging software gets in your way most of the time. If gimp has a 16-bit per component mode, I'd tell you to use it. About randomizing the sampling on AO baking... don't. It doesn't work, unless you like grainy looks. If you want to avoid banding after the square root (which is uglily difficult), try rendering AO way oversampled (ie - in a huge texture, 8k x 8k or bigger), convert to 16-bit per component if that's possible, downsample, and then apply square root. Downsample first. Don't randomize sampling either in that process, that would add biased noise, and biased noise is bad.
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
chuck_starchaser
Elite
Elite
Posts: 8014
Joined: Fri Sep 05, 2003 4:03 am
Location: Montreal
Contact:

Post by chuck_starchaser »

klauss wrote:Chuck, you're doing an amazing job.
Thanks! :D Nice to see you, Klauss; I missed you. There's a lot of stuff in this thread, but I know your time is at a premium these days, so I'll try to summarize it for ya, below...
About the material, don't worry. I know my materials... really. I somehow am able to get the right look without even trying.
So, send a texture set and I'll try to cook it up for you. Both... shader-driven and old-engine driven.
The old engine supports most of what I need, only perhaps texturable shininess could be useful (specular exponent), but I can manage without it.
Thanks! Well, I'm redoing the bumpmap and paint from scratch, so won't have anything for a while, but you could experiment with the textures as I posted them 2 or 3 posts ago, if you want.
Here's the mesh:
http://deeplayer.com/dan_w/WCUships/Dem ... ting.blend
And here's ...

Idea #1: Make shininess a function of specular intensity.
Method: Of the RGB specular value, pick the highest of the three components, and call it S. Then shininess N = 120 * S, or something like that.
Justifications:
a) Phong shading changes the size but not the intensity of higlights. This is wrong: If a spot is bigger, light gets more spread out, and therefore dimmer.
b) Using a shininess texture takes an extra texture
c) Allowing artists to edit shininess directly would lead to chaos.
d) Why the highest of the 3 components? Because colored metals and paints with high specularity are usually polished or glossy too.
e) Being able to micromanage shininess directly would be the ultimate, but having some control of it is good enough and infinitely better than nothing.
f) Even when not intentionally controlled, shininess variations would add a ton of distinctiveness to the materials in a ship. Whether the shininesses are "right" for the materials is nowhere nearly as important as that it varies.
g) I think the variability I propose has a pretty good physical basis.
BTW: Also tell me what you're going for. I always go for a semi-matte rugged metallic look (ie - a bit banged up), because that's what looks less synthetic, but you tell me and I'll accomodate.
Actually, I was going to ask for a higher order of accommodation :D
Did you see the "durasteel", "plasteel", "tungsten" and "isometal" renders?
Check them out:
http://vegastrike.sourceforge.net/forum ... 8253#78253
For reasons too long to explain again here, I multiplied my diffuse base by the square root of the ambient, and my specular by the square of the ambient; but when I used the specular texture as diffuse, I got my "Isometal" look, which is like a dirty, oily, machine shop look, but very pretty. So, I was going to ask if it would be possible to

Idea #2: have the shader compute the square, square root, or anything between, of the total PRT illumination and use that to modulate diffuse and/or specular as per 2 parameters supplied externally. That way, using the same textures, we could change the metal type of the ship, such as when you upgrade its armor type...
Justification:
Not only would it save the work of having to compute curves of the ambient to premultiply diffuse and specular, and not only would it allow fancy material changes using the same textures, but in fact would produce smoother results, due to floating point precision in the gpu.
BTW2: Noise actually is a panacea for quantization. But you have to add noise before quantizing, and what you do is add after quantizing. It won't work. If you could bake or render high bit-depth versions, noise them up, and then convert to lower bitdepth, it would be better. You know about S/D modulation? That's just adding noise. Noise shaping, they call it. You can do that to pictures, but imaging software gets in your way most of the time. If gimp has a 16-bit per component mode, I'd tell you to use it. About randomizing the sampling on AO baking... don't. It doesn't work, unless you like grainy looks. If you want to avoid banding after the square root (which is uglily difficult), try rendering AO way oversampled (ie - in a huge texture, 8k x 8k or bigger), convert to 16-bit per component if that's possible, downsample, and then apply square root. Downsample first. Don't randomize sampling either in that process, that would add biased noise, and biased noise is bad.
Thanks, I'll try that. Never heard of 16-bit rgb but it must exist...
In any case, I was aware of what you're saying about adding noise before quantizing. Just that I didn't think I had that option, and my hope was therefore a more modest one: that noise would distract from the presence of banding.

Anyways...

Idea #3: Have a square texture, 256, monochrome, with perlin noise, and use it as detail texture to modulate shininess.
Implementation:
Texture is 50% gray + signed perlin noise.
Where value is above 0.5, it:
  • Increases specularity
  • Increases shininess
  • Decreases diffuse
Justification:
Long time ago we spoke of modulating the normal to get random scatter around the halos of specular highlights...
a) This is a cheaper way to do it because, for each normal we modulate, we need three parameters, encoded as RGB; but for shininess modulation we only need a single parameter, so this detail texture can be monochrome.
b) More importantly, it would look more realistic, because the noisy scatter look of highlights on real materials is probably more related to shininess scatter than to actual bumpiness.
c) This is rather common to all surfaces, and proportional to their specularity, so we could apply it globally.
d) And if we apply it globally, it could be combined with this texture you were using to replace some computation in your shaders. The perlin noise square tile could be thrown into its alpha channel, and so we save one texture unit.
e) Because this detail is only noticeable around the fringes of highlights, it is much less likely that one could notice tiling repetition of the detail texture.
f) Phong shading is, historically, an empirical approximation of specular reflection, rather than a formula based on hard theoretical foundations; and to whatever extent it is not exact, I'm sure it could use the help of a bit of random scatter to fool the eye.

Idea #4: Maybe too much to ask, but I had an idea for how to generate titanium-like rust in the shader, to add view-angle dependent hues to surfaces in proportion to oxidation, where the degree of oxidation is computed as the square of the cos of the angle between the normal and the z axis (frontal rust from aerobraking).
Justification:
What I did in this texturing work was to generate a rust template by blurring uncorrelated noise scatter, then place a frontal bake squared on top, and blend with color modulation mode. But then I gyrated the hue of it by 77 degrees for use with the specular texture. The idea being to fake tonality changes with view angle. But of course this is not going to work very well, tho I'm sure it's better than nothing. But it's a lot of work. With this idea, all ships would automatically acquire frontal rusting iridescence subtleties.

Idea #5: Make it a rule that greyscale color in the diffuse texture is interpreted as "metal" by the shader. Use slightly off-grey color to represent non-metalic grey paint or other material. Metal color is actually read off the specular texture and applied to diffuse; ---i.e.: for gold use dark grey in diffuse, yellow in specular. Then the shader can know whether to apply special metal processing, such as rust iridescence.

Idea #6: Fake specular self occlusion based on solid angle (sum of PRT values squared, I think) --more to the point: its equivalent conical radius angle. If the view angle is greater, don't speculate nor environmentally map.
Perhaps make it a smooth transition from full speculation to none; but bring the shininess down together with the speculation. I.e.: shininess would be computed based on final specular color.
Justification:
Should be square root of infinity times better than nothing...
mkruer
Site Administrator
Site Administrator
Posts: 1089
Joined: Thu Jan 02, 2003 10:07 am
Contact:

Post by mkruer »

@Chuck

Regarding your Realistic, vs Cartoon, vs Romantic. Aim for realism and then to make it romantic, scale back on the hardness (lighting) and blemishes. That’s about it. If you go to redo to the Hornet textures you will probably figure out a good way of managing this for future use. My guess would be that to get the same effect, you have to do the same manipulation. This might be construed as three steps forward, one step back, but it will probably allow for better consistence across the board.

Also when it comes to the decal layer, you mentioned that that layer was sandwiched in-between multiple other layers. Is this something that can be handled by the engine at runtime? Basically taking your bottom layer, a decal layer and then a finishing top layer and compiling them into a single texture? We might be storing three times the data locally, but when it goes to the video card, its all one image. I am putting the ability to customize ships as a high priory because that is one of the things that everyone wants to have the ability to do.

Keep up the good work.
I know you believe you understand what you think I said.
But I am not sure you realize that what you heard is not what I meant.

Wing Commander Universe Forum | Wiki
Wing Commander: The Wasteland Incident
chuck_starchaser
Elite
Elite
Posts: 8014
Joined: Fri Sep 05, 2003 4:03 am
Location: Montreal
Contact:

Post by chuck_starchaser »

Good idea; that should be trivial to code. I'll work on it after I'm done with the Demon. Would be a very useful piece of code as it would be usable to avoid the multiplication of ship textures by factions that have to be part of the download presently. It could also take some extra paint color parameter, to vary the color of the default paint patterns, to accomodate characteristic faction colors. And it could take jpg's as input, and output .dds for the gpu's convenience.

EDIT:
Heck! Why couldn't this go one step further and genrate a ship texture from a set of masks. It could take an ambient occlusion mask, a paint mask, a frontal bake, and a height and glow maps, plus a color-coded materials mask, and it could automatically produce normal map, dirt trailing off grooves, frontal rust effects, plus random impacts and scratches, in addition to setting up specular and diffuse base colors for each of the materials, and then blurring the unused areas of the textures, and then scaling, sharpening and saving the result in dds format...
Doing all this by hand is fun to do once, but insanity to try to do for every ship.
What it would require, though, is that z-axis be aligned to the x axis on the UV map; but most ships need to be redone or fixed, mesh-wise, anyways.
So, if all these steps could be automated at runtime, all we'd have to ship with the game are a set of masks:
1) ambient bake --jpg (or prtn/prtp)
2) frontal bake --jpg
3) glows --jpg
4) smoothing corrections normal map --jpg
5) bumpmap --png
6) color coded material mask (includes basic paint patterns) --png
7) customizable paint layer --png
8) optional modulation/greebling mask

So, most of the work, for the artist, would be vector-drawing with solid colors, and producing the required bakings. All the shading, bumpmap ambient self shadowing, normal map combining, dirt trails, rust, generating proper colors for diffuse and specular, impacts, air marks, bird dropping streaks and scratches, as well as scaling, sharpening and dds conversion could be done in 2 seconds, automatically.
The masks would be pretty lightweight, because they don't contain too much information. For instance, the bakings could be 512 monochrome; the linework and paint masks would be palettized color and rle compressed.
The piece of code would first scale up the masks with good interpolation, and 16-bit color; do all the processing in 16 bits, and then scale down the result with dithering. Better quality than we could hope to get out of Gimp.

And, doing this would automatically standardize texturing style, and future changes in shader features and what not that require changes to the texturing of all ships would only take a change to the code and running it on all ships in batch mode.

Klauss, scratch ideas 2, 4 and 5 from my previous post. This code could do those things instead. The rest stands.
klauss
Elite
Elite
Posts: 7243
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Post by klauss »

You have to go one step further to get to my idea, and a bit further than that to get to some other people's idea.

Do all that.
On the GPU.
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
chuck_starchaser
Elite
Elite
Posts: 8014
Joined: Fri Sep 05, 2003 4:03 am
Location: Montreal
Contact:

Post by chuck_starchaser »

Hahaha... Of course!
I think I'll code it for cpu first, but yes.
chuck_starchaser
Elite
Elite
Posts: 8014
Joined: Fri Sep 05, 2003 4:03 am
Location: Montreal
Contact:

Post by chuck_starchaser »

New paint job.

Image

Tons of garbage I need to clean up, but just for a quick preview.
Bumpmap is 2048; textures are 512.

Diffuse:

Image

Specular:

Image

Glowmap:

Image
Last edited by chuck_starchaser on Fri Mar 09, 2007 5:54 am, edited 1 time in total.
klauss
Elite
Elite
Posts: 7243
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Post by klauss »

Wewy Nice.
Sorry I didn't get to previewing this on the engine(s), I've been having busy days.
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
chuck_starchaser
Elite
Elite
Posts: 8014
Joined: Fri Sep 05, 2003 4:03 am
Location: Montreal
Contact:

Post by chuck_starchaser »

klauss wrote:Wewy Nice.
Thanks!
Sorry I didn't get to previewing this on the engine(s), I've been having busy days.
No rush; I still have a few sleepless nights ahead of me; and I know for a
fact you'll make it look better in game than in the renders. Jeezas, like you
got paralax, dynamic global occlusion, HDR, soft shadows ... I got none of
those things with my lowly renderer... :shock:
With a bit of detail perlin noise on the shininess it will be indistinguishable
from a photograph. :twisted:

I made a couple of close-up shots just to show Brad what a 512 texture
can do... :D (he doesn't believe in them)

Image

Image

Not bad for 5800 tris and 512 textures, eh? But what about the normal map?
Can we go down from 2048 to 1024? Let's see:

Image

Groovies a bit thicker, but looks like we're okay with a 1024 normal map and 512 for the rest.

Klauss, what did you think of the ideas post. Numbers 1, 3 and 6 I mean.
Like, the metal would look a lot better with half as much shininess, but the paint
and the glass need twice and four times as much, respectively.
But the shader could deduce the right shininess; no need for a texture
for it.
And the metal could also use a shininess modulating detail texture.
If you could implement it as addition/subtraction to the shininess, then,
low shininess materials would be more suceptible to shininess detail,
and the glass and paint a lot less.
BradMick
Bounty Hunter
Bounty Hunter
Posts: 223
Joined: Sun Oct 26, 2003 7:48 pm
Contact:

Post by BradMick »

sure, if you like a non smoothed lined jagged nightmare from hell, it sure is mighty fine.
LightWave nerd extrodanaire...

"Who need drugs when you got Brad? He's a trip enough already!' - stoner friend of mine...
chuck_starchaser
Elite
Elite
Posts: 8014
Joined: Fri Sep 05, 2003 4:03 am
Location: Montreal
Contact:

Post by chuck_starchaser »

BradMick wrote:sure, if you like a non smoothed lined jagged nightmare from hell, it sure is mighty fine.
Yeah, I really miss the aliased underworld; and my name cudda bin "Jagger" :D
What's wrong with jaggies? Hey, you like polygonated curves in meshes; I like
jaggies in textures :D :D :D

Thing is, I was really lucky, in that I hardly needed any non-orthogonal lines;
--even though I didn't plan for it while unwrapping (in the future I will).
And where I did, like the paint on the little wings, and the cockpit,
I just used a fuzzy brush of appropriate diameter (9, in my case, as I was
planning a 4:1 reduction), which generates a pretty smoothly antialiased line
at 512.
chuck_starchaser
Elite
Elite
Posts: 8014
Joined: Fri Sep 05, 2003 4:03 am
Location: Montreal
Contact:

Post by chuck_starchaser »

Okay, Brad, here's just for you: All textures at 2048.

Image

I don't know why the rectangles near the bottom seem multiple, btw; that's
a mystery...

Anyways, as you can see, it doesn't look much better; just a bit. But of course,
this is a WIP; in fact, more like a work with NO progress, at this junction.


Yeah, and you know what I'm thinking? Time to start again from scratch. I could have
thought about this problem...

The problem is that when I reduce to 512 the edges get fuzzified, and it looks
like the paint overshoots the bumpmap and whatnot.

To fix that, I'd have to move all my lines in the 2048 textures so that they are on
texel grid lines multiples of 4; plus an offset of 2, which is a ton of work,
needless to say.

Another thing that would have helped is to turn on the option of "snap to pixels"
when doing the UV unwrap, I'm thinking; but it's a bit too late for that.

But if I had put a bit more thought into the texturing, what I would have done was draw all my
grooves and paint boundaries with a solid pen, size 1, at 512 x 512. Then expand that to
2048 without interpolation, and used it as a template background. Then all my lines at
2048 would be on grid when reduced to 512, and I'd've been able to pre-sharpen
before reduction, and/or reduce without interpolation; and then there'd be less
fuzzies; and the texture would pixelate a lot more gracefully as you get close to it.

Still learning...
DualJoe
ISO Party Member
ISO Party Member
Posts: 387
Joined: Tue Mar 21, 2006 2:37 pm
Location: Netherlands
Contact:

Post by DualJoe »

The metal material is looking impressive.

Not to keen on the details though. As you said they look blurred/stretched even with the high-res versions. Have you tried switching off all the filters in the texture-settings? I'm also not to convinced of the effect that AA has on texture-detail, maybe things improve when you turn that off too. IMO rendering in higher res and then scaling down gives me AA without the same loss of detail.

I'm having a hard time spotting if the stretching/blurring is in the texture(resolution) or because of the unwrap. How does an uv-testgrid look on the model?

Worst case scenario would be that you'd have to redo the unwrap or use one of the others you've made. Blender should be able to bake from one unwrap to the other without noticeable loss. Just remember to turn off all the filtering and smoothing(AA and such) when applying and baking the textures.
When I think about how long creating my textures took in comparison with the unwrap I'd rather redo the unwrap (times 10) than redo the textures.

PS
The tileable photo of the aluminum-plate will have to wait. I'm shipping of for "cold-weather"-training on monday-morning and I must have my equipment ready before then. I thought it was next week, I'm glad I realized that mistake in time.
chuck_starchaser
Elite
Elite
Posts: 8014
Joined: Fri Sep 05, 2003 4:03 am
Location: Montreal
Contact:

Post by chuck_starchaser »

No, don't worry, Dual; I got this figured out. Except, that is, the ghost rectangles; that I still can't figure. I checked registration by overlaying my diffuse, specular, lightmap and normal map, and they are in the same places. There's only one UV mapping here, so it can't be that.
In any case, the main problem at 512 is indeed what I was saying before: I never took care of placing my lines on a 512 grid. The rivets are worse: complete garbage.

I started re-doing my bumpmap xcf by tracing the old at 512 resolution. If I turn off my new layers, this is what I see of my old bumpmap reduced to 512:

Image

The rivets are completely blasted.

With the normal map at 1024 the rectangles on the arm look like this:

Image

In a way, my theory was right, in that if you want an antialiased line after reducing to 512 from 2048, you need to use a fuzzy brush with a radius of 4 or grater, namely the #9 brush. And to be consistent, all grooves should be done with the same brush, whether they are orthogonal or not.
But for orthogonal paint edges that fall within a bumpmap groove, I could have used a solid pen and be done with it. Too much fuzziness is not good.

Anyways, I'm redoing my bumpmap and paint layers for the third time:

Image

Placing stuff at 512, then I'll enlarge to 2048 and trace it again. I'll also draw vertical lines and horizontal lines on separate layers and then merge them with darken only, so that the fuzzy brush strokes don't make overwriting artifacts. My old lines file was full of all kinds of little garbage that got worse when reduced.

I've been "cold weather training" kind of naturally, the past few days, here in Montreal :D How's your eyes, anyways? Fully recovered, I hope?
BradMick
Bounty Hunter
Bounty Hunter
Posts: 223
Joined: Sun Oct 26, 2003 7:48 pm
Contact:

Post by BradMick »

or to avoid all of the headaches and non sense you could just draw all the textures at 1024 and convert to whatever it is you need to convert to. no extra thinking, no extra anything...and, well, its pretty much the standard and less work intensive and good product producing way of going about it as well.
LightWave nerd extrodanaire...

"Who need drugs when you got Brad? He's a trip enough already!' - stoner friend of mine...
mkruer
Site Administrator
Site Administrator
Posts: 1089
Joined: Thu Jan 02, 2003 10:07 am
Contact:

Post by mkruer »

Too much enlarging and shrinking has a tendency to blur the edges. I agree with Brad, pick a size and stick with it. We do have a requested standard for a reason. http://vegastrike.sourceforge.net/wiki/ ... ardization. Also if the ship is symmetrical and you have no decals (which should not be on the base texture) I would recommend mirroring the texture, you can double the the detail with the same amount of space. This just brings up one question. How do you apply non symmetrical decals to the rest of the ship when the base is mirrored?

@Brad, you once did a tutorial for creating a ship, how about one on how to design and texture one?
I know you believe you understand what you think I said.
But I am not sure you realize that what you heard is not what I meant.

Wing Commander Universe Forum | Wiki
Wing Commander: The Wasteland Incident
chuck_starchaser
Elite
Elite
Posts: 8014
Joined: Fri Sep 05, 2003 4:03 am
Location: Montreal
Contact:

Post by chuck_starchaser »

BradMick wrote:or to avoid all of the headaches and non sense you could just draw all the textures at 1024 and convert to whatever it is you need to convert to. no extra thinking, no extra anything...and, well, its pretty much the standard and less work intensive and good product producing way of going about it as well.
It's going smoother now; I've just discovered a feature of Gimp I never knew, or perhaps cared to know: Grid, and Snap to Grid. Oh, man, this is sooo much easier now. All I would have had to do, when doing the lines and the rivets, was set the grid to 4 x 4 pixels, and offsets to 2 and 2.
But then again, I wasn't even trying to align my stuff, cuz I wasn't even thinking.

Yeah, like I said at wcplanet, I might end up using 1024, but for now my goal stands at trying for 512. We all have to have a target to aim for, right? That's my target. Makes a big difference in frame rate when you have a lot of ships of a lot of different types. Textures take up a lot of space, and a lot of bandwidth. Frankly, I don't care what the standard is; in every field you find the blind leading the blind syndrome. In my field --I'm an Electrical Engineer, specialized in EMI noise problem prevention-- everybody lives by the dogma: "keep wires short". In truth, the length of the wires is almost irrelevant, as long as signal and return path travel together. But like a religious dogma everybody goes on with "keep the wires short"... and they do; yet nothing works until I step in to fix it.

But once this is done, I'll produce textures of 512, 1024 and 2048 and we'll take measurements of frame rates, and we'll see.

I don't mind working hard at this; and you should be happy, it's your mesh after all. But, for me, this is a learning experience. Officially, this is my second texture job (firs was the Caernaven). So, what I want is to get the process perfected, whatever it takes. Later I'll think of ways to speed it up.
mkruer wrote:Too much enlarging and shrinking has a tendency to blur the edges. I agree with Brad, pick a size and stick with it. We do have a requested standard for a reason.
I'm not "enlarging and shrinking", either too much, or at all. I'm just working at 4 times the final resolution. I did pick a size: 512, and I'm sticking to it.
Also if the ship is symmetrical and you have no decals (which should not be on the base texture) I would recommend mirroring the texture, you can double the the detail with the same amount of space. This just brings up one question. How do you apply non symmetrical decals to the rest of the ship when the base is mirrored?
I will do this mirroring stuff, eventually, some day, not too far into the future, I promise. But the PRT textures (and the normal map?) can't be mirrored; so, to do that, I need to set up dual UV maps; and Blender now supports dual UV's, but I just don't feel up to the challenge of trying out the new feature. I'm feature-phobic; sorry; and it's looking okay, even unmirrored, and even at 512; isn't it? I just don't want to change course now for no reason whatsoever. I know what's causing the problems I have, and I'm fixing it.
mkruer
Site Administrator
Site Administrator
Posts: 1089
Joined: Thu Jan 02, 2003 10:07 am
Contact:

Post by mkruer »

Something about the blind (me) telling an artist in training (you) how to paint...

On to the next thing.

The average video card for the last 4 years has had a minimum of 128MB of memory, last 2 year, the minimum has been 256MB, and I looks like this generation its going to become 512MB, So I think its safe to say that you can use textures of 1K and higher, unless you plan on having more then 20 1K objects on the screen at one time*. I would say at this point shoot for the moon, make all new textures 2K and let the engine scale them before play for “optimumâ€
I know you believe you understand what you think I said.
But I am not sure you realize that what you heard is not what I meant.

Wing Commander Universe Forum | Wiki
Wing Commander: The Wasteland Incident
Post Reply