Lightmap demo

Traditionally people add colors of lightmaps and the textures at run time. I think it is expensive in java, because you have to first convert binary color data to RGB, then convert them back after the addtion. There is no convient way to add binary color structure. In my demo, I precalculated lightmaps for each polygon . The disadvantage is that it consumes more memory, since all polygons now have their unique textures. But it looks pretty cool :slight_smile:

here is a screen shot:

http://www.freewebs.com/phu004/screenshot.jpg

here is where you can grab the demo: (copy the url and paste it to your address bar, otherwise it won’t work.)

http://www.freewebs.com/phu004/bedroom.zip

Click the link bellow to run it:
http://www.freewebs.com/phu004/bedroom/Bedroom.html

This demo is a java applet, double click bedroom.html to run it.
press"awsd" keys to move around, and press arrow keys to rotate camera.

Tell me your average FPS if you run my demo successfully.

Regards

First off, the link is bad.
If you copy the text it works, but the href is wrong.

Second, no shadows, unless I didn’t turn them on or i don’t understand the demo :slight_smile:

FPS = ~10
The renderer does look decent, what model format are you using? May we can get you some sexier test models.

to shawnkendall,

Sorry I dont know the link isn’t working, I insert the link between two url tags, but when you click on it, it just redirect you to the page you are reading.
I have added some comments that tells other people to right click the link and choose save target as.

In my demo, I only cast shadows to 2 polygons, which are the floor and the desktop, I could add more shadows without affacting the frame rate since they are precalculated, but I was too lazy to do that. I hardcode all the vertix information of each models within my source codes, there was quite a bit of work involved.

that’s not the forum, that’s actually freewebs. they’re performing a technique called “hotlink protection” (which is why it works if you enter the URL in the address bar manually)

looks good. have 15fps @130polys.

2,6GHz P4 HT, 1GB RAM, GF4 TI 4200 and some progs opened here at work :wink:

I have done some optimization to the code, such as converting some division into multiplication. I had about 7fps improvment over the last version I put on the web.

Great, now I got ~21 :slight_smile: Still many background apps running so there would be 2 fps more without them :wink:
Great work though.

Great, now I got ~21 Still many background apps running so there would be 2 fps more without them
Great work though.

Thanks for the information. I am sure there are still optimization technique I can use to make my program run faster. I will use power of 2 textures instead of textures with random size for next demo.

Great work, I got ~30 fps and look ok, but some lines ‘shake’.