Jump to content


How are different textures created from one image


5 replies to this topic

#1 GamingGoldenAge

    New Member

  • Members
  • Pip
  • 1 posts

Posted 29 March 2012 - 07:45 PM

Yeah, the subject line pretty much asks what I'm trying to ask here...

I've heard of the technique but don't know how they do it.

Btw, is this one of the main gaming dev forums out there? I've looked at a few others and this one seems more polished I would say. I'm a student and am looking for good discussion places. Thanks for the help. This site looks really decent.

#2 fireside

    Senior Member

  • Members
  • PipPipPipPip
  • 1616 posts

Posted 01 April 2012 - 11:47 AM

You can create a texture for depth from an image, but it doesn't always work right. It just uses the dark and light places on the texture to map depth. There are software programs to do it. Gimp has a plugin for it. Usually for normal maps, though, a depth texture is baked from a light map. Programs like Blender do it, or there are specific programs which also do it which I can't remember the name. You can also do maps for alpha and specularity. I think that's what you are asking about. They're done in modeling programs but not from one image. They are combined in the engine.
Currently using Blender and Unity.

#3 Reedbeta

    DevMaster Staff

  • Administrators
  • 5340 posts
  • LocationSanta Clara, CA

Posted 01 April 2012 - 08:52 PM

I think it's basically guesswork / eyeballing. Oftentimes textures that are from a photo reference will have some lighting baked into them, so you can kinda get some kind of approximation of the height map by looking at contrast, like fireside says. But it's difficult to tease that out from actual changes in the material color. For instance, a sidewalk with cracks between the concrete tiles will have dirt accumulate in the cracks so they'll both be darker in color, and darker because less light gets down in there.
reedbeta.com - developer blog, OpenGL demos, and other projects

#4 Vilem Otte

    Valued Member

  • Members
  • PipPipPipPip
  • 362 posts

Posted 02 April 2012 - 12:36 AM

For getting actual height/normal map, you need to take a photo of the same surface (from same viewpoint) with different conditions of lighting - if you have all this, you can actually build correct normal map and thus correct height map (as long as you know the depth difference between most distant point and less distant point in viewport (actually this one is possible to guess without any actual measurement).

In real development, there is no time or money to do the previous one. So you actually hand-create the height maps (or try to "fake" extract it somehow) and normals map (from height map).
My blog about game development (and not just game development) - http://gameprogramme...y.blogspot.com/

If you don't know how to speed up application, go "roarrrrrr!", hit the compiler with the club and use -O3 :D

#5 geon

    Senior Member

  • Members
  • PipPipPipPip
  • 939 posts

Posted 02 April 2012 - 09:55 AM

View PostVilem Otte, on 02 April 2012 - 12:36 AM, said:

So you actually hand-create the height maps (or try to "fake" extract it somehow) and normals map (from height map).

Alternatively, you actually model the details and bake them to texture/normal/specularity-maps.

#6 Stainless

    Member

  • Members
  • PipPipPipPip
  • 610 posts
  • LocationSouthampton

Posted 02 April 2012 - 11:54 AM

Or buy a 3D camera, they are not that expensive now.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users