collada strange vertex normals

Guides, Q&A, Suggestions

collada strange vertex normals

Postby bigdogco » Thu 8. Sep 2016, 02:57

Hi!

I hope this is not a stupid question, I am new to Voxel editors :) My problem is that when I export mesh as .dae, its normals are all over the place and of course the lightning in the scene is all messed up. I dont think that this is related to VoxelShop as other voxel editors do the same. So I guess there something special about collada format? For example if I use MagicalVoxel and export it in .dae, normals are bad, export same object as .obj and normals are all good.

Here is the image of the normals.

Image

It seems only one vertex got proper normals, one on the far got one. Is that related to the light or camera position inside of the editor or something? Anybody got any ideas?
bigdogco
 
Posts: 4
Joined: Thu 8. Sep 2016, 02:43

Re: collada strange vertex normals

Postby flux » Thu 8. Sep 2016, 03:07

I'm mentioning this briefly in my blog post here:
https://blackflux.wordpress.com/2014/03 ... es-part-3/

Have you tried using flat shading?
flux
Administrator
 
Posts: 250
Joined: Sun 20. Jun 2010, 00:31

Re: collada strange vertex normals

Postby bigdogco » Thu 8. Sep 2016, 08:57

Yup, I am using flat shading. Well, at least it is what irrLicth engine tells me :)

So as I understand that when collada is exported it merges vertices and it averages normals. But still why does normals look so strange on a single square? Even if I do not use any optimization, I get pretty strange normals.

Image

As I understand on a cube each vertex should have 3 normals, x,y,z. For example if I load up an .obj exported from voxel this what I get:

Image

Are there any way to keep the normals somehow? So it doesn't averages them? Maybe I just need a custom shader for .dae?

I might have to read your blog some more to understand this all little bit better. Haven't done lighting or even 3D in a while.
bigdogco
 
Posts: 4
Joined: Thu 8. Sep 2016, 02:43

Re: collada strange vertex normals

Postby flux » Thu 8. Sep 2016, 17:48

Currently not supported by the exporter. You could open a feature request on git. It would make the exported collada file significantly larger though.

This should be a setting in your engine. With flat shading things should render correctly. Maybe dig some more through the engine config?
flux
Administrator
 
Posts: 250
Joined: Sun 20. Jun 2010, 00:31

Re: collada strange vertex normals

Postby bigdogco » Fri 9. Sep 2016, 03:34

I will mess around with the engine an lightning some more. Flat shading looks really good, hopefully I will manage to hook it up.

Thanks for your quick replays!
bigdogco
 
Posts: 4
Joined: Thu 8. Sep 2016, 02:43

Re: collada strange vertex normals

Postby bigdogco » Fri 21. Oct 2016, 11:47

Thanks for the fix in latest version!
bigdogco
 
Posts: 4
Joined: Thu 8. Sep 2016, 02:43

Re: collada strange vertex normals

Postby flux » Fri 21. Oct 2016, 15:25

bigdogco wrote:Thanks for the fix in latest version!

No worries. This is not a fix though. VoxelShop COLLADA simply didn't include normals before.
flux
Administrator
 
Posts: 250
Joined: Sun 20. Jun 2010, 00:31


Return to VoxelShop

Who is online

Users browsing this forum: No registered users and 1 guest

cron