Results 1 to 9 of 9

Thread: Preloading content - information sharing.

  1. #1

    Question Preloading content - information sharing.

    = Intention

    This thread is meant to share knowledge, get people to test and find out new ground.

    Especially the config part is hardly known at all and little understood.
    So more testing is needed to find out, if it can help.

    = Scripting

    Their main purpose is to be used in mission, especially when beaming
    the player from on place to another.

    • camPreload: Preload the scene for the prepared camera.
    • preloadCamera: Preload all textures and models around given Position to avoid visual artifacts after camera is moved.
    • preloadObject: Preload all textures, materials and proxies needed to render given object.
    • startLoadingScreen: When loading screen is shown,simulation and scene drawing is disabled, scripts run at full speed.


    And a few more, specific, found in BIKI: Category:Scripting Commands ArmA2 (load/preload).

    = Config

    The sample code is taken from 1.04 configs.
    The comments are taken from binarize source files, part of the BI tools,
    written by BI - yet no guarantee to be correct or up-to-date.

    Code:
    class PreloadVehicles
    {
    	access = 1;
    };
    No comment - probably doing nothing.

    Code:
    // any texture corresponding to the entry below is preloaded
    // and kept in the memory permanently
    // actual texture file is looked up in the corresponding config entry
    // lookup values:
    //  "*" - path is relative to Data unless it starts with a backslash
    //  "\*" - path is always absolute
    // "@*" - model name (rel. to data3d) is given in the config - load all textures for itreferenced by it
    // "\@*" - model name (abs) is given in the config - load all textures for itreferenced by it
    // in future other values or combinations may be possible,
    // like for textures which need to be loaded, but not all mipmaps are needed
    class PreloadTextures
    {
    	class CfgInGameUI
    	{
    		imageCornerElement = "*";
    		class GroupDir
    		{
    			image = "*";
    		};
    		class PeripheralVision
    		{
    			cueTexture = "\*";
    			bloodTexture = "\*";
    		};
    		class Cursor
    		{
    			me = "*";
    			aim = "*";
    			weapon = "*";
    			select_target = "*";
    			lock_target = "*";
    			leader = "*";
    			mission = "*";
    			tactical = "*";
    			move = "*";
    			selected = "*";
    			attack = "*";
    			getIn = "*";
    			watch = "*";
    			outArrow = "*";
    		};
    	};
    	class CfgCloudletShapes
    	{
    		cloudletSmoke = "@*";
    		cloudletWater = "@*";
    		cloudletFire = "@*";
    		cloudletUniversal = "@*";
    	};
    	class CfgWorlds
    	{
    		class Chernarus
    		{
    			pictureShot = "*";
    		};
    		class utes
    		{
    			pictureShot = "*";
    		};
    	};
    	class CfgWeaponCursors
    	{
    		class RifleCursor
    		{
    			texture = "*";
    		};
    		class MGCursor
    		{
    			texture = "*";
    		};
    		class LawCursor
    		{
    			texture = "*";
    		};
    	};
    };
    This works. Has been used in a1 to preload gear and map elements to speed
    up loading time.

    What about textures not defined in config and only in rvmat/p3d?
    It might be possible to create config definitions for yet undefined textures.
    Does it work? Dunno - testing needed. Might not for every type at least.

    Unknown how the preloading works - into Ram/VRam?
    Might cause issues if too much data is preloaded that way.

    Code:
    // addon configuration
    // Following official addons should be always loaded if present
    // this should help to minimize compatibility problems
    // with older missions that do not have correct addons[] list
    // (This applies especially to mission using official weapons).
    class CfgAddons
    {
    	access = 1;
    	class PreloadBanks {};
    	class PreloadAddons
    	{
    		class CA
    		{
    			list[] =
    			{
    				"CAData",
    				//...
    			};
    		};
    	};
    };
    This probably helps the engine do the preloading on mission loading.
    The same is done via addons/addonsAuto array as part of the mission.sgm.
    NOT recommended to define community work that way as it crates
    save game issues (makes a save dependent on the addon no matter what).
    Same/similar thing can be achieved via activateAddons (scripting command).

    Not much potential here I think.

    Code:
    // any texture corresponding to the entry below is preloaded
    // and kept in the memory permanently
    // actual texture file is looked up in the corresponding config entry
    // lookup values:
    //  "*" - the class including all subclasses is made permanent
    //  "." - only this class is made permanent
    // "fastFind" - optimize searching in this class
    class PreloadConfig
    {
    	RadioProtocolBase = "*";
    	RadioProtocolDefault = "*";
    	CfgVoice = "*";
    	class CfgCloudlets
    	{
    		CraterBlood = ".";
    		CloudletsMissileManual = "*";
    		CloudletsMissile = "*";
    		CloudletsScud = "*";
    		CraterDustSmall = "*";
    		CraterDustBig = "*";
    		CraterSmoke1 = "*";
    		CraterSmoke2 = "*";
    		CraterSmoke3 = "*";
    		CraterWater = "*";
    		Explosion = "*";
    	};
    	CfgDestructPos = "*";
    	CfgCloudletShapes = "*";
    	CfgMimics = "*";
    	CfgVehicles = "fastFind";
    	CfgNonAIVehicles = "fastFind";
    	CfgAmmo = "fastFind";
    	CfgMusic = "*";
    	CfgTitles = "*";
    	CfgCameraEffects = "*";
    	RscTitlesText = "*";
    	CfgFonts = "*";
    	CfgFontFamilies = "*";
    	RscMainMenu = "*";
    	RscSubmenu = "*";
    	RscMoveHigh = "*";
    	RscMoveDir = "*";
    	RscReply = "*";
    	RscStatus = "*";
    	RscWatchDir = "*";
    	RscWatchMoreDir = "*";
    	RscMoveDist = "*";
    	RscFormations = "*";
    	RscCombatMode = "*";
    	RscTeam = "*";
    	RscSelectTeam = "*";
    	RscRadio = "*";
    	CfgHQIdentities = "*";
    	RscButtonImages = "*";
    	class RscInGameUI
    	{
    		RscUnitInfoSoldier = "*";
    	};
    	RscObjectives = "*";
    	CfgDestroy = "*";
    	class CfgSFX
    	{
    		Church = "*";
    	};
    };
    Preloading configs does not seem like a source to speed up the game.

    Code:
    //Core engine data (preloaded textures and models)
    class CfgCoreData
    {
    	access = 0;
    	textureHalf = "#(argb,1,1,1)color(0.5,0.5,0.5,1,dt)";
    	textureZero = "#(argb,1,1,1)color(0,0,0,0)";
    	textureTIConversion = "core\data\ticonversion.tga";
    	lodTransitionSpeed = 0.125;
    	halfspaceModel = "core\default\default.p3d";
    	textureDefault = "ca\data\data\default_co.paa";
    	textureTrack = "ca\data\data\texturetrack_ca.paa";
    	textureTrackFour = "ca\data\data\texturetrackfour_ca.paa";
    	maskTextureFlare = "ca\data\data\masktextureflare%02d_co.paa";
    	eyeFlare = "ca\data\data\eyeflare_ca.paa";
    	cloudletBasic = "ca\Data\cl_basic.p3d";
    	cloudletFire = "ca\Data\cl_fire.p3d";
    	cloudletFireD = "ca\Data\cl_fireD.p3d";
    	cloudletWater = "ca\Data\cl_water.p3d";
    	paperCarModel = "ca\Data\papauto.p3d";
    	collisionShape = "ca\Data\colision.p3d";
    	sphereModel = "ca\data\koule.p3d";
    	rectangleModel = "ca\data\rect.p3d";
    	craterShell = "ca\data\krater.p3d";
    	craterBullet = "ca\data\krater_po_kulce.p3d";
    	sphereLight = "ca\data\kouleSvetlo.p3d";
    	cloudletMissile = "ca\data\missileSmoke.p3d";
    	horizontObject = "ca\data\horizont.p3d";
    	skysphere = "ca\data\obloha.p3d";
    	halflight = "ca\data\halfLight.p3d";
    	textureBlack = "ca\data\data\black.pac";
    	textureLine = "ca\data\data\tracer.paa";
    	forceArrowModel = "ca\ui\force.p3d";
    	footStepL = "ca\characters\stopa_L.p3d";
    	footStepR = "ca\characters\stopa_P.p3d";
    	slopBlood = "ca\characters\krvava_skvrna.p3d";
    	cobraLight = "ca\air\cobraSvetlo.p3d";
    	marker = "ca\air\obrysove svetlo.p3d";
    };
    Not much known again. Might be a way to preload p3d files.

  2. #2
    Nice work!
    Hope to find it in Biki soon
    #include "signatur.h"
    "I'm not slacking of. My addon is 'pboing'!"

    Blog about the RTE | Pastebin with SQF support

  3. #3
    = What can be done to improve performance:

    • Reduce texture size.
    • Remove "mipmap" textures.
    • Remove model complexity (resolution LODs - and therefore at times even sections).
    • Preload textures (if possible).
    • Preload models (if possible).




    = Testing

    Res LOD and mipmap dropping addons:


    Less complex models:


    You may wanna try these two preloading addons:


    Last edited by .kju [PvPscene]; Oct 22 2009 at 11:27.

  4. #4
    PreloadVegetationTextures_Visuals_C_PROPER.7z - (source code)
    Might work yet freezes the game on world loading here.
    This got me interested.

    Preloadvegetation is causing lot of problems to people?

    I downloaded preloadvegetationtextures, low buildings, low vegetation and draw distance tweak good while ago and have been using/testing them since.

    For me preload basically fixed the vegetation. Trees look good from close and from distance.
    Price is that it screws the building textures. Many buildings show only that ultra crap texture, some smaller parts have texture missing completely etc...

    Only times i have disabled preloadvegetation is when i have been playing mission in larger town/city. On country side it's just too good not to be used.

    Preloadvegetation seems, to me, be on right tracks allthough causing some anoying side efects.

  5. #5
    Interesting - so PreloadVegetationTextures_Visuals_C_PROPER works for you?

    With all textures from the 5 plants pbo the game fails to load here.
    With less, texture loading is horrible for non vegetation.

  6. #6
    Sergeant Major jasonnoguchi's Avatar
    Join Date
    Oct 25 2009
    Location
    Rotating btw US, China and Singapore
    Posts
    1,620
    Does these mods work in ArmA 1 ? really need to lower the LOD of all of these things in ArmA 1.

  7. #7
    The tools may work for a1 models too. Best to ask T_D about that.

    The addons are for a2. After all this is the a2 general forum.
    That said for a1 there are several tweaks available anyway.

  8. #8
    Quote Originally Posted by kju View Post
    This, crashes my game. Latest Beta, Phenom, 4gigs of ram, etc etc.

    -k
    ARMA 2 Mission packs:LITE Coop mission package + LIMA coop mission package (ACE + ACRE) + More ACE + ACRE missions. + Aliabad coop Mission Package+ Fireforce Takistan NEW
    ARMA 3 Mission packs:Fourplay Coop Mission Pack NEW
    Kill things, break stuff. Repeat as necessary.

  9. #9
    Yep. Like it says.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •