Print at Dec 19, 2025, 4:15:48 PM
Posted by mrencyc at Jul 7, 2023, 4:33:06 PM
Problem with imported object normals
I'm having difficulty importing sets of books I created in Blender. In Blender, they look fine



but when I try to import them to Sweet Home 3D they look like this:



It seems like there's something weird going on with the normals, but they render correctly in every other program and as far as I can tell they're correct in Blender. When I turn on backface culling in Blender every face still renders correctly.

I uploaded the .obj file here if anyone would like to take a look and see what I'm doing wrong.

Posted by Keet at Jul 8, 2023, 7:45:06 PM
Re: Problem with imported object normals
Your zip file is missing/invalid so I can't take a look at it.
----------------------------------------
Dodecagon.nl
1300+ 3D models, manuals, and projects

Posted by mrencyc at Jul 8, 2023, 8:23:40 PM
Re: Problem with imported object normals
Thanks, the link should work now.

Posted by Keet at Jul 8, 2023, 8:32:16 PM
Re: Problem with imported object normals
Looking from the right at the books they are fine, from the left they are missing textured faces. Looks to me like you missed something in Blender, i.e. the books left side faces.
----------------------------------------
Dodecagon.nl
1300+ 3D models, manuals, and projects

Posted by sjb007 at Jul 9, 2023, 1:20:13 AM
Re: Problem with imported object normals
Looking quickly in Blender one thing I notice is that the facing sides of each pair of books are at the exact same y coordinate. This is probably the source of the weird rendering in SH3D. SH3D is using OpenGL, and overdrawing of exactly aligned faces can can cause weird artefacting in SH3D. Try separating them by a tiny amount.

Posted by Keet at Jul 9, 2023, 8:29:08 AM
Re: Problem with imported object normals
And check that all faces are oriented outward. You might have a few faces that are facing in the wrong direction.
Wouldn't be the first time that happened with models created in Blender smile
----------------------------------------
Dodecagon.nl
1300+ 3D models, manuals, and projects

Posted by mrencyc at Jul 9, 2023, 5:12:43 PM
Re: Problem with imported object normals
I had a weird thought and tried changing the .png file to .jpg and that appears to have fixed the problem. I've also had issues importing PNGs as textures so I think the issue is a bug in PNG support in Sweet Home 3D.

Posted by Keet at Jul 9, 2023, 5:54:41 PM
Re: Problem with imported object normals
If the problem is solved by converting the PNG to JPG it's probably that tranparency in the PNG caused it, not a bug in Sweethome3D. I have never had problems with PNG's in Sweethome3D which of course respects the transparency in PNG's. Very useful to add an overlay text PNG with a transparent background for signs.
----------------------------------------
Dodecagon.nl
1300+ 3D models, manuals, and projects

Posted by Greymagic27 at Jul 15, 2023, 6:58:18 PM
Re: Problem with imported object normals
I've had this issue as well. If it's just because of transparency when using .png then at least that's an easy fix. I can just rebake my textures into jpg.

Not my thread I know but helpful nonetheless, thanks OP!

Posted by Daniels118 at Jul 16, 2023, 7:49:41 AM
Re: Problem with imported object normals
The problem is caused by the way raster 3D graphic handles transparent objects. Although your object is not transparent, it is treated as such because the texture has some transparent pixels. You can still use the PNG format as long you fill the whole image with fully opaque pixels (i.e. try to fill the transparent area with white).
The alternative is to divide the object in multiple shapes so that the rasterizer can draw them in the proper order.

For those interested I recommend these 3 lectures (must be read all in this order):
1) https://www.geeksforgeeks.org/z-buffer-depth-buffer-method/
the point 9 leaves with an open question, which is solved by this:
2) https://computergraphics.stackexchange.com/a/7630
and so this:
3) https://en.wikipedia.org/wiki/Painter%27s_algorithm
when you'll read the "Limitations" paragraph you'll understand the reason.