purebasic with blitz3d SDK
-
- Enthusiast
- Posts: 121
- Joined: Mon Jun 26, 2006 10:47 am
purebasic with blitz3d SDK
i'm kind of stuck here. i've started a project with the blitz3d sdk (it's over 2000 lines long) and then i find out that i can't change the FOV of the camera using the sdk commands. is there any way i can do this from purebasic?
- Rook Zimbabwe
- Addict
- Posts: 4322
- Joined: Tue Jan 02, 2007 8:16 pm
- Location: Cypress TX
- Contact:
Re: purebasic with blitz3d SDK
Let me look at my Blitz3D docs...

I don't know the calling consttants though... did they not give you a help file with this? It is a part of the download when I bought the lib???Camera Range
Camera range determines how far into the distance a camera can 'see'. You specify 2 values for camera range - a near value and a far value. All rendering is clipped to this range.
Its a good idea to try and keep the near value as high as possible, while keeping the far value as low as possible. This helps to minimize z-buffer problems like 'jaggies'. By default, the near value for a new camera is 1, and the far value is 1000.
To change the camera range, use the CameraRange command:
;Sets the near range to 5 and the far range to 5000
CameraRange camera,5,5000
Camera Zoom
Changing a cameras zoom allows you to 'zoom-in' or 'zoom-out' of the action in the world. The default zoom value for a new camera is 1. Zoom values greater than 1 will cause a 'zoom-in' effect, while zoom values less than 1 will cause a 'zoom-out'. Zoom values should never be set at 0 or less!
The CameraZoom command controls camera zoom:
;Zoom-in a bit!
CameraZoom camera,1.5

-
- Enthusiast
- Posts: 121
- Joined: Mon Jun 26, 2006 10:47 am
Re: purebasic with blitz3d SDK
erm... i'm using the blitz3d SDK -- not all blitz3d functions are available. and the 2 functions above have nothing to do with the focal length of the camera (or field of view). i think the function is 'SetCameraFOV' or something.Rook Zimbabwe wrote:Let me look at my Blitz3D docs...
I don't know the calling consttants though... did they not give you a help file with this? It is a part of the download when I bought the lib???Camera Range
Camera range determines how far into the distance a camera can 'see'. You specify 2 values for camera range - a near value and a far value. All rendering is clipped to this range.
Its a good idea to try and keep the near value as high as possible, while keeping the far value as low as possible. This helps to minimize z-buffer problems like 'jaggies'. By default, the near value for a new camera is 1, and the far value is 1000.
To change the camera range, use the CameraRange command:
;Sets the near range to 5 and the far range to 5000
CameraRange camera,5,5000
Camera Zoom
Changing a cameras zoom allows you to 'zoom-in' or 'zoom-out' of the action in the world. The default zoom value for a new camera is 1. Zoom values greater than 1 will cause a 'zoom-in' effect, while zoom values less than 1 will cause a 'zoom-out'. Zoom values should never be set at 0 or less!
The CameraZoom command controls camera zoom:
;Zoom-in a bit!
CameraZoom camera,1.5
- Rook Zimbabwe
- Addict
- Posts: 4322
- Joined: Tue Jan 02, 2007 8:16 pm
- Location: Cypress TX
- Contact:
Re: purebasic with blitz3d SDK
Actually i just used those two... I do not remember the FOV commands...
let me see if there is anything with FOV???
Nope...
You use what I showed you,
http://www.blitzbasic.com/Community/pos ... 645#710263
http://www.blitzbasic.com/Community/pos ... 896#151107
linkage
SSWIFT suggests rescaling the camera entity (I haven't done that ever but that should work... His conde is included in the second quoteed link
recaapped here per SSWIFT on Blitz3D forum:
Both ideas should work though... you just gotta play around with it a bit!
let me see if there is anything with FOV???
Nope...
You use what I showed you,
http://www.blitzbasic.com/Community/pos ... 645#710263
http://www.blitzbasic.com/Community/pos ... 896#151107
linkage
SSWIFT suggests rescaling the camera entity (I haven't done that ever but that should work... His conde is included in the second quoteed link
recaapped here per SSWIFT on Blitz3D forum:
Code: Select all
Function HUD_Camera_FOV_Correction(ThisCamera)
Scale640x480# = 480.0 / 640.0
ScaleThisRes# = Float(GraphicsHeight()) / Float(GraphicsWidth())
Rescale# = Scale640x480# / ScaleThisRes#
ScaleEntity ThisCamera, 1, Rescale#, 1, True
End Function

Both ideas should work though... you just gotta play around with it a bit!

-
- Enthusiast
- Posts: 121
- Joined: Mon Jun 26, 2006 10:47 am
Re: purebasic with blitz3d SDK
my god... it worked. thanks, man. you are a life saver
. took me a while to notice the difference though lol.

Re: purebasic with blitz3d SDK
Ralph gave you more help than you would get on the official forums 

Best wishes to the PB community. Thank you for the memories. 