• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[Solved] Camera cuts off terrain at set length

Status
Not open for further replies.
Level 4
Joined
Jun 17, 2017
Messages
26
Yeah the title doesn't make much sense, but I don't know how to call this.

The map basically gets cut off, when objects/map get too far away from the camera. But this makes it hard to get some shots from afar :
Slika1.PNG


And it cuts off this area that it was suppossed to show:
Slika2.PNG

This problem also appears in game

My memory may serve me wrong, but I think that in the campaing, some cutscenes had a bigger field, before the terrain was cut off.

Is there any way to make this not happen?
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,207
Change the Far Clipping (FarZ) of the camera. This should increase the draw distance. For editor placed cameras one can set this field by opening their property window and confirming the change.

This can be dynamically applied to a camera setup as follows...
JASS:
globals
    camerasetup             gg_cam_Camera_001          = null
endglobals

function CreateCameras takes nothing returns nothing
    set gg_cam_Camera_001 = CreateCameraSetup(  )
    call CameraSetupSetField( gg_cam_Camera_001, CAMERA_FIELD_ZOFFSET, 0.0, 0.0 )
    call CameraSetupSetField( gg_cam_Camera_001, CAMERA_FIELD_ROTATION, 90.0, 0.0 )
    call CameraSetupSetField( gg_cam_Camera_001, CAMERA_FIELD_ANGLE_OF_ATTACK, 304.0, 0.0 )
    call CameraSetupSetField( gg_cam_Camera_001, CAMERA_FIELD_TARGET_DISTANCE, 1650.0, 0.0 )
    call CameraSetupSetField( gg_cam_Camera_001, CAMERA_FIELD_ROLL, 0.0, 0.0 )
    call CameraSetupSetField( gg_cam_Camera_001, CAMERA_FIELD_FIELD_OF_VIEW, 70.0, 0.0 )
    call CameraSetupSetField( gg_cam_Camera_001, CAMERA_FIELD_FARZ, 5000.0, 0.0 ) // This line sets FarZ to 5000 Warcraft III units.
    call CameraSetupSetDestPosition( gg_cam_Camera_001, 0.0, 0.0, 0.0 )
endfunction
I am unsure if there is a dynamic GUI only way to do this.

Be aware that large FarZ values might degrade game performance due to the increased render work load. Additionally the game might have some hard coded FarZ distance limit, defining the maximum possible draw distance.
 
Status
Not open for further replies.
Top