X-Plane / XPlane2Blender

Scenery & Aircraft export addon for Blender and X-Plane
GNU General Public License v3.0
197 stars 67 forks source link

Implement new Autodetect Textures From Cycles workflow #449

Open tngreene opened 5 years ago

tngreene commented 5 years ago

Autodetect Textures Workflow was added #137, and now with #399 it is broken - there are no more Texture Slots to fill in 2.8. To be clear about what feature I mean:

  1. Instead of unchecking Autodetect Textures and filling in the TEXTURE file paths by hand, for every material, make or reuse an Image Texture Slot with the same image, check a certain Influence box to set it as the Albedo Texture, Normal Texture, or Lit Texture.
  2. Warnings are given for not using the correct textures in combinations with Material Options
  3. XPlane2Blender uses this to write the TEXTURE.... directive
  4. It can also use this to Compile Normal-Textures #299
  5. This way the user also sees the Texture in Textured mode of the 3D View

Some problems:

  1. As mentioned in #357, users find it annoying to have to keep some piece of data the same across 10s or 100s of datablocks.
  2. These warnings are entirely reliant on the user using this feature correctly. If they have not taken the time to change the Influence flags they'll get a lot of meaningless warnings
  3. Avoiding writing in the file path by hand once, is I think, a very small feature
  4. How relevant and used is Compile Normal-Textures? It was made before PBR. Does it really depend on the Autodetect Textures feature? There are no errors before it. It just seems like that is where the code was stuck.
  5. This is by biggest one. There are several ways to get a texture to be mapped in Blender's 3D Viewer. I don't think we should force people to use any particular one anymore, now that I know about EEVEE, Cycles, and the UV Image Editor. Especially on the account of just a few text fields.

If we did want to do some texture checking for the user we'd have to start looking at establishing conventions and documenting them with Shader Nodes or the UV Editor Again. Or maybe we could let the user specify the images they want checked which would be much easier.

This also affects what we want to do with #445. I'm not sure if the converter setting the Texture Slots is a valuable feature if 2.8 immediately ditches it.

tngreene commented 5 years ago

See also this forum post: https://forums.x-plane.org/index.php?/forums/topic/187150-help-decide-what-the-new-texture-workflow-should-be-for-xplane2blender-for-28/

And it is worth noting I have almost never seen a .blend file sent to me without Autodetect being unchecked.

arb65912 commented 5 years ago

And it is worth noting I have almost never seen a .blend file sent to me without Autodetect being unchecked.> Than it seems majority do not care for it.

airfightergr commented 5 years ago

Opinion: Autodetect feature is not useful and probably a proper implementation will consume your valuable time from other stuff.

Since this "1 time set and let it as is" feature, does not bother the artist/developer/user to do it. In the contrary, I feel doing a few things manually, gives more control to the user, and we want this.

Probably, the final texture maybe not used inside blender. Someone may use a base/albedo texture to bake stuff on another texture and then use an external program (Substance Painter, Photoshop, Gimp, etc.) to compose the final texture.

Suggestion: Remove it!

tngreene commented 5 years ago

In response to community feedback the resounding response is that this feature is rarely used.

The new plan is to remove the Texture Slot auto-detection and to use "Has a Texture Path Set Or Not" for triggering the warnings. Very simple and a very low amount of code change. Compile Normal Textures doesn't even need a change.

tngreene commented 5 years ago

Actually, we're not scrapping this after all!

tngreene commented 4 years ago

From #399

(The fact that the other autodetect unit tests didn't fail is very interesting to me!)