PaperModelers.com

Go Back   PaperModelers.com > Designers Corner > Designers helping designers

Reply
 
Thread Tools Display Modes
  #1  
Old 09-20-2017, 05:23 AM
Thales's Avatar
Thales Thales is offline
Member
 
Join Date: Feb 2009
Location: state of confusion
Posts: 586
Total Downloaded: 498.04 MB
blender transparent textures -> .obj export -> pepakura

So I am teaching myself a bunch of design tools because there are a ton of things that don't exist as models today that I would like to build and release.

But here is the stumbling block I have run into. I am using Blender 2.79, exporting at a .obj file, then importing into Pepakura 4.0.x.

Here is what I do:

*create an object in blender
*assign that object a material (just white for example)
*assign that material a texture that is an overlaid PNG that includes some transparency
*export that object as a .obj file
*import that .obj into Pepakura

When I do this I would expect the texture to be on top of the white material, with the underlying material showing through the transparency in the PNG of the texture.

Instead, I get the transparency rendered as black. So I get the texture image on a black background for that part.

Any thoughts on how to properly represent that transparency in pep or am I running into limitations of either the .obj file format/pepakura/something_else?

Thanks.
__________________
Projects: Serenity
PM Book Websites: LT - IU
Reply With Quote
Google Adsense
  #2  
Old 09-20-2017, 06:29 AM
Thales's Avatar
Thales Thales is offline
Member
 
Join Date: Feb 2009
Location: state of confusion
Posts: 586
Total Downloaded: 498.04 MB
It is also worth noting that if I create a texture PNG that has a solid background (no transparency) of the same color as the material, then it works as expected... But that will pose some serious limitations if I get into multiple texture layers in the future.
__________________
Projects: Serenity
PM Book Websites: LT - IU
Reply With Quote
  #3  
Old 09-20-2017, 09:00 AM
Kugelfang's Avatar
Kugelfang Kugelfang is offline
Member
 
Join Date: Feb 2009
Location: Silver Spring, MD, USA
Posts: 280
Total Downloaded: 37.97 MB
The issue will NOT be the *.obj format. The *.obj and *.mtl files are normally just regular text files--though there are some compressed versions. If you look in the *.mtl file created when you export to *.obj, you'll see a references to the graphic files (*.png in your case). So in the *.mtl file you may see the material color(s) (defined in RBG values) and a reference to the external graphic texture file that is 'laid over' the material. That's the extent of it in the .obj format.

The issue is probably either Pepakura's handling of transparency in *.png files, or Blender's exporting of transparency in *.png files. Or both. If you open the *.png file in The Gimp, what color is the transparent area? Does it match what you're seeing in Pep?

I don't have Pepakura but that would be my focus for tracking down the issue. Finding out how it handles alpha channel transparency is key. And does it even handle the material color at all? It may rely entirely on the external texture.
__________________
--jeff

~~ Current Project: 1:100 Skipjack Kathryn ~~
~~ First Project: 1:250 Zeppelin LZ-17 Sachsen ~~
Reply With Quote
  #4  
Old 09-20-2017, 09:40 AM
Thales's Avatar
Thales Thales is offline
Member
 
Join Date: Feb 2009
Location: state of confusion
Posts: 586
Total Downloaded: 498.04 MB
Thanks Kugelfang.

The png in gimp is indeed transparent (grey checks). The non-transparent portions of the PNG do appear as intended in pep, but the transparent areas are rendered as black in pep.

I do know that pep can handle material colors, because those without textures defined do appear as expected (white). I do not know if it can handle material colors in conjunction with an image texture though. I poked through pep's website but wasn't finding anything readily pertinent. The gargler engine isn't providing much detail either.
__________________
Projects: Serenity
PM Book Websites: LT - IU
Reply With Quote
  #5  
Old 09-20-2017, 10:17 AM
Thales's Avatar
Thales Thales is offline
Member
 
Join Date: Feb 2009
Location: state of confusion
Posts: 586
Total Downloaded: 498.04 MB
I'm leaning towards pep being the issue with the interpretation of image transparency.

I keep poling around and in pep, there is the texture configuration menu, and the entry for my transparent-image-texture appears with a black background when the source image definitely has transparency.
__________________
Projects: Serenity
PM Book Websites: LT - IU
Reply With Quote
Google Adsense
  #6  
Old 09-20-2017, 10:41 AM
Kugelfang's Avatar
Kugelfang Kugelfang is offline
Member
 
Join Date: Feb 2009
Location: Silver Spring, MD, USA
Posts: 280
Total Downloaded: 37.97 MB
Yeah, I suspect it's a Pep issue, too. My guess would be that since there is no color rgb data for the transparent parts of the *.png file, Pep is assuming an rgb of 0,0,0. Which IS the rgb value of black. (Or the rgb value actually is 0,0,0 but that most applications would also read the alpha channel which tells the application that the area is actually transparent and to ignore the rgb.) I've come across other applications that mishandle *.png files like that. It's kind of an 'old school' issue but I don't know how current Pep actually is.

Just out of idle curiosity, if you assign a material color of red to a part of the *.obj that does not have a texture applied in Blender, does Pep show it as red? I'm wondering if you're actually seeing the material color in Pep, or if white is the default for an untextured model.

--jeff
__________________
--jeff

~~ Current Project: 1:100 Skipjack Kathryn ~~
~~ First Project: 1:250 Zeppelin LZ-17 Sachsen ~~
Reply With Quote
  #7  
Old 09-20-2017, 11:01 AM
imcold's Avatar
imcold imcold is offline
Member
 
Join Date: Jul 2009
Location: Slovakia
Posts: 541
Total Downloaded: 0
Pepakura doesn't support texture alpha channel/transparency*. And it sort of makes sense - it's just the patterns that you print on solid paper.

Jeff: it does support material colors, if you use materials without textures. Not sure about material's alpha value - I can try it, if you're really curious.


* pdo doesn't store the png directly - it has its own internal format which is RGB only. Assuming that there isn't any super secret setting I may not know of, added in some recent version.
Reply With Quote
  #8  
Old 09-20-2017, 11:33 AM
Thales's Avatar
Thales Thales is offline
Member
 
Join Date: Feb 2009
Location: state of confusion
Posts: 586
Total Downloaded: 498.04 MB
Yes, if I put a material that is red on the object it comes into pep with a red part when unfolded.

I don't have a personal use case of a material that is partially transparent... just layered textures (which is why I would need transparency).

So it sounds like the texture images will need to be non-transparent... which is another thing to handle by hand... but if that is what it takes then that is what it takes.
__________________
Projects: Serenity
PM Book Websites: LT - IU
Reply With Quote
  #9  
Old 09-20-2017, 03:26 PM
Oldenburger67 Oldenburger67 is offline
Member
 
Join Date: Aug 2010
Posts: 81
Total Downloaded: 79.93 MB
Unfolder Script

Hello Thales,

great to hear that you use Blender!!!
Blender is a great Programm!!!

But why do you use Pepakura, when you can do unfolding frpm within Blender:

Don`t you know this script:

https://blenderartists.org/forum/sho...rt-Paper-Model

Addam has worked on this script for morde than 7 years, and it's great.

You can choose whether you can export the unfolded mesh as svg, png or PDF file.
From within you can also choose, whether you will export the unfolded mesh with or without texture or just with the colour of the mesh!

Just try it it's great

By the way, here a some additional Scripts for cardboard modelers in Blender. Just look at the attachments.

Michael Zier wrote them for the Kartonbau.de forum to be used in Blender

With many greetings from the other side of the atlantic

Thomas
Attached Files
File Type: zip PaperModelTools.zip (5.6 KB, 12 views)
Reply With Quote
  #10  
Old 09-21-2017, 05:32 AM
Thales's Avatar
Thales Thales is offline
Member
 
Join Date: Feb 2009
Location: state of confusion
Posts: 586
Total Downloaded: 498.04 MB
Quote:
Originally Posted by Oldenburger67 View Post
But why do you use Pepakura, when you can do unfolding frpm within Blender:

Don`t you know this script:

https://blenderartists.org/forum/sho...rt-Paper-Model

Addam has worked on this script for morde than 7 years, and it's great.
Thanks. I'll give these a try. Is there a way to view the proposed 2d layout before exporting? I expect to have a good bit of trial and error and repeatedly exporting is probably not an ideal solution.
__________________
Projects: Serenity
PM Book Websites: LT - IU
Reply With Quote
Google Adsense
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 10:18 AM.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.

Parts of this site powered by vBulletin Mods & Addons from DragonByte Technologies Ltd. (Details)
Copyright © 2007-2023, PaperModelers.com