Hard Light Productions Forums
Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: DaBrain on September 25, 2006, 02:32:43 pm
-
I just read an article about normal mapping. One statement was quite shocking for me. Surface parts should not share the same part of the UV map. Mirroring is forbidden...
Now that would ultimatly destroy all my plans to create normal maps for FS2, SoL and maybe other projects.
I also read this restiction depends on the engine.
So, do I have a problem now?
I does make sense... :(
-
this sort of thing depends largely on the implementation.
-
i was reading about this too. it is still possible to generate normal maps for mirrored models. it just takes some tweaking to get it seamless. i have alot of ships that have seams in obvious places, mainly along the centerline. the pf satyr has a nice ugly line that goes right over the cockpit window at a funky angle, it should look pretty whack normal mapped.
if youre using a hi poly mesh to generate your uvs, you just neer to remove all the copyed/mirrored parts of the model so that you dont have any duplicates in the uv map. (god damn this is gonna make the ragnarok class a ***** to normal map). programs like melody are pretty smart about this, and may be able to generate the normal map anyway.
if you still get seams, tweak your uv normals before generating your normal map. i think max lets you do this, im not sure though. i doubt any low-end modeling program gives you this control.
directly edit the normal map. this is easyer if you keep your seams either perfectly vertical or perfectly horizontal in the uv map (i do this anyway as it would be a pita to uv two sections at an angle). just draw a green or red line (depending on which way youre going) with low opacity. re-normalize and save and check it in your modeling program. repeat untill it looks right.
-
I know some engines will cause trouble with mirrored parts.. I hope FSO won't be one of them...
(It's a waste of time to work on normal maps now, if they have to be redone later.)
BTW, I have tested the MAX render-to-texture thingy to export a normal map. Surprisingly the result was just... blue....
We don't need an UV map for the high poly model, right? How can I get the normal map to match the UV map of the low poly model then?
There doesn't seem to be a single good tutorial for this in german. :(
-
By rights, as long as the UV Map is read correctly, this shouldn't be a problem, the Ogre isn't so much the UV Mapping as the lighting itself. You know when you Mirror a UV Map, letters go the wrong way round on the opposite side? So does lighting when you mirror the map, So everything on mirrored side will react to light the opposite of how it should. It shouldn't be noticeable most of the time, but it is worth bearing in mind ;)
-
Yeah, I hope that's won't be too bad. It's not very easy to imagine it visual.
It would proabably look like a kaleidoscope effect, when the mirrored parts are neighbours. Good to know that this exact style of UV mapping was used for most fighters in FS2... duh...
-
that's one of those 'based on how it's implemented' things, there are ways to get around the inherent problem, for one thing I don't know how taylor is implementing his bumpmaps system but if you calculate tangent and bitangent vectors in addition to normal, this will un-mirror the texture in the appropriate situations, unfortunately tangent/bitangent calculation can be a bit of a pain in the ass.
-
I know some engines will cause trouble with mirrored parts.. I hope FSO won't be one of them...
(It's a waste of time to work on normal maps now, if they have to be redone later.)
BTW, I have tested the MAX render-to-texture thingy to export a normal map. Surprisingly the result was just... blue....
We don't need an UV map for the high poly model, right? How can I get the normal map to match the UV map of the low poly model then?
There doesn't seem to be a single good tutorial for this in german. :(
you mean that part in the advanced tutorial that tells you how to generate normalmaps for tiles in max? i got a max 8 scene set up to convert a bump map into a normal map, as per the instructions in the tutorial plus some extra tweaking to improve render quality. i find the result is much better than what the nvidia plugin can generate (which no doubt uses the same technique with an objoiusly less advanced renderer).
basicly i set up the lights as discribed, i then locked the camera directly onto a 20x20 hi poly plane. i applied a displace modifyer which you can load a heightmap into, tweak the displace value to the desired height and hit render. it workes pretty well.
this is where perserving all my layers layers in photoshop textures is gonna pay off. i can black out the layers and apply an inner glow in the blending options setting it to the right values can generate a bump map of the texture, without having to redraw anything.
anyway let me know if you want my .max file.
-
this is where perserving all my layers layers in photoshop textures is gonna pay off. i can black out the layers and apply an inner glow in the blending options setting it to the right values can generate a bump map of the texture, without having to redraw anything.
Hmm... *tries this*
*likes what it does*
*makes bump maps for his lizard ships*
-
btw that applies to any kind of map file, i use the same psd file as the base for diffuse,env,glow,shine, and now normal maps. learning to use layers in photoshop is probibly the most important photoshop skill you can have to do texturing. it makes remixing a texture snap, just tweak each layer systematically. it may take me longer to do the main texture, but the quality is much better, and i can make any other map for that texture in less than 15 minutes.
-
btw that applies to any kind of map file, i use the same psd file as the base for diffuse,env,glow,shine, and now normal maps. learning to use layers in photoshop is probibly the most important photoshop skill you can have to do texturing. it makes remixing a texture snap, just tweak each layer systematically. it may take me longer to do the main texture, but the quality is much better, and i can make any other map for that texture in less than 15 minutes.
:nod:
Yea, thats what I do, also. I just never thought to use the outter glow effect for bump maps until you said it, and it seems so obvious now.
-
@Nuke You cheater! You're supposed to spend hours on a high-poly version of the model. :lol:
-
Well the normal mapping would work the best when you have a UV mapped model. Also the textures look the best using this method. If your worrying about using the existing files (tiles) you can always cut and past them to fit your UV/texture map. Just creat a grayscale image and you can use that for normal map generation and specular mapping. There is a really cool program called crazybump. It is a beta program that converts photos/textures to normal maps and height maps. Its free and easy to use. Plus you can tweak them in real time while viewing them.
http://boards.polycount.net/showflat.php?C...=0&fpart=1&vc=1
Or if your a really ambitious modeler and love the really high poly modeling, you can make a high poly model (20+k polys) and project that detail on a lower poly (SCP highpoly) model. A program called xNormal has been recommended by alot of the guys in the mod team I'm on (for HL2). http://boards.polycount.net/showflat.php?C...0&fpart=12&vc=1.
-
@Nuke You cheater! You're supposed to spend hours on a high-poly version of the model. :lol:
well tiles when you think about them are planner and its incredibly easy to make normal maps for, as its just a vertical porjection. if you look at nukemod i seldom use tiles, the ssj dante and the sg pyre (which im debating the removal of, as sentry guns dont add too much to the game unless you ad alot of them, and the things just an htl nightmare for that). im actually working on the high poly vultre which im definately gonna normal map. so wel see how much work it really is.
-
Nuke? Is this what you meant for tile maps?
(http://img66.imageshack.us/img66/1892/nukenormalie0.jpg)
-
Yup, I even use a program which can convert heightmaps into anything up to a roughly 2-million polygon plane :)
-
yea thats what i do, a really good way to do it.
-
Ok how did you do that? Which program did you use?
-
I use a program called Vue D'Esprit 5 for it, though I think Bryce offers exactly the same feature. Basically, you use your heightmap to create a landscape and then export the landscape as a .obj file ;)
-
@Scooby_Doo
MAX can do exactly the same... just as sidenote. ;)
-
Cool! Now could you explain how, please :)
-
You create a plane, set a really high number of tiles (like 200*200), not too much to crush your PC though(!) and apply a displacement modifier on it. Now you just use your height map as displacement map.
That's it. :)
-
Oh that... ehh, was hoping for something useful on existing models. Sorry DaBrain. :blah:
-
Flipside was talking about a plane too...
-
@Scooby_Doo
MAX can do exactly the same... just as sidenote. ;)
technically speeking so can truespace, well sort of :D
-
Mapping is the only Bane in my otherwise happy Modelling world.......
-
You'll find most companies create their normal maps from the UV Maps not the models themselves, it's a lot easier and using the technique above, actually is more accurate ;)
It's only a few compaines that go really AWOL on their Normal maps to be honest :)
-
im probibly gonna only do a partial normal map from a high res mesh, curved surfaces mainly, as thats the main binifit of normal maps. most of the blockey parts of the ship a simple planner normal map will work fine on.
-
Oh they painted it on manually... well that looks a LOT easier than trying to create a million beveled panels.
-
Ok I shouldn't have said that. I'm having no luck here... :confused:
Heres the diffuse map:
(http://img.photobucket.com/albums/v356/Shodan_AI/test1.jpg)
and heres the normal map (applied it to the displacement map)
(http://img.photobucket.com/albums/v356/Shodan_AI/test1-normal.jpg)
With mentalray this is all I'm getting:
(http://img.photobucket.com/albums/v356/Shodan_AI/test1result.jpg)
this was a basic cube... all it did was blow out the sides, but it still doesn't have any depth in the grooves
-
Heres the diffuse map:
(http://img.photobucket.com/albums/v356/Shodan_AI/test1.jpg)
That diffuse map has already applied lighting. It should contain only the color data (like it's fully lit).
-
yep, thats another thing i gotta do. get rid of all my painted on lighting effects. i use alot of those, so that makes my work harder. in fhe future im just gonna paint flat, but that doesnt change the fact that i have to remix 20 or so textures. fortunately most of it i can do simply by tweaking render styles.
-
Ok I replaced it with a pure white texture, and then a nice blue/white cloud texture... results same as above.
-
i wonder if we can get shadows working right. with this and shadows, i could do away with fake lighting altogether
-
real time shadows? slow, low-detailed and expensive compared to the free, high-detailed fake lighting. (at least when it comes to self-shadowing)
-
cant normal mapping get you some degree of shadowing. if the pixel normals of a downseam on a panel point away from the light, they will cast a dark line on what would usualy be a dark edge of a bevel effect in the diffuse map. thus it would apear correct from any angle.
-
Woohooo I got it working....
One question how do I get rid of that rough sawedge sides? The normal map is solid colors (no antialiaing)
-
That's the pixel edges from the image conversion, if you use photoshop, best bet I've found is to apply a very slight outer-glow effect or a semi-transparent Stroke' effect to the bump/height layer. Basically, I've been finding that non-anti-aliased lines only really work for straight lines or 45', every thing else seems to need it, which quite annoyed me since I'd made about 3/4 of a bump map before this became apparent :(
-
Thats what I kinda figured, so I made them hard edges (this is only 0' and 90'). That cleared up a lot but there still some remaining.
Heres the normal:
(http://img.photobucket.com/albums/v356/Shodan_AI/test2-normal.jpg)
and the result:
(http://img.photobucket.com/albums/v356/Shodan_AI/test2result.jpg)
Also why are the panels blow out like that?
-
Hmmm. not sure, could be something to do with the displacement setting causing the 'blow out' effect, it might also have something to do with those imperfections in the groove. Are you able to turn down the amount of displacement/bump used?
-
looks like ****ty compression or something
-
Checking....
It looks like the panel line isn't as deep but still jaggity.
It's PSD so there shouldn't be any lossless compression. Also should the cube sides have seperate uv map sections instead of sharing?
-
Scooby, what program are you using?
I ran this through one I have and got this in like 10 sec with no touch up.(http://img174.imageshack.us/img174/1231/test1zx4.th.jpg) (http://img174.imageshack.us/my.php?image=test1zx4.jpg)
You won't get good detail on your test without some specular and better lighting. Displacement maps do better shadowing than normal maps since its actual geometry. Normal ma[s only will shadow in the grooves not the bumps casting shadows. If your using the Nvidia pluggin I can't help you much, but the ATI program works pretty well, but you need to use a black and white image. Post a image of the texture you want to make into a normal map and I'll whip you one up real quick.
-
Ok heres the base texture:
(http://img.photobucket.com/albums/v356/Shodan_AI/base1.jpg)
heres the height map:
(http://img.photobucket.com/albums/v356/Shodan_AI/base1-height.jpg)
heres nvidias tool normal map (height generation: 3x3, height source: average rgb, alpha field: unchanged, minz:0 scale: 2):
(http://img.photobucket.com/albums/v356/Shodan_AI/base1-normal.jpg)
and heres Max 7's Mental Ray result with shine and lighting:
(http://img.photobucket.com/albums/v356/Shodan_AI/base1result.jpg)
Not very pretty....
-
I looked to give it a try, but my video card on this laptop doesnt support pixel shaders :(
-
Neither does mine, and I don't have a laptop :sigh:
Weeee my 1,000 post LOL
-
@Scooby_Doo
One problem seems to be, that the cube doesn't have enough polygons. At least it looks that way.
-
It's a basic 12tria cube... Isn't that the purpose of normal mapping?
-
It almost looks as if the UV map is rotated by a minute amount, since the bump always drifts in one direction.
What's really strange is that if you look at the far side of the cube, you can see the polygons along the inside 'wall' of the bumps on those polygons, as though the bumps had been modelled rather than textured, since if the bumps were being rendered to the texture, you would not see that.
-
Hmmm good point, unless mental ray can figure out based on the normals.
-
try bluring the bump map just a tiny amount before converting it to a normal map.
-
I blurred it... and watched it as it rendered from the old to the new blurred. didn't notice a thing...
However when i zoomed out a bit. this happened
(http://img.photobucket.com/albums/v356/Shodan_AI/base1result1.jpg)
And with bumpmap :-)
(http://img.photobucket.com/albums/v356/Shodan_AI/base1result2.jpg)
-
Yeah, that's the problem, the displacement map was displacing the polygons off of the edge of the cube, hence the 'flying edges' effect. That also explains why it was converting bumps into polygons.
-
How do I fix that? Could that be the reason I'm having jagged lines?
-
You don't need to, 3Ds max uses Bumpmaps, normal maps are a sort of 'cheap' version that are faster, but don't self-shadow. I forgot that 'displacement' maps in 3DS max divide the object up into thousands of polygons and offsets their position according to brightness, which is slightly different to a bumpmap. That was why your first model looked so odd, it was converting the normal map to greyscale and then displacing the polygons according to the result.
I don't know if 3DSMax has a way of rendering bumps from normal maps, alas, since I don't use it, but I'm sure someone will tell you if there is :)
Basically, if the Bump-map works, then so should the normal map.
-
i know max 8, in d3d mode, you can select dx9 shaders for your material. just click where it says standard and pick shader from the list, then load the shader for normal mapping.
-
Ohhh I think i remember seeing something about DirectX Shaders in Max 7... I'll report back in a few :-)
Nope no go.... Standard renderer does nothing and mental ray gives a warning about being not supported by this translator and renders to black. Besides this is above my head.
-
i just use the ts7 player myself, it works pretty well i just need a way to turn off the ****ing grid :mad:
it screws up the lighting.
or if youre really desprate get a copy of doom 3 or quake 4 and replace some commonly used texture and normal map for one of your design. i find that works just as well. just remember pk4s are zips with a different extension :D
-
Scooby are you using max 6 or 7? Could you send me the max files with the textures...I would like to take a look at it...when I got the time to do it.
-
Uploaded to the ftp, base.rar
-
ok will see that I can take a look at it as soon as I find some time.
-
Well I think I've made some progress, a light bulb in my head went off last night.
It looks like there is no direct normal map support in max 7. maybe in max 8 or 9? Bump map normal maps lower the texture, displacement normal maps raises the texture...
Since bumpmapping is in the possible future... how about displacement mapping too? They complement each other.
(http://img.photobucket.com/albums/v356/Shodan_AI/base1result3.jpg)
not sure why the displacement is so low res compared to the bumpmap.
-
I don't think we should use more than one technique for now.
Also... bumpmapping is outdated and afaik, there is no 'real' displacement mapping for games. It's just some advanced techniques, that use normal maps, but go beyond the standard normal mapping.
But, those will for sure require 'clean' normal maps. Not just like the cheapo way I've been doing them in so far.
Remapping all FS2 ships/objects, anyone? Certainly not me. ;)
-
Displacement is probably inversed bumpmap, shadowed areas are now highlighted and visa versa.
Still not fond of normal mapping, if i can't preview it done right in Max.
-
Displacement is probably inversed bumpmap
No, it works different. You could create a small fake landscape with displacement mapping, but not with bump mapping.
Still not fond of normal mapping, if i can't preview it done right in Max.
Works fine for me...
(http://www.game-warden.com/forum/imagehosting/3645590040b8260.jpg)
I really think it's a setup problem.
-
Ok how did you do that? I've gone through i don't know how many online "tutorials" and haven't gotten me anywheres....
It usually how to setup normal mapping for real time rendering, which i can't do because it requires shaders.
-
Ah... you can't use shaders?
So that's the problem. (Did I miss that?) Well... this is the viewport. It looks different when I render it.
I prefer the real-time version, cause it's interactive. I wouldn't touch normal maps without a gfx card that doesn't support D3D9 shaders.
It's just too difficult to test what you just did.
-
Well hopefuly soon I'll get something that has shader support... i heard theres a radeon 1600 or 1800 on sale BF
Well the only way I get any good results is using bump then normal map mode and select the normal map file.
course i could have just as well done that with regular old bumpmapping.
edit:ehhhh.. i think i have something that looks like a normal map rendered... but i see no advantage over bumpmap... in fact it doesn't even do outward displacement like displacement mapping does.
-
Well.. normal mapping isn't displacement mapping. Although some of the newer techniques can have similar results. Actually even better results than displacement mapping.
With normal mapping, you can make a low-poly mesh look like a high-poly mesh. You can hardly say the same about bump mapping...
-
Is there a good tutorial out there that can tell me how to make a normal map? I want to try it on my lizard fighters.
-
hi,
normal mapping is a variety of bump mapping, like virtually displacement mapping.
they "rebuild" geometry visually, like dabrain said.
the first released game with normal mapping was farcry.
normaly the artist make an high polyon modell (like 500k polygone), then they make a "texture", reducted the polygone and use the texture to rebuilding it.
but the problem is, that you see the low polygone edges of the modeel.
displacement mapping is complettly different.
in the GPU displacement mapping using a high map to modificated the geometry of a modell.
it generated polygones.
so you make an modell with 1000 polygones and a high map, and in the GPU the modell go to 100.000 polygones.
the advantage is that you dont have to save and transmit so an high-polygone modell in the system.
but theres problems: first you generate in the GPU the polygones, but the collision of objects make the CPU.
and in the moment only two graphics cards support real displacement mapping.
the new Geforce 8800 GTS/GTX (like all Direct3D 10 compatible cards) and the old pehelia matrox graphic card.
so in the moment is there no really way to use displacement mapping in FS2, and i think not really a way in the future.
because i believe you have to rewrite the collisioncode complettly or a lot of them.
Mehrpack
-
Course it depends on how much displacement you do.....
Alternatively it would be a lot simplier if you could do an inverse bumpmap... rather than creating "bumps" it's creates "raised" sections. Useful for raised panels...etc.
-
You can do more with a normal map than with a simple bump map.
Also... it's acutally easier to create a high-def normal map than something similar as bum map.
Thanks to the render-to-texture feature, all modern 3d softwares have. ;)
Additionally there are freeware tools (i.e. Nvidia Melody), that can take care of that, if your modelling software doesn't support render-to-texture.
@taylor Some games seem to change some channels to achive better compression. Will we use this?
There is a simple method to detec what kind of normal map is used.
By default the (blue-ish) normmal map has 24-bit. The (green-ish) modified normal maps use an alpha channel and therefore have 32-bit.
I don't know if you can support both of them... Also... we might have to use the alpha channel for something else later...(Height map, Paralax mapping?)
-
@taylor Some games seem to change some channels to achive better compression. Will we use this?
There is a simple method to detec what kind of normal map is used.
By default the (blue-ish) normmal map has 24-bit. The (green-ish) modified normal maps use an alpha channel and therefore have 32-bit.
I don't know if you can support both of them... Also... we might have to use the alpha channel for something else later...(Height map, Paralax mapping?)
I'll leave it open for now, can't really say yes or no at this point. But if you want it, then I'll try and code in support for it. Just be sure to remind me about it later on when the code is getting closer to done. You'll be getting test builds of it all, so when it gets to the point of working like it's supposed to, just bring this up again and I'll see about adding it.
I'm also looking into adding 3Dc compression support for normal maps since it has better quality for such things than DXT does.
-
Nvidia Melody... that takes a high def model and uses it's normal map on a low def model... I'm definetely not going that route... in fact I doubt very few here will. I'd rather paint up a normal map or create one from a bumpmap. Also I was reading some forum about Doom 3's addnormal mapping, using normal mapping which gives you vertice normals and bumpmapping which gives you height.
-
Well... it's not that much work to create a "high"-poly model. Just smooth some edge, greeble a bit and use the more detailed model as high-poly mesh. You can add more detail in photoshop by creating a height map for small detail, using the NV plugin and overlay the two normal maps.