Jump to content

Search the Community

Showing results for tags 'normals'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements
    • Welcome Aboard
  • Kerbal Space Program 2
    • KSP2 Dev Updates
    • KSP2 Discussion
    • KSP2 Suggestions and Development Discussion
    • Challenges & Mission Ideas
    • The KSP2 Spacecraft Exchange
    • Mission Reports
    • KSP2 Prelaunch Archive
  • Kerbal Space Program 2 Gameplay & Technical Support
    • KSP2 Gameplay Questions and Tutorials
    • KSP2 Technical Support (PC, unmodded installs)
    • KSP2 Technical Support (PC, modded installs)
  • Kerbal Space Program 2 Mods
    • KSP2 Mod Discussions
    • KSP2 Mod Releases
    • KSP2 Mod Development
  • Kerbal Space Program 1
    • KSP1 The Daily Kerbal
    • KSP1 Discussion
    • KSP1 Suggestions & Development Discussion
    • KSP1 Challenges & Mission ideas
    • KSP1 The Spacecraft Exchange
    • KSP1 Mission Reports
    • KSP1 Gameplay and Technical Support
    • KSP1 Mods
    • KSP1 Expansions
  • Community
    • Science & Spaceflight
    • Kerbal Network
    • The Lounge
    • KSP Fan Works
  • International
    • International
  • KerbalEDU
    • KerbalEDU
    • KerbalEDU Website

Categories

There are no results to display.


Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Skype


Twitter


About me


Location


Interests

Found 3 results

  1. This is how it looks in unity and usually looks just about as good with no sudden changes with any smoothness angle setting from 40 to 180: This is how it seems to always turn out in ksp however. In previous iterations, simply setting smoothness angle higher than 150 would do the trick, however that isnt working any more. What i've tried: Making sure the normals are the right way in Blender Trying smoothing angle settings in unity from 40 to 180 Changing shading in Blender ------- As has happened too many times recently, after tons of time spent troubleshooting the problem and getting a whole lot of 'No results found for site:kerbalspaceprogram.com "', right after I decided to make a post about it, I found a solution... well only sort of. I still have no idea why the same settings I normally use (calculate normals, default smoothing angle), but using blenders shading and turning off calculate tangent space did it... I think... maybe...).
  2. I'm having a problem with Blender and Unity. I import the model but the normals won't flip. I've tried recalculating and flipping and in Unity the normals stay the same.
  3. The Problem Cutting a hole in a round object can be very tricky, as it often generates problems with the shading of the mesh. Some examples and the discussion that lead into a solution can be found in this thread. Today, I want to summarize our findings and add some details in this tutorial for blender. Very(!) basically, the shading of a mesh is derived from the normals of its vertices. Techniques like Phong shading will interpolate the normals of the vertices that span a polygon on every point (pixel) of its surface to create a normal for this point that are then used in a special model to empirically create the lighting of that point. But if you cut additional vertices, that aren't in line with the existing ones of a sphere or a cylinder, these normals will also be used and cause the problems. Also, the topology of the mesh - it's flow of connected quads influences the shading. For rendering and/or animation, you would avoid these problems by adding a higher mesh density, so that every edge of the hole would be on an original edge of the target mesh. Also, you would avoid triangles, avoid stretched polygons, avoid 5+sided poles (vertices with more than 5 edges connected to them). Read more about normals and (phong) shading and mesh topology. For games, this is not a solution, but can be fixed by tweaking the normals of the mesh. The Solution 1 Cutting a hole 1.01 Position a circle with the numbers of vertices and the right diameter of the hole you want to cut. The example shows a fairly large hole to cut into a frustum. Like maybe a round hatch. 1.02 Adding a edgeloop (alt-r in edit mode) where the centre of the hole should be on the target mesh. This will help us positioning the hole, as well as give us some extra geometry to play with. 1.03 Set Snap to vertex - active and pivot to center 1.04 In object mode, select the circle, hit g to move and hover over the vertex on the newly created helper edgeloop where the center of the hole should be. This snaps the center of the circle to this vertex. 1.05 With the circle still selected, go into edit mode, select everything, de- and re-select the top vertex to make it active. 1.06 Hit r to rotate and hover over the vertex on top of the frustum that is vertically above the centre of the hole. The circle will rotate and align perfectly with the angle of the frustum. (On sphere-like objects, create a vertice in the centre of the sphere, rotate to this vertice, and rotate additional 90° on the needed axis to get the circle into a tangential position above the surface) 1.07 Hold shift while using the 1/3/7 and maybe control- keys (or View->Align View->Align View to Active->) to snap the view to the circle like shown in the picture. The rotation is irrelevant, but the circle should be coplanar to the screen. 1.08 With the circle selected, shift-select the target mesh, then hit tab to go into edit mode. 1.09 Select Knife Project from the Mesh Tools tab of the t-menu. 1.11 This will project the circle (our "knife") on (and into) the target mesh. Please note that the projection axis is the current view axis (thus the alignment in step 1.07) 1.12 Now we can edit the frustum. Select the faces in the area of the newly cut circle... 1.13 Hit f to make it a single n-gon and extrude using the e key. 1.14 to clean up the topology a bit, select the edges/vertices on the frame of the hole that are not edge vertices of the circle ... 1.15 ... and edge-slide (double tap on g) them to the nearest edge of the circle. Use the Remove Doubles command from the Mesh Tools tab of the t-menu to remove double vertices. 1.16 Select the edges that shall be sharp edges and press control-e (or use Mesh->Edges) and select Mark Sharp. 1.17 Add an edgesplit multiplier with only Sharp Edges selected. 1.18 The result looks like this: so far, so good ... 1.19 But if we add a matcap pseudo-material that is more glossy, the problems in the shading can be seen clearly: 2 Fixing the normals 2.01 To fix the normals and thus the shading of the mesh, we need a copy of it, without the hole. Add a fairly large amount of subdivision surface modifier to this copy, to make it very smooth. 2.02 The copied and smoothed helper mesh can now be hidden and even moved to another layer. 2.03 Back to our original mesh, select the edges that are not on the surface of the basic shape of the mesh. (everything extruded inwards in step 1.13) 2.03 Invert your selection by pressing control-i (or using Select->Inverse). 2.04 On the Data tab of the mesh, under Vertex Group, add a vertex group, and Assign the selected vertices. Invert the selection again, to only those vertices that are not on the surface of the basic mesh, and Remove them from the Vertex group. 2.05 Add a Data Transfer modifier to the mesh. Point the source object to the helper mesh created in 2.01. Select Face Corner Data and hit the Custom Normal Button. Also select the vertex group created in 2.04 in the Generate Data Layers part of the modifier. 2.06 The data modifier now assigns the normals of the helper mesh to all vertices of the mesh with the hole cut into, that are assigned to the vertex group from step 2.04. (On more complex meshes, its often useful to only make a helper mesh with the most basic geometry (the curved surface where the hole should be cut into) and to exclude vertices that are not in the area of the hole from the vertex group.) 2.07 Now only one problem remains: the Data Transfer modifier cannot be applied! So exporting to unity removes it. To fix this issue, head over to the DATA tab of the object again. Under Normals, select Auto Smooth and hit the button Add Custom Split Normals Data from the Geometry Section under Geometry Data. You can now apply the Data Transfer modifier and export the mesh into unity, where the normals will still look perfectly.
×
×
  • Create New...