Hot answers tagged normal-mapping
14
Tangent space is perpendicular to the geometric normals - the interpolated vertex normals of the polygons. The normal map provides the shading normals, relative to the tangent space defined by the geometric normals. When the shading normals are not the same as the geometric ones - i.e. because you have a detailed surface texture with features that are not ...
8
I am assuming your intention is to use this normal map in a game, as it was explained in other comments, you most likely don't want world space normals since they only work for a fixed world. Your problem with tangent normal baking is that you don't have a mesh with less detail to bake the map to. This is how you do it:
1 - Create a lower-res version of ...
6
First of all, re: "why we cannot just use the normalised sum of the sampled-normal vector, and the surface-normal?" If they're in the same space already, summing these two just has the effect of halving the strength of the normal map - it effectively blends 50% between the normal map and the non-normal-mapped geometric normals. If they're not in the same ...
5
Right, normal mapping isn't done by componentwise multiplying the object normal and the texture normal. They're vectors, and that operation doesn't make geometric sense for vectors.
For the standard way of doing normal mapping - tangent-space normal maps - the idea is to construct a 3x3 tangent-to-world matrix at each fragment and transform the texture ...
5
To sucessfuly bake a normal-map you need to make sure of 2 or 3 things.
Make sure that your mesh is manifold. (E.g. that there are no double-sided faces.) You can check that in edit-mode by pressing Ctrl+Shift+Alt+M, this will select all non-manifold edges.
Make sure to select "Tangent" for Normal Space in the Bake Panel. This is the method usually used in ...
5
Short Answer
Because adding two vectors together and normalizing the result will give you a vector that is halfway between the two of them. I don't think that corresponds to what you were thinking it would do.
Long Answer
Take for instance the following picture from an unrelated subject (Blinn-Phong shading model) and pay attention to the H vector:
The ...
4
Your problem is in your Light vector calculation.
vec3 lightpos = vec3(15.0, 26.5, 0.5);
vec3 L = normalize(lightpos - vVertexCoord);
Here lightpos is in World space, whilst vVertexCoord in is Object space.
You need all your operands in the same space.
Furthermore your TBN matrix(its not TNB) is wrong., it should be as follows:
mat3 TBNmatrix = ...
4
Well to begin, it's actually two textures, but basically what he's done is cram lots of individual maps into separate channels of the textures. So in those two textures, you have specular, normal, masks, albedo etc.
Unfortunately, in order to extract all the separate bits of information and use them properly this means he has to have quite complex shaders ...
4
You didn't really get astounding quality with Crazy Bump...hmm. don't know what exactly you are looking for.
okey, here is another solution. Its called Insane Bump. Its functionality is similar to Crazy Bump. Try it out.
There is an interesting comparison between this two bumpies.
Oh did I mention. Its Free!
3
The skin is fairly smooth with some big dimples. A first approximation would be (in the GIMP):
Take a black image (in greyscale mode)
Filters | Noise | Hurl to get some dimple locations
Colors | Threshold to reduce it to black and white
Filters | Gaussian blur at a small radius (maybe 2px)
Colors | Curves to restore the necessary contrast and normalise the ...
3
A space is not just an axis though. Tangent space has 3 axes: the U tangent, the V tangent, and the normal. In your illustration you add an offset to the normal. But how do you know which direction to offset it? That's what tangent space defines. If the normal is Z, the tangent space gives you the orthogonal X and Y directions in which your offset ...
2
To try and make reasonalby comple mathematical theory sort and concise: it is because the Normal is actually a co-vector rather than a vector. The difference between a covector and a vector is that a co-vector defines an opposite 'handedness' on sign reversal, while a vector defines an opposite 'direction' on sign reversal. For instance, reversing the normal ...
2
There's no 'proper' way to generate a bump map from a regular image because the 3D information simply isn't there. But if you know your textures are all from a similar source where directional lighting has been baked into the texture to some degree, you may be able to fake some usable bump maps via some standard image processing approaches.
PIL already ...
2
This is the effect that will occur if you treat the shape as a rectangle, and use its bounding box as the 0,0 -> 1,1 mapping:
This is your texture:
This is your shape with texture coords mapped to bounding box(approximate guesses shown):
This is the final result:
As you can see you've basically sliced a shape out of the original texture. If that's not ...
2
There are quite some tutorials, I'm sure, on the issue of normal mapping, but since you're here, I assume you're not satisfied with what you found.
In your case, the terrain is ussualy a Monge Patch, which is not a complicated 2D manifold to perform geometric measurments using normal differential geometry.
First, why a normal map technique?
Because the ...
2
As you note, every vertex can only have one normal. That means that, depending on the lighting appearance you want, you may need to duplicate vertices. Specifically, if you want the edges of the cube to have a sharp boundary, then you will need to have separate vertices for each side. Make new vertices at the exact same position and use each duplicate for a ...
2
N_a is the result of the normal map fetch, which is usually not unit length because it is a linear blend of almost-unit vectors.
The normal map typically encodes normals in tangent space, which is to say that a normal in the map with the value [0,0,1] points directly away from the surface along the surface normal.
You are right that N_a is "the normal ... ...
2
Take the diagram below; the normal is simply the deviation from the 'reference normal' for any given coordinate system, correct?
No, it is not.
The simplest way to understand this is to take the simplest possible case of bump mapping. Your geometry is a flat quad. And you're going to apply a normal map to this quad. Now, let's say that all of the ...
1
It looks like you have mipmapping disabled for at least the normal map texture.
Select your image file in the Content project. In the Properties, expand the Content Processor, and set "Generate Mipmaps" to "True".
I can't spot any issues with your shader at a glance, but I don't normally deal with graphics programming so I'm not sure what my opinion is ...
1
Create a flat plane of orange skin in high definition 3D (ie. a Lot of polygons + an orange colour texture).
Bake it.
Use it :-)
This link Might help you get the general idea of baking.
Only top voted, non community-wiki answers of a minimum length are eligible