0
$\begingroup$

When I import OBJ file with texture image of transparent png and red background I can see the color of red is correct when in Solid Preview mode.

But once I switch to material or rendered preview mode where I would expect to see the image with red bg all I see is the image with pitch black bg - why?

In fact I am just testing if the OBJ file is OK (it is OBJ I made, generated by the Blender 2.8), cos it does not show texture in UE4 where I want to use it (so now I know the info about the texture is correct and something else is wrong with the UE4, but that is another topic, of course).

PS: I would like to have a solution without using of NODES, if possible.

$\endgroup$
  • $\begingroup$ hello, maybe share your file here: blend-exchange.giantcowfilms.com $\endgroup$ – moonboots Sep 27 at 14:47
  • $\begingroup$ it is not a .blend file, it is ".obj + .mtl + transparent .png" that opened in Blender (via import .obj) does not show the red bg color of the brick. Instead it is showing the image of the png (which has transparent bg) with pitch black bg and that s my problem as I do not know why is that...so I uploaded those 3 file to Zippyshare here: link. BTW that obj file was created INSIDE BLENDER, so maybe I could also add that .blend file after all, so here it is: link $\endgroup$ – qraqatit Sep 27 at 15:27
0
$\begingroup$

Edit : So my answer only answers partially to your problem, whoever knows a bit better about Obj and Mtl imports will hopefully give you a better answer.

I don't know how to work without nodes, so I show you the problem and the solution with the nodes:

  • You want your arrow to show up on your object on a red background, here is the current node organization:

enter image description here

  • This node organization doesn't allow you to show any background, so it shows only black where there's the alpha transparency. The red you see in Solid mode is actually the color you've picked as Viewport Display color:

enter image description here

  • To create a red background, you have several solutions, you can plug your Image Texure into a MixRGB, choose a red color in the second socket, and plug the Image Texture alpha output into the factor of the MixRGB:

enter image description here

enter image description here

| improve this answer | |
$\endgroup$
  • $\begingroup$ But there is red specified in the mtl file for the obj, thus that red color comes from the obj. $\endgroup$ – qraqatit Sep 27 at 16:34
  • $\begingroup$ edit: mh ok seems like the mtl file contains the material informations, except that it doesn't seem to work the way you want, see the node organization I've sreenshot $\endgroup$ – moonboots Sep 27 at 16:40
  • $\begingroup$ ah, so you cannot help me with this one as it is probably more obj/mtl oriented question (what a pity there is no equivalent of this page for the Wavefront OBJ). Anyway, my main problem/concern is really the obj file output as I am doing it for usage inside UE4, but now I have some suspicion that transparent png are probably not supported in Wavefront OBJ files, but that is a question for somewhere else which i have to find where (to ask it). Well, at least you teached me how to use NODES and how to work with them, so thanks anyway. Still, I flag this as right answer as it make the image tran. $\endgroup$ – qraqatit Sep 27 at 16:44
  • $\begingroup$ It looks like the result is not the one you want but I can't tell you more, are your sure the Obj. file with its Mtl works the way you want in other softwares? Maybe change the title of your question so that it is specifically about Mtl imports in Blender? $\endgroup$ – moonboots Sep 27 at 16:46
  • $\begingroup$ well, that is exactly the thing I am finding about right now: it seems image transparency (map_Kd) is not supported, only opaque, tho using map_d (BW image where black reveals, white hides) do partly the job: with this particular image (the yellow arrow with black lining around it) it makes the bg transparent as expected BUT the black around the arrow makes the red surface completely transparent thus we see inside/thru the brick and the yellow makes the arrow whiteish. I guess I am going to ask this on stackoverflow now... $\endgroup$ – qraqatit Sep 27 at 16:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.