Skip to main content
gamedev.net
🔒 Locked

flat texture

Started by robydx 4 replies 700+ views
Original Post
robydx
robydx
Hi, I have a mesh, I want to generate unique texture coordinate to have for every pixel of a texture only one point on the mesh (in that way I can do lightmap, normal map generation so one and other things). The problem is that I'm Italian so I don't know the correct name of this algorithm and so I don't know how to search it. Please can someone tell me the name of this algorithm (or the link to a good algorithm). I hope that I was clear thanks
http://www.notjustcode.it DirectX tutorial
Rasmadrak
Rasmadrak
using your approach would

A) Require a HUGE amount of triangles to present an ordinary wall etc.

B) Make 3d models look way ugly with more or less one color per triangle.

I suggest that you define which region of the texture a triangle should use.
This is basic texture mapping and should be handled in any beginner tutorial for the API of choice.

Hope you solve it!

/Robert
"Game Maker For Life, probably never professional thou." =)
robydx
robydx
Probably I was't clear
I have a 3D model (of a person for example).
I have an hires version and a lowres version.
So I want to generate normal map from this. The result will be unique for every part of the mesh.
So I need texture coordinate that are unique.
Another case.
I ve a statue in a park. I want to calculate light on the statue (light map).
Also in this case I need that texture coordinate are unique.
Do you understand me?
http://www.notjustcode.it DirectX tutorial
Thr33d
Thr33d
Don't worry, that's not too hard. Basically what you're saying is, you want unique UV coordinates for each section of the model. In other words, you don't plan on having a texture tile over the geometry.

You want this especially for lighting, where each section couldn't possibly tile, and would need to be unique.

The good news is, if the model was created by an artist who also textured it, he probably has already set up the UV coordinates this way. If you're looking for a programming related solution, you might search for something along the lines of these key words

"automatic UV mapping coordinates"


In your last post you mention normal mapping, perhaps all you're looking for (your entire question) is something like ATI's NormalMapper
here's some info on normalmapping and the ATI application.

Check out the main app (Normal Mapper) and the standalone UI download :)

Hope that helps!
-Michael g.


p.s. Ben Cloward has an excellent tutorial on normal mapping and also references ATI's normal mapper.
Nik02
Nik02
The technique of laying out texture coordinates is often referred to as "unwrapping".

Automatic unwrapping is usually implemented as an algorithm that "walks" across triangles, and when unique mapping can't be continued with the current triangle cluster, it begins a new cluster. This is usually followed or interleaved with optimization by transforming (rotating, translating, scaling) the clusters, so that the available texture space would be utilized most efficiently.
Niko Suni
robydx
robydx
Thank you, is exatly what I need to implements.
I know ati normal mapper (but do not do this algotithm), and melody that do the same thing.
Also directX has this algorithm implemented (uvatlas) but I want to implement it for my self.
Thank for information, know I've some material for work.
Bye
http://www.notjustcode.it DirectX tutorial

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.