General > German corner

Probleme mit eigenem Shader

<< < (2/3) > >>

Gidy:
Danke für den Tipp...ich hab die Revision mit dem fehler gefunden den ich Commitet habe.

Aktuelle Revision:

--- Code: ---Center:(0.0,0.0,0.0)
TransfromdCenter:(0.0,0.0,0.0)
WorldTransformation:(
1.0 0.0 0.0 0.0
0.0 1.0 0.0 0.0
0.0 0.0 1.0 0.0
0.0 0.0 0.0 1.0
)
--- End code ---

Gleiche Datei bei einer Revision von vor 2 Tagen:

--- Code: ---Center:(0.0,0.0,25.0)
TransfromdCenter: (0.0,0.0,25.0)
WorldTransformation: (
1.0 0.0 0.0 0.0
0.0 1.0 0.0 0.0
0.0 0.0 1.0 0.0
0.0 0.0 0.0 1.0
)

--- End code ---

und der unterschied war....ich hate object3D.build() auskommentiert :-/ Gott sei dank gibts eine Versionskontrolle :-D

Gidy:
Rein der Vollständigkeits halber mein fertiger Shader, falls jemand mal was ähnliches benötigt.

Fragment-Shader:

--- Code: ---uniform vec3 colors[6];
varying vec3 normalized_normal;
varying vec3 normalized_vertex_to_light_vector;
void main()
{
float intensity =  degrees(asin(dot(normalized_normal, normalized_vertex_to_light_vector)))/90.0;
float x=float(colors.length-1)*intensity;

int color1ID=int(x);
int color2ID=color1ID+1;
float factor=fract(x);
vec3  c0=colors[color1ID];
vec3  c1=colors[color2ID];
float temp=0.0;

gl_FragColor=vec4(mix(c0,c1,temp),1.0);

}

--- End code ---

Vertex-Shader:

--- Code: ---varying vec3 normalized_normal;
varying vec3 normalized_vertex_to_light_vector;
void main()
{
    // Transforming The Vertex
    gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
 
    // Transforming The Normal To ModelView-Space
    vec3 normal = gl_NormalMatrix * gl_Normal;
 
    // Transforming The Vertex Position To ModelView-Space
    vec4 vertex_in_modelview_space = gl_ModelViewMatrix * gl_Vertex;
 
    // Calculating The Vector From The Vertex Position To The Light Position
   vec3 vertex_to_light_vector = vec3(gl_LightSource[0].position-vertex_in_modelview_space);
   
    // Scaling The Input Vector To Length 1
    normalized_normal = normalize(normal);
    normalized_vertex_to_light_vector = normalize(vertex_to_light_vector);
 
 }
--- End code ---

Gidy:
Ich arbeite noch immer an der Software und plötzlich erhalte ich diesen Fehler. Dieser tritt bei großen Objekten auf, aber auch nicht immer (ca. 75%). Kleine Objekte gehen ohne Probleme.
Sobald ich das Objekt nichtmehr compilire oder
Config.setParameterValue("useNormalsFromOBJ", false) mache, tritt der Fehler nicht mehr auf. Mit deaktivirtem Shader tritt der Fehler auch auf :-/ Ich weiß nichtmehr weiter. (getestet auf zwei Systemen)


--- Code: ---#
# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x000000006fcc89a0, pid=7564, tid=8688
#
# JRE version: 7.0_25-b16
# Java VM: Java HotSpot(TM) 64-Bit Server VM (23.25-b01 mixed mode windows-amd64 compressed oops)
# Problematic frame:
# C  [nvoglv64.DLL+0xac89a0]  DrvPresentBuffers+0xcd540
#
# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
#
# An error report file with more information is saved as:
# F:\Users\userX\Dropbox\Arbeit\TestProject-JpctLWJGL\hs_err_pid7564.log
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.sun.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#

--- End code ---


--- Code: ---Driver is: nvd3dumx,nvwgf2umx,nvwgf2umx/9.18.13.2049 on NVIDIA Corporation / GeForce GT 555M/PCIe/SSE2
GL_ARB_texture_env_combine supported and used!
FBO supported and used!
VBO supported and used!
OpenGL renderer initialized (using 4 texture stages)
Waiting for renderer to initialize...15
Checking for triangle strip...
Not a triangle strip at position 1!
Waiting for renderer to initialize...16
Subobject of object 2/first compiled to indexed data using 7332/6971 vertices in 44ms!
Object 2/first compiled to 1 subobjects in 951ms!
Creating new world processor buffer for thread view1
Waiting for renderer to initialize...17
Driver is: nvd3dumx,nvwgf2umx,nvwgf2umx/9.18.13.2049 on NVIDIA Corporation / GeForce GT 555M/PCIe/SSE2
GL_ARB_texture_env_combine supported and used!

Shader program compiled and linked fine!
Tangent handle not found (tangents needed: false)!
Shader compiled!
VBO created for object 'first'
Compiled 1 VBO!


Shader program compiled and linked fine!
Tangent handle not found (tangents needed: false)!
Shader compiled!
Loading file F:\Users\Philipp\AppData\Local\Temp\obj4674091273484188013.obj
Text file F:\Users\Philipp\AppData\Local\Temp\obj4674091273484188013.obj loaded...7913887 bytes
Processing object from OBJ-file: reload
Object 'reload_jPCT4' created using 81920 polygons and 245760 vertices.
Checking for triangle strip...
Not a triangle strip at position 1!
Subobject of object 4/reload compiled to indexed data using 66/66 vertices in 1ms!
Checking for triangle strip...
Not a triangle strip at position 1!
Subobject of object 4/reload compiled to indexed data using 8775/8775 vertices in 3ms!
Checking for triangle strip...
Not a triangle strip at position 1!
Subobject of object 4/reload compiled to indexed data using 23997/23997 vertices in 35ms!
Checking for triangle strip...
Not a triangle strip at position 1!
Subobject of object 4/reload compiled to indexed data using 24000/24000 vertices in 36ms!
Checking for triangle strip...
Not a triangle strip at position 1!
Subobject of object 4/reload compiled to indexed data using 24000/24000 vertices in 9ms!
Checking for triangle strip...
Not a triangle strip at position 1!
Subobject of object 4/reload compiled to indexed data using 24000/24000 vertices in 8ms!
Checking for triangle strip...
Not a triangle strip at position 1!
Subobject of object 4/reload compiled to indexed data using 24000/24000 vertices in 8ms!
Checking for triangle strip...
Not a triangle strip at position 1!
Subobject of object 4/reload compiled to indexed data using 24000/24000 vertices in 10ms!
Checking for triangle strip...
Not a triangle strip at position 1!
Subobject of object 4/reload compiled to indexed data using 24000/24000 vertices in 9ms!
Checking for triangle strip...
Not a triangle strip at position 1!
Subobject of object 4/reload compiled to indexed data using 24000/24000 vertices in 9ms!
Checking for triangle strip...
Not a triangle strip at position 1!
Subobject of object 4/reload compiled to indexed data using 24000/24000 vertices in 9ms!
Checking for triangle strip...
Not a triangle strip at position 1!
Subobject of object 4/reload compiled to indexed data using 20922/20922 vertices in 7ms!
Object 4/reload compiled to 12 subobjects in 216ms!
VBO created for object 'reload'
VBO created for object 'reload'
VBO created for object 'reload'
VBO created for object 'reload'
VBO created for object 'reload'
VBO created for object 'reload'
VBO created for object 'reload'
VBO created for object 'reload'
VBO created for object 'reload'
VBO created for object 'reload'
VBO created for object 'reload'
VBO created for object 'reload'
Compiled 12 VBO!

--- End code ---

Datei mit der der Fehler auftritt: https://www.dropbox.com/s/jcuu2akivitatid/obj5045321048087547196.obj

EgonOlsen:
Ja, '*!"&"&%!###-Nvidia-Treiber mal wieder. Dabei sollen die ja sooooo toll sein. Ich gucke mir das mal an. Welche Version von jPCT ist das und wie alt ist dein Grafiktreiber?

EgonOlsen:
Aaaalso...

0. Ich kann das Problem nicht nachvollziehen, auch auf NVidia-Karten nicht (oder anders: Bei mir geht es... ;))

1. Das ist der AWTGLRenderer, oder?

2. Ich bräuchte auch den mtl-File. Ohne ist die Texturverteilung scheinbar anders und das Ding wird im Ergebnis in 11 statt wie bei dir in 12 Teile compiliert.

3. Deine Logausgabe ist komisch...und zwar dieser Teil:


--- Code: ---OpenGL renderer initialized (using 4 texture stages)
Waiting for renderer to initialize...15
Checking for triangle strip...
Not a triangle strip at position 1!
Waiting for renderer to initialize...16
Subobject of object 2/first compiled to indexed data using 7332/6971 vertices in 44ms!
Object 2/first compiled to 1 subobjects in 951ms!
Creating new world processor buffer for thread view1
Waiting for renderer to initialize...17
Driver is: nvd3dumx,nvwgf2umx,nvwgf2umx/9.18.13.2049 on NVIDIA Corporation / GeForce GT 555M/PCIe/SSE2
GL_ARB_texture_env_combine supported and used!

--- End code ---

Da sind Meldungen vom ObjectCompiler zwischen Meldungen "Waiting for renderer to initialize...XX"...das kann gar nicht sein, außer da läuft noch ein anderer Thread, der auch sowas tut. Renderst du in mehrere Fenster gleichzeitig?

4. Probier doch mal ein paar Dinge aus:


* Setze mal Config.glUseVBO=false; (ganz am Anfang)
* Setze mal Config.glBatchSize hoch oder runter (Default ist 8000, probiere mal 4000, 2000, 500, 16000, 32000...)
* Setze mal Config.nativeBufferSize hoch. Default ist 1024, probier mal Vielfache davon.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version