Solar Eclipse model?!

Blitz3D Forums/Blitz3D Programming/Solar Eclipse model?!

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Not trying to sound offensive, but here's a few tips to help you out when asking for help here:

1) Try and be patient! People will respond if they are able!

2) When posting code, as jfk mentioned, use the code you're actually working with, otherwise, it's not going to work regardless, and it's harder for anyone else to see whaat may be the problem (especially as the code gets more and more complex)

3) Also, when posting code, Use the {code} and {/code} (with square bracets) to give your code
A clearer depiction


4) Try to indent and format your code more easily, also, use ';' to give remarks and comments to help identify what does what.

Now, to answer some of your questions:

1) Lights in Blitz merely affect the surfaces they interact with, they do not actually emanate any visible rays or diffusion. This is often synthesised by use of Sprites.

2)I have made some alterations to your code (and annotated them) so at least, currently, it works to an extent:

Graphics3D 640,480
SetBuffer BackBuffer()
light=CreateLight(1) ;Lights need to have a type set. 1-3 for various types of Light.
camera=CreateCamera()
PositionEntity camera, 0,0,-7

sun=CreateSphere (16)
PositionEntity sun, 0,0,1  ;---------------------------changed 'nucleus' to SUN
tex=LoadTexture( "thesun.jpg" )
EntityTexture sun,tex

;glow setup
s=1
Global sizex=640/s
Global sizey=480/s
Global glowtexture=CreateTexture (384,384,256)
Global sp=CreateSprite(camera)
MoveEntity sp,-.25,-0.06,1.18
EntityAlpha sp,.32
ScaleTexture glowtexture,GraphicsWidth()/sizex,GraphicsHeight()/sizey
EntityTexture sp,glowtexture
TextureBlend glowtexture, 5
While Not KeyDown(57) ; - I have changed this to the SPACEBAR, otherwise, the second loop thinks you're still pressing ESCAPE!
TurnEntity sun,0.5,0.5,0.5
RenderWorld
Flip			;	Since you are working in the BackBuffer, you need To use Flip To display the Render!
CopyRect 0,0,sizex,sizey,0,0,BackBuffer(),TextureBuffer(glowtexture)
CameraViewport camera,0,0,GraphicsWidth(),GraphicsHeight()
Wend 

pivot=CreatePivot()
PositionEntity pivot,0,0,1
orbit=CreateSphere(16,pivot)
tex1=LoadTexture( "orbit.jpg" )
EntityTexture orbit, tex1
ScaleEntity orbit, 0.3,0.3,0.3
PositionEntity orbit,4,0,0
While Not KeyDown (1)
TurnEntity pivot,0,3,0

pitch#=pitch#+1 yaw#=yaw#+1 roll#=roll#+0
RotateEntity sun,pitch#,yaw#,roll# 

RenderWorld
Flip

Wend

End