Feedback in new material options (replacement for texface) [committed]

Hello folks,

you are welcome to test a new patch to replace the “per face” texface options with “per material” equivalent ones.

Some of the conversion will be handled automatically. But in some cases there will be a need to go for the Help menu and call a converter script. In the console window you should find relevant info (e.g. material “Yellow” conflicted, please go to menu …).

The builds (for OSX, Win and Linux64) can be found here:
http://graphicall.org/dfelinto

Thanks, and please report bugs, suggestions and general feedback.
More info into this project here.

Hello Dalai!

First of all thank you very much for all that passion with the BGE!

Your build for MacOSX works really great! I opened some very older Blender files that I did and those old ones from NaN times and looks like the only issue is to refresh some alpha textures, in some cases just because preview issues inside 3d views.

I must confess I’m a bit confused about your main purpose here. I was talking to Vitor lately and he told me your first idea was to remove the texture face panel so if you want to have a texture you need a material forcefully; no backward compatibility :wink:

Now, that’s past: there is backward compatibility and the texture face panel is still there. I still can get a surface textured without adding a material. So I guess the purpose is to kill the “copy drawn mode button” since It doesn’t made any apparitions in 2.5 series and to replace it with the materials button instead? So… Isn’t it easier to have different texture face properties per object instead of per face or per material?

No bad criticism here, I’m asking sincerely. Texture face X Materials was always a confuse topic from the conceptual point of view, at least for me. I like the way 2.49b and YoFrankie handled that (Texture face X Blender Materials (“multitexture”) X GLSL) Like… “Texture face is texture face, material is material but you can use Uv inside materials.”

So… Considering history and sanity of BGE users… Isn’t it better to kill “multitexture” and keep only GLSL instead of killing ours beloved texture face pannel and copy drawn mode button? The “multitexture” option is for nothing. XD

Yours,

ChicO.

Hi ChicO,
thanks for your feedback.

First of all, the “Texture Face” panel will disappear. COMPLETELY. The reason for this to still be present is to help with debugging. I should’ve mentioned that, sorry.

“I’m a bit confused about your main purpose here”
remove per face settings and provide a decent workflow for changing those properties in a material bases.

  • In Blender 2.49 (and 2.5) there is no way to go to a mesh and “select” all the faces with a given texface setting. You have no visual feedback and close to no control other than assigning the faces one by one or copy the same settings for a bunch of faces.
  • Also the need for UV only to change “texface” properties seems overkill. Specially since the way it’s now if you toggle between different active UV channels you will have different “texface” settings for the faces (the texface is part of the UV struct)

" Isn’t it easier to have different texture face properties per object instead of per face or per material? "

No, really not. That would be way too limiting and a deal-breaker (Erwin expressed that himself). I can think of a couple of examples if you want.

“Considering history and sanity of BGE users… Isn’t it better to kill “multitexture” and keep only GLSL instead of killing ours beloved texture face panel and copy drawn mode button? The “multitexture” option is for nothing. XD”

I actually think we should kill the “Face Texture” mode and keep MultiTexture and GLSL.

Now, do you really like the texture face panel? The fact that you necessarily need a UV for changes that have nothing to do with UV?
Think about someone that is beginning in Blender/BGE. I know a lot of people that stay away from the texface panel without even knowing it (and they are missing some functionality because of that).

Let me know your thoughts,
Thanks again for your opinions.

Aaaanh! Allright! That explains everything :slight_smile:

That’s a fact.

I though to have the Uv directly on the mesh was a way to make the game run faster and make it easier to export assets to other platforms :I

Sorry if this is a bit offtopic but do you have any links about the differences between Multitexture and GLSL Dalai?

Btw people don’t forget to read: http://wiki.blender.org/index.php/User:Dfelinto/TexFace

Thank you!

Hey Dalai!

Sorry about the bump.

Just discovered it right now.

Soft bodies for the BGE hooked with constraints need to be set for collision if you want twosided faces in texture face mode. (<Suppose your creating a simple flag that moves with the wind for the BGE). So if you also add light that’s 3 face properties per object and the object has no volume.

How does the new material options handle that? :rolleyes:

Hi ChicO,

you can create a material and set Two-Sided option in the new material panel.
The options for light and collision can be set either in this material panel (if you want it per material) or in the Physics panel (if you want it set per object).

For light/unlight use the “shadeless” option.

Now I got it.

Very nice! Just awesome. Much more precise from both; conceptual an technical point of views. You executed it just like Vitor’s original concept :)!

Congratulations!

Don’t forget to set “Blender Game” to see the new panel people!


Hey Dalai! Do you know why the developers did the texture face panel design separated from materials a long time ago? Was it to make it easier to export for Quake 1 or something? I never understood that decision…

:?

Yes. Just yes.

This is awesome. The only weird thing is that Mix blending mode sets the material to shadeless, while the Light and unsupported blending modes light the faces correctly. And Alpha Sort mode just… Works! It’s never worked well for me before this.

With these new buttons in the Material panel, you should remove the ‘Texture Face’ buttons in Blender Game mode (and I guess, from Blender in general). Great, great job, DFelinto. Texture Face mode most likely should be removed.

On further inspection, there’s no Collision boolean property, but I still love this idea. This should definitely be in trunk!

If I understood dfelinto correctly the physics checkbox should take the function as collision to.

I really like this too, It’s a huge ui cleanup.

But I think I would prefer obcolor to work rather then go. Setting per object is valuable - especial as long we don’t have any deep copy (make singeluser) functionality for meshes and materials. But I don’t really understand this stuff well yet, this fix will make it easier. But it’s not only due to messy settings, my graphic card driver have added allot of extra fuzz and confusion to :frowning: Still not perfect but allot better since ubuntu 11.04 :slight_smile:

Hello everyone.
new builds available (Win32, OSX, Linux64)!

I did a big change in the backward compatibility code following some suggestions from Ton. Now if there is no material and the mesh needs a material it will be created. This is close to the final version I believe.

Hey Dalai! Do you know why the developers did the texture face panel design separated from materials a long time ago? Was it to make it easier to export for Quake 1 or something? I never understood that decision…

It was for optimization reasons (so you could set specific settings per face). I heard it was specially done to work with PS2.

This is awesome. The only weird thing is that Mix blending mode sets the material to shadeless, while the Light and unsupported blending modes light the faces correctly. And Alpha Sort mode just… Works! It’s never worked well for me before this.

I’m not sure I’m following here. The old Light option is now replaced by the “shadeless” already existent in the material. What do you mean by “mix blendering mode” sets the material to shadeless?

On further inspection, there’s no Collision boolean property, but I still love this idea. This should definitely be in trunk

If I understood dfelinto correctly the physics checkbox should take the function as collision to.

Yup, toggle the “Physics” button and you can control the old collision set.

But I think I would prefer obcolor to work rather then go. Setting per object is valuable - especial as long we don’t have any deep copy (make singeluser) functionality for meshes and materials.

I’m with you here. This requires further investigation though. One thing that would help is to track down in which version of Blender OBColor stopped working (the texface option).

Thanks everyone for the feedbacks.

What I meant is that the Mix blending mode in the texture panel appeared to make materials shadeless, while other modes set them correctly. You can see this by simply setting a texture for a material, and setting the blend mode to Mix (the default). It will turn shadeless, regardless of the Shadeless setting.

Builds updated again. Now it should be the final, or really close to it.
I fixed the bug with alpha. If you still have any problem with alpha in the 3dview make sure the Transparency mode is not set to Mask instead of ZTransp.

Also I’m not ignoring the Light flag in the texface. The reason is that GLSL mode doesn’t take it into consideration. Thus it would be impossible to handle all case conversions. I opt to better support GLSL then.

And Builds available again. I hope those are the finals now.
Something new apart from the bug fixes: Two-sided is now called " Back Culling" (twosided on == back culling off)

If you have any new files crashing, please get hold of me.
Thanks

Very nice. For me, Mix blending mode makes the object shadeless in Multitexture mode. I’m not sure what can be done about that, but Mix blends normally in GLSL mode (with lighting). I have to use the Soft or Hard Light blending modes to make them show up in Multitexture mode, which breaks it in GLSL mode. I see the collision flag is set via the Physics checkbox. I like that!

Do you have a sample (made with 2.59 “trunk”, not with the patched Blender) that I could take a look at? I still don’t understand if you are pointing at a backward compatibility problem, or an incosistency in current trunk/2.59/2.49 BGE?

Patch committed to trunk. Thanks for the testing.
More details here: http://code.blender.org/index.php/2011/09/bge-material-texface-changes/

To me, it seems that while it doesn’t perfectly convert everything, it does seem to work well without breaking anything and the conversion issues are easily fixed.

It also seems to fix the bug where game text doesn’t appear properly the first time you run the game (even though it still doesn’t fully display in the 3D view), so I can say that the system looks to be better than before and thus you’ve done a good job overall. :slight_smile:

Yeah, I’m impressed. I thought that it would be some kind of ‘Sorry, you’ll lose your work’ kind of situation, but you did a great job with the conversion code. The Mix mode bug is still present (I think it’s a bug with Blender itself), but maybe it’s supposed to be there. If you choose Multiply for the blending mode on the object instead, the object is shaded correctly, so no big deal. Great job!

EDIT: I just had a moment where I smiled at how simple it is - I switched a plane from a black opaque texture to a transparent window texture and paused as I thought of how to make it clip alpha, like the other windows in the mesh. I remembered, selected the second material in the stack and hit ‘Apply’, and it instantly became Clip Alpha-enabled, just like the other windows. This is definitely a step in the right direction! Great job, again!

Very nice improvement over the old system! I can attest to how much time dfelinto put into writing the conversion code so that older files work out of the box. :eyebrowlift:

Yay develoepers!