• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

Burn material colors into textures

Messages
7,450
Country
us-illinois
Hi Arno:

Regarding the following ModelConverterX (aka "MCX") feature as documented in the MCX wiki:

"Burn material colors into textures

When importing models from certain models it might be that a material has both a texture and a colour. Some systems mix those two on rendering, others don't. If your target system does not, you can use this function to mix the colour and the texture, this results in new textures."

http://www.fsdeveloper.com/wiki/index.php?title=ModelConverterX#Burn_material_colors_into_textures


When you use the term "material colors", are you by any chance referring to the color information which IIUC is stored "per vertex" in the 3D model as described by the author of "MeshLab" ?

http://meshlabstuff.blogspot.com/2009/03/on-storage-of-color-in-meshes.html



http://www.cyi.ac.cy/system/files/MeshLab Documentation1.pdf



The reason I ask, is that I would like to see if it is possible for MCX to import the Ambient Occlusion (aka "AO") information written into 3D models by MeshLab, and exported as a file format (ex: PLY) that will properly store and retain that color information (which IIUC, is stored "per vertex")


https://en.wikipedia.org/wiki/PLY_(file_format)





IIUC, having this option in MCX would allow FS developers an easier way to implement AO in their 3D solid (aka "manifold") models by simply texturing with "visible" materials, and then add the information (usually) "in-visible" and not seen until rendered in ex: FS at run time.

This might hopefully allow Sketchup and users of 3D modeling programs (other than Blender) to reduce the complexity of their work-flow, by avoiding use of expensive photo-realistic rendering software (and the P.I.T.A. of having to manually 're-texture' their 3D models using a "pre-rendered" / "baked" texture) ...when all they may want is to add some AO to their already-photo-real textures. :wizard:



I am still seeking a more comprehensive understanding of this aspect of 3D modeling, and am wondering if MeshLab may also already have a way to "bake" this 'color per vertex' info into a textured mesh via the "VERTEX ATTRIBUTE TRANSFER dialog > VERTEX COLOR" menu options ? :scratchch

http://www.cse.iitd.ac.in/~mcs112609/Meshlab Tutorial.pdf (see page 44 of 46)


Would I be correct that one or more of the many options (and the few file formats) offered by MeshLab might 'work compatibly' for storage of AO color information in 3D models it exports ...so that it can be retained and utilized when imported into MCX ?


NOTE: MeshLab Documentation Page 36 of 64 lists currently supported MeshLab "export" file formats:

• PLY,
• STL,
• OFF,
• OBJ,
• 3DS,
• COLLADA,
• VRML,
• DXF
• U3D

http://www.cyi.ac.cy/system/files/MeshLab Documentation1.pdf

(Google URL... above URL does not work consistently in this forum software) :

https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&uact=8&ved=0CB4QFjAAahUKEwi7hfyg3_HHAhXGcT4KHUJfDXw&url=http://www.cyi.ac.cy/system/files/MeshLab%20Documentation1.pdf&usg=AFQjCNEoHAR76bsI--wZypIgPy3IjWafWQ&bvm=bv.102537793,d.cWw



BTW: Reportedly, when using MeshLab, output with ambient occlusion results in ColorRGBA:

"MeshLab creates always ColorRGBA data for vertex-color. Even for cases where no alpha is set."

http://examples.x3dom.org/example/x3dom_vertRGBA.html



BTW: I understand that Sketchup has an option to utilize "Color By Layer" to add color information to various parts of a model when "Layer Numbers" other than the default "0" are used for Geometry.

This feature reportedly can also implement 'transparency' (IIUC, by RGBA alpha channel as is done with other Sketchup materials) ...when such a "Color By Layer" option is used.


In the context of MCX and 3D models made for use in FS, would this be regarded as a form of "multi-texturing" which may actually be displayable at run time in FS ...without first being "baked" into the "visible" 'diffuse' texture mapped onto a MDL ?


PS: Some related info regarding MeshLab and Blender storage of vertex color information:

http://www.agisoft.com/forum/index.php?topic=2984.0

http://blenderartists.org/forum/archive/index.php/t-324876.html



I would be grateful for any insight / ideas you may be able to share with us on possible methods of implementing AO in 3D models processed via MCX for use in FS. :)


GaryGB
 
Last edited:

=rk=

Resource contributor
Messages
4,450
Country
us-washington
I will observe that color data is uniform per polygon; there is no way to define color "graduation" across a polygon, that is what textures do. The polygon count would likely be prohibitive to get gradual shading using the "single color or shade per polygon" convention, which is what "burn colors into material textures" does.
 

tgibson

Resource contributor
Messages
11,327
Country
us-california
Much better to bake the AO into a texture, and apply that. Don't know how it is done with those programs, though.
 
Messages
7,450
Country
us-illinois
Thanks for the initial replies; I shall also look forward to Arno's reply here (...as soon as he has a chance to review this info). :)

GaryGB
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,859
Country
netherlands
Hi Gary,

MCX does not read per vertex colour information. This feature I used with OpenFlight files where the polygon colour is typically blended with the texture. Since FS doesn't do this kind of blending, this feature will do the blending and make a new texture with the result.
 
Messages
7,450
Country
us-illinois
So, IIUC, we would still have to manually re-texture a 3D model processed by the latter work-flow ? :scratchch

GaryGB
 
Top