Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (487)
Games in Android Showcase (112)
games submitted by our members
Games in WIP (553)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Java real-time raytracing (?)  (Read 4145 times)
0 Members and 1 Guest are viewing this topic.
Offline N_I_C_S
« Posted 2012-01-20 23:47:28 »

Hello,

Today I'd like to present an idea I had several months ago :
I wanted to start a new little software rendering engine (yes, I already did JavaGL ...) When appears to me a new data structure which allows the possibility to find very fast the collision segment/mesh (no matter the number of polys).

So I applied it in a first test-applet providing simple raytracing (there are still rendering defaults) :
http://javagl.sourceforge.net/demos/JSoftRay/raydemo.html (sorry for the ridiculous screen size Grin )

The main disadvantages of this structure, as you will see, are its weight in memory and its building time, but maybe it can be a way to reach soon, with the hardware progresses, a true real-time raytracer...

If I let myself dream, I can even think about a material acceleration of this structure.

So I have 2 questions :

- How is the framerate on your machines, according to the rendered options (reflects, shadows) ?

- Do you find the enterprise pertinent enough to be developed (depends a little on the 1st question Grin ) ?

Flesh Snatcher : Java FPS
Last demo on http://fleshsnatcher.sourceforge.net/demo/
Offline version + sources on http://sourceforge.net/projects
Offline EddieRich

Senior Newbie





« Reply #1 - Posted 2012-01-21 01:21:32 »

If that is truely raytracing each frame, bravo !!!
As a math geek I've always been interested in raytracing.

I didn't see any FPS printed, but it was choppy and appeared to be about 3-4 FPS, whether shadows or reflections were on or not.
I have an old Dell Dimension @ 2.1GHz, WinXP Home Edition 2002 SP3.
I'll run at work (newer faster computer) on Monday and let you know.

Ed
Offline Miaow

Innocent Bystander





« Reply #2 - Posted 2012-01-21 02:26:06 »

The framerate is perfect, with either of the options.

I note that there is a rendering problem when both are on (a non textured triangle shape moving in the shadow).

This is definately pertinent, keep working on that, this is good work. =)

Good luck,

Miaow.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline ra4king

JGO Kernel


Medals: 345
Projects: 2
Exp: 5 years


I'm the King!


« Reply #3 - Posted 2012-01-21 06:58:08 »

Wow that's really impressive. It ran really smoothly for me with reflection and shadow on (couldn't find FPS printed anywhere either Undecided): I have an Intel Core i7 2600K with a Nvidia GeForce GTX 580. The shadow however had quite a few visual glitches that looked like a triangle was cut out of it.

Offline theagentd
« Reply #4 - Posted 2012-01-21 07:56:44 »

Wow that's really impressive. It ran really smoothly for me with reflection and shadow on (couldn't find FPS printed anywhere either Undecided): I have an Intel Core i7 2600K with a Nvidia GeForce GTX 580. The shadow however had quite a few visual glitches that looked like a triangle was cut out of it.
NO WAY! You upgraded from your GTX 470?!

Myomyomyo.
Offline ReBirth
« Reply #5 - Posted 2012-01-21 07:57:52 »

The shadow has glitches and for what I see the reflection works fine. I take a bet you set the color of FPS to white so we can't see them.

Offline ra4king

JGO Kernel


Medals: 345
Projects: 2
Exp: 5 years


I'm the King!


« Reply #6 - Posted 2012-01-21 08:14:07 »

Wow that's really impressive. It ran really smoothly for me with reflection and shadow on (couldn't find FPS printed anywhere either Undecided): I have an Intel Core i7 2600K with a Nvidia GeForce GTX 580. The shadow however had quite a few visual glitches that looked like a triangle was cut out of it.
NO WAY! You upgraded from your GTX 470?!
I upgraded from the 570 to the 580 Grin

Offline gouessej
« Reply #7 - Posted 2012-01-21 11:57:53 »

Hi

I've just tested it. I have had to refresh the page as the first time nothing appears. It is very slow even in a very small window, even when I disable the effect, I get about 2 FPS on my AMD Semprom 2600+. Ok it is just a demo but d3caster and 3DzzD in software rendering mode are faster, they are able to display much more 3D objects with a better framerate. Good luck.

Offline N_I_C_S
« Reply #8 - Posted 2012-01-21 12:52:55 »

Hey, thanks a lot for your answers !

@EddieRich
Thanks, actually it's raytracing (well, I think so...) : each pixel launches a ray and its color is multiplied by the hit meshes ones, which explains the background is white Wink . With this method it's very easy to make reflects or shadows, transparency or diffraction effects (that I'll try to implement) with the same code. Actually, there is no FPS ! I thought I couldn't display it, which was very stupid, I'll add it next time Grin . Thanks for Monday, I'm curious of the result !

@Miaow
Thanks, I note it down Smiley . You're right for the shadow, it's caused by the nd-grid (yes, N.D. are my initials...) building algo, which is not perfect yet, and btw can seriously be improved to optimize again the performances Wink . But it's geometrically more complex than I thought...

@ra4king
Thank you, I must say normally the graphic card shoudn't change the performances because, as it's software rendering, the applet only uses the brute force of the CPU Grin . Hmm, that said, maybe it shouldn't be stupid to try to use CUDA or something like that for the "trivial" calculations, like rays tranformations according to the camera or things like that...

@ReBirth
Ha ha ! No the FPS isn't displayed, Actually I'll try not to put it white (that's a stupidity I'm able to do Grin ) !

EDIT :
Hi, Julien, thanks for the test !
Ha ha, I could have bet you'd talk about 3DzzD !  Maybe keep in mind it's raytracing (I insist)... 3DzzD is a fantastic engine (I don't know d3caster) but in a way it emulates the work of a graphic card, what I try to do is closer to a project like Larrabee. Theorically that can easily do things very complex for graphic cards like diffraction, smooth shapes or realistic shadowing, with no loss of performance.

Flesh Snatcher : Java FPS
Last demo on http://fleshsnatcher.sourceforge.net/demo/
Offline version + sources on http://sourceforge.net/projects
Offline gouessej
« Reply #9 - Posted 2012-01-21 16:40:13 »

d3caster uses raycasting (raytracing but only handling the primary rays). There are some examples of hardware accelerated shader based raycasting (Julia quaternion?), maybe you should have a look at them. You could even make some computations on the GPU or on the CPU (with OpenCL) and do the rendering on the GPU too (with OpenGL of course).

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline N_I_C_S
« Reply #10 - Posted 2012-01-21 17:48:49 »

You're right, it should be very interesting to try CUDA or OpenCL, at least for some massive sequential calculations (matrix, etc...), but I don't really understand how to do the rendering with OpenGL Undecided as the result is an array of pixels (I must admit I'm a noob Grin ) . Otherwise thanks for the Julia quaternion, it's pretty fascinating ! Certainly hard to implement...

Flesh Snatcher : Java FPS
Last demo on http://fleshsnatcher.sourceforge.net/demo/
Offline version + sources on http://sourceforge.net/projects
Offline gouessej
« Reply #11 - Posted 2012-02-10 17:58:13 »

You're right, it should be very interesting to try CUDA or OpenCL, at least for some massive sequential calculations (matrix, etc...), but I don't really understand how to do the rendering with OpenGL Undecided as the result is an array of pixels (I must admit I'm a noob Grin ) . Otherwise thanks for the Julia quaternion, it's pretty fascinating ! Certainly hard to implement...
Someone spoke about an implementation of Julia 3D quaternion using JOGL and JOCL on our official forum:
http://forum.jogamp.org/Julia3d-out-of-memory-problem-td3729033.html

Martin Pernollet is kind, he might explain to you how it works.

Offline krasse
« Reply #12 - Posted 2012-02-10 22:56:55 »

The latest versions of Blender (2.61 and 2.62) have real-time raytracing (the Cycles renderer).

Looking at the source code for that might be very useful for you since they have implemented it both in software and hardware (cuda perhaps?).

Your demo is much less noisy than the Cycles version, so it is probably more useful real-time than the current version of Cycles. See for example this video and also this one.

Offline N_I_C_S
« Reply #13 - Posted 2012-03-03 00:11:38 »

@gouessej
Hmm, interesting, I'll register in your forum !

@krasse
Thanx for the information ! I'll look at it because my nd-grid has one default : it costs A LOT of memory !

Flesh Snatcher : Java FPS
Last demo on http://fleshsnatcher.sourceforge.net/demo/
Offline version + sources on http://sourceforge.net/projects
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

TehJavaDev (12 views)
2014-08-28 18:26:30

CopyableCougar4 (24 views)
2014-08-22 19:31:30

atombrot (37 views)
2014-08-19 09:29:53

Tekkerue (30 views)
2014-08-16 06:45:27

Tekkerue (29 views)
2014-08-16 06:22:17

Tekkerue (18 views)
2014-08-16 06:20:21

Tekkerue (27 views)
2014-08-16 06:12:11

Rayexar (65 views)
2014-08-11 02:49:23

BurntPizza (41 views)
2014-08-09 21:09:32

BurntPizza (33 views)
2014-08-08 02:01:56
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!