|
|||||||
| Programming, Coding, (Web)Design Discuss all your programming or design needs with likeminded people. |
![]() |
|
|
Thread Tools |
|
|
#1 |
|
Java programmer
Join Date: May 2002
Location: Massachusetts
Posts: 125
Rep Power: 0 ![]() |
First you guys should download the JRE 1.4.2 as it boosts Java overall speed.
You can grab it here; it really got me thinking again about java performance. Now 2D bump map appreciation time: I coded this applet not that long ago, yet I still feel like there is something missing. I can't put my hand on it as of yet, so let me collect your opinions and thoughts. bumpmapping To stop the light from tracking the cursor, just press the mouse left button and drag it out the applet. Side note; this is how I compute per-pixel normals Code:
public vec3f normalAtVertex(point3f cen,point3f p1,point3f p2,
point3f p3 ,point3f p4,point3f p5,
point3f p6)
{
/****************
* p1 p6 *
* o---o *
* p2/ | / | *
* o -cen- o *
* | / | / p5 *
* o---o *
* p3 p4 *
****************/
vec1 = new vec3f(p1.x-cen.x, p1.y-cen.y, p1.z-cen.z);
vec2 = new vec3f(p2.x-cen.x, p2.y-cen.y, p2.z-cen.z);
vec3 = new vec3f(p3.x-cen.x, p3.y-cen.y, p3.z-cen.z);
vec4 = new vec3f(p4.x-cen.x, p4.y-cen.y, p4.z-cen.z);
vec5 = new vec3f(p5.x-cen.x, p5.y-cen.y, p5.z-cen.z);
vec6 = new vec3f(p6.x-cen.x, p6.y-cen.y, p6.z-cen.z);
nor1.cross(vec1,vec2);
nor2.cross(vec2,vec3);
nor3.cross(vec3,vec4);
nor4.cross(vec4,vec5);
nor5.cross(vec5,vec6);
nor6.cross(vec6,vec1);
vertexNormal = (inWards) ? new vec3f(-(nor1.x + nor2.x + nor3.x + nor4.x + nor5.x + nor6.x),
-(nor1.y + nor2.y + nor3.y + nor4.y + nor5.y + nor6.y),
-(nor1.z + nor2.z + nor3.z + nor4.z + nor5.z + nor6.z))
: new vec3f( nor1.x + nor2.x + nor3.x + nor4.x + nor5.x + nor6.x,
nor1.y + nor2.y + nor3.y + nor4.y + nor5.y + nor6.y,
nor1.z + nor2.z + nor3.z + nor4.z + nor5.z + nor6.z);
vertexNormal.normalize();
return vertexNormal;
}
|
|
|
|
|
|
#2 |
|
A Legend in Underwear
Join Date: May 2002
Location: Unknown
Posts: 5,255
Rep Power: 0 ![]() |
Crashed
load: class bump_map.class not found.
java.lang.ClassNotFoundException: bump_map.class I'm using BlackDown JRE 1.4.1 for Linux (pretty much the same as Suns JRE 1.4.1)
__________________
Gentoo Linux - Developer (baselayout) Read my blog "I contend that we are both atheists. I just believe in one fewer god than you do. When you understand why you dismiss all the other possible gods, you will understand why I dismiss yours." Stephen Roberts |
|
|
|
|
|
|
|
|
Java programmer
Join Date: May 2002
Location: Massachusetts
Posts: 125
Rep Power: 0 ![]() |
Re: Crashed
Quote:
Still using the 1.4.1 should allow the applet to run. /me back coding. PS: I use SDK 1.4.2 to produce my demos |
|
|
|
|
|
|
#4 |
|
A Legend in Underwear
Join Date: May 2002
Location: Unknown
Posts: 5,255
Rep Power: 0 ![]() |
Erm - isn't 1.4.2 still in beta?
__________________
Gentoo Linux - Developer (baselayout) Read my blog "I contend that we are both atheists. I just believe in one fewer god than you do. When you understand why you dismiss all the other possible gods, you will understand why I dismiss yours." Stephen Roberts |
|
|
|
|
|
|
|
|
Java programmer
Join Date: May 2002
Location: Massachusetts
Posts: 125
Rep Power: 0 ![]() |
Quote:
|
|
|
|
|
|
|
#6 |
|
A Legend in Underwear
Join Date: May 2002
Location: Unknown
Posts: 5,255
Rep Power: 0 ![]() |
Crashed out with the same error using Sun's 1.4.2 beta for linux
__________________
Gentoo Linux - Developer (baselayout) Read my blog "I contend that we are both atheists. I just believe in one fewer god than you do. When you understand why you dismiss all the other possible gods, you will understand why I dismiss yours." Stephen Roberts |
|
|
|
|
|
|
|
Java programmer
Join Date: May 2002
Location: Massachusetts
Posts: 125
Rep Power: 0 ![]() |
Umm I don't see why would it do that
Btw for those who got it to work, what fps do yo uget at default settings? On my Athlon 1.35 384 DDR I get around 22-23fps that sinks down 17-19 when radius is maximized. |
|
|
|
|
|
#8 |
|
Wolfish Bastard
Join Date: May 2002
Location: Cave; Ozark Mountains
Posts: 2,110
Rep Power: 0 ![]()
|
nifty effects... with the default settings I get 38 - 40 fps... maxed out.. I get about 30 - 33 fps I hope that is of some help.
|
|
|
|
|
|
#9 |
|
A Legend in Underwear
Join Date: May 2002
Location: Unknown
Posts: 5,255
Rep Power: 0 ![]() |
Same error on my XP box at work using 1.4.2 beta
here's the full error text incase it means something to you Code:
java.lang.ClassNotFoundException: bump_map.class at sun.applet.AppletClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.applet.AppletClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.applet.AppletClassLoader.loadCode(Unknown Source) at sun.applet.AppletPanel.createApplet(Unknown Source) at sun.plugin.AppletViewer.createApplet(Unknown Source) at sun.applet.AppletPanel.runLoader(Unknown Source) at sun.applet.AppletPanel.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: java.io.IOException: open HTTP connection failed. at sun.applet.AppletClassLoader.getBytes(Unknown Source) at sun.applet.AppletClassLoader.access$100(Unknown Source) at sun.applet.AppletClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) ... 10 more
__________________
Gentoo Linux - Developer (baselayout) Read my blog "I contend that we are both atheists. I just believe in one fewer god than you do. When you understand why you dismiss all the other possible gods, you will understand why I dismiss yours." Stephen Roberts |
|
|
|
|
|
#10 |
|
A Legend in Underwear
Join Date: May 2002
Location: Unknown
Posts: 5,255
Rep Power: 0 ![]() |
Update - it works fine in IE but not Mozilla. Can you try it using Mozilla and see what the problem is?
__________________
Gentoo Linux - Developer (baselayout) Read my blog "I contend that we are both atheists. I just believe in one fewer god than you do. When you understand why you dismiss all the other possible gods, you will understand why I dismiss yours." Stephen Roberts |
|
|
|
![]() |
| Thread Tools | |
|
|