11-08-2003, 01:31 PM
The mistake was to probe cubes, thus leading to 960000 polygons for the 4th rank.
The right method, I hope, is to probe a shape composed of, if we take the example of rank 1:
1) One side of the main cube (let's call it "A"), i.e. 8 possible sub-squares, the 9th corresponding to the hole in the middle
2) The 20 inside squares that can be visibe inside the "tunnels" if the ray crosses the reference square in the hole.
Then the probing will tell which sub-square, let's call it "B", is hit by the ray. The process is iterated with this new square, which has n its turn 28 sub-squares.
So, instead of probing 960000 squares per pixel, the program will probe only 6 main cube sides (to init the recursive loop)+ 4*28 sub-sides (4th rank example) = 118 cubes !
Consequences:
1) The prog will be much faster, at least by 6000 or 7000 times
2) I can re-include the reflection and shadow raycasting
3) I can increase the size of the pic
4) I can set a much larger maximum rank
So I should, when it's done, be able to have a better pic than Paul Bourke's, which is a black&white picture without texture: and this future picture will be done with QB :bounce:
The right method, I hope, is to probe a shape composed of, if we take the example of rank 1:
1) One side of the main cube (let's call it "A"), i.e. 8 possible sub-squares, the 9th corresponding to the hole in the middle
2) The 20 inside squares that can be visibe inside the "tunnels" if the ray crosses the reference square in the hole.
Then the probing will tell which sub-square, let's call it "B", is hit by the ray. The process is iterated with this new square, which has n its turn 28 sub-squares.
So, instead of probing 960000 squares per pixel, the program will probe only 6 main cube sides (to init the recursive loop)+ 4*28 sub-sides (4th rank example) = 118 cubes !
Consequences:
1) The prog will be much faster, at least by 6000 or 7000 times
2) I can re-include the reflection and shadow raycasting
3) I can increase the size of the pic
4) I can set a much larger maximum rank
So I should, when it's done, be able to have a better pic than Paul Bourke's, which is a black&white picture without texture: and this future picture will be done with QB :bounce:
hink Global, Make Symp' All ! ®