Welcome to Keen Software House Forums! Log in or Sign up to interact with the KSH community.
  1. You are currently browsing our forum as a guest. Create your own forum account to access all forum functionality.

View distance and visual effects

Discussion in 'Modding' started by Concave, Jan 14, 2020 at 02:20.

  1. Concave Apprentice Engineer

    Messages:
    109
    I have been pondering on ideas related to immersion and graphical modding. My question is: where would I start looking in source code about things to do with rendering? Would it be even possible to access this part of the game engine rendering mechanics in ModAPI?

    For example, when flying i notice tree lines change shape as I approach them. They look like cardboard from far away, but when close there are many animations and shading elements at play. This method seems used to accommodate a shading budget for relevant items to a players relative POV.

    I first noticed this concept in the Total War series, where a mass of soldiers would look like a dark blob from far away, but as the camera nears, individual detail is revealed. Battlecruiser Millenium and Universal combat games had planetary animal herds and bird activity, but only when the player was planetside. The flora/fauna was not physically interactive, which made it cheaper to add.

    The reason I mention the wildlife example is because I think of these herds somehow effecting local conditions. For example, grass density could be decreased over time if herbivore herd is in certain area grazing, and bird populations have historically followed herbivore grazing patterns in order to extract larvae from fertilizer. This is an example of a natural process that I think about adding to the beautiful planetary simulation (with good physics engine) that VRage has created.

    A dark, speckled "cloud" in the distance would be cheap to render, but could represent a flock of birds. This sort of activity would be a clue that the keen player could heed in order to achieve a certain objective.


    Here are some unorganized notes from a recent session, I'll put up some screenshots later:


    Code:
    distant dust clouds are primary indicators of land combat. beacon and
    antennae signals should be reserved for players that are over 4km away
    from the conflict. this gives players outside of audible range a direction
    to pursue, but once they are within audible range - distant sound will
    be another indicator of combat. dust cloud formations will remain suspended
    for a period of time before fading and this also gives a distant, grounded
    onlooker a reference point to pursue for some action
    
    view distance has to be balanced in order to give player incentive to
    use foilage, camoflauge, and slower movement to achieve their
    objectives. the length of grass, its distance render, and player
    position relative to a hill makes a drastic difference when trying to
    infer object position and distance without hud markers. a battlegroup
    traveling with wheels may not have their grids rendered from far away
    as a reward for their discretion and the presence of trees and a forest
    which ultimately would hide this sort of activity in the real world.
    but due to the constraints of the game engine - we cannot render all of
    this detail and have the player use it. therefore, the penalty of
    ground travel would be a slight dust cloud render that slowly accumulates, which could be cheap
    to do computationally, and still grant the wheeled travelling player
    immunity to the exact location of the grid from a distance, but once a
    player with an advantage in the form of aerial powered aircraft comes
    along to respond to the dust cloud, the grid will render within however
    many kilometers we choose.
    
    the description above desires to create the scenario of a player aerial
    POV traveling relatively fast noticing a slight change in the scenery
    that may not be as easily visible from ground level. this would prompt
    a curious player to investigate, and since we are setting rendering rules,
    we could also make the individual forest trees render within view distance
    of the flying player. this would mean there would not be an exact
    source of the dust, but a general pattern that would infer the sound of the
    traveling wheeled vehicle.
    
    audio hearing distance is closely tied to this system. a loud air traveling
    vehicle could be heard but not seen. a wheeled vehicle could be neither heard
    nor seen, until within closer proximity relative to the fast aircraft.
    rumbling engines with sound proofed engine bays could be an engineering
    tactic that may come with a fuel penalty and allow a player more stealth.
    
    	note: longer distance hauls can be treated in this same regard, with
    	both sound and visual cues. as a player approaches a new planet from
    	another, this would imply millions of kilometers of travel, so we can
    	agree on an amount of time that would be fair to give a shimmer for
    	planetary players. lets say that this shimmer would be less obvious at
    	first if the viewer is the destination of the jumping player. players
    	at different angles would have a more pronounced view of the travel
    	sequence. if you are on a planet independent of a large scale transmission
    	of freight - it would be obvious as the distant skies would be filled
    	with constant streaking, which may not be as obvious unless we only
    	allow details to be visible with a telescope. the effect this could have
    	is the curious interplanetary player arrange for travel to another "hot"
    	sector.
    	
    footfall sound will be tweaked, and grass density would have a minimum
    required render distance, of only a hundred meters or so. this would create a
    combat distance for ground based players. jump packs will need to be
    altered. a hover mode introduced? ultimately we want to suppress the
    ability to launch a player far above the action and see other players
    utilizing the grass. if this is allowed, we could still rely on our
    render mechanics to keep players hidden. this may arrange  a scenario
    where a surrounded player can launch themselves above the canopy of
    the trees where he may be closed in on foot within 100m. his grass
    cover allowed him to get this far, but once the 'launch' happens his
    position is obvious. the hunting players could fire on him, but would
    not likely be accurate, but they can afford to try, because the jetting
    player would be losing character model render distance because what
    the effect of rapid acceleration and wind rush would do to a person
    in real life. we could even drastically limit their view sensitivity,
    because the G forces required for the escape situation they were found
    in will limit their physical ability temporarily
    
    
    colliding craft will be handled by replacing both grids instantly with
    a flat texture arrangement that could reflect the nature of the crash.
    ultimately we want to slightly distort the player POV and hud in order
    to simulate the physical severity of violent explosions, lurches,
    collisions, gunfire, thruster burn. this would mean a local render of
    a spectacular event would yield in instant death, negating the need
    to render anyways. or, it would have a delayed render for the purpose
    of wreckage (that also reflects the nature of the crash), all in the
    middle of a large cloud of dust and debris and players within a certain
    proximity could have blurred vision that would hide the required
    delayed render load of the destructive event
    
    
    large objects on the horizon. this scene could be arranged by introducing
    a slow moving, towering mobile structure that could be used for a fast
    mining feature. and simultaneous heavily armored and defending fortress.
    it could essentially function like an AoE2 siege engine. slow movement
    speed, visible horizon signature, easy probe detection would be the
    keys to countering this force. its advantages include rapid player
    repairs, respawn, mobile construction, fast mining, and a certain type
    of turret required to get past a certain type of defense. this would
    create incentive to build these large expensive titan elements that
    allow a player to run campaigns. these machines would be required for
    multiple players to be on board in order to operate. this would prevent
    one player from tirading around alone.
    eventually we want to be able to use sheer numbers of NPCs to overwhelm
    players. smart players can kite npc hordes around, but opposing players
    can interfere with PVE like DayZ. this would create crude but operational
    NPC interaction environments where rates and values can be tweaked in order
    to accommodate players eventually seeking challenge, noteriety, progression.
    we cannot simulate large scale AI driven community growth because of limits
    imposed by the engine and current hardware.
    back to the canopy, forest, tree example. as with joint operations typhoon
    rising, grass can hide the player at a distance without rendering the
    expensive grass. so, perform this same function with a forest texture that
    could somehow appear over areas where players may want to conceal from
    satellite  or aerial observation. but we would not them to be able to hide
    indefinately\.
    	
    distant explosions and combat would produce slow rising, subtle tufts of clouds, but
    because explosions produce light, night time combat will be easily traceable.
    it would be easy to miss new, different colored clouds in the distance because
    of combat too far to hear. a large warhead explosion could produce a shockwave
    that maybe could even be slightly visible. trees nearby can shutter a few
    moments after it visibly occurs. large scale events like this create a
    signature on a horizon, but once distance is closed, the amount of dust implies
    low visibility conditions in the area that could hang for several minutes at a
    time, which means easy to hide within or figure out a rapid escape.
    
     
  2. mojomann71 Senior Engineer

    Messages:
    1,803
    Are you sure you posted this for the right game? We have no birds or herbivores. Or even soldiers for that matter...

    :D
     
  3. Concave Apprentice Engineer

    Messages:
    109
    I know we have neither of those - I am seeking out information to use to navigate the source code to the end of potentially adding some of these concepts. I love what Keen has made in the way of a planetary simulation with a meaningful physics engine. They have made the game accessible on a wide range of machines using the rendering tricks I am interested in.

    Here is the original question posed at the beginning of the thread: "My question is: where would I start looking in source code about things to do with rendering? Would it be even possible to access this part of the game engine rendering mechanics in ModAPI?

    I cannot find a screenshot or video from Battlecruiser Millenium to demonstrate what I am after, I'll have to download the client and find it myself.

    Soldiers would be a nice addition. Even simple bots that can aim with adjustable accuracy/firepower and move a bit would be interesting to work with as fodder to counter player aggression. The "soldier" I was thinking of more of an NPC ship with similarly simple capabilities ineffective alone but in numbers could contest a player and present a challenge sufficient enough to require multiple players to assimilate, plan, and overcome.


    The "bird cloud" concept is just a derivative of the "wheeled player traveling" dust cloud idea - each of these has a certain utility. While in real life I am interested in agriculture, and thought it would be interesting to explore the game simulation factor to play with these concepts. However, a bird cloud could be indicative of something more exciting for the engineer player looking for some combat. If players are traveling in heavy, polluting, loud vehicles, it will motivate animal populations to reconfigure their location. Therefore, a player that is not operating with discretion could have their position revealed by sudden movements of a local bird flock rushing into the sky. Another player sitting patiently on a mountain, waiting for "signs" of interesting activity, may notice this sudden natural reaction and investigate. The sound of a loud enemy player may be too far to hear, but we can use rendering tricks like dark specs going towards the sky to prompt PVP action. We would not be concerned with individual bird animations or detailed behavior - it is only for a visual cue and effect.
     
  4. Concave Apprentice Engineer

    Messages:
    109


    Here's an example of a distant propulsion event generating the plume of dust. Rapid takeoff and landing would generate this type of effect and the resulting cloud would linger for varying periods depending on the wind. A crash would have a similar effect and we could use this to disguise delayed grid loading to smooth out performance during large scale otherwise SIM reducing events.