Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, degenerate_762), 1,309 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Normalmaps Specularmaps and Heightmaps #153189
09/10/07 10:21
09/10/07 10:21
Joined: Jan 2007
Posts: 651
Germany
R
RedPhoenix Offline OP
User
RedPhoenix  Offline OP
User
R

Joined: Jan 2007
Posts: 651
Germany
I'm currently thinking about autogenerating Normal, Specular and Heightmaps for Textures for use in shaders. Normalmaps seem to be quite easy so far, as there are the engine function bmap_to_normals and some other codes for it out here. Heightmaps should be easy to create, too, although I don't really know how to do it. I think the blue channel of a dot3 normalmap could be already seen as "sort of a heightmap". This wouldn't be the perfect solution but at least a solution. For having a better map I think the length of each "pixel normal" has to be calculated out of the normalmap, or am I wrong here?

But for gloss/specularmaps I have no idea, how to generate them, of course there can't be really a clue to the specularity of a material found in the texture.
I thought of bmap_to_alpha here. This would create an alpha channel depending on the pixel's brightness, right? So it would be in the last case some kind of gloss map (with fantasy )

Any other ideas how to make it better?

Re: Normalmaps Specularmaps and Heightmaps [Re: RedPhoenix] #153190
09/10/07 12:03
09/10/07 12:03
Joined: Oct 2002
Posts: 8,939
planet.earth
ello Offline
Senior Expert
ello  Offline
Senior Expert

Joined: Oct 2002
Posts: 8,939
planet.earth
how to make it better? i guess doing it for every texture by hand would be best

Re: Normalmaps Specularmaps and Heightmaps [Re: ello] #153191
09/10/07 12:40
09/10/07 12:40
Joined: Jan 2007
Posts: 651
Germany
R
RedPhoenix Offline OP
User
RedPhoenix  Offline OP
User
R

Joined: Jan 2007
Posts: 651
Germany
Yes that's clear to me, that's not the problem. I said at the beginning I'm searching for ways to generate those maps automatically, of course they won't be as good as made by hand or with a professional graphics program. I just wanted to hear your opinion on the ideas I had so far.

Last edited by RedPhoenix; 09/10/07 12:40.
Re: Normalmaps Specularmaps and Heightmaps [Re: RedPhoenix] #153192
09/10/07 13:11
09/10/07 13:11
Joined: Apr 2006
Posts: 136
San Francisco
T
Tor Offline
Member
Tor  Offline
Member
T

Joined: Apr 2006
Posts: 136
San Francisco
uh, for specular you could apply the texture to the model and then generate a spec map based on some lighting at a certain angle etc. That's more or less what spec maps are. Fake lighting effects.

You can't really "automagically" generate these kinds of things, they are very much artist driven.


"Towlie, you're the worst character ever." I know...
Re: Normalmaps Specularmaps and Heightmaps [Re: Tor] #153193
09/10/07 13:34
09/10/07 13:34
Joined: Aug 2005
Posts: 1,558
HK
V
vlau Offline
Serious User
vlau  Offline
Serious User
V

Joined: Aug 2005
Posts: 1,558
HK
I'm always looking for such a tool which generate those
maps and preview them on screen instantly, something like
the tools from DB Pro. I would like to pay for it if someone
can create such tool.

Re: Normalmaps Specularmaps and Heightmaps [Re: Tor] #153194
09/10/07 13:34
09/10/07 13:34
Joined: Oct 2003
Posts: 4,131
M
Matt_Aufderheide Offline
Expert
Matt_Aufderheide  Offline
Expert
M

Joined: Oct 2003
Posts: 4,131
Quote:

uh, for specular you could apply the texture to the model and then generate a spec map based on some lighting at a certain angle etc. That's more or less what spec maps are. Fake lighting effects




This makes no sense. Specular maps are not "fake lighting". All a spec map does is control the amount of specular reflection at a given point. That is, certain areas are made more or less shiny by multiplying the spec map with the specular component calculated in the shader.

The easiest way to automatically make a spec map is simply to use the regular color map...and you can can change it a bit in the shader if you want by brightening or darkening it.

-----------------------------------------------------------------

Quote:

Normalmaps seem to be quite easy so far, as there are the engine function bmap_to_normals and some other codes for it out here. Heightmaps should be easy to create, too, although I don't really know how to do it. I think the blue channel of a dot3 normalmap could be already seen as "sort of a heightmap"




This is a great idea if you want your lighting to look like crap. Sometimes you can get away with converting a regular texture to a normal map, but normally only for organic rough textures like dirt or grass.

For Doom3 for instance, most of the normal maps were created by rendering actual models...this is an automatic generation in a way.

The blue channel of a normal map gives you the slope, not the height.. that's a totally different thing, and you might as well use a picture of a clown.


Sphere Engine--the premier A6 graphics plugin.
Re: Normalmaps Specularmaps and Heightmaps [Re: Matt_Aufderheide] #153195
09/10/07 15:47
09/10/07 15:47
Joined: Jan 2007
Posts: 651
Germany
R
RedPhoenix Offline OP
User
RedPhoenix  Offline OP
User
R

Joined: Jan 2007
Posts: 651
Germany
Quote:

This is a great idea if you want your lighting to look like crap. Sometimes you can get away with converting a regular texture to a normal map, but normally only for organic rough textures like dirt or grass.




Well dirt and grass are exactly the sort of texture I need this generator for

Quote:

The blue channel of a normal map gives you the slope, not the height




But if it gives the slope then it wouldn't be that great deal to calculate a height out of it. You figure out a base height (could be the heighest or lowest point of the map but actually I have no idea how to find it), and then you could calculate the height of every other point depending on the difference of the slope to the previous point. Does this make sense or do I get it wrong?

Re: Normalmaps Specularmaps and Heightmaps [Re: Matt_Aufderheide] #153196
09/10/07 15:49
09/10/07 15:49
Joined: Oct 2002
Posts: 8,939
planet.earth
ello Offline
Senior Expert
ello  Offline
Senior Expert

Joined: Oct 2002
Posts: 8,939
planet.earth
Quote:

.. that's a totally different thing, and you might as well use a picture of a clown.



great, this one actually made me fall from my chair

Re: Normalmaps Specularmaps and Heightmaps [Re: ello] #153197
09/11/07 08:32
09/11/07 08:32
Joined: Nov 2004
Posts: 7,121
Potsdam, Brandenburg, Germany
Machinery_Frank Offline
Senior Expert
Machinery_Frank  Offline
Senior Expert

Joined: Nov 2004
Posts: 7,121
Potsdam, Brandenburg, Germany
Imagine a metal door with a few letters in a bright color on top of it. If you create normalmap and spec-map automatically then the letters will shine and will appear dented / bumped. That is not what you want.
Because of that I create those maps manually via different layers in GIMP.


Models, Textures and Games from Dexsoft
Re: Normalmaps Specularmaps and Heightmaps [Re: Machinery_Frank] #153198
09/26/07 17:35
09/26/07 17:35
Joined: Apr 2007
Posts: 249
Louisana, USA
Ilidrake Offline
Member
Ilidrake  Offline
Member

Joined: Apr 2007
Posts: 249
Louisana, USA
Actually, all of these effects can be generated, but like I've said in another post, you need 3ds max to do it. You simply paint your texture in a paint program, create a plane in max, set the lighting the way you want it and then Render to Texture which bakes the effects into a finished texture. You can also bake the images seperate ie., Height Map, Specular, etc.

I know Max is expensive but it is very much worth it.


Just Because Your Paranoid Doesn't Mean They Aren't After You...Because They Really Are

http://spearbang.awardspace.com/news.php
Page 1 of 2 1 2

Moderated by  Blink, Hummel, Superku 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1