Perspective 3D Graphics

Anything QL Software or Programming Related.
User avatar
bwinkel67
QL Wafer Drive
Posts: 1533
Joined: Thu Oct 03, 2019 2:09 am

Re: Perspective 3D Graphics

Post by bwinkel67 »

Ok, Steve needs to team up with QBits and create a version of Elite....I know, I know, there is a demo out there already, but that never went anywhere and I'd love a version of Elite on the QL.


stevepoole
Aurora
Posts: 890
Joined: Mon Nov 24, 2014 2:03 pm

Re: Perspective 3D Graphics

Post by stevepoole »

Hi Guys,
Thanks for your encouragement, and interest shown in this project.

Work is progressing steadily, and I am trying to stear a clear course through the increasingly dense code.

There is a lot of new ground for me, and sometimes it ties my head in knots , until I backtrack to clear out any nonsense.

Tonight I managed to wrap images onto four sides of the cube, with two still to go.... and it is getting easier as I understand the problems better.

Best wishes, Steve.
Capture d’écran (690).png


stevepoole
Aurora
Posts: 890
Joined: Mon Nov 24, 2014 2:03 pm

Re: Perspective 3D Graphics

Post by stevepoole »

Hi Folks,
Job now done : All six faces wrapped correctly, (with transparencies here).... Needs some hidden-face sorting added though.

Then tomorrow I start tidying up the code, with a user interface for you to examine and manipulate your own input images.

Should be ready with a 'tumbling' demo fairly soon : Steve.
Capture d’écran (695).png


stevepoole
Aurora
Posts: 890
Joined: Mon Nov 24, 2014 2:03 pm

Re: Perspective 3D Graphics

Post by stevepoole »

Hi Folks,
Here is the prototype program. (In fact three in one !). UNZIP to dos4_ , LRESPR dos4_PHGTK.bin & LRESPR dos4_RPIX.bin. (Photon & Per Witte...).

RUN the 'cube tumbler'demo, or type main1 for the 'orbiting' program, or type main2 for the 'QL tumbler'. (Tested under QPC2).

The 'cube tumbler' is a demo, where listing-comments tell you what you can alter for different effects.
The 'orbiting' program has a demo mode, or a user interface mode to allow you to familiarise yourself with the various parameters !
The 'QL Tumbler' is an old program demonstrating fast tumbling 'QL' characters.
When running these programs, hit ESCape to stop, or N (ext) to move ahead.
Be careful to INPUT the suggested values, as such entries are not yet fully error -trapped. (Just hit ENTER for any prompted defaults).

Please let me know if you find any quirks. (Now I can get on with further animation developments.) Regards, Steve.
Wrapper2.zip
(54.31 KiB) Downloaded 123 times


stevepoole
Aurora
Posts: 890
Joined: Mon Nov 24, 2014 2:03 pm

Re: Perspective 3D Graphics

Post by stevepoole »

Hi All,

Wrapper is now at version 3. A fast sorting routine has been merged in, and rear faces are now hidden correctly, even if transparent !

User input is fully error-trapped to avoid accidental halting. Six seperate images can be wrapped onto the faces of the cube.

So more tidying up of the code is in order, before another release. A lot of code is redundant, in anticipation of further developments.....

(The sort routiine can handle almost any number of faces, ready for more complicated output. (But only six faces to deal with here !).

Now I will investigate the possibility of grabbing images from buried windows, and wonder if anyone has already tried this ?

Regards, Steve.


stevepoole
Aurora
Posts: 890
Joined: Mon Nov 24, 2014 2:03 pm

Re: Perspective 3D Graphics

Post by stevepoole »

Hi Folks,
Here is a screen shot with six sorted face images using transparency. ( wrapping every fourth pixel only... hence the moirages).

There is a problem, in that QLs and PCs dont both have pixels of the same shape, explaining some distortions on different setups...

Next I will try to grab images from any windows.....

Regards, Steve.
Capture d’écran (699).png


stevepoole
Aurora
Posts: 890
Joined: Mon Nov 24, 2014 2:03 pm

Re: Perspective 3D Graphics

Post by stevepoole »

Hi,
To simplify things, there are now six window channels to grab images from, (once you have loaded and adapted them using Photon's toolkit).

Regards, Steve.
Capture d’écran (700).png


stevepoole
Aurora
Posts: 890
Joined: Mon Nov 24, 2014 2:03 pm

Re: Perspective 3D Graphics

Post by stevepoole »

Hi Folks,

Now, by mergeing three perspective programs, we can get, for example, the following output :

Next job is to move the objects along seperate trajectories.

Regards, Steve.
Capture d’écran (703).png


stevepoole
Aurora
Posts: 890
Joined: Mon Nov 24, 2014 2:03 pm

Re: Perspective 3D Graphics

Post by stevepoole »

Hi,
Getting objects to move along trajectories is progressing well. But I have not been able to access graphics from buried windows.

Does anyone know if it is possible to refresh channel windows, that have been overwritten by other channels ?

My knowledge of such matters is scant. If possible it would be useful to buffer such windows somewhere, eg: using Turbo's MOVE_MEMORY ?

If anyone has dabbled with such things, I would appreciate some enlightenment, so that I could use all of the computer screen for output....

Regards, Steve.
___________________


Silvester
Gold Card
Posts: 436
Joined: Thu Dec 12, 2013 10:14 am
Location: UK

Re: Perspective 3D Graphics

Post by Silvester »

You already have them at your disposal; FPIC_SAVE and FPIC_LOAD. They just call the system window save/restore routines.


David
Post Reply