Try my new website:
www.urcho.com
- the new SIMPLE social network
Sign up
|
357
members |
125
snippets
Search for:
ALL
POPULAR
File Controls
Multiplayer Code
2D Effects
3D Effects
Oldskool demos
Basic Functions
Maths/Physics
Sound
Tutorials
Misc
Username:
Password:
Sign up
3d Parralaxing by Fuller
[
back
]
Author:
Archive
| Viewed:
842
times | Language:
BlitzBasic 3D
| Category:
3D Effects
Function Make_Parallaxing_Stars_and_Sky() plane=CreatePlane() MoveEntity plane,0,-1,0 p_tex=LoadTexture("mediastars.bmp",2) ScaleTexture p_tex,20,20 EntityTexture plane,p_tex plane2=CreatePlane() MoveEntity plane2,0,-10,0 p_tex2=LoadTexture("mediastars.bmp",2) ScaleTexture p_tex2,50,50 EntityTexture plane2,p_tex2 plane3=CreatePlane() MoveEntity plane3,0,-20,0 p_tex3=LoadTexture("mediastars.bmp") ScaleTexture p_tex3,50,50 EntityTexture plane3,p_tex3 ;top planes plane1=CreatePlane() MoveEntity plane1,0,20,0 TurnEntity plane1,180,0,0 p_tex1=LoadTexture("mediastars.bmp",2) ScaleTexture p_tex1,20,20 EntityTexture plane1,p_tex1 plane21=CreatePlane() MoveEntity plane21,0,30,0 TurnEntity plane21,180,0,0 p_tex21=LoadTexture("mediastars.bmp",2) ScaleTexture p_tex21,50,50 EntityTexture plane21,p_tex21 plane31=CreatePlane() MoveEntity plane31,0,40,0 TurnEntity plane31,180,0,0 p_tex31=LoadTexture("mediastars.bmp") ScaleTexture p_tex31,50,50 EntityTexture plane31,p_tex31 ;sky sky=CreateSphere(30) ScaleEntity sky,200,200,200 ScaleTexture p_tex31,.1,.1 EntityTexture sky,p_tex31 FlipMesh sky end function
Author Comments:
Parraling effect Step one: Create a couple planes [CreatePlane()] Remember to offset one on the Y axis Step two: Assign Alpha or masked textures to the planes The bottom plane should have a bigger texture (ScaleTexture()) Step three: Thats it! Move the camera around the plane to see the effect! Hope this helps someone Example (not the cleanest though, youll need some star image):
Login or
create an account
to comment on this snippet