Code archives/3D Graphics - Effects/Spacesphere
This code has been declared by its author to be Public Domain code.
Download source code
| |||||
Play around with the sptex scale a bit to suit your tastes. | |||||
;Spacesphere ;Create the Texture sptex = CreateTexture(1024,1024,1+8) SetBuffer TextureBuffer(sptex) For a = 1 To 200 Plot Rand(0,1023),Rand(0,1023) Next SetBuffer BackBuffer() TextureBlend sptex,5 ;Create the Sphere spbox = CreateSphere(5) ScaleEntity spbox,10000,10000,10000 EntityTexture spbox,sptex ScaleTexture sptex,.25,.5 EntityFX spbox,1 FlipMesh spbox EntityOrder spbox,99999 |
Comments
| ||
Here is a working example. |
| ||
Stars get dimmer when you move - shame. |
| ||
I see only one ball circling around me and a big white sphere around the camera. |
| ||
ANDRES you probably have nVidia graphics card yes? Why does the LEFT arrow mess this (slightly more complicated) example up? I don't get it... trying to do the double starfield effect like on Trek... The LEFT ARROW seems to spin madly... all else works! |
| ||
Rook - you've left out the decimal points in the 35 & 30 ... there's an extra ", 0" there instead ;) |
| ||
yipes!!! Thanks Stevie! |
| ||
Rook Zimbabwe: Nope, I have ATI Radeon 9600se TextureBlend sptex,5 ruined the texture, i can't use third (add)blend mode, but it works with second (multiply) |
Code Archives Forum