[REQ] Tree reducer

Discussion in 'Mod Discussions' started by zaphodx, November 17, 2013.

  1. zaphodx

    zaphodx Post Master General

    Messages:
    2,350
    Likes Received:
    2,409
    Not sure if this is possible but I think the trees on Earth biomes kill my FPS. Is it possible to reduce the number of rendered trees by about 70%?
  2. maxpowerz

    maxpowerz Post Master General

    Messages:
    2,208
    Likes Received:
    885
    Not untill release or when we get server side moddig.
    it's part of the Planet.json and Biomes.
    I can do it but it wont make a difference during gamelay the server's planet.json overrides the local one i think.
    You only see a difference in the system editor, thats how i know it works :)
  3. maxpowerz

    maxpowerz Post Master General

    Messages:
    2,208
    Likes Received:
    885
    It's the same with making custom biome's and planets in general,
    you can make them client side but they wont load on the server just yet.
  4. zaphodx

    zaphodx Post Master General

    Messages:
    2,350
    Likes Received:
    2,409
    But that's what I want? To reduce trees rendered on my side to increase FPS.
  5. maxpowerz

    maxpowerz Post Master General

    Messages:
    2,208
    Likes Received:
    885
    It kinda sucks hey, but im sure when we get release it will be doable very easily, all i need to do is edit the grouping brushes for the trees and sparsen/thin them out a bit.
    I myself consider the current amount of trees a little on the over-kill side of things and i may point this out to an artist or a dev to see if we can have an option to reduce the amount of trees in a cluster in the jungle biome.
  6. Culverin

    Culverin Post Master General

    Messages:
    1,069
    Likes Received:
    582
    According to Mavor, trees are supposed to be part of the sim (soon?).

    "Removing" trees will likely only be a temporary solution.
  7. azuna1

    azuna1 New Member

    Messages:
    13
    Likes Received:
    2
    you could just replace the current tree model with a super simple one (a green stick?)

    i also wonder.. shouldnt trees be a single mesh group?
  8. maxpowerz

    maxpowerz Post Master General

    Messages:
    2,208
    Likes Received:
    885
    there is about 6 different trees and some varieties of small vegetation.
    then in the jungle biome folder there are 6-7 different groupings of these trees .
    but yeah, reducing the tree model to a single polygon would always help, even removing the tree's altogether, but like culverin said they will be affecting gameplay soon as im sure they will be, the dev's said they will be burnanble and maybe even reclaimable when they finish implementing the feature.
  9. azuna1

    azuna1 New Member

    Messages:
    13
    Likes Received:
    2
    i was just talking about the drawcalls requiered to render a planet

    you can ofc place 100x the same model but then it will take 100x the amount of drawcalls
    its possible to (after generating the planet) to assamble them to just 1, so your graphics card only needs 1x the drawcalls to actualy render them

    Explanation:
  10. Culverin

    Culverin Post Master General

    Messages:
    1,069
    Likes Received:
    582
    So a single stick could potentially work?
    Even as a part of the simulation?

    Green stick = tree
    Red stick = tree on fire
    Black stick = burnt tree
  11. Raevn

    Raevn Moderator Alumni

    Messages:
    4,226
    Likes Received:
    4,324
    The simulation is independent of the rendering. You could have the trees not render at all, and they would still "be there". Of course this wouldn't be great to play on, so it's up to the user how much tradeoff they want :p.
  12. maxpowerz

    maxpowerz Post Master General

    Messages:
    2,208
    Likes Received:
    885
    Yes the game uses instancing to render the trees, the only reason im not doing the mod just yet is because the dev's said they are making the trees part of the sim at some point and they will affect gameplay.
    At this current point in time tho, i could easily do what zaphodx's requesting (i will have a few versions ready in a few hours :) ).
    Raevn is also correct the trees aren't part of the sim right now, so its only a visual effect at this point in time and i can fix it for zaphodx so i will try.
  13. maxpowerz

    maxpowerz Post Master General

    Messages:
    2,208
    Likes Received:
    885

    It depends on how the engine will interact with the meshes when its implemented, im not sure if trees will need collision boxes, if the do they will most probably need the collision box to be modified to suit the new tree shape or units will get snagged on non existant vertices.
  14. maxpowerz

    maxpowerz Post Master General

    Messages:
    2,208
    Likes Received:
    885
  15. azuna1

    azuna1 New Member

    Messages:
    13
    Likes Received:
    2
    i feel like none of you got what i was talking about :D
    i was just speaking about FPS affected by trees due to a wrong way of rendering them

    ps: probably mountains too
  16. maxpowerz

    maxpowerz Post Master General

    Messages:
    2,208
    Likes Received:
    885
    you were talking about model instancing
    http://wiki.splashdamage.com/index.php/Model_Instancing
    Im sure of it.
    drawcalls to render the same tree model over an over, its called instancing.
  17. maxpowerz

    maxpowerz Post Master General

    Messages:
    2,208
    Likes Received:
    885
  18. azuna1

    azuna1 New Member

    Messages:
    13
    Likes Received:
    2
    ye but i say PA does not effectivly use it
    if it would work correct a mapfile wouldnt be big ins size
    but PAs planets consume alot RAM
  19. maxpowerz

    maxpowerz Post Master General

    Messages:
    2,208
    Likes Received:
    885
    Its not the trees eating ram.
    When you make a planet say 600 in size with the water level about 38ish the planet is made of around 8000+ vertices,
    when you set the water level to 0 on the same size planet it generates a ton more mountains,
    With the current CSG system when a brush joins the planet surface the intersecting parts create more vertices,
    So in the end when a ton of mountain brushes are used the amount of vetice on the planet jumps from 8000+ to over 18000+

    to see this for youreslf, load up the system editor, then press ~ (tilde)
    type "viz wireframe" and press enter.
    it will render the game in wireframe, (this is a dev debugging option)
    then genearte a stock earth planet with the water around 32-38.
    look at the planets wireframe
    then just set the water to 0 on the same planet then press preveiw again :)
    WOW look at how many extra vertice are generated around the brushes .. OMG WOW .. lol
    It's not the trees eating RAM its the planet's geometry :p

    --edited---
    type viz normal or viz 1 to get back to normal rendering.
    Last edited: November 20, 2013
    Raevn and LavaSnake like this.
  20. Gerfand

    Gerfand Active Member

    Messages:
    575
    Likes Received:
    147
    Just reclaim those dam trees(I know that yo can't reclaim this yet)

Share This Page