This site requires JavaScript, please enable it in your browser!
Greenfoot back

Comments for 3D Renderer

Return to 3D Renderer

-nic--nic-

2013/3/9

this is a really good 3d example, but you say raycasting is not used in games what kind of 3d rendering is used in games?
DutaDuta

2013/3/9

Scanline (or rasterization) rendering.
-nic--nic-

2013/3/9

Thanks
A new version of this scenario was uploaded on Sun Mar 10 01:01:33 UTC 2013 Now with source code! (Forgot to click the "Publish with source code" button earlier) It's got comments in if anyone wants to have a look.
A new version of this scenario was uploaded on Sun Mar 10 02:25:14 UTC 2013 Changed the example scene.
A new version of this scenario was uploaded on Sun Mar 10 02:25:30 UTC 2013 Changed the example scene.
You should let us change the camera angle so we can really experience the 3D effect.
darkmist255darkmist255

2013/3/11

Great work!
SPowerSPower

2013/3/11

'this uses a technique called "raycasting" (or "raytracing")' These are totally different things, raytracing is simulating rays going out of the camera and hitting things, being bent by glass, etc. Raycasting is also simulating rays, but they just stop when they hit something and the rays are casted in a 2 dimensional world. I hope this made it a bit clearer. And also, great work!
SPowerSPower

2013/3/11

And raytracing is what you're doing here :)
davmacdavmac

2013/3/11

"Raycasting is also simulating rays, but they just stop when they hit something and the rays are casted in a 2 dimensional world." Not correct; raycasting is usually used in a 3D world. Both ray tracing and ray casting map a view of a 3d world to a 2D surface (the screen).
-nic--nic-

2013/3/11

this is very interesting :)
SPowerSPower

2013/3/11

@davmac Do you mean the same as I do? http://qt-project.org/doc/qt-4.8/images/raycasting-demo.png is what I think of raycasting, where this is the map: http://sinepost.files.wordpress.com/2012/06/raycasting-map.png?w=540 Three tutorials: http://www.permadi.com/tutorial/raycast/ http://lodev.org/cgtutor/raycasting.html http://sinepost.wordpress.com/2012/06/16/raycasting/
davmacdavmac

2013/3/12

Spower, the picture you have is a raycast projection of a 2D world, yes, but you can use raycasting for 3D worlds as well. The difference as I understand it is whether reflections and light sources are taken into account. See the wikipedia entry: http://en.wikipedia.org/wiki/Raycasting
MatheMagicianMatheMagician

2013/3/12

This also concurs with davmac: http://www.gamedev.net/topic/431216-difference-between-ray-casting-and-ray-tracing/
SPowerSPower

2013/3/12

Ok, I understand it now. Thanks for the lesson, davmac!
MatheMagicianMatheMagician

2013/3/12

As a suggestion for speed Duta, you could make the screen smaller like in BuilderBoy's scenarios.
DutaDuta

2013/3/12

I could do, MatheMagician, but this is intended to be an example of the images that can be rendered with even simple "ray" + (new Random().nextBoolean() ? "tracing" : "casting"). And, as I attempted to explain in the description, this is never intended to be real-time. My internet had gone down and so I was bored. Hence I decided to spend a couple hours making this. I'll probably improve it at some point though..