We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.

texture color difference

Home Forums Programming texture color difference

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #42468
    feiyanlei
    Customer

    Hello, due to the project reasons, some places have to use code to write, when I use code to add a map to the model, the effect of the map display is different from the map in Blender, what is the reason?

    const loader = new v3d.TextureLoader();
    loader.load(
                    url,
                    function( texture ){
                        texture.flipY = false;
                        mesh.material = new v3d.MeshBasicMaterial({
                            map: texture
                        })
                    }
                )
    Attachments:
    You must be logged in to view attached files.
    #42498
    xeon
    Customer

    Hi there,
    As I am sure you are aware there are differences between EEVEE and Verge3D that we are always battling.

    In most cases, its the material, lighting or both.

    without seeing your materials I am guessing you are using a Principle BSDF since its the most compatible material between the two.

    Within Blender set all your Principle BSDF settings to 0. You can leave Emission and Alpha set to 1.0 and see if that doesn’t solve the problem.

    Xeon
    Route 66 Digital
    Interactive Solutions - https://www.r66d.com
    Tutorials - https://www.xeons3dlab.com

    #42547
    xeon
    Customer

    Hi Feiyanlei,
    I re-read your question and realized I did not answer it completely.

    MeshBasicMaterial is not affected by light and Blender Materials by default are. So there will be a drastic difference between the two.

    https://threejsfundamentals.org/threejs/lessons/threejs-materials.html

    If you are wanting the blender result via code, you will need to add a bit of complexity to your code to layer up a material. Black background, alpha masked text color and then add emissive properties to the color. Depending on how glossy you want the screen you may need to change the baseMeshMaterial to another material form to get the desired effect. BaseMeshMaterial is 100% flat so it looks more cartoon like and I believe would not match the your background scene.

    Hope this helps.

    Xeon
    Route 66 Digital
    Interactive Solutions - https://www.r66d.com
    Tutorials - https://www.xeons3dlab.com

    #42594
    feiyanlei
    Customer

    Hi Xeon,

    Thank you very much for your reply, because my problem is not described in the order, maybe your answer is different from what I want, I also use Emission in Blender.

    But I’ve solved that problem, just add this code to add the following code when loading the text.
    texture.encoding = v3d.sRGBEncoding;

    Here is a complete code。

    const loader = new v3d.TextureLoader();
    loader.load(
                    url,
                    function( texture ){
                        texture.encoding = v3d.sRGBEncoding;
                        texture.flipY = false;
                        mesh.material = new v3d.MeshBasicMaterial({
                            map: texture
                        })
                    }
                )
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.