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.

Principled BSDF and Gltf Export

Home Forums Graphics / Blender Principled BSDF and Gltf Export

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #76377
    chirio
    Participant

    Hi there,
    I’m using Blender 4.1.1. and Verge 4.6.0. on Windows.
    When I try to look at my scene or even the dark template, objects with principled BSDF disappear, as soon as i export the scene to gltf. I’m really puzzled. Any ideas why that might be?
    I even tried a scene from a friend. It works until i do a gltf export on both of my PCs.

    Attachments:
    You must be logged in to view attached files.
    #76380
    kdv
    Participant

    press F12 in your browser.

    Puzzles and JS coding. Fast and expensive.

    If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.

    #76381
    chirio
    Participant

    I get lots of errors, but I don’t have a clue what any of this means.

    v3d.js:1 Verge3D 4.2.0 for Blender (License, WebGL 2.0)
    v3d.js:1 v3d.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType.
    ne @ v3d.js:1
    v3d.js:1 v3d.WebGLProgram: shader error: 0 35715 false gl.getProgramInfoLog Fragment shader is not compiled.
    ERROR: 0:2799: ‘node_bsdf_principled’ : no matching overloaded function found

    1: #version 300 es
    2: #define varying in
    3: layout(location = 0) out highp vec4 pc_fragColor;
    4: #define gl_FragColor pc_fragColor
    5: #define gl_FragDepthEXT gl_FragDepth
    6: #define texture2D texture
    7: #define textureCube texture
    8: #define texture2DProj textureProj
    9: #define texture2DLodEXT textureLod
    10: #define texture2DProjLodEXT textureProjLod
    11: #define textureCubeLodEXT textureLod
    12: #define texture2DGradEXT textureGrad
    13: #define texture2DProjGradEXT textureProjGrad
    14: #define textureCubeGradEXT textureGrad
    15: precision highp float;
    16: precision highp int;
    17: #define HIGH_PRECISION
    18: #define SHADER_NAME MeshNodeMaterial
    19: #define LIGHT_PATH_IS_CAM_RAY 1
    20: #define WORLD_NODES 0
    21: #define NORMAL_OUTPUT 0
    22: #define NODE_RGB_NUM 1
    23: #define NODE_VALUE_NUM 0
    24: #define NODE_TEX_COORD_NUM 0
    25: #define NODE_RGB_BL
    26: #define NODE_NORMAL
    27: #define NODE_BSDF_PRINCIPLED_BL
    28: #define NODE_OUTPUT_MATERIAL_BL
    29: #define MT_BLENDER
    30: #define COMPAT_USE_SPEC_ENV_BLENDER_APPROX
    31: #define USE_ENVMAP
    32: #define ENVMAP_TYPE_CUBE_UV
    33: #define ENVMAP_MODE_REFLECTION
    34: #define ENVMAP_BLENDING_NONE
    35: #define cubeUV_maxTileSize 256.0
    36: #define USE_SHADOWMAP
    37: #define SHADOWMAP_TYPE_PCF_POISSON_DISK
    38: #define PHYSICALLY_CORRECT_LIGHTS
    39: #define TEXTURE_LOD_EXT
    40: #define UNITS_SCALE_FACTOR 1.0
    41: uniform mat4 viewMatrix;
    42: uniform vec3 cameraPosition;
    43: uniform bool isOrthographic;
    44: #define TONE_MAPPING
    45: #ifndef saturate
    46: #define saturate(a) clamp(a, 0.0, 1.0)
    47: #endif
    48: uniform float toneMappingExposure;
    49: uniform float toneMappingMidTones;
    50: uniform float toneMappingPhysicalScale;
    51: uniform float toneMappingBrightness;
    52: uniform float toneMappingContrast;
    53: uniform bool toneMappingChromaticAdaptation;
    54: uniform vec3 toneMappingWhiteColor;
    55: uniform bool toneMappingColorDifferentiation;
    56: uniform bool toneMappingExteriorDaylight;
    57: uniform vec3 toneMappingWhiteBalance;
    58: uniform float toneMappingHighlights;
    59: uniform float toneMappingShadows;
    60: uniform float toneMappingSaturation;
    61: uniform float toneMappingAperture;
    62: uniform float toneMappingShutter;
    63: uniform float toneMappingISO;
    64: uniform float toneMappingVignetting;
    65: uniform vec2 toneMappingResolution;
    66: const float FILMIC_BLENDER_LOG_MIN = -12.473931188;
    67: const float FILMIC_BLENDER_LOG_MAX = 12.526068812;
    68: const float FILMIC_BLENDER_EXPOSURE_LATITUDE_RATIO = 0.66;
    69: vec3 LinearToneMapping(vec3 color) {
    70: return toneMappingExposure * color;
    71: }
    72: vec3 ReinhardToneMapping(vec3 color) {
    73: color *= toneMappingExposure;
    74: return saturate(color / (vec3(1.0) + color));
    75: }
    76: vec3 OptimizedCineonToneMapping(vec3 color) {
    77: color *= toneMappingExposure;
    78: color = max(vec3(0.0), color – 0.004);
    79: return pow((color * (6.2 * color + 0.5)) / (color * (6.2 * color + 1.7) + 0.06), vec3(2.2));
    80: }
    81: vec3 RRTAndODTFit(vec3 v) {
    82: vec3 a = v * (v + 0.0245786) – 0.000090537;
    83: vec3 b = v * (0.983729 * v + 0.4329510) + 0.238081;
    84: return a / b;
    85: }
    86: vec3 ACESFilmicToneMapping(vec3 color) {
    87: const mat3 ACESInputMat = mat3(
    88: vec3(0.59719, 0.07600, 0.02840),
    89: vec3(0.35458, 0.90834, 0.13383),
    90: vec3(0.04823, 0.01566, 0.83777)
    91: );
    92: const mat3 ACESOutputMat = mat3(
    93: vec3( 1.60475, -0.10208, -0.00327),
    94: vec3(-0.53108, 1.10813, -0.07276),
    95: vec3(-0.07367, -0.00605, 1.07602)
    96: );
    97: color *= toneMappingExposure / 0.6;
    98: color = ACESInputMat * color;
    99: color = RRTAndODTFit(color);
    100: color = ACESOutputMat * color;
    101: return saturate(color);
    102: }
    103: vec3 CustomToneMapping(vec3 color) { return color; }
    104: #define ORDERS_OF_MAG 5.0
    105: #define PI_TONE 3.14159265359
    106: float toneCalcBrightness(in vec3 color)
    107: {
    108: return (abs(color.r) * 0.263 + abs(color.g) * 0.655 + abs(color.b) * 0.082);
    109: }
    110: float toneApproximateScotopicLuminance(vec3 color)
    111: {
    112: return (0.062 * color.r + 0.608 * color.g + 0.330 * color.b);
    113: }
    114: vec3 LogarithmicMaxToneMapping(vec3 color) {
    115: float inputScaleFactor = toneMappingPhysicalScale / PI_TONE;
    116: float brightness = (toneMappingBrightness < 0.0) ? 0.0 : (toneMappingBrightness * 0.7);
    117: float powerBot = toneMappingExteriorDaylight ? 4.0 : 2.0;
    118: float res = 100.0 / ORDERS_OF_MAG;
    119: float mag = floor((50.0 / res));
    120: float power = ((brightness / 20.0 – ORDERS_OF_MAG) – powerBot) + mag;
    121: float stepsize = 9.0 / res;
    122: float step = 50.0 – (mag * res);
    123: float param_c = (0.02 * toneMappingContrast) * 2.0;
    124: float param_b = pow(10.0, power) * (1.0 + (stepsize * step));
    125: float param_a = param_b * (1.0 + param_c);
    126: param_c /= pow(2.0, toneMappingMidTones – 1.0);
    127: param_b *= PI_TONE;
    128: vec3 whiteConstancyFactor = toneMappingWhiteColor;
    129: if (toneMappingChromaticAdaptation) {
    130: float luminance = toneCalcBrightness(whiteConsta

    #76382
    kdv
    Participant

    v3d.js:1 Verge3D 4.2.0 for Blender (License, WebGL 2.0)

    The clue is here.

    v3d.js 4.2.0 is not campatible with Blender 4.x

    Puzzles and JS coding. Fast and expensive.

    If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.

    #76383
    chirio
    Participant

    But I have Verge3D 4.6.0 installed…

    Attachments:
    You must be logged in to view attached files.
    #76385
    kdv
    Participant

    v3d.js is outdated in the folder where you export your model.

    Puzzles and JS coding. Fast and expensive.

    If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.

    #76393
    chirio
    Participant

    Well I tried the update function in the App Manager. This seemed to work for now.
    Thanks!

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.