0

I'm unable to successfully display a model+texture map WITHOUT the viewer applying lighting effects to it. I am using a localised version of the viewer to investigate the problem but I welcome an Autodesk Material Library setting solution if it exists.

This is an example of how I want to see the material, i.e. no specular, no reflections (ignore the fact this example is in three.js): https://stemkoski.github.io/Three.js/Texture-Repeat.html

This is an example of my problem: https://myhub.autodesk360.com/ue29c31db/g/shares/SHabee1QT1a327cf2b7a7879b97973545818?viewState=NoIgbgDAdAjCA0IBGMAsBmATAMwKYBMBaCAQwHYBjQ1fATlUNt13UO1pIwDYZMAOTCVogAukA I have attempted many different "Autodesk Material Library" settings, including ramping up "Self Illumination" however, the texture either fails to load and/or, that glossy shine persists. Could the Materials.json be tweaked to fix this problem? This is my Materials.json

{
    "name": "LMVTK Simple Materials",
    "version":  "1.0",
    "scene":    {
        "SceneUnit":    8214,
        "YIsUp":    2
    },
    "materials":    {
        "0":    {
            "version":  2,
            "userassets":   ["0"],
            "materials":    {
                "0":    {
                    "tag":  "0",
                    "proteinType":  "",
                    "definition":   "SimplePhong",
                    "properties":   {
                        "integers": {
                            "mode": 4
                        },
                        "booleans": {
                            "color_by_object":  false,
                            "generic_is_metal": false,
                            "generic_backface_cull": false
                        },
                        "scalars":  {
                            "generic_transparency": {
                                "units":    "",
                                "values":   [0]
                            }
                        },
                        "colors":   {
                            "generic_diffuse":  {
                                "values":   [{
                                        "r":    1,
                                        "g":    1,
                                        "b":    1,
                                        "a":    1
                                    }]
                            }                           
                        }
                    },
                    "transparent":  false,
                    "textures": {
                        "generic_diffuse":  {
                            "connections":  ["1_generic_diffuse"]
                        }
                    }
                },
                "1_generic_diffuse":    {
                    "tag":  "0",
                    "definition":   "UnifiedBitmap",
                    "properties":   {
                        "scalars":  {
                            "unifiedbitmap_RGBAmount":  {
                                "units":    "",
                                "values":   [1]
                            }
                        },
                        "uris": {
                            "unifiedbitmap_Bitmap": {
                                "values":   ["image0.jpg"]
                            }
                        },
                        "booleans": {
                            "texture_URepeat":  true,
                            "texture_VRepeat":  true,
                            "unifiedbitmap_Invert": false
                        },
                        "integers": {
                            "texture_MapChannel":   1
                        }
                    }
                }
            }
        }
    }
}




Dez
  • 45
  • 2

1 Answers1

0

I recommend trying this approach. Literally bypass the LMV materials (which are all effected by lighting) and use a custom THREE material that is not effected by lighting. You may possibly need to create a custom shader too.

Start with this... https://forge.autodesk.com/cloud_and_mobile/2016/02/custom-transparent-meshes-with-view-data-api.html

Let me know if that fixes the problem, and if not I can deep dive into it further.

Best, Michael

enter image description here

michael beale
  • 1,014
  • 1
  • 6
  • 5
  • Thanks for answering Michael, where would the code for the circle described in your link be inserted? – Dez Jan 09 '19 at 02:16
  • for the geometry, use the renderProxy object and apply the material to that. Here is a better blog post that describes what I mean... https://forge.autodesk.com/blog/showhide-textures-object-forge-viewer and the customer shader I mentioned (in order to get the flat lighting), you can follow this blog post: https://forge.autodesk.com/blog/forge-viewer-custom-shaders-part-1 – michael beale Jan 10 '19 at 04:21