Liberty BASIC Community Forum
« Knight Rider -Experimental lighting 3D project »

Welcome Guest. Please Login or Register.
Jan 20th, 2018, 10:59am

Rules|Home|Help|Search|Recent Posts|Notification

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: Knight Rider -Experimental lighting 3D project  (Read 403 times)
Team Liberty BASIC

member is offline



Posts: 111
xx Knight Rider -Experimental lighting 3D project
« Thread started on: Feb 22nd, 2016, 05:25am »

In an instance, the lighting of a stack of lines of this sort could eventually give simulated lighting.

I am currently working on extremely detailed lighting from this idea..
This technique could also be applied to overhead lighting if width is given priority for the pixel levels that are wider and mixing with this current program idea.

RATE adjusts the speed of the cycle..

This may not be that fast and may be only practical for making complex 3D objects for image capture.(BMP)

This is just a really rough example.. I plan to make super high quality 3D objects using this method.

(its super low quality with large pixel size and is drawn exclusively with pixels)

global x
global y
call screen 800,600' Generic screen with graphics box to fit ( I may redesign)
'*******************************place graphics bellow here use #h.1 for draw device
rate = 10' cycle rate
if d=0 and s>e then [skip]
if d=1 and s<e then [skip]
call ultimate 100,104,s,104
call ultimate 100,100,s,100
call ultimate 102,98,s,98
call ultimate 104,96,s,96
call ultimate 102,98,s,94
call ultimate 104,96,s,92
if d=0 then s=s+rate
if d=1 then s=s-rate
if d=0 and s>e then d=1:e=0:goto [jmp]
if d=1 and s<e then d=0:e=90:goto [jmp]
goto [cycle]

'^^^^^^^^^^^^^^^^^^^^^^Put graphics and game stuff above^^^^^^^^^^^^^^^^
 close #h

 ' Generic screen
sub screen x,y
graphicbox #h.1, 0,0,x-1,y-1
open "Generic Window Host" for window_nf as #h
print #h, "trapclose [quit]"
#h.1 "backcolor black;fill black;cls"
#h.1 "color white"' default color if no color has been chosen
end sub
sub ultimate x,y,light,width 'x,y,light startx,width of line
if light>width then light=width
for mov=origin to x step -1
#h.1 "down;size 4;color ";r;" ";g;" ";b
#h.1 "set ";x+mov;" ";y
r=r -2
g=g -2
b=b -2
if r<2 then r=2
if g<2 then g=2
if b<2 then g=2
next mov
for mov=origin to destination step 1
#h.1 "down;color ";r;" ";g;" ";b
#h.1 "set ";x+mov;" ";y
r=r -2
g=g -2
b=b -2
if r<2 then r=2
if g<2 then g=2
if b<2 then g=2
next mov
end sub

« Last Edit: Feb 22nd, 2016, 05:36am by michael » User IP Logged

I like making program generators and reinventing the wheel.. I never make mistakes.. Not ever.. (lie)
Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

Rules|Home|Help|Search|Recent Posts|Notification

Donate $6.99 for 50,000 Ad-Free Pageviews!

| |

This forum powered for FREE by Conforums ©
Sign up for your own Free Message Board today!
Terms of Service | Privacy Policy | Conforums Support | Parental Controls