Ticket #129 (closed defect: wontfix)

Opened 7 years ago

Last modified 7 years ago

STEP files - Can't visualize step file

Reported by: pjoulaud Owned by:
Priority: major Milestone: openPLM-1.1 Official Release
Component: media Version: 1.1
Keywords: webgl Cc:

Description (last modified by pjoulaud) (diff)

Today, I tested the troisd server. It was updated at the release 1208.
I created a Document3D and uploaded the Pompe_5_pistons.stp
The thumbnail was created : OK
But I can't visualize the geometry in 3D tab. In fact, there's nothing.
I looked at the Firefox Error messages but I can' t find anything interesting and I have no way to copy it and attach it to this ticket.
Thank you.

Hereafter error messages :

[11:10:55,033] L'utilisation de getAttributeNode() est obsolète. Utilisez getAttribute() à la place. @ http://troisd.openplm.org/object/Document3D/DOC_00049/a/3D/
[11:10:55,485] Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:13.0) Gecko/20100101 Firefox/13.0 | WebGL 1.0 | Mozilla | Mozilla | WebGL GLSL ES 1.0 @ http://troisd.openplm.org/media/js/3D/three-min.js:275
[11:10:55,655] DEPRECATED: Camera hasn't been added to a Scene. Adding it... @ http://troisd.openplm.org/media/js/3D/three-min.js:294
[11:10:55,721] Fragment shader failed to compile with the following errors:
ERROR: 0:82: error(#201) Requires extension support: indexing into an array of samplers with non-constant indices (GL_ARB_gpu_shader5)
ERROR: 0:85: error(#201) Requires extension support: indexing into an array of samplers with non-constant indices (GL_ARB_gpu_shader5)
ERROR: 0:88: error(#201) Requires extension support: indexing into an array of samplers with non-constant indices (GL_ARB_gpu_shader5)
ERROR: 0:91: error(#201) Requires extension support: indexing into an array of samplers with non-constant indices (GL_ARB_gpu_shader5)
ERROR: 0:94: error(#201) Requires extension support: indexing into an array of samplers with non-constant indices (GL_ARB_gpu_shader5)
ERROR: 0:97: error(#201) Requires extension support: indexing into an array of samplers with non-constant indices (GL_ARB_gpu_shader5)
ERROR: 0:100: error(#201) Requires extension support: indexing into an array of samplers with non-constant indices (GL_ARB_gpu_shader5)
ERROR: 0:103: error(#201) Requires extension support: indexing into an array of samplers with non-constant indices (GL_ARB_gpu_shader5)
ERROR: 0:106: error(#201) Requires extension support: indexing into an array of samplers with non-constant indices (GL_ARB_gpu_shader5)
ERROR: error(#273) 9 compilation errors.  No code generated
 @ http://troisd.openplm.org/media/js/3D/three-min.js:267
[11:10:55,722] precision mediump float;
#define MAX_DIR_LIGHTS 1
#define MAX_POINT_LIGHTS 1
#define MAX_SHADOWS 1














#define USE_SHADOWMAP
#define SHADOWMAP_SOFT


uniform mat4 viewMatrix;
uniform vec3 cameraPosition;
uniform vec3 diffuse;
uniform float opacity;
uniform vec3 ambient;
uniform vec3 specular;
uniform float shininess;
#ifdef USE_COLOR
varying vec3 vColor;
#endif
#ifdef USE_MAP
varying vec2 vUv;
uniform sampler2D map;
#endif
#ifdef USE_LIGHTMAP
varying vec2 vUv2;
uniform sampler2D lightMap;
#endif
#ifdef USE_ENVMAP
varying vec3 vReflect;
uniform float reflectivity;
uniform samplerCube envMap;
uniform float flipEnvMap;
uniform int combine;
#endif
#ifdef USE_FOG
uniform vec3 fogColor;
#ifdef FOG_EXP2
uniform float fogDensity;
#else
uniform float fogNear;
uniform float fogFar;
#endif
#endif
uniform vec3 ambientLightColor;
#if MAX_DIR_LIGHTS > 0
uniform vec3 directionalLightColor[ MAX_DIR_LIGHTS ];
uniform vec3 directionalLightDirection[ MAX_DIR_LIGHTS ];
#endif
#if MAX_POINT_LIGHTS > 0
uniform vec3 pointLightColor[ MAX_POINT_LIGHTS ];
#ifdef PHONG_PER_PIXEL
uniform vec3 pointLightPosition[ MAX_POINT_LIGHTS ];
uniform float pointLightDistance[ MAX_POINT_LIGHTS ];
#else
varying vec4 vPointLight[ MAX_POINT_LIGHTS ];
#endif
#endif
#ifdef WRAP_AROUND
uniform vec3 wrapRGB;
#endif
varying vec3 vViewPosition;
varying vec3 vNormal;
#ifdef USE_SHADOWMAP
uniform sampler2D shadowMap[ MAX_SHADOWS ];
uniform vec2 shadowMapSize[ MAX_SHADOWS ];
uniform float shadowDarkness[ MAX_SHADOWS ];
uniform float shadowBias[ MAX_SHADOWS ];
varying vec4 vShadowCoord[ MAX_SHADOWS ];
float unpackDepth( const in vec4 rgba_depth ) {
const vec4 bit_shift = vec4( 1.0 / ( 256.0 * 256.0 * 256.0 ), 1.0 / ( 256.0 * 256.0 ), 1.0 / 256.0, 1.0 );
float depth = dot( rgba_depth, bit_shift );
return depth;
}
#endif
void main() {
gl_FragColor = vec4( vec3 ( 1.0 ), opacity );
#ifdef USE_MAP
#ifdef GAMMA_INPUT
vec4 texelColor = texture2D( map, vUv );
texelColor.xyz *= texelColor.xyz;
gl_FragColor = gl_FragColor * texelColor;
#else
gl_FragColor = gl_FragColor * texture2D( map, vUv );
#endif
#endif
#ifdef ALPHATEST
if ( gl_FragColor.a < ALPHATEST ) discard;
#endif
vec3 normal = normalize( vNormal );
vec3 viewPosition = normalize( vViewPosition );
#ifdef DOUBLE_SIDED
normal = normal * ( -1.0 + 2.0 * float( gl_FrontFacing ) );
#endif
#if MAX_POINT_LIGHTS > 0
vec3 pointDiffuse  = vec3( 0.0 );
vec3 pointSpecular = vec3( 0.0 );
for ( int i = 0; i < MAX_POINT_LIGHTS; i ++ ) {
#ifdef PHONG_PER_PIXEL
vec4 lPosition = viewMatrix * vec4( pointLightPosition[ i ], 1.0 );
vec3 lVector = lPosition.xyz + vViewPosition.xyz;
float lDistance = 1.0;
if ( pointLightDistance[ i ] > 0.0 )
lDistance = 1.0 - min( ( length( lVector ) / pointLightDistance[ i ] ), 1.0 );
lVector = normalize( lVector );
#else
vec3 lVector = normalize( vPointLight[ i ].xyz );
float lDistance = vPointLight[ i ].w;
#endif
float dotProduct = dot( normal, lVector );
#ifdef WRAP_AROUND
float pointDiffuseWeightFull = max( dotProduct, 0.0 );
float pointDiffuseWeightHalf = max( 0.5 * dotProduct + 0.5, 0.0 );
vec3 pointDiffuseWeight = mix( vec3 ( pointDiffuseWeightFull ), vec3( pointDiffuseWeightHalf ), wrapRGB );
#else
float pointDiffuseWeight = max( dotProduct, 0.0 );
#endif
pointDiffuse  += diffuse * pointLightColor[ i ] * pointDiffuseWeight * lDistance;
vec3 pointHalfVector = normalize( lVector + viewPosition );
float pointDotNormalHalf = max( dot( normal, pointHalfVector ), 0.0 );
float pointSpecularWeight = max( pow( pointDotNormalHalf, shininess ), 0.0 );
#ifdef PHYSICALLY_BASED_SHADING
vec3 schlick = specular + vec3( 1.0 - specular ) * pow( dot( lVector, pointHalfVector ), 5.0 );
pointSpecular += schlick * pointLightColor[ i ] * pointSpecularWeight * pointDiffuseWeight * lDistance;
#else
pointSpecular += specular * pointLightColor[ i ] * pointSpecularWeight * pointDiffuseWeight * lDistance;
#endif
}
#endif
#if MAX_DIR_LIGHTS > 0
vec3 dirDiffuse  = vec3( 0.0 );
vec3 dirSpecular = vec3( 0.0 );
for( int i = 0; i < MAX_DIR_LIGHTS; i ++ ) {
vec4 lDirection = viewMatrix * vec4( directionalLightDirection[ i ], 0.0 );
vec3 dirVector = normalize( lDirection.xyz );
float dotProduct = dot( normal, dirVector );
#ifdef WRAP_AROUND
float dirDiffuseWeightFull = max( dotProduct, 0.0 );
float dirDiffuseWeightHalf = max( 0.5 * dotProduct + 0.5, 0.0 );
vec3 dirDiffuseWeight = mix( vec3( dirDiffuseWeightFull ), vec3( dirDiffuseWeightHalf ), wrapRGB );
#else
float dirDiffuseWeight = max( dotProduct, 0.0 );
#endif
dirDiffuse  += diffuse * directionalLightColor[ i ] * dirDiffuseWeight;
vec3 dirHalfVector = normalize( dirVector + viewPosition );
float dirDotNormalHalf = max( dot( normal, dirHalfVector ), 0.0 );
float dirSpecularWeight = max( pow( dirDotNormalHalf, shininess ), 0.0 );
#ifdef PHYSICALLY_BASED_SHADING
vec3 schlick = specular + vec3( 1.0 - specular ) * pow( dot( dirVector, dirHalfVector ), 5.0 );
dirSpecular += schlick * directionalLightColor[ i ] * dirSpecularWeight * dirDiffuseWeight;
#else
dirSpecular += specular * directionalLightColor[ i ] * dirSpecularWeight * dirDiffuseWeight;
#endif
}
#endif
vec3 totalDiffuse = vec3( 0.0 );
vec3 totalSpecular = vec3( 0.0 );
#if MAX_DIR_LIGHTS > 0
totalDiffuse += dirDiffuse;
totalSpecular += dirSpecular;
#endif
#if MAX_POINT_LIGHTS > 0
totalDiffuse += pointDiffuse;
totalSpecular += pointSpecular;
#endif
#ifdef METAL
gl_FragColor.xyz = gl_FragColor.xyz * ( totalDiffuse + ambientLightColor * ambient + totalSpecular );
#else
gl_FragColor.xyz = gl_FragColor.xyz * ( totalDiffuse + ambientLightColor * ambient ) + totalSpecular;
#endif
#ifdef USE_LIGHTMAP
gl_FragColor = gl_FragColor * texture2D( lightMap, vUv2 );
#endif
#ifdef USE_COLOR
gl_FragColor = gl_FragColor * vec4( vColor, opacity );
#endif
#ifdef USE_ENVMAP
#ifdef DOUBLE_SIDED
float flipNormal = ( -1.0 + 2.0 * float( gl_FrontFacing ) );
vec4 cubeColor = textureCube( envMap, flipNormal * vec3( flipEnvMap * vReflect.x, vReflect.yz ) );
#else
vec4 cubeColor = textureCube( envMap, vec3( flipEnvMap * vReflect.x, vReflect.yz ) );
#endif
#ifdef GAMMA_INPUT
cubeColor.xyz *= cubeColor.xyz;
#endif
if ( combine == 1 ) {
gl_FragColor.xyz = mix( gl_FragColor.xyz, cubeColor.xyz, reflectivity );
} else {
gl_FragColor.xyz = gl_FragColor.xyz * cubeColor.xyz;
}
#endif
#ifdef USE_SHADOWMAP
#ifdef SHADOWMAP_DEBUG
vec3 frustumColors[3];
frustumColors[0] = vec3( 1.0, 0.5, 0.0 );
frustumColors[1] = vec3( 0.0, 1.0, 0.8 );
frustumColors[2] = vec3( 0.0, 0.5, 1.0 );
#endif
#ifdef SHADOWMAP_CASCADE
int inFrustumCount = 0;
#endif
float fDepth;
vec3 shadowColor = vec3( 1.0 );
for( int i = 0; i < MAX_SHADOWS; i ++ ) {
vec3 shadowCoord = vShadowCoord[ i ].xyz / vShadowCoord[ i ].w;
bvec4 inFrustumVec = bvec4 ( shadowCoord.x >= 0.0, shadowCoord.x <= 1.0, shadowCoord.y >= 0.0, shadowCoord.y <= 1.0 );
bool inFrustum = all( inFrustumVec );
#ifdef SHADOWMAP_CASCADE
inFrustumCount += int( inFrustum );
bvec3 frustumTestVec = bvec3( inFrustum, inFrustumCount == 1, shadowCoord.z <= 1.0 );
#else
bvec2 frustumTestVec = bvec2( inFrustum, shadowCoord.z <= 1.0 );
#endif
bool frustumTest = all( frustumTestVec );
if ( frustumTest ) {
shadowCoord.z += shadowBias[ i ];
#ifdef SHADOWMAP_SOFT
float shadow = 0.0;
const float shadowDelta = 1.0 / 9.0;
float xPixelOffset = 1.0 / shadowMapSize[ i ].x;
float yPixelOffset = 1.0 / shadowMapSize[ i ].y;
float dx0 = -1.25 * xPixelOffset;
float dy0 = -1.25 * yPixelOffset;
float dx1 = 1.25 * xPixelOffset;
float dy1 = 1.25 * yPixelOffset;
fDepth = unpackDepth( texture2D( shadowMap[ i ], shadowCoord.xy + vec2( dx0, dy0 ) ) );
if ( fDepth < shadowCoord.z ) shadow += shadowDelta;
fDepth = unpackDepth( texture2D( shadowMap[ i ], shadowCoord.xy + vec2( 0.0, dy0 ) ) );
if ( fDepth < shadowCoord.z ) shadow += shadowDelta;
fDepth = unpackDepth( texture2D( shadowMap[ i ], shadowCoord.xy + vec2( dx1, dy0 ) ) );
if ( fDepth < shadowCoord.z ) shadow += shadowDelta;
fDepth = unpackDepth( texture2D( shadowMap[ i ], shadowCoord.xy + vec2( dx0, 0.0 ) ) );
if ( fDepth < shadowCoord.z ) shadow += shadowDelta;
fDepth = unpackDepth( texture2D( shadowMap[ i ], shadowCoord.xy ) );
if ( fDepth < shadowCoord.z ) shadow += shadowDelta;
fDepth = unpackDepth( texture2D( shadowMap[ i ], shadowCoord.xy + vec2( dx1, 0.0 ) ) );
if ( fDepth < shadowCoord.z ) shadow += shadowDelta;
fDepth = unpackDepth( texture2D( shadowMap[ i ], shadowCoord.xy + vec2( dx0, dy1 ) ) );
if ( fDepth < shadowCoord.z ) shadow += shadowDelta;
fDepth = unpackDepth( texture2D( shadowMap[ i ], shadowCoord.xy + vec2( 0.0, dy1 ) ) );
if ( fDepth < shadowCoord.z ) shadow += shadowDelta;
fDepth = unpackDepth( texture2D( shadowMap[ i ], shadowCoord.xy + vec2( dx1, dy1 ) ) );
if ( fDepth < shadowCoord.z ) shadow += shadowDelta;
shadowColor = shadowColor * vec3( ( 1.0 - shadowDarkness[ i ] * shadow ) );
#else
vec4 rgbaDepth = texture2D( shadowMap[ i ], shadowCoord.xy );
float fDepth = unpackDepth( rgbaDepth );
if ( fDepth < shadowCoord.z )
shadowColor = shadowColor * vec3( 1.0 - shadowDarkness[ i ] );
#endif
}
#ifdef SHADOWMAP_DEBUG
#ifdef SHADOWMAP_CASCADE
if ( inFrustum && inFrustumCount == 1 ) gl_FragColor.xyz *= frustumColors[ i ];
#else
if ( inFrustum ) gl_FragColor.xyz *= frustumColors[ i ];
#endif
#endif
}
#ifdef GAMMA_OUTPUT
shadowColor *= shadowColor;
#endif
gl_FragColor.xyz = gl_FragColor.xyz * shadowColor;
#endif
#ifdef GAMMA_OUTPUT
gl_FragColor.xyz = sqrt( gl_FragColor.xyz );
#endif
#ifdef USE_FOG
float depth = gl_FragCoord.z / gl_FragCoord.w;
#ifdef FOG_EXP2
const float LOG2 = 1.442695;
float fogFactor = exp2( - fogDensity * fogDensity * depth * depth * LOG2 );
fogFactor = 1.0 - clamp( fogFactor, 0.0, 1.0 );
#else
float fogFactor = smoothstep( fogNear, fogFar, depth );
#endif
gl_FragColor = mix( gl_FragColor, vec4( fogColor, gl_FragColor.w ), fogFactor );
#endif
} @ http://troisd.openplm.org/media/js/3D/three-min.js:267
[11:10:55,730] Could not initialise shader
VALIDATE_STATUS: false, gl error [1281] @ http://troisd.openplm.org/media/js/3D/three-min.js:355

Change History

comment:1 Changed 7 years ago by pjoulaud

  • Description modified (diff)

comment:2 Changed 7 years ago by pcosquer

  • Component changed from models & controllers to media

comment:3 Changed 7 years ago by pcosquer

  • Keywords webgl added
  • Status changed from new to closed
  • Version set to 1.1
  • Resolution set to wontfix

Hi,

It seems the graphic card does not fully support WebGL.
If WebGL has been forced, it is possible that the 3D view does not work and I can not do
anything to fix it.

I'm closing this bug. If it still occurs and WebGL is not forced, I will spent more time on this bug.

Regards,
Pierre

Note: See TracTickets for help on using tickets.