Search the Community
Showing results for tags 'normals'.
-
Hi everyone, I am loading stl meshes into unigine which are flat shaded (triangle normals only). Is it possible to use interpolated vertex normals for smooth shading with an editor option, or do I have to calculate them in code and provide them in the mesh file beforehand? Thanks in advance and best regards Mario
-
[SOLVED] supply the normal in World Space, not Tangent Space
roberto.voxelfarm posted a topic in Rendering
Hi, we are writing a custom deferred shader and we want to supply the normal in World Space, not Tangent Space. How can we achieve this? We do not want the value we supply in gbuffer.normal to be interpreted as if it was in Tangent Space. /roberto -
Unigine::Mesh class is not saving/loading custom normals.
sebastian.vesenmayer posted a topic in Bug Reports
Hi, When loading my created mesh objects which I saved before there are no normals anymore in the mesh object. Here is a reproducer: { auto mesh = Unigine::Mesh::create(); mesh->addSurface("0"); mesh->addVertex(Unigine::Math::vec3(1.f, 1.f, 0.f), 0); mesh->addVertex(Unigine::Math::vec3(1.f, 0.f, 1.f), 0); mesh->addVertex(Unigine::Math::vec3(0.f, 1.f, 1.f), 0); mesh->addNormal(Unigine::Math::vec3(0.f, 0.f, 1.f), 0); mesh->addNormal(Unigine::Math::vec3(0.f, 0.f, 1.f), 0); mesh->addNormal(Unigine::Math::vec3(0.f, 0.f, 1.f), 0); mesh->addIndex(0, 0); mesh->addIndex(1, 0); mesh->addIndex(2, 0); auto numVertex = mesh->getNumVertex(0); auto numNormals=mesh->getNumNormals(0); std::cout << numVertex << numNormals << std::endl; mesh->save("hello.mesh"); } { auto mesh = Unigine::Mesh::create("hello.mesh"); auto numVertex = mesh->getNumVertex(0); auto numNormals = mesh->getNumNormals(0); std::cout << numVertex << numNormals << std::endl; } It affects versions 2.7.2.1 to 2.8.0.1. Thanks, Sebastian -
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: