Page MenuHome

Missing settings from the Blender Render material panel
Closed, ArchivedPublicTO DO


Testing around some material settings with alpha channels, i have noticed a very strange problem that is linked to some important entry missing from the Material interface in Blender Render mode.

I have a small PNG file that is a simple motif in the center of what is full of alpha channel transparency
(I attached this PNG to this post.)

Description of the problem :

I enable the addon "Import Image As Plane" in the user preferences.
I set the Display to Multitexture (important, not GLSL , as it's when using Multitexture that i noticed the problem)

Then i import this PNG as a plane.
The result is as i expect it to be, if i look at the plane in edit mode, i can see that the UV/Image Editor has automatically loaded the PNG and unwrapped the plane to fit that PNG :

I notice too that it has automatically created a Material and the Texture entry for that material.
Nothing strange at all, it works as expected.

Now the problem itself comes from when i do this manually :

I close and relaunch Blender to be sure that i start without any of this kind of data possibly in memory.
I set the Display to Multitexture (like before)

- I create a plane
- With that plane selected i go in Edit Mode , i split my screen in 2 and make the second screen as the UV/Image Editor
- In the UV/Image Editor i load the PNG
- In the Edit Mode i select my plane and press U then Unwrap

Until then, no problem :

Now i create a Material for this plane.
In 3D View i notice that the plane goes black. Not the first time, but as i'm on Multitexture display it's nothing unsual.

Now i setup the material and the texture entry exactly like the Import Image As Plane did :
-Material : no change from default
-Texture entry for that Material, i set "Type" to Image, and i load the PNG.
At the mapping i set UV instead of the default Generated
And at Sampling, i disable "Activate" (like the "Import Image As Plane" did)

There is no more difference in settings between my manually setup Material+Texture and what the "Import Image As Plane" would do.

Or so i thought, because in the viewport it now look like this , the plane is totally black and does not exhibit anymore the texture like it should :

And there i have been puzzled for a few days because no settings in all panel are now any different from what the "Import Image As Plane", even trying to change lot of settings never improved the situation, in the Viewport the plane continue to look completely wrong.

For some reason at some point i changed Blender Render to Blender Game, something i never do usually as i have no need to.
And while looking at the Material settings, i noticed when looking that there is an entry that is simply not there in the regular Blender render.

It's under "Game Setting" and is called "Alpha Blend" that when i setup my Material manually is set to "Opaque".
The "opaque" term made me suspicious.
And after some cross comparison, it appears that the "Import Image As Plane" addon actually change the "Opaque" setting to "Alpha Blend" , but i couldn't see that because this important setting due to its impact on how the viewport is displayed in Multitexture, is not in the "Blender Render" mode for some reason ?

And if after setting my material manually instead of using the addon, i set the setting from "Opaque" to "Alpha Blend" , suddenly in the viewport the Plane is displayed correctly again :

Happens apparently only when having your display set to Multitexture. Not a bug obviously, but it's really strange that a setting that is so important is not present in what is Blender main "work" mode, "Blender Render".
For some reason it does not seem to affect the viewport that badly if using GLSL display.

Event Timeline

A few more about this : friend mentionned to me that he had a similar problem in 2.49b, the alpha in the viewport was displayed as black instead of transparent, and that to have the alpha texture correctly displayed in the viewport he had to change the setting "Active Alpha Blending" (that is Opaque too by default) into "Alpha".

In 2.49b this option was in the "Texture Face" tab instead of the Material one, seems strange to me, but i remember that 2.49b had lot of buttons moved where there was some space, one of the reason of the UI redesign, to reorganize and put those buttons where it was making more sense.

And searching about this , i found out that the Texture Face tab existed in 2.5 "Blender Render" mode, but with the release of Blender 2.6 that tab was moved to "Blender Game".
Unfortunately the Alpha Blending settings were always a part of the "Texture Face" tab in 2.5 , so when that tab was moved, those Alpha settings were moved along, and that's then why i couldn't find them anywhere, unless i went to "Blender Game" mode.

So indeed it's not a bug, but i think it may be an overlook (considering GLSL display is unaffected, and most people are using it, i guess that's why the importance of this tab in relation to Multitexture viewport was overlooked).

Note: are you using multi texture for game or render preview?
I think this can be considered a bug. However, for Multitexture you still need to set the image in one of the texture channels.

So the bug is not 'missing ui options' but rather the fact that in this case the 'Opaque' setting doesn't matter for the bge or the render, but it matters for the 3dview.
Attached a sample file that shows the alpha in render AND bge but not in 3dview (due to have Opaque as alpha blending).

Using multitexture on my work computer because this one does not have a glsl - able card.
As i said the problem does not occur on the system able to use glsl display (as long as i don't use multitexture of course).

Rendering is ok, no problem as it's using the material settings and they're correctly defined.
The problem i had is that the viewport when i'm on "Blender Render" mode would have the model becoming black if i have the texture assigned through the UV/Image editor + a material setting (for rendering) , if there's no material (and only the texture is assigned to that model through the UV/Image Editor) the problem does not occur , but if a material is added (and to render you need materials) then with Multitexture enabled the model lost the alpha transparency and turns black.

That's why i thought the setting is missing, because this loss of alpha transparency in the viewport is controlled by that alpha blending setting that is by default set to "Opaque", and to "fix" that the user is currently forced to move from the "Blender Render" mode to the "Blender Game" mode to access that Material setting that is lacking from the "Blender Render" Material tab, even if that user is not working on anything related to a game.

Hi Sanc, I'm revisiting this bug report.

One thing I didn't understand is: do you want to have your file transparent when rendering, or not?
If so, can you please attach a file that renders like you want, but shows wrongly in the viewport?
(note: for that please don't change anything from the BGE interface, for test sake)

Isn't it possible to write the issue as a 1 liner? That way others could check... this is too much info for me.
An attempt:

"An alpha draw option in 3d viewport can only be set if GE render engine is on, but it's also used by regular drawing".

Sorry for not replying sooner, i missed the updates on my mail box as it was drawn between some spam.
I'll try to summarize the problem , sorry for the probably previous bad english explanation that could have been confusing.

So i try again.

This report is about the Multitexture display, not GLSL that work as it is expected to.

I have an unwrapped Cube and in the UV/Image Editor there is a (packed) texture assigned.
attached blend is MTalphaCubeUVNOMAT.blend
attached viewport screenshot is MTalphaCubeUVNOMAT01.jpg

In the viewport it is perfect in textured mode, nothing wrong.

Now i add a material to that cube, just a material.
attached viewport screenshot is now MTalphaCubeUV1MAT.jpg
As you can see, just adding a material make the transparency becoming completely opaque.

So for that Material, i configure the texture panel correctly, as the preview (or going into GLSL display) show me to be
attached screenshot is MTalphaCubeUV1MATTEX.jpg

But still the alpha transparency is still opaque in Viewport (remember it is Multitexture)
attached blend is MTalphaCubeUVMATTEX.blend

From there, the -only- way to get the viewport to show again the correct transparency is to switch to Blender Game and change the Alpha setting in the material, and that's where i wanted to explain :

It is not a bug.
But in the current situation, and because the alpha setting is an important one to get viewport displaying the correct level of alpha transparency of a texture (in Multitexture) to me it seems that having the Alpha settings not available in the "Blender Render" workmode (that is the main Blender workspace) and only in the "Blender Game" workmode -despite it affects the viewport in "Blender Render" too- is rather counter productive.

Ton Roosendaal actually summarized this entirely in his one liner ;)

Long story short,
he wants "game_settings.alpha_blend" property to be available inside of the "Blender Render".

Dalai, can you share some light on this please? Why does a setting which is inside a Game RNA struct affect BI view port?

After checking the code: there's more calls checking material game settings, also active when 'render engine' is 'internal'.

I'll mark this down as known limit and todo in wiki.

Ton Roosendaal (ton) changed the task status from Unknown Status to Unknown Status.Feb 16 2013, 5:20 PM