English Amiga Board

English Amiga Board (https://eab.abime.net/index.php)
-   Coders. General (https://eab.abime.net/forumdisplay.php?f=37)
-   -   Ray casting (https://eab.abime.net/showthread.php?t=87639)

sandruzzo 19 June 2017 06:30

Ray casting
 
is there a good ray casting tutorial for amiga?

roondar 19 June 2017 12:41

I don't know of one, but isn't it effectively the same thing as on the PC, but adding C2P conversion?

StingRay 19 June 2017 13:06

Quote:

Originally Posted by roondar (Post 1166047)
isn't it effectively the same thing as on the PC

That's exactly what is is, there is no "Amiga raycasting" at all.

zero 19 June 2017 16:57

Well, on Amiga you usually do it into a chunky buffer in fastmem and then use C2P into chip mem, but that's the only real difference.

Bisquit on YouTube has some good tutorials on raycasting.

Thorham 19 June 2017 17:36

What does ray casting have to do with chunky graphics?

robinsonb5 19 June 2017 17:45

Quote:

Originally Posted by Thorham (Post 1166110)
What does ray casting have to do with chunky graphics?

Nothing per se - except that (assuming your rays are intersecting with vertical walls) you're processing the scene one column at a time, which is horribly inefficient if you're rendering to a planar framebuffer.

sandruzzo 20 June 2017 16:35

Since Amiga is a word(16 bit) machine, was thinking about doing ray casting with this in mind, and maybe get rid of c2p

Thorham 20 June 2017 17:44

Quote:

Originally Posted by robinsonb5 (Post 1166114)
Nothing per se - except that (assuming your rays are intersecting with vertical walls) you're processing the scene one column at a time, which is horribly inefficient if you're rendering to a planar framebuffer.

Yes, but why not just use integer based vectors? Seems faster than bitmap based ray casting, unless I'm wrong (never done it).

robinsonb5 20 June 2017 18:05

Quote:

Originally Posted by sandruzzo (Post 1166333)
Since Amiga is a word(16 bit) machine, was thinking about doing ray casting with this in mind, and maybe get rid of c2p

Sure, that's doable if you're rendering walls with flat shading - but as soon as you introduce texture mapping into the mix you have loads of shifting and masking to deal with before you can write a 16-bit word.

Thorham 20 June 2017 18:15

Quote:

Originally Posted by robinsonb5 (Post 1166346)
Sure, that's doable if you're rendering walls with flat shading - but as soon as you introduce texture mapping into the mix you have loads of shifting and masking to deal with before you can write a 16-bit word.

What's the actual use case for ray casting here? I'm thinking of ray casting as used in current 3D games...

robinsonb5 20 June 2017 18:15

Quote:

Originally Posted by Thorham (Post 1166338)
Yes, but why not just use integer based vectors? Seems faster than bitmap based ray casting, unless I'm wrong (never done it).

I've written a raycaster but not done 3D graphics with vectors. The big draw of raycasting is simplicity - a simple step-by-step procedure for each column on the screen tells you which walls have to be drawn (just the first one you hit unless you're dealing with transparent textures), which texture column should be drawn, and at which scale. No need to depth-sort polygons, deal with backface culling, view cones, clipping and all the stuff that comes with polygon-based 3D graphics, even before you've added texture mapping into the mix.

(Just to be clear, I'm talking about raycasting as in Wolfenstein 3D here - Sandruzzo, is that what you meant?)

Thorham 20 June 2017 18:21

Quote:

Originally Posted by robinsonb5 (Post 1166349)
Just to be clear, I'm talking about raycasting as in Wolfenstein 3D here

Right, now it makes sense. Didn't realize the term was used in that context.

sandruzzo 20 June 2017 18:35

Quote:

Originally Posted by robinsonb5 (Post 1166349)
based 3D graphics, even before you've added texture mapping into the mix.

(Just to be clear, I'm talking about raycasting as in Wolfenstein 3D here - Sandruzzo, is that what you meant?)

Yes. I meant that:great

Maybe we some good lookup table we should be able to do texture mapping word based.

saimon69 20 June 2017 21:32

Quote:

Originally Posted by robinsonb5 (Post 1166346)
Sure, that's doable if you're rendering walls with flat shading - but as soon as you introduce texture mapping into the mix you have loads of shifting and masking to deal with before you can write a 16-bit word.

What if we use just one bitplane texture?

robinsonb5 21 June 2017 01:06

Quote:

Originally Posted by saimon69 (Post 1166409)
What if we use just one bitplane texture?

We still have the problem of assembling a 16-bit word from 16 independently selected texture pixels - so still lots of masking and shifting.


All times are GMT +2. The time now is 21:08.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.

Page generated in 0.04620 seconds with 11 queries