ocean Posted August 5, 2015 Share Posted August 5, 2015 So, if I'm ever going to get a project done I'm going to have to go retro... Is it possible to make a super-low-poly flat shaded game in Leadwerks? I tried importing plain colors as textures, but they seem awfully smooth by default at least. Quote Ubuntu 14.04 / 64bit. Dell XPS430, Intel Core 2 Quad Q8300 @ 2.50GHz, 4Gb Ram, Radeon HD 6670, Leadwerks Pro edition (Steam). Link to comment Share on other sites More sharing options...
Genebris Posted August 5, 2015 Share Posted August 5, 2015 Recalculate normals to completely remove smoothing. http://www.leadwerks.com/werkspace/page/tutorials/_/models-and-animation-r8#section4 And I suppose you can import one 1x1 pixel white texture and change color for each material in material editor. Quote Link to comment Share on other sites More sharing options...
Josh Posted August 5, 2015 Share Posted August 5, 2015 You don't even need textures, materials can just have a diffuse color. It's probably easiest to just build your normals using the angular threshold method above, using a tolerance angle of zero. This will give you completely hard edges on any model. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
ocean Posted August 5, 2015 Author Share Posted August 5, 2015 Brilliant! Thanks! But am I right in assuming this does not apply to brushes? EDIT: Or terrain for that matter? Quote Ubuntu 14.04 / 64bit. Dell XPS430, Intel Core 2 Quad Q8300 @ 2.50GHz, 4Gb Ram, Radeon HD 6670, Leadwerks Pro edition (Steam). Link to comment Share on other sites More sharing options...
Josh Posted August 5, 2015 Share Posted August 5, 2015 Brushes are always hard-edge unless you have smooth groups. Cylinders, spheres, and other round shapes have smooth groups but that can be removed. You will need to modify the terrain shader to make that have hard edges. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Genebris Posted August 5, 2015 Share Posted August 5, 2015 Or use your own mesh instead of terrain. If you don't use textures and have low poly models this shouldn't be a problem for performance. Quote Link to comment Share on other sites More sharing options...
shadmar Posted August 12, 2015 Share Posted August 12, 2015 You can recalculate normals with a geometry shader as flat like this: (will override all mesh smoothing) vec3 edge1 = vertex_position[1].xyz-vertex_position[0].xyz; vec3 edge2 = vertex_position[2].xyz-vertex_position[0].xyz; mat4 nm=transpose((cameramatrix)); vec3 faceNorm = mat3(nm) * normalize(cross(edge2,edge1)); Quote HP Omen - 16GB - i7 - Nvidia GTX 1060 6GB Link to comment Share on other sites More sharing options...
Slastraf Posted August 12, 2015 Share Posted August 12, 2015 make a terrain in blender: make a heightmap in blender to import it into leadwerks terrain (does not have not what you want by default) : Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.