Importing Vertex Normals into Blender 2.67 for Proper Shading

Next
 From:  Zalamander
6003.1 
Greetings, users of MoI!

If you have tried to import objects into Blender from MoI, you may have noticed shading artifacts. This is due to Blender ignoring custom vertex normals on import. I have modified the OBJ importer in 2.67 to import vertex normals, however there is a caveat: You must not enter edit mode, or the imported normals will be overwritten! Rendering should however work fine.

For testing, I used MoI OBJ export. Triangle, Quad and NGon export should all work, however you must not weld the vertices!

You can find the modified importer here:
http://www.blenderartists.org/forum/showthread.php?299193-Modified-OBJ-Importer-for-Custom-Vertex-Normals
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Frenchy Pilou (PILOU)
6003.2 In reply to 6003.1 
if that work you are an hero!
All Blender & CAD user thanks you!

By Zalamander
without code

with the new code

EDITED: 3 Jul 2013 by PILOU

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
6003.3 In reply to 6003.1 
Hi Zalamander, thanks for making this updated importer, that is great news that there is now a way to get vertex normals support in the current version of Blender!

Will this become a built in part of the OBJ importer in the next version? I hope so, it's a major improvement and it's kind of weird to have support for vertex normals in Blender for rendering but not in the importer...

In previous versions of Blender, any imported vertex normals were discarded and recalculated from scratch not only when going into edit mode but also when you did a rendering - it sounds like that has been fixed now so that the renderer will use existing normals instead of recalculating them, is that correct?

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Zalamander
6003.4 In reply to 6003.3 
I'm not involved with development, but the issue has been acknowledged in developer meeting notes:
http://lists.blender.org/pipermail/bf-committers/2013-May/040144.html

However, with the 2.68 release candidate out, I don't think anything has happened in that regard.

As for the renderer working with custom normals, I wouldn't call it "support", rather a "happy accident". Indeed, the internal renderer did perform recalculations up until a while ago (I only figured out that it doesn't do that anymore yesterday). This was probably changed with the integration of the new BMesh modeling system. Currently, the normals are just a writable property and all renderers/exporters use it, as far as I can tell.
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
6003.5 In reply to 6003.4 
That's a great side effect from bmesh integration!

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  bisenberger
6003.6 
Cool!
Blender is developing into a really nice program with some really good training available. To make it even better Otay is beta testing OctaneRender for Blender.
http://render.otoy.com/forum/viewtopic.php?f=7&t=33592
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  SurlyBird
6003.7 
Hey, Zalamander! Thank you for this... Something I've wanted for a long, long time. Works great!
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Frenchy Pilou (PILOU)
6003.8 
Hello
Tell me if I am wrong

All works fine but as soon you edit your object normals are replaced by the Blender normal recalculated !
So in fact you must only use in Blender your imported object without "edit" you can just change the material!

So optimze your object's form outside Blender before the importation! :)

It's yet no so bad! ;)
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  coi (MARCO)
6003.9 In reply to 6003.8 
zalamander said so in his initial post..

quote:
however there is a caveat: You must not enter edit mode, or the imported normals will be overwritten! Rendering should however work fine.
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
 From:  Frenchy Pilou (PILOU)
6003.10 In reply to 6003.9 
Aaaaahhh :)
---
Pilou
Is beautiful that please without concept!
My Gallery
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged
 

Reply to All Reply to All