2
$\begingroup$

I have small problem, let say I have this mesh:

enter image description here

At the end it needs to be split into separate chunks/objects (in this example it's split in five chunks) like this:

enter image description here

The problem is that normals are wrong as opposed to original mesh which makes shading go wrong (visible seams between objects). I've tried to use Auto Smooth and it's quite better, but still worse than original mesh.

This mesh is just an example of my original mesh which at the end will be exported in order to be used in external game engine with OpenGL as a backend renderer, so for OpenGL it doesn't matter whether it's rendered as one object or not (I'm NOT using triangle strips) as long as normals are the same as were before. Is there a possibility to separate mesh into objects while maintaining original normals?

Thank you in advance.

$\endgroup$
  • $\begingroup$ It's not your normals that are wrong, separating an object into chunks should have no influence in normals. The problem is Blender is smoothing your joined mesh taking the adjacent faces into consideration, but when you separate them into different parts there are no adjacent faces to smooth with. If you want the same effect you will either ave to add more geometry to each separate chunk, or manually edit the vertex normals $\endgroup$ – Duarte Farrajota Ramos Oct 16 '16 at 17:55
  • $\begingroup$ @DuarteFarrajotaRamos - that's not entirely true. There are three kinds of normals. You have vertex normals, vertex per face normals and face normals. While dividing an object into several meshes does not affect the face normals, it often affects the other two, which results in different shading across objects. Mostly they cannot be fixed. $\endgroup$ – metaphor_set Oct 16 '16 at 18:17
  • $\begingroup$ Ah yes, you are right, I was thinking just in terms of face normals which while altered, should not be flipped on separation, but vertex normals are indeed changed, affecting shading. Thanks for the correction $\endgroup$ – Duarte Farrajota Ramos Oct 16 '16 at 18:22
  • $\begingroup$ well, some normal custom editing is possible with the "normal edit" modifier... I can't say if it can help in this particular case, but you could try this also.. $\endgroup$ – m.ardito Oct 17 '16 at 12:13
  • $\begingroup$ also, I know nothing about this, but could you perhaps bake normals from the single object, and then apply respective parts to separated parts, later? just an idea... $\endgroup$ – m.ardito Oct 17 '16 at 12:29
1
$\begingroup$

Unfortunately Blender has no method to adjust vertex normals by hand, so the only way to fix this (well, sorta...) is to separate your mesh in a way that the vertex normals don't change their direction at the cuts.

In a nutshell this means cutting up your mesh in the areas where you have a more even geometry. Depending on your geometry this might not entirely fix your problem but it reduces the amount of difference in the shading significantly. Keep in mind that this also might increase the loopcuts, which results in more vertices/faces.

In the image below I marked the areas where I put the loopcuts with green arrows. cuts in areas with even geometry

$\endgroup$
1
$\begingroup$

Thanks everybody for answers and comments, but it's quite sad that Blender doesn't allow this.

So, as I'm using my custom script written in Python in order to export scene objects to my custom format I've modified my script and added small preprocessing feature which makes use of object custom properties. What it does is that it checks for property with name "Group", then calculates all smooth normals for each vertex in object mesh and takes all meshes from other objects that have "Group" property with the same value into account while preprocessing vertices.

Result? It looks the same as original mesh and everything is processed automatically with my script, problem solved. :)

$\endgroup$
  • $\begingroup$ could that script become a blender plugin? :) $\endgroup$ – Aquarius Power Dec 19 '18 at 3:50
  • 1
    $\begingroup$ @AquariusPower Hmm, yes, I guess. Although as I've mentioned first you need to somehow (logically) group objects. There is one issue that I can think of right now, I'm not sure when exactly and how often Blender updates normals so it might interfere if you would like to use it as a modifier for particular group of objects. I guess as long as you would like to use it for exporting stuff - it's ok, but not so much for updating the particular mesh (modifier). I'm not sure how to incorporate it for exporting task (I had my own file format) and I'm not sure if I still have that code though. $\endgroup$ – cafebabe_t Dec 22 '18 at 9:56
  • $\begingroup$ oh I get it, it is like a specific tool for your specific use-case, not a generic one, and also has specific pre-requisites what may not be adequate to other models, but anyway I think someone may use that tip you already described to create an actual generic addon :) $\endgroup$ – Aquarius Power Dec 23 '18 at 0:29
-1
$\begingroup$

I created a Blender add-on for this exact purpose called TiNA which allows you to easily transfer normals between objects. TiNA basically turns the somewhat overwhelming Data Transfer Modifier into a set of more comprehensible operations.
There's a special branch for those using Blender 2.80 beta.

TiNA

 Hotkey           | Operation 
------------------|-------------------------------------------------------------------
 Alt+N            | Transfer normals from selection to active object
 Shift+Alt+N      | Transfer normals from active object to all other selected objects
 Ctrl+Shift+Alt+N | Clear custom normals data for entire selection
 Alt+W            | Wrap normals

In your case you could transfer the normals from an unsplit duplicate by selecting all objects, and - with the unsplit duplicate as your active object - hitting Shift+Alt+N.

$\endgroup$
  • 1
    $\begingroup$ Nice piece of marketing. However Link only answers will get removed in review... please add some detail on how T!NA can be used to answer this problem (and the other answer with similar ad) $\endgroup$ – batFINGER Feb 27 at 13:22
  • $\begingroup$ It's not like I'm linking to LucKey Productions... which is also all free stuff, btw! Again not selling, just doing something called sharing. But if you feel an urge to give me money, you're more than welcome to donate. $\endgroup$ – 魔大农 Feb 27 at 18:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.