English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Asm / Hardware

 
 
Thread Tools
Old 02 September 2021, 17:53   #1
sparhawk
Registered User
 
sparhawk's Avatar
 
Join Date: Sep 2019
Location: Essen/Germany
Age: 55
Posts: 463
3d Tutorial

When I watched this [ Show youtube player ] I was quite impressed with this rotating cube showing the moving graphics on each side. At first I thought that they were doing some texture mapping, and was surprised because I thought the Amiga is not fast enough for that.
After thinking about how this can be done, I thought that it might be enough to have a good 3D routine, and then stuff being shown can be projected on the cube with a view transformation.


I have also seen other demos with lots of stars coming from the Z axis and I wondered if these are real 3D calculations or just some visual tricks. In the beginning of the Enigma demo above, they also have this starfield whirling around all axis, so I assume that this are really 3D calculations.



So does anybody know a good 3D tutorial where such stuff is explained for somebody not so fluent in math?
sparhawk is offline  
Old 02 September 2021, 22:35   #2
redblade
Zone Friend
 
redblade's Avatar
 
Join Date: Mar 2004
Location: Middle Earth
Age: 40
Posts: 2,127
Go to bombjacks site and download Amiga Real-Time 3D gfx. It was released for Atari ST and Amiga. Because you are from Germany, there should be a few tutorials available in German too (I don't know any at the top of my head).

Also the danish tutorial that some translated to English has a 3d section in the last chapters, I thought it was pablo.dk but that does not seem to be the site.
Updated to: Danish 3d tutorial translated to English
redblade is offline  
Old 02 September 2021, 23:28   #3
Antiriad_UK
OCS forever!
 
Antiriad_UK's Avatar
 
Join Date: Mar 2019
Location: Birmingham, UK
Posts: 418
Quote:
Originally Posted by sparhawk View Post
When I watched this [ Show youtube player ]
I have also seen other demos with lots of stars coming from the Z axis and I wondered if these are real 3D calculations or just some visual tricks. In the beginning of the Enigma demo above, they also have this starfield whirling around all axis, so I assume that this are really 3D calculations.
The z-axis stuff is usually just a increasing z with a perspective calculation - you can get plenty of stars just doing it realtime. There's a deep dive into the perspective calc in Planet Rock Lobster (which also rotates) in this forum somewhere (they took it to extremes with log tables )

I've no idea if the Enigma box had any cheats but I've got a filled inconvex vector version I did on the a1200 back in the 90s somewhere and I just brute forced it something like:
- Is this side of the cube showing?
- If yes, rotate and perspective on that cube side's scene
- Then set the z of all the points in that side to match the "cube"
- Rotate and perspective again for that side

So that method essentially doubles the CPU time for each cube face - but that Enigma scene is all wireframe/simple so maybe it was do-able like that too. I know you can combine multiple rotation matrices into one, so I'd imagine the guy who wrote Engima was better than my basic maths and did it like that. Does anyone on here actually know though? (it's still amazing remembering seeing that for the first time, as Virgil's hyperbased remix says...OMG IT'S ROTATING )
Antiriad_UK is offline  
Old 03 September 2021, 11:35   #4
sparhawk
Registered User
 
sparhawk's Avatar
 
Join Date: Sep 2019
Location: Essen/Germany
Age: 55
Posts: 463
Quote:
Originally Posted by redblade View Post
Go to bombjacks site and download Amiga Real-Time 3D gfx. It was released for Atari ST and Amiga. Because you are from Germany, there should be a few tutorials available in German too (I don't know any at the top of my head).
No need of german tutorials. English is fine as well. Thanks!
I tried to find this book for sale, as I rather like to have a hardcopy but haven't found one so far. But instead I found that the author is keeping the book along with the source code samples on gitlab:https://gitlab.com/amigasourcecodepr...me-3d-graphics

Looks like a very useful site.


Quote:
Originally Posted by Antiriad_UK View Post
I know you can combine multiple rotation matrices into one, so I'd imagine the guy who wrote Engima was better than my basic maths and did it like that.
Yea, that's what I was thinking. I don't know the math, but I knew the theory, which doesn't help much when trying to implement stuff like that.

Quote:
Does anyone on here actually know though? (it's still amazing remembering seeing that for the first time, as Virgil's hyperbased remix says...OMG IT'S ROTATING )
Would be cool if a demo coder could explain a bit how it works. That's why I also appreciate the AsmSkool videos from Photon, because it doesn't just show the flashy stuff, but also the process how to get there.
sparhawk is offline  
Old 04 September 2021, 01:11   #5
redblade
Zone Friend
 
redblade's Avatar
 
Join Date: Mar 2004
Location: Middle Earth
Age: 40
Posts: 2,127
Quote:
Originally Posted by sparhawk View Post
No need of german tutorials. English is fine as well. Thanks!

I tried to find this book for sale, as I rather like to have a hardcopy but haven't found one so far. But instead I found that the author is keeping the book along with the source code samples on gitlab:https://gitlab.com/amigasourcecodepr...me-3d-graphics
I had a look at the code, OS Friendly, Kick31 startup code as it uses lowlevel.library to put their interrupt code in the interrupt, The danish tutorial from the 80s, swaps VBlank directly so will have problems on os2+ machines.
redblade is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
help with GRAC tutorial jojo073 support.Apps 0 25 November 2018 10:07
New tutorial on BOBs Yragael Coders. Tutorials 9 15 August 2018 00:00
SAS C tutorial? Narf the Mouse Amiga scene 33 28 July 2017 02:48
Filesystem tutorial? NorthWay Coders. System 5 10 March 2015 13:38
OS X eUAE Tutorial ElB support.OtherUAE 3 27 November 2008 22:50

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 20:44.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.12052 seconds with 15 queries