ProjectExtraCamera

From GECK
Jump to: navigation, search


A function added by the JIP NVSE Plugin.

Description

Projects the current scene frame, as viewed from the specified camera, onto either a NiTri-based geometry block, or an image-type UI tile.

The function takes up to 5 arguments, as follows:

  • cameraName - The name of a camera previously attached using AttachExtraCamera.
  • targetGeometry - Either
    • a) A name (case-sensitive) of a NiTriShape/Strips block in the calling reference's 3D model. The block MUST have either BSShaderNoLightingProperty or BSShaderPPLightingProperty property; or
    • b) The full path of an image-type UI tile, prefixed with an asterisk.
  • FoV - The camera's field-of-view angle. The lower this value, the more zoomed-in the rendered image will be (it is recommended not to use FoVs lower than 1, or greater than 10).
  • pixelSize (optional) - The resolution (and hence quality) of the rendered image. 256x256, by default. It is not recommended (and, in most cases, not necessary) to use resolutios greater than 1024x1024, especially when calling this function every frame.
  • grayscale (optional) - If present and non-zero, the rendered image will be generated in grayscale, otherwise (default) in full-colour.

Notes

  • The camera MUST be within the current loaded cells grid, or in the same interior cell as the player.
  • If an image was successfully rendered from the camera and projected onto the target, the function returns 1 (otherwise, 0).
  • A calling reference is not required when projecting onto a UI tile.
  • When projecting onto a NiTri block, the image will be wraped according to the mesh UV map.
  • This function should be considered EXPERIMENTAL, and may change considerably (or be scrapped, altogether) in the future.

Syntax

[help]
(successful:0/1) reference.ProjectExtraCamera cameraName:string targetGeometry:string FoV:float pixelSize:int grayscale:0/1

Example

objectRef.ProjectExtraCamera "mySnigCam" "ProjectScreen" 4.2
ProjectExtraCamera "mySnigCam" "*HUDMainMenu/Cam_Project_Screen" 3.4 512 

See Also