November 28, 2020, 10:18:30 AM

Author Topic: [bb] -Please remove- by Trader3564 [ 1+ years ago ]  (Read 643 times)

Offline BlitzBot

  • Jr. Member
  • **
  • Posts: 1
[bb] -Please remove- by Trader3564 [ 1+ years ago ]
« on: June 29, 2017, 12:28:40 AM »
Title : -Please remove-
Author : Trader3564
Posted : 1+ years ago

Description : -cut-

Code :
Code: BlitzBasic
  1. -cut-


Comments :


Trader3564(Posted 1+ years ago)

 I catched some nice examples of an egyption tumb that i beleive was done by IPete2.<a href="../Community/postseefe.html?topic=51997" target="_blank">http://www.blitzbasic.com/Community/posts.php?topic=51997[/url]


Wings(Posted 1+ years ago)

 THis is sweet. I changed resulution and managed to get it working real nice.using 512x512 rather that 255.here is a asteroid field i created.1280x800 !


Blitzplotter(Posted 1+ years ago)

 .


puki(Posted 1+ years ago)

 Heh, I had a mini touch-fest.  Post a video of the asteroids - I want to see them in motion.


Filax(Posted 1+ years ago)

 Another version :
Code: [Select]


Global red,blue,redt,bluet,black
Dim cb(8),tt(8)

Graphics3D 1024,768,32,0
SetBuffer BackBuffer()
AmbientLight 0,0,0

Global cam=CreateCamera()
PositionEntity cam,0,0,-12
RotateEntity cam,2,0,0

light=CreateLight(2)
LightRange light,20
PositionEntity light,10,10,-20
LightColor light,200,200,200

spht=CreateTexture(256,256)
SetBuffer TextureBuffer(spht)
For ttx=0 To 255 Step 8
    For tty=0 To 255 Step 16
        Color 255,Rnd(255),Rnd(255)
        Oval ttx,tty,8,5
    Next
Next

SetBuffer BackBuffer()

sph=CreateSphere()
ScaleEntity sph,15,15,15
FlipMesh sph
EntityFX sph,1
EntityTexture sph,spht

sph2=CreateSphere(50)
PositionEntity sph2,0,0,0
ScaleEntity sph2,3.0,3.0,3.0
EntityColor sph2,50,100,150
EntityShininess sph2,0.2

sph2=CreateSphere(50)
PositionEntity sph2,5,5,5
ScaleEntity sph2,1.0,1.0,1.0
EntityColor sph2,250,100,150
EntityShininess sph2,0.2

sph2=CreateSphere(50)
PositionEntity sph2,-5,-3,-5
ScaleEntity sph2,1.0,1.0,1.0
EntityColor sph2,50,200,150
EntityShininess sph2,0.2

;EntityAlpha sph2,.5
;EntityFX sph2,1+16
;EntityTexture sph2,spht

obj=CreateCylinder()
ScaleEntity obj,0.3,7,0.3
;EntityBlend obj,3

ff=CreatePivot()

For cc=1 To 8
    tt(cc)=CreatePivot(ff)
    cb(cc)=CreateCube(tt(cc))

    EntityColor cb(cc),Rnd(150,255),Rnd(255,55),Rnd(150,255)
EntityShininess cb(cc),0.5
    PositionEntity cb(cc),0,0,-6
    RotateEntity tt(cc),0,45*cc,0
Next

map=512

redt=CreateTexture(map,map)
bluet=CreateTexture(map,map)

initglass()

While Not KeyDown(1)

    time#=time#+2
    tx#=(Sin(time*2)*0.5)+0.7
    ty#=Cos(time/2)*3

    For xx=1 To 8
        ScaleEntity cb(xx),tx,tx,tx
        TurnEntity cb(xx),ty,ty,ty
    Next

    If KeyHit(57) Then WaitKey:WaitKey

    TurnEntity obj,1,1,1
    TurnEntity ff,0,1,0
    TurnEntity sph,tx/5,ty/5,0.1
    TurnEntity sph2,-tx/5,-ty/5,-0.1

    stereo(map,redt,bluet)

    UpdateWorld
    RenderWorld
    Flip

Wend

End

Function initglass()
    black=makequad(cam)
    EntityAlpha black,1
    PositionEntity black,0,0,1.01

    red=makequad(cam)
    EntityColor red,255,0,0
    EntityFX red,1
    EntityBlend red,3
    PositionEntity red,0,0,1
    TextureBlend redt,5
    EntityTexture red,redt

    blue=makequad(cam)
    EntityColor blue,0,255,255
    EntityFX blue,1
    EntityBlend blue,3
    PositionEntity blue,0,0,1
    TextureBlend bluet,5
    EntityTexture blue,bluet
End Function

Function makequad(parent%)
    meshquad = CreateMesh(parent%)
srf      = CreateSurface(meshquad)

AddVertex   srf, -1, 1, 0, 0, 0
AddVertex   srf,  1, 1, 0, 1, 0
AddVertex   srf, -1,-1, 0, 0, 1
AddVertex   srf,  1,-1, 0, 1, 1

    AddTriangle srf, 0, 1, 2
AddTriangle srf, 3, 2, 1
Return meshquad
End Function

Function stereo(map,rtext,btext,decal#=0.1)
    HideEntity red
    HideEntity blue
    HideEntity black

Local oldx#=EntityX(cam)
Local oldy#=EntityY(cam)
Local oldz#=EntityZ(cam)

CameraViewport cam, 0, 0, map, map

    ;red
    MoveEntity cam,-decal#,0,0
    RenderWorld
    CopyRect 0,0,map,map,0,0,BackBuffer(),TextureBuffer(rtext)

    ;blue
    MoveEntity cam,decal#*2,0,0
    RenderWorld

    CopyRect 0,0,map,map,0,0,BackBuffer(),TextureBuffer(btext)


CameraViewport cam,0,0,GraphicsWidth(),GraphicsHeight()
    MoveEntity cam,-decal#,0,0

    ShowEntity red
    ShowEntity blue
    ShowEntity black

PositionEntity cam,oldx#,oldy#,oldz#

End Function


 

SimplePortal 2.3.6 © 2008-2014, SimplePortal