Search the Community
Showing results for tags 'tangent'.
-
Lately I've been trying to workout a problem with tangent space normal maps in Unigine. Basically, there's no real standardization for tangent space coordinate systems, and each engine presents it's own set of variables that can be drastically different from the next. Thus, baking normal maps becomes a problem, since in some basic cases it becomes very obvious that there's a mismatch. There's a piece of software called Handplane 3D that attempts to bridge that gap by reading in object space normal maps and the mesh, and spitting out tangent space maps that are calibrated to various engines. My current problem is that they don't have a preset for Unigine, and all of the calibrations I can bake display some degree of warping. These are the meshes I'm using. The right one is the low poly, and the left is the high poly I'm baking from. These are the various tangent space normal maps applied onto the low poly model in Unigine. Notice how almost all of them display some kind of inverted shadow on the top corner, and similar effects on the surface facing the camera. These surfaces are supposed to be flat. The Source and Unreal 3 engine calibrations are arguably the best, but even those display obvious problems in different areas. For reference, this is the high poly model, next to the Source normal map. Notice how the lighting on both sides of the high poly is completely smooth. Has anybody noticed this problem? There are times when objects are moving that it becomes painfully obvious. What can be done about this?
- 8 replies
-
- normal maps
- tangent
-
(and 2 more)
Tagged with:
-
Hi! Unigine!! I found bug. See Attach File. I Export Mesh. First Local Position 0, 0, 0. Second Local Postion more than 10000 Value... Result is Picture... Max Export is Same Result... If Local Position 0,0,0, then output is good!!! But Local Position Over Than 10000, then output is bad...
- 2 replies
-
- Mesh Export
- Normal
-
(and 1 more)
Tagged with:
-
Hi, I have a model which is a flat surface (two triangles) with a simple grey diffuse texture. I clone the model four times and place them connected to each other. Everything looks perfect with any light condition, thank you guys. Then I turn one of the tile to 180 degrees. Because I did not change an angle of normals and my texture is a solid grey color, I would expect to see the same color for all tiles but this is what I've got Why does the surface change its color? Any idea? Steps to reproduce: 1. replace "data\library\worlds\materials\probes.cpp" by attached file. 2. run "demos\library_materials_d3d11.bat" 3. observe different color on tiles. probes.cpp: #include <library/scripts/materials.h> void create_scene() { // create a mesh { ObjectMeshDynamic mesh = new ObjectMeshDynamic(); mesh.addVertex(dvec3(0, 0, 0)); mesh.addTexCoord(dvec4(0, 0, 0, 0)); mesh.addVertex(dvec3(2, 0, 0)); mesh.addTexCoord(dvec4(0, 1, 0, 0)); mesh.addVertex(dvec3(0, 2, 0)); mesh.addTexCoord(dvec4(1, 0, 0, 0)); mesh.addVertex(dvec3(2, 2, 0)); mesh.addTexCoord(dvec4(1, 1, 0, 0)); mesh.addIndex(0); mesh.addIndex(1); mesh.addIndex(2); mesh.addIndex(3); mesh.addIndex(2); mesh.addIndex(1); mesh.setMaterial("mesh_base", 0); mesh.setMaterialTexture("diffuse", "grey.dds", 0); mesh.updateNormals(); mesh.updateTangents(); node_save("my.node", mesh); delete mesh; } { ObjectMeshDynamic mesh = node_load("my.node"); mat4 mat; mat.m00m01m02m03 = vec4(1, 0, 0, 0); mat.m10m11m12m13 = vec4(0, 1, 0, 0); mat.m20m21m22m23 = vec4(0, 0, 1, 2); mat.m30m31m32m33 = vec4(0, 0, 0, 1); mesh.setTransform(mat); engine.editor.addNode(class_remove(mesh)); } { ObjectMeshDynamic mesh = node_load("my.node"); mat4 mat; mat.m00m01m02m03 = vec4(1, 0, 0, 2); mat.m10m11m12m13 = vec4(0, 1, 0, 0); mat.m20m21m22m23 = vec4(0, 0, 1, 2); mat.m30m31m32m33 = vec4(0, 0, 0, 1); mesh.setTransform(mat); engine.editor.addNode(class_remove(mesh)); } { ObjectMeshDynamic mesh = node_load("my.node"); mat4 mat; mat.m00m01m02m03 = vec4(1, 0, 0, 0); mat.m10m11m12m13 = vec4(0, 1, 0, 2); mat.m20m21m22m23 = vec4(0, 0, 1, 2); mat.m30m31m32m33 = vec4(0, 0, 0, 1); mesh.setTransform(mat); engine.editor.addNode(class_remove(mesh)); } { ObjectMeshDynamic mesh = node_load("my.node"); /* mat4 mat; mat.m00m01m02m03 = vec4(1, 0, 0, 2); mat.m10m11m12m13 = vec4(0, 1, 0, 2); mat.m20m21m22m23 = vec4(0, 0, 1, 2); mat.m30m31m32m33 = vec4(0, 0, 0, 1); mesh.setTransform(mat); */ mat4 mat; mat.m00m01m02m03 = vec4(-1, 0, 0, 4); mat.m10m11m12m13 = vec4(0, -1, 0, 4); mat.m20m21m22m23 = vec4(0, 0, 1, 2); mat.m30m31m32m33 = vec4(0, 0, 0, 1); mesh.setTransform(mat); engine.editor.addNode(class_remove(mesh)); } return "Gold, silver, metal, car paint, concrete, stucco, tile, glass, rubber"; } probes.cpp