PNG Import Texture Transparency Complicated Problem

textures
png
transparency

#1

I’ve been working on model of a community center for the non-profit I work with. The 3 faces of the exterior of the structure itself have intricate murals on them.

This is the building:

I’ve finally figured out (courtesy of the very helpful people in this thread) how to convert the mural into a texture to apply to the several hundred brick faces that make up the overall mural.

My problem now is that certain parts of the center of the mural are empty. For example, in the real world these parts are just exposed brick as shown here:

I’m importing the file as a texture PNG onto the texture control geometry face thing, where you can see which parts of the mural are transparent and which are not. Note, the areas where the window cut out are show paint spilling over onto the because it’s easier for formatting - it works out fine when applied):

My issue is that when I apply the texture to all of the brick faces, it turns the brick faces in the areas that are transparent on the texture control geometry thing transparent as well, when what I actually wanted was for them to remain their normal brick color.

This wouldn’t be such a problem if the areas where the transparency lined up perfectly with the bricks (or even just had straight edges), but it’s very uneven and I cant simply go and repaint the gaps. (i.e. the rounded asparagus head above the window opening.

My guess is that I need to figure out someway to vectorize (is that a word?) the image so that theres a way for SketchUp to tell where the pants stops and the transparency starts - or maybe there’s a unique color code for transparency that some feature can convert transparent areas adjacent to colored areas into edges or something?

I’m honestly not sure, but after spending some time google searching I wasn’t able to find any information examples of how to overcome this issue (possibly because I don’t even know the right words to search).

Does anyone have any suggestions? Here’s a link to the model in Google Drive:

I’ve added it to the 3D warehouse as well

Any help would be greatly appreciated!


#2

I think that it’s doing the right thing. You’ve asked for zero alpha, and you’re getting it.

The easiest solution would be to put your graphic on top of a solid brick color layer in Photoshop, then use a flattened no-alpha image of the two. Then it should look ok.

I think it’s unusual to have modeled all of the bricks though. If you flattened the mural against a layer that showed a brick wall, including the cement between the bricks, it would still look right, and would be a lot less geometry.

Could I try your mural png, to do a test?


#3

Yeah, definitely: Here’s a link the murals in jpeg, PNG, and PSD formats:

I’m not sure what a flattened no-alpha image is, but I’m going to be exporting this into SketchFab after the model is done to create an interactive version similar to this

Just to clarify, the mural is actually only painted on the brick faces themselves in real life (except for a small portion of the southeast corner - but that’s the exception). It’s an annoying feature, but the mortar is a separate color/texture entirely and is actually pretty noticeable when you’re looking at the mural straight on as the gap between bricks is .5" tall (traditional spacing is like half or less than half of that).

SketchFab has some great 3D rendering features and I want to keep all the brick registering as the same material so that I can set it all similarly (i.e. reflectivity, roughness, etc.).

I’m worried that SketchFab wont be able to recognize the different colors of an image converted into a texture as different materials. Not sure if that makes sense, but I don’t want the brick to have the same shiny glossy values as I would want the paint of the mural to have.


#4

It’s such a complex model that it’s very slow for me to apply a texture. But here is what I meant about a flat texture that is both the mural and the brick color.


#5

Yeah, sorry about that lol. Someone suggested turning View->Edge Style->Profiles off, which I found to be super helpful in working with.

I see what you mean - do you think that will have a problem registering as a unique materials in SketchFab (my concern mentioned above)?


#6

Why don’t you just texture it with a photo? Maybe take some hi-res pics from all 4 sides without the telephone wire in the way. Use match photo to distort the images into rectangles by clicking this button 54%20PM.


#7

I think I know what you’re trying to do, as I’d swear that’s what I once did.

In my case, I prepared a “decal” in Photoshop by extracting the background color (black) from the image, which made that part transparent. I placed it as an image on an object that was colored black which showed through the decal for the desire effect. PNG should support transparency, so I’m not sure what’s going wrong. You’re not importing it as JPEG, right?

Image prepped in PS with transparent background (it’s hard to make out the white letters on transparent background):

“Decal” placed in the model. SU object is colored black which shows through the transparent parts of the “decal”


From my experience, it seems that you’re concept should work.


#8

Forestr, I’ve had horrible success with Match Photo. I feel like it’s impossible to get to the quality of final product that I want. Also, correct me if I’m wrong, but Match photo can’t be used in a full 360 degree interactive model, can it?

The viewer I plan to use (because it loads in Facebook timelines automatically is Sketchfab - Here’s a test link of the structure itself: https://sketchfab.com/models/e96358608c3a4733938efa0da68fabe0

Basically I need to be able to rotate it freely and view the best possible model at all times, not just at defined angles


#9

Yeah, I pretty much the same thing, but this is a texture (still PNG though) not an image. Maybe that’s the difference here?

If that is the difference, then I might run into trouble with all the curved surfaces in the cornice, though I guess there’s only a small amount of transparent stuff there. You’d think there’s be link a box you could check to “project or not to project” transparent textures (or even any specific color, since it’s prolly not that different of a function?)

Here’s a link to the model if you want to check it out yourself:
https://drive.google.com/open?id=1vWDyMHnAtpvuVVHvnLNUfmdYTDhye4rI


#10

Just on the question of Facebook, you can export .glb from SketchUp and directly drag the file into your Facebook post. Use this extension to get the .glb file:

https://extensions.sketchup.com/en/content/gltf-exporter


#11

whatttttt?!?!

I’m running CleanUp3, so my SketchUp is like frozen, but If this is what I think it is, then wow that’s awesome. I’ve legit been asking around for an interactive viewer that’s housed within SketchUp directly that loads easy to navigate 360 interactive models.

The SketchFab platform is actually really good, through it’s got it’s kinks in terms of how it functions on different browsers/platforms etc. I do really really really like all of the post-modeling rendering processing you can do in it though (i.e. changes colors, reflectivity, glossiness, metalness, roughness, etc. etc. etc. of different materials AND separately, lines). The test model just finished processing and I applied some rendering stuffs to it if you wanna check it out: https://sketchfab.com/models/e96358608c3a4733938efa0da68fabe0

Without knowing much of anything I’ve been able to create some pretty professional looking stuff.

I wish more than anything though that I didn’t have to leave the SketchUp platform to do it. Hopefully once my SU frees up I’ll be able to check it out and have some luck with it


#12

Well, I’ll be darned, but that seems to be the difference. On the left, imported as image, on the right imported as texture:


#13

The good news is that we figured out what was happening. The bad news is that it doesn’t exactly provide a solution to the problem at hand lol.


#14

I do that all the time. That said, Match Photo only works at oblique angles to the faces of the object, and if you project those photos for your texture, you get parallax issues for things like inset windows or projecting objects. The photo texture looks better if you use photos shot straight on.


#15

Do you have any examples of something that turned out really well that you can share, or direct me towards?


#16

Here’s a full circle animation around an existing barn building on my SmugMug page.

(Let’s see if SmugMug’s bbcode link works)


#17

Wow, that’s a crazy model with all those bricks!! :slight_smile:
You’re right in that the projection of a png texture will render the transparent parts transparent on the model. As your brick color is a solid RGB color (184,85,70) I used that as a layer underneath your mural png in photoshop and then saved as a jpeg (could be a png too) so that the “transparent” parts would render the same brick color as your model. I then selected all the brick faces (by parallel projection from one side - selecting left to right to only get faces) - made that a group. Then with your mural in that group, project the texture onto only those faces. This leaves the mortar color the same without the mural imprint as well as the sides/edges of the brick the brick color. A few bricks here and there that were outside of the selection could easily be touched up.
The image attached is of the one side, you could repeat for the other two.

7432%20Brush%20V%20view|690x339


#18

@colin, I installed the extension and tried to export the file following the instructions listed on the link you provided (I tried all three options of export) and it’s giving me the following error message each time 13%20PM

I quit SketchUp and reopened just to make sure the plugin installed correctly too, but no luck

Any suggestions? Maybe it has something to do with all of the images as mentioned in this thread: https://forums.sketchup.com/t/orbit-bug-in-mobile-viewer-thats-not-in-desktop-viewer/18410?u=tysongersh


#19

The error suggests that nothing [nil] is being used in the processing.
So, is the entire geometry grouped or inside a component-instance ?
Because we cannot see the code in an RBE file who knows how it works ?
On the current selection ?
On the model.entities ?
On the model.active_entities ?
If that grepped for geometry ?
If the collected objects is empty then the [] empty message will result in an error !


#20

There are a 3 groups for each exterior face (w all the individual brick & cornice faces) for quicker selection to apply textures and the mortar is one giant shape in a group of it’s own. Maybe a few more - I just hit explode all (which is probably going to take a few minutes to process) and will try again once all groups are exploded