How to correctly add an image to a material

Hi all!

I have an image, which is just white text with a transparent backgound, that I want to add to a material so the text shows up on my object. I’m inexperienced with cycles & eevee so I’m not sure where I am going wrong at. Here’s a screenshot of what I have:


The image is added with a mix shader and the alpha of the image is connected to the factor of the mix shader. This appears to work fine in brightly lit environments, but under dim lighting conditions, the text is too bright:

Here I put a cube around around my object, camera & lights to block environment lighting, and as you can see the text is way too bright. Manually adjusting the factor of the mix shader will adjust the brightness of the image, but how to add the image so I don’t have to adjust the factor? How can I make it so the image is as bright as the object it appears on?

.blend file attached

Thanks for any help,
Randy

Image_add_to_text_question.blend (1.2 MB)

that is surprisingly bright given scene lighting, like emission is turned up for the white

Hi,

You image texture appears pink which means that it’s missing.

im guessing the issue is that your images node runs directly into the mix shader node, my first try would be to run the image into normal mix node (not mix shader) mix it there with whatever color your object should be and that mix node into a regular diffuse shader or principled shader node and that directly to the material output

Hello everyone!

You are correct, Sir!
I forgot to pack the image. I packed the image and re-uploaded the file on the first post. Is there someplace in the user prefs to set it to always pack images?

I thought about this, and sure, I was mixing things up. I was plugging an image into a mix shader, and I shouldn’t be doing that.

So I plugged the image into a diffuse shader and connected that to the mix shader:

and here was my result:

Which I think is more correct, so thank you for the direction.

@KDLynch Thanks for our input and interest in this project!
I plan to add in all the extra stuff soon. Memory module, printer, cassette recorder…

Thanks for the help & input!
Randy

2 Likes

Hi, yes

https://docs.blender.org/manual/en/3.4/files/blend/packed_data.html

You just need to either choose Pack Resources or Automatically Pack Resources

I have made some changes to your .blend file. I’m not sure if I did it right (I just tried to experiment with it a bit), but from what I’ve got, it seems to me that the visibility of your text onto your object now depends on the light spots that are around it. I made a comparison slider so that you may see the difference in a clearer way.

Here’s what I’ve done with the nodes (I’ve made a backup of your previous ones):

Some little things that I’ve also done:

  1. In the scene settings I’ve switched Device from CPU to GPU in order to get more fast rendering in real-time.
  2. Disabled Noise Threshol for the Viewport.
  3. Added a TEST POINT LIGHT to the scene. I name it the same in the Outliner, so you will always find it there.

Here’s your .blend file as well:
Image_add_to_text_question _new.blend (1.3 MB)

Hope it helps

Cheers,
Sergey

Thanks for the file and the work!!!

TBH, I wasn’t sure what I was looking at in the image with the comparison slider you posted. So I donwloaded your file and rendered it. Then I appended in my material and rendered.


And now I see the difference, my material is on the left, yours on the right. Your material recieves light from the TEST POINT LIGHT, mine doesn’t. Well, my base material doesn’t get lit from the test light, but the text does get light from the test lamp. Now I am wondering why that is… any thoughts?

I’m on a cheap computer with integrated intel GPU, so that won’t help me much. I really need a higher spec machine.

Thanks for your replies!
Randy

I had to disconnect your old nodes, such as Fresnel and Glossy BSDF. They’re all somehow effects on the reflection of the material. Maybe that’s the case.

Correct if I’m wrong, but I think it works like it should be.
Here’s my nodes once again:

I have turned all of the light spots, except for the test one:
outliner

Here’s the comparison between the non-light scene and the scene with a test spot light being turned on:


I have applied Shade Smooth to your CaseBottom.
I also had to switched from CPU to GPU in order to get better performance on my machine and turned off both Noise Threshold options for Viewport and Render as well.
image

Here’s the .blend file anyway:
Image_add_to_text_question_new_2.blend (1.2 MB)

My machine isn’t that faster either. An old i5 6500 along with GeForce GTX 1060 and 16GB of RAM on 2400 MHz

Hi, great looking project,

This was my first ever computer, it was the ZX81 here in the uk.

Looking forward to seeing it with a Rampack and cassette recorder.

Will you be modelling the wedge of cardboard that you had to stick between the computer and rampack to stop the machine crashing? :wink:

2 Likes

So I think I figured out where I was going wrong at. I was using a Mix Shader node to combine the image texture with the other shaders. Replacing that with an Add Shader node appears to fix my problem.

Here’s a low light scene with a point test light:

And here’s it with good lighting:

Here’s my node setup:

The Fresnal, Diffuse, Glossy and the Mix shader that combines them are from a material I have in a file someplace… Anyway, I added in the Noise Texture and Displacement node to give the case the slightly rough look of computers at that time. Using the Add Shader node to combine the image with the other shaders works because I guess I want to add the image shader to the other shaders, instead of mixing them.

I want to say that I found this tutorial to be most helpful:
https://artisticrender.com/the-complete-beginners-guide-to-blender-nodes-eevee-cycles-and-pbr/

There are still some errors, but I think I can correct them, and they are errors that only show up on close in shots. So I’m not that concerned about them.

Thanks @goorman for the tip about the point test light, very useful!!!

Thanks for the replies,
Randy

1 Like