﻿<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ja">
	<id>https://wiki.blender.jp/index.php?action=history&amp;feed=atom&amp;title=%E5%88%A9%E7%94%A8%E8%80%85%3ADfelinto%2FTexFace</id>
	<title>利用者:Dfelinto/TexFace - 版の履歴</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.blender.jp/index.php?action=history&amp;feed=atom&amp;title=%E5%88%A9%E7%94%A8%E8%80%85%3ADfelinto%2FTexFace"/>
	<link rel="alternate" type="text/html" href="https://wiki.blender.jp/index.php?title=%E5%88%A9%E7%94%A8%E8%80%85:Dfelinto/TexFace&amp;action=history"/>
	<updated>2026-06-15T11:28:51Z</updated>
	<subtitle>このウィキのこのページに関する変更履歴</subtitle>
	<generator>MediaWiki 1.31.0</generator>
	<entry>
		<id>https://wiki.blender.jp/index.php?title=%E5%88%A9%E7%94%A8%E8%80%85:Dfelinto/TexFace&amp;diff=103043&amp;oldid=prev</id>
		<title>Yamyam: 1版 をインポートしました</title>
		<link rel="alternate" type="text/html" href="https://wiki.blender.jp/index.php?title=%E5%88%A9%E7%94%A8%E8%80%85:Dfelinto/TexFace&amp;diff=103043&amp;oldid=prev"/>
		<updated>2018-06-28T19:41:22Z</updated>

		<summary type="html">&lt;p&gt;1版 をインポートしました&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ja&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← 古い版&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;2018年6月28日 (木) 19:41時点における版&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;ja&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(相違点なし)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Yamyam</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.blender.jp/index.php?title=%E5%88%A9%E7%94%A8%E8%80%85:Dfelinto/TexFace&amp;diff=103042&amp;oldid=prev</id>
		<title>2011年9月19日 (月) 20:07にwiki&gt;Dfelintoによる</title>
		<link rel="alternate" type="text/html" href="https://wiki.blender.jp/index.php?title=%E5%88%A9%E7%94%A8%E8%80%85:Dfelinto/TexFace&amp;diff=103042&amp;oldid=prev"/>
		<updated>2011-09-19T20:07:08Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新規ページ&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{WikiTask/Inprogress|100.0|committed on rev. 40372}}&lt;br /&gt;
[http://code.blender.org/index.php/2011/09/bge-material-texface-changes/ Updated Information HERE]&lt;br /&gt;
&lt;br /&gt;
==Abstract==&lt;br /&gt;
Tex Face is part of Blender original design 15 years ago. The functionality it brought to the Blender Game Engine is still useful nowadays. However its design hasn't changed and it lacks integration with other parts of Blender.&lt;br /&gt;
&lt;br /&gt;
This proposal is centered on moving the working functionalities as sub-options for the Material and remove deprecated ones.&lt;br /&gt;
==Disadvantages==&lt;br /&gt;
'''or why users may complain'''&lt;br /&gt;
There are two arguments against this proposal that I expose here for the sake of an open dialog:&lt;br /&gt;
&lt;br /&gt;
# The TexFace Shading mode will be working as before (eventually renamed SingleTexture mode?). The difference is that now you will need to create a material if you want to set any option from the old TexFace.&lt;br /&gt;
#&amp;lt;del&amp;gt;** old del** There is no possible way to handle backward compatibility.&amp;lt;/del&amp;gt; &amp;lt;del&amp;gt;The implementation of backward compatibility can be too cumbersome. [[#Backward_Compatibility_Issue.2FSolution|See details]]. it may be better to drop it. In other words any old file that was relying on TexFace options different than the default ones would have to be manually updated. This would include making copy of your materials to set different options for different parts of your Mesh.&amp;lt;/del&amp;gt;&lt;br /&gt;
# update: Backward compatibilty has to done in two steps sometimes [[#Backward_Compatibility#Implementation|See details]].&lt;br /&gt;
&lt;br /&gt;
==General Design==&lt;br /&gt;
{{Note|TexFace Options|Tex, Tiles, Light, Invisible, Collision, Shared, Twoside, ObColor, Halo, Billboard, Shadow, Text, Sort, Opaque, Add, Alpha, Clip Alpha}}&lt;br /&gt;
&lt;br /&gt;
===Obsolete options===&lt;br /&gt;
'''ObColor''' - it's not been used in the BGE drawing code. If you have any sample that uses it please send me. Looking at the code and testing with files revealed to me that it's obsolete.&lt;br /&gt;
&lt;br /&gt;
'''Shared''' - it's not been used in the BGE drawing code. It's been used for  Vertex Painting instead. The check is:&lt;br /&gt;
&amp;lt;code&amp;gt;if(shared_color or not in paintmask mode) ... &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I would like to hear from people that uses it, but it seems to me that simply checking for the paintmask mode will be fine.&lt;br /&gt;
This feature was used to blend vertex colors across connected faces. If we get rid of Shared we will have to include the faces we want to &amp;quot;share&amp;quot; in the paintmask. For there will be no way to have them shared automatically (as one could with the TexFace option)&lt;br /&gt;
&lt;br /&gt;
for the records, the actual code for that is in pain_vertex.c:&lt;br /&gt;
&amp;lt;code&amp;gt;if ((tface &amp;amp;&amp;amp; tface-&amp;gt;mode &amp;amp; TF_SHAREDCOL) || (me-&amp;gt;editflag &amp;amp; ME_EDIT_PAINT_MASK)==0) { &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===New User Interface===&lt;br /&gt;
{{Note|Material Panel|New Game Option sub-panel only available in the Game Engine render mode}}&lt;br /&gt;
[[File:Dev-DFelinto-TexFaceToMaterial.png|640px]]&lt;br /&gt;
&lt;br /&gt;
{{Note|Game Options|New Panel}}&lt;br /&gt;
====Game Options====&lt;br /&gt;
=====Blend Mode=====&lt;br /&gt;
'''old:''' Transp (Opaque, Add, Alpha, Clip Alpha), Sort&lt;br /&gt;
&lt;br /&gt;
'''new:''' Blend Mode (enum: Add, Alpha Blend, Alpha Clip, Alpha Sort, Opaque)&lt;br /&gt;
&lt;br /&gt;
''Opaque is the default''&lt;br /&gt;
&lt;br /&gt;
=====Face Orientation=====&lt;br /&gt;
&lt;br /&gt;
'''old:''' Halo, Billboard, Shadow&lt;br /&gt;
&lt;br /&gt;
'''new:''' Face Orientation (enum: Billboard, Halo, Normal, Shadow)&lt;br /&gt;
&lt;br /&gt;
''Normal is the default''&lt;br /&gt;
&lt;br /&gt;
=====Isolated Options=====&lt;br /&gt;
&lt;br /&gt;
'''old:''' Two-sided, Text&lt;br /&gt;
&lt;br /&gt;
'''new:''' individual booleans as before&lt;br /&gt;
&lt;br /&gt;
{{Note|Physics|Existent Panel - adding a new boolean}}&lt;br /&gt;
====Physics====&lt;br /&gt;
'''old:''' Collision&lt;br /&gt;
&lt;br /&gt;
'''new:''' boolean in the Panel header to whether use or not use the Physics options (friction, force, ...)&lt;br /&gt;
&lt;br /&gt;
{{Note|Shading|Existent Panel - not changing anything}}&lt;br /&gt;
====Shading====&lt;br /&gt;
'''old:''' Light&lt;br /&gt;
&lt;br /&gt;
'''new:''' to use the Shadeless option already existent as the only factor to determine whether a face gets lid.&lt;br /&gt;
&lt;br /&gt;
==Related topics==&lt;br /&gt;
'''Tiles''' - currently available in the UV-Editor this option may stay for good, to be moved to '''Image Layer''' in the future (see next topic).&lt;br /&gt;
&lt;br /&gt;
'''UV Layer''' - the current TexFace options are a subset of a UV Layer struct. It's organized like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;UV | Image Layer | Game&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With this proposal the game part will become obsolete. It can also be a good time to remove ImageLayer from there. Keep in mind that this is a separated discussion and doesn't affect this proposal in any way. It was brought to me by Campbell Barton while discussing those ideas.&lt;br /&gt;
&lt;br /&gt;
==Implementation Design==&lt;br /&gt;
As a way to avoid code-refactoring (which can be welcomed eventually but not now) the idea is to move the options to the Object Material and use the same internal code in the BGE render. Ideally that would mean to change only the UI, the DNA, RNA and the Converter. However in some places in the Converter the whole mesh is passed along with the old options on it.&lt;br /&gt;
&lt;br /&gt;
That will require more attention, in a case-per case basis. Nevertheless I stand that the less we change it the better.&lt;br /&gt;
&lt;br /&gt;
If an object needs different settings for the same Mesh (as one can achieve with TexFace) you can set multiple materials for it.&lt;br /&gt;
&lt;br /&gt;
The Blender Game Engine already splits Blender Material into their own materials -  [http://www.blender.org/documentation/249PythonDoc/GE/GameTypes.KX_MeshProxy-class.html more details here].&lt;br /&gt;
&lt;br /&gt;
That means that internally BGE always dealt with faces with different TexFace settings as if they had independent materials. Now we will be exposing this to the user.&lt;br /&gt;
&lt;br /&gt;
==Backward Compatibility Implementation==&lt;br /&gt;
Whenever a new file is open we try to convert all the materials following the rules:&lt;br /&gt;
1) not change the render result (options such as shadeless is not touched, nor new materials are created).&lt;br /&gt;
2) the material has no conflict (all the meshes/faces assigned to it share the same texface flags).&lt;br /&gt;
&lt;br /&gt;
If there are still materials (or faces with no materials) that require further conversion a warning in the console will indicate to use the Convert Option in the Help menu.&lt;br /&gt;
If the user access it it then will convert all the materials, including creating new materials when needed.&lt;br /&gt;
&lt;br /&gt;
==Backward Compatibility Issue/Solution==&lt;br /&gt;
I originally thought that Blender had a limit in the number of material slots of an object. Apparently it doesn't so I reconsidered the original statement. Backward compatible is possible indeed. However it may make your file hard to manage. How I see this being implemented:&lt;br /&gt;
&lt;br /&gt;
===Case 1: Mesh has no material and no UV was ever created===&lt;br /&gt;
This is what one would expect from a file ready to render. In this case there is nothing to be done. No new material will be created. Perfect scenario. But why do you have a mesh with no material and no UV? :)&lt;br /&gt;
&lt;br /&gt;
===Case 2: Mesh has no material and TFace options are the default===&lt;br /&gt;
Similar with the '''Case 1''' we don't have to create a material here. We do have to loop over the Mesh to make sure of that, but well that's life.&lt;br /&gt;
&lt;br /&gt;
===Case 3: Mesh has no material and different combinations of TFace options===&lt;br /&gt;
In this case we would have to create the materials:&lt;br /&gt;
'''no_material_collision''', '''no_material_collision_text''', '''no_material_collision_add''', ... (or let's say '''no_material_1''', '''no_material_2''', '''no_material_3''', ...)&lt;br /&gt;
&lt;br /&gt;
In the worse scenario that would produce around '''319''' combinations! I may be wrong in the math here, but I'm afraid I'm correct.&lt;br /&gt;
{{Note|320 = (2 ^ 4 * 5 * 4 - 1) |(2^4=16 means 4 boolean options, 5 the options of the first enum and 4 of the second one. -1 is to discount the default option which falls into Case 2)}&lt;br /&gt;
&lt;br /&gt;
Is it possible? Yes. Desirable? I'm not so sure. It seems that it can easily get out of hand here. Let's see the next case.&lt;br /&gt;
&lt;br /&gt;
===Case 4: Mesh has a material and no UV was ever created or using default options===&lt;br /&gt;
Same thing as '''Case 1''' and '''Case 2''', no need to do anything. Render files may falls into that category so we are good to go.&lt;br /&gt;
&lt;br /&gt;
===Case 5: Mesh has a material and one single TexFace != default is being used===&lt;br /&gt;
Now things start to get complicated. If there is another Mesh using the same Material we need to make sure they both share the same TexFace settings. If they do we have to take this material and convert it (add on its panel the old TexFace option). Otherwise we have to similiar with '''Case 3''' and create '''my_material_collision''', '''my_material_text''', ... again we are talking about more than 300 combinations here so we may want to go with numbers?&lt;br /&gt;
&lt;br /&gt;
===Case 6: Mesh has a material and different combinations of TFace options===&lt;br /&gt;
Same as the Case 5.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
It seems doable for sure, but I'm not sure is something we want to do automatically. One alternative I thought would be to keep the structs in the Blender DNA, the old TexFace properties in the RNA and create a Python script that can handle that for the user (as an addon On by default). Or maybe one option in the FileManager to open/append old files and convert the properties the TexFace. For Linking I think it should be handle on each file individually.&lt;br /&gt;
&lt;br /&gt;
==How you can help==&lt;br /&gt;
===How it's been done so far===&lt;br /&gt;
The original design for this changes was made by [http://www.mikepan.com Mike Pan] and me ([http://www.dalaifelinto.com Dalai Felinto]) in some informal rantings over lunch with a sketchbook and a screenshot of the 2.49 TexFace panel. After that artist and developer [http://obalbio3d.wordpress.com Vitor Balbio] decided to give this a try and helped rethinking some of the UI options.&lt;br /&gt;
&lt;br /&gt;
Now that the UI is done he is trying to implement the new options while I'm coaching him in some BGE specifies and general help.&lt;br /&gt;
&lt;br /&gt;
====UI Design====&lt;br /&gt;
The design and ideas here are not set in stone. Feedback and discussions (here or in the bf-committers mailing list) are necessary.&lt;br /&gt;
&lt;br /&gt;
====Support the Idea, or Not :)====&lt;br /&gt;
As any core change in workflow bringing backward compatibilities issues I expect to see some adverse opinions on those ideas. I would like to hear sincere opinions on whether or not this change is worth. Take in mind that this is not something I'm proposing as a coder only, but specially as a BGE user. The design and presented ideas tries to address both perspectives.&lt;br /&gt;
&lt;br /&gt;
====Get your Hands Dirty====&lt;br /&gt;
That said, I'm currently pretty busy with other projects, therefore I have no plans to actually do hardcore coding on this. If you think you have the time and energy to help on this and want to join Vitor to work on this together that would be great. I'm committed to code design, code review and general assistance.&lt;br /&gt;
&lt;br /&gt;
If you are a code developer really willing to take over this feature please let me know. It would be nice to coordinate efforts together.&lt;br /&gt;
&lt;br /&gt;
====Contact and Further Discussions====&lt;br /&gt;
I would rather if the ideas could be discussed in the [http://lists.blender.org/pipermail/bf-committers/2011-February/030338.html bf-committers mailing list].&lt;br /&gt;
&lt;br /&gt;
With the code structured and the design in the right foot I will likely post on BlenderArtists to gather fresh users opinion on that as well (a pole maybe).&lt;br /&gt;
&lt;br /&gt;
February 2011&lt;br /&gt;
Dalai Felinto&lt;/div&gt;</summary>
		<author><name>wiki&gt;Dfelinto</name></author>
		
	</entry>
</feed>