Skip to content

Asset: Scene

ᴏᴠ ━ ᴛʀᴏɴ edited this page Dec 23, 2024 · 31 revisions

━ How to setup a scene?

  1. Create a folder with your desired asset name under files/assets/scene/.

  2. Asset's structure should be strictly as below attached:

    image

  3. All your model/collision asset files must go under dff/col respectively without any doubt. [Note: File namings doesn't matter since they are referenced under scene.ipl]

    image image

  4. Create a txd file named as asset.txd and drop your necessary textures into it & save. [Note: File name matters here, it must strictly be asset.txd]

  5. Create a ipl file named as scene.ipl and add your necessary datas under it. [Note: Model name within the IPL must strictly match w/ dff/col names as highlighted below since the library links them using via IPL]

    image

  6. Create a json file named as asset.json and configure based on your requirements as below attached: [Note: File name matters here, it must strictly be asset.json]

    image

━ How to configure a scene?

  • assetBase: Default model whose properties scene elements should inherit. [Default: 1337]
  • assetTransparency: Boolean indicating whether scene elements should have transparency property. [Default: false]
  • streamRange: Range b/w which scene elements should be streamed in [0 - 300]. [Default: 170]
  • sceneLODs: Boolean indicating whether the scene elements should be using LODs. Enabling this makes elements to be visible from distant beyond default streaming limit. [Default: false]
  • sceneDimension: Your preferred scene dimension for the created scene elements. [Default: 0]
  • sceneInterior: Your preferred scene interior for the created scene elements. [Default: 0]
  • sceneOffset: Useful for mass movement of scene elements without modifying/re-exporting IPL. For example {"x": 0, "y": 0, "z": 2000} would move the entire scene elements at a z height of 2000 relative to the IPL's z coord. [Default: {"x": 0, "y": 0, "z": 0}]
  • shaderMaps: Required if you prefer to use any built in Assetify shaders for your scene.

━ How to boot a scene?

  • Attach your scene name within files/assets/scene/manifest.json.
    [[
      "yourSceneName1",
      "yourSceneName2",
      "yourSceneName3"
    ]]
  • Incase if you have enabled autoLoad under settings/shared.lua for scene assets then your scene shall be automatically loaded when you restart the library, either way you could use Assetify's APIs to dynamically load/unload them.
    assetify.loadAsset("scene", "yourSceneName")
    assetify.unloadAsset("scene", "yourSceneName")

Clone this wiki locally