I get the same black window with particles thing when I webstart it.
I uploaded a new jar that is almost half size of the previous one, and put the source in a nice package…
Still have no clue why it would work on some systems and not the others…
I’m sure most of you know the problems relating to JWS cache, but here’s my five cents…
Please try to delete your JWS cache completely, I mean on the filelevel, not through Java Plugin which can be accessed from the control panel, at least I had still problems with JWS even if I disabled caching completely, JWS was still using old jars for some reason.
In short, here’s the directory that I clean up first if I have problems with JWS:
C:\Documents and Settings\Jani Laakso.javaws\cache*
This ensure me that I’m always using the latest versions.
Cheers, Jani!
I tried deleting the cache, but it’s still the same problem.
I’m running it from source now and I’m still getting the black screen. I’ve double-checked that it’s finding the data files (and it is finding them properly) so i’m still not sure what’s causing the problem yet. I’ll get back to it tonight when i get home (my work comp has an embedded intel gfx chip :-/ ).
Ummm I dunno exactly what’s standing behind the bug you’re pointing out, but I tried a new method in loading the meshes, give it a run now and tell me what comes.
I aslo introduced 50 % more performance by tweaking my loader.
Finally I cleaned up my main frame a bit, few should enjoy it more now
Get the source, it’s worth the download
“New” demo up and running.
Now the application runs at ~ 1500 fps while the model in is MOTION…
It is still not fully optimized but I’m working on it
blank gray screen, saw the various loading this and that red text on black screen then having selected a window size an empty grey screen is displayed
In you links to get source what else is needed…your implementation of the xith lib? any other mods?..for example some of the texture coordinate methods claimed not to be implemented when I tried your source yeseterday using a 64MB DDR NVidia GeForce4 MX 420
The phong, ppl vs and celshading vs won’t work on your card since not only it supports two texture units whereas normally I need one more, but also it doesn’t live up DX8.0 specifications meaning no support for either PS and VS…
Now the quake 3 demo should run smooth as baby’s butt seing that a lot of people who tried it had it working flawlessly on their machines.
Other point is, my Xith3d.jar has been modified and imporved to support new features
@JCD: At first: you are really doing a great job!
Nevertheless I do have a question regarding your minimum requirements for Phong Lighting. As far as I understand it it should require DirectX 8 features. Sadly though claiming to fullfill that my Gforce3 simply shows the same black background with only the red particles being visible - saying that something is not supported. Any hints?
PS: Full error text:
Error String line 1, column 1: error: program type not supported on this hardware
PS2: Had the chance to crosscheck it on a Radeon 9000 (ATI claims it would be DirectX 8.1 compatible).: This time it says:
Error String:line66: too many total instructions
Hmmm that’s strange…
This is what graphic cards other people who’s got it to work had:
Radeon 9600
Radeon 9700 Pro
GeForce FX Go5650
I have no clue on why your Geforce 3 doesn’t load it up properly…
How about the Quake 3 demo? Any luck on that side?
PS: I do indeed run a little check to see if the current hardware supports the required extensions:
public static void setShaderProgramState(GL gl, ShaderProgram shaderProgram, CanvasPeer canvas){
if(!checkedOnce){
checkedOnce = true;
String extensions = gl.glGetString(gl.GL_EXTENSIONS);
if(extensions.indexOf("GL_ARB_vertex_program") !=-1)
ARB_shader_programs_supported = true;
if(!ARB_shader_programs_supported)
javax.swing.JOptionPane.showMessageDialog(null,"No Vertex/Fragment shaders support, skipping",
"Error",
javax.swing.JOptionPane.ERROR_MESSAGE);
}
if(ARB_shader_programs_supported){
SHADER_PROGRAM_TYPE = shaderProgram.getShaderProgramType();
gl.glEnable(SHADER_PROGRAM_TYPE);
}
else
return;
if( shaderProgram == null ||
!shaderProgram.isEnabled() ||
shaderProgram.getShaderCode() == null){
gl.glDisable(SHADER_PROGRAM_TYPE);
return;
}
bindShaderProgram(gl, shaderProgram, canvas);
}
/me feels miserable :-/
Ahhhhhhhhh damn now I get it:
The Radeon 8500 supports up to 22 shading instructions whereas the Geforce 3 can only get up to 12!!!
On the other hand, Geforce Fx and Radeon 9x00 (where x > 2) do support over 65356 instructions at once.
A quick look at my phong shader
!!ARBfp1.0
#**********************************************************************#
#Authors:Matthew Williams "NitroGL" #
# Abdul Bezrati "Java Cool Dude" #
# Phong lighting via I=Ka+Base*(Kd*Falloff*(N.L))+(Ks*Gloss*(R.L)^n) #
#**********************************************************************#
# Light parameters
PARAM specularColor = state.light[0].specular;
PARAM ambientColor = state.material.ambient;
PARAM diffuseColor = state.material.diffuse;
PARAM shininess = state.material.shininess;
TEMP textureBase, normalVector, lightVector;
TEMP reflectionVector, viewVector;
TEMP NdotL, RdotL, Falloff, temp, textureGloss;
TEX textureBase , fragment.texcoord[0], texture[0], 2D;
TEX normalVector, fragment.texcoord[0], texture[1], 2D;
TEX textureGloss, fragment.texcoord[0], texture[2], 2D;
MAD normalVector , normalVector , 2.0, -1.0;
DP3 normalVector.w, normalVector , normalVector;
RSQ normalVector.w, normalVector.w;
MUL normalVector , normalVector , normalVector.w;
MOV lightVector, fragment.texcoord[1];
MUL Falloff, lightVector, state.light[0].attenuation.z;
DP3 Falloff, Falloff, Falloff;
SUB_SAT Falloff, 1.0, Falloff;
DP3 lightVector.w, lightVector, lightVector;
RSQ lightVector.w, lightVector.w;
MUL lightVector, lightVector, lightVector.w;
MOV viewVector, fragment.texcoord[2];
DP3 viewVector.w, viewVector, viewVector;
RSQ viewVector.w, viewVector.w;
MUL viewVector, viewVector, viewVector.w;
DP3 reflectionVector, normalVector, viewVector;
ADD reflectionVector, reflectionVector, reflectionVector;
MAD reflectionVector, reflectionVector, normalVector, -viewVector;
DP3 reflectionVector.w, reflectionVector, reflectionVector;
RSQ reflectionVector.w, reflectionVector.w;
MUL reflectionVector, reflectionVector, reflectionVector.w;
DP3_SAT RdotL, reflectionVector, lightVector;
POW RdotL, RdotL.x, shininess.x;
MUL RdotL, textureBase.a, RdotL;
MUL RdotL, specularColor, RdotL;
MUL RdotL, RdotL, textureGloss;
DP3_SAT NdotL, normalVector, lightVector;
MUL NdotL, Falloff, NdotL;
MUL RdotL, NdotL, RdotL;
MUL NdotL, diffuseColor , NdotL;
ADD textureBase, ambientColor, textureBase;
MAD result.color.rgb, textureBase, NdotL, RdotL;
END
Reveals far more instructions than what it is supported by your current hardware.
Sorry about that
@JCD: Do not worry! You are just facing a point where no one has gone before (as far as i know). Maybe there is something to tweak which would be fine - but if not we all may be able to find out which card supports which feature - or not.
PS: Your quake md3 demo works for me
Thanks for making it work with Xith3D and sharing your knowledge!
There is no way I can tweak that phong shading code any better, as a matter of fact, I spent a lot of time on it with a friend and I think I managed to create the best to do it… But again I’m no John Carmack or anything like that (the only thing I’ve got in common with him is the long hair… ::))
I’m glad to hear that my md3 demo works on your side, however I’d love to see you guys post something like the email that I received today:
Well that is something I cannot mail (need some newer hardware …)
Following demos do work on my GForce 3 (Java 1.4.2_03):
- Basic Framework (okay, no demo, but the right start
)
- Particles Generator
- Nehe’s Cel-Shading Tutorial
- Cloth Simulation
- Flag Simulation
- PerPixel Lighting
- Nehe’s Cel-Shading Tutorial (Vertex Shaders Accelerated)
- PerPixel Lighting (Vertex Shaders Accelerated)
- Quake III model loader and animator
Sadly water demo still crashes right after starting …
And as we found out before Phong Lighting partly works (i.e. the particles are visible)…
Maybe it would be a good idea to list supported cards?
The Q3 model demo is all pink (like the cloth demo) on my Mac.
I think it’s about time you updated your graphic card divers swpalmer, or ditch that mac and get a Win computer ;D…Ok don’t shoot I’ll stop the joking ;D
@Stefan2d: Thanks for the feedback man, that’s greatly appreciated (maybe machine config and fps numbers can be posted sometime )
The water demo runs on some PCs and crashes on some others, it’s up to JOGL guys to look into the TexCoordGen SPHERE_MAP and fix it…
Well it’s an athlon running at 2 Ghz. Sadly I had vertical sync on for open gl therefore 60 fps would not be quite related to your question - only thing to say at the moment is that your demos consume damn less cpu time
PS. Okay - wanted to see some numbers before going to sleep 8) - ran in windowed mode
-
Nehe’s Cel-Shading Tutorial (Vertex Shaders Accelerated)
600 fps (640x480x32)
440 fps (800x600x32)
300 fps (1024x768x32) -
md3:
118 fps (640x480x32)
118 fps (800x600x32)
116 fps (1024x768x32)
does not depend on resolution here … stopping animation will result in a large speed gain: reaches 380 - roughly 200% faster- maybe there is something to be tuned?
I also noticed that the fps stay constant even when moving the model far out shortly before it vanishes. Maybe LOD would be a nice feature for the future
Glad you found the reason for it not working JCD! I suppose it’s almost time i upgraded that card
The info you’re looking to gather:
WinXP, AMD 2500XP+, ATI 8500DV 64MB
Ran the demo’s at 800x600:
Particle Gen (100 particleS) ~760FPS
NeHe’s Cel-Shading ~95FPS
Cloth Sim ~280FPS
Flag Sim ~295
Water Sim ~240FPS
PerPixel Lighting ~370FPS
NeHe’s Cel-Shading VS ~290FPS
PerPixel Lighting VS ~380FPS
Phong - N/A
Quake3 Model Ldr (moving) ~485FPS
And I’ll chime in too to say that you’ve done some very cool stuff with these demos! Thumbs up mate!
[quote]I think it’s about time you updated your graphic card divers swpalmer, or ditch that mac and get a Win computer ;D…Ok don’t shoot I’ll stop the joking ;D
[/quote]
Yeah, there is a problem. They show up pinkish on all Macs. Not yet sure why. Trying to get a new release out before Monday (jogl OSX major update).
Ok I’ll post few numbers produced by my configuration which is:
AMD Athlon XP 2.1 Ghz
NForce 2 Ultra Mobo
512 DDR @ 166 Mhz
Radeon 9700 Pro ~ default clocks
All resolutions set to 640*480
Main Frame: ~3000 FPS.
Particle System, 100 particles, physics disabled, flame effect: ~1750 FPS.
NeHe’s Cel-Shading: ~1900 FPS.
Cloth Simulation: ~750 FPS.
Flag Simulation: ~750 FPS.
Water Simulation: ~750 FPS. (heh? 3 * 750 in a row?)
PerPixel Lighting: ~ 1300 FPS.
NeHe’s Cel-Shading VS: ~1850 FPS.
PerPixel Lighting VS: ~ 1350 FPS.
Phong Lighting FS & VS: ~450 FPS.
Quake 3 Loader and Animator (motion): ~1400 FPS.