Java church demo

Hey guys, Happy new year! Hope you enjoyed your holiday.

Well I pretty much spent my holiday working on this demo. I always enjoy looking at the stained glasses
in the big churches, it’s my pleasure to create these shiny colorful glasses with Java and some 3d rendering
tricks.

Here is a shot:

http://phu004.webs.com/javaChurch/Untitled.jpg

I uploaded the appleton my website:
http://phu004.webs.com/javaChurch/church.htm

Controls are simple, arrows key for changing view point, a,w,s,d for camera moment.

This demon does require a lot of cpu power, it takes 20~ 30% of the cpu resources on my E8400. For those who
interested in the source code, you can grab it at http://phu004.webs.com/java_church.zip.

Nice church!

I’m impressed that you can do that with Java2D.

pretty cool!

it looks pretty awesom from the outside cause it is like floating in the air lol.

very nice work, runs pretty nice here.

you could also try an opengl binding for java to offload the cpu usage to a graphics card. Then again that would require a signed applet, still pretty impressive work for software 3d.

You wrote whole software rendering for this? All the models are as java classes and constructed by mathematical functions? This must be the 10th time someone reinvents the bicycle. It looks good and runs fine on my pc from year 2004, but just imagine if all models,animations in games were constructed with code, 3 year development time switch 30 years.

[quote]you could also try an opengl binding for java to offload the cpu usage to a graphics card.
[/quote]
I feel that software rendering gives me the flexibility to create new interesting effect, while relying on opengl binding i have to stick with its fixed pixel functions.
And I have deal with whole bunch of other hassles too such as driver issues. With moredern CPU power faster than ever I think there is plenty of room for software
rendering.

[quote]You wrote whole software rendering for this?
[/quote]
Well i created this rendering system a few years ago, and i made couple of other applets with it, check out my older posts :slight_smile:

[quote]but just imagine if all models,animations in games were constructed with code, 3 year development time switch 30 years.
[/quote]
I agree. All i do is keeping all models simple, but its till a pain in the butt.

I like the translucent distortion of the glass. Very pretty. How does that work? Chews rather heavily on my CPU though.

[quote]I like the translucent distortion of the glass. Very pretty. How does that work? Chews rather heavily on my CPU though.
[/quote]
Thanks for trying out. For each of my translucent texture there is a distortion texture associate with it,(essentially it’s just the black/white version of the orginal texture).
The gradient at each point is used to displace pixels from the back ground image.

It does take a lot of cpu resource since its pre pixeld operation, especially when you look directly into the chandelier.

How to create these assets?

How to create these assets?