Custom detailsprites

Discussion in 'Bug Reports' started by Silk, Apr 13, 2014.

  1. Silk

    Silk Mapper

    Messages:
    3,147
    Likes Received:
    36
    Trophy Points:
    0
    So terrain can have automatically placed detail sprites like grass. For this it uses a material called "detailsprites.vmt" linking to a texture called "detailsprites.vtf" in the folder "detail" under "materials".

    The combinations of sprites that are made from that material and used in maps are specified in "detail.vbsp" in the root folder of the game.

    Now it's possible to make a custom material/texture and a custom detail.vbsp file. All that should be required to use it after making those is to link to them in "map properties" in Hammer (last image of the first post in the link below). However this doesn't seem to work. It keeps using the standard files even if I tell it to use my files.

    At last I tested this by copying the standard files, leaving them in the same folders and simply renaming them and correcting their path references to the new names. I inverted the colors of the texture for a visual difference and changed the map properties to link to the new files, but it still used the old ones. If I remove the old ones, it uses none.

    Info on detail_sprites
    http://www.interlopers.net/forum/viewtopic.php?f=11&t=33402&hilit=custom+detail+sprite+material

    Still I remember seeing custom stuff in the past. Yet this should be so simple that I can't see where I could've done something wrong. Bug or me being very, very stupid ?

    Edit: nvm, it seems to require a pc reboot for some reason. Restarting Hammer alone isn't enough.
     
    Last edited: Apr 13, 2014
  2. Beerdude26

    Beerdude26 OnThink(){ IsDownYet(); }

    Messages:
    7,243
    Likes Received:
    13
    Trophy Points:
    0
    So, is this fixed?
     
  3. Silk

    Silk Mapper

    Messages:
    3,147
    Likes Received:
    36
    Trophy Points:
    0
    Yeah tested it twice. After a reboot it adjusts.

    Didn't find out earlier cause I always put my pc in sleepmode ^^
     
  4. Trickster

    Trickster Retired Developer

    Messages:
    16,576
    Likes Received:
    46
    Trophy Points:
    0
    On a very very very vaguely related note, is there any way we can force a minimum viewdistance for detailsprites or something. What kind of lag are we talking if it's like 8k?
     
  5. flasche

    flasche Member Staff Member Moderator

    Messages:
    13,299
    Likes Received:
    168
    Trophy Points:
    0
    [​IMG]
     
  6. Silk

    Silk Mapper

    Messages:
    3,147
    Likes Received:
    36
    Trophy Points:
    0
    I wish to know if we can as well ^^
    Distance is much too short for decent use most of the time

    I have no idea on impact though. But much will depend on how dense, how many (surface wise), and what type (sprites or models). Not extremely dense sprites should be fine I think for 8k view distance. Models ... no idea

    Been talking about detail sprites/props with flasche today. Especially tried looking at Dear Esther and how they did it, but most is codewise. They did wonders though, even developed their own GPU-accelerated sway for detail sprites. I tried some things but failed. Canyon would be perfect for much more dense details though as the map has very good performance.

    Can't you try it out in a beta branch or something?
     
  7. Trickster

    Trickster Retired Developer

    Messages:
    16,576
    Likes Received:
    46
    Trophy Points:
    0
    I remember ramping it to 8k on one of Omneh's map lliterally halved my FPS, so that might be an issue.
     
  8. Silk

    Silk Mapper

    Messages:
    3,147
    Likes Received:
    36
    Trophy Points:
    0
    I tested this in Chain. It's the only map I can test it on since the engine port. All other maps (with terrain) seem to have 300 fps all the time since then.

    In chain, from player level (so with visibility blocking, which also removes detail sprites) the visual difference was huge and I barely saw a drop in performance. 95% of the map was still at 300 fps even with 8000 units of view distance.

    From above though, so without vis blocking, fps would drop to an average of 195 (standard 1200 distance) at east and west if I looked in directions with the most demanding sections of the map in sight. With 8000 distance that would lower to 160 fps, which admittedly is a big drop.

    However even above the visblocking the drop was only that big in some places, on average it was more a 20 fps drop instead of 35, and the commanders are the only ones who will ever get above all of the visibility optimizations. Below everything was fine.

    Imo it's perfectly possible for MOST maps, however maps relying heavily on detail models (like emp_silo's ferns) would NOT be able to cope with it, unless optimized with care. For example only dense patches of detail props at some strategically or visually important areas, while everything else is more barren, and/or having dense areas of detail props divided by something that blocks visibility so they don't ever have to all be drawn at the same time.

    Does the engine/game allow for map specific detail distances? Cause it would be a shame to leave it at 1200 for all maps just because there's maybe 1 or 2 maps that could suffer from an 8000 distance
     
    Last edited: Apr 16, 2014
  9. Beerdude26

    Beerdude26 OnThink(){ IsDownYet(); }

    Messages:
    7,243
    Likes Received:
    13
    Trophy Points:
    0
    Reading the detail props page on VDC, I noticed you have to activate the detail shapes (=2-3 sprites arranged in a 3D shape that sway and can bend away from players) in code, so I went ahead and did that. The next RC should have it. Might be nice to use for even more detailed foliage.
     
  10. Silk

    Silk Mapper

    Messages:
    3,147
    Likes Received:
    36
    Trophy Points:
    0
    Wanted to ask that some time ago, but for some reason I never did.

    Will try it out
     
  11. f1r3w4rr10r

    f1r3w4rr10r Modeler

    Messages:
    2,475
    Likes Received:
    4
    Trophy Points:
    0
    Will be really nice looking I hope. But I bet there are going to be at least some complaining about their unplayable FPS again. Make sure you couple it to some graphics quality presets, if it isn't already.
     
  12. Trickster

    Trickster Retired Developer

    Messages:
    16,576
    Likes Received:
    46
    Trophy Points:
    0
    The point is, if players can turn it off/down then it defeats the object of what we're trying to achieve. If you play at the moment on any map with a lot of detailsprites, especially Omneh's maps, the smart thing to do is just turn them off. That way, players can't hide in them near you so you have superior vision. I want a situation whereby we don't have this situation where someone is prone behind what they think is a bush, 2000 units away, but doesn't actually render to someone else and so they get shot.

    It's a huge problem in games like Arma, but in Empires we play at much lower distances, so hopefully we can help the issue a little bit.
     
  13. Silk

    Silk Mapper

    Messages:
    3,147
    Likes Received:
    36
    Trophy Points:
    0
    Arid, Bush, Chain, Downfall and eventually Echelon will have no problem with 8000 detaildistance.

    Since duststorm hasn't got any that won't be a problem either. If it gets detail sprites in the future than the guy adding them should be able to do it in a way that it doesn't break performance.

    I'm testing stuff in Canyon atm, I should be able to make something decent eventually that doesn't break performance either

    Glycencity, streetsoffire, urbanchaos, escort and district have no or barely any detail sprites, so no problems there.

    I'd be surprised if crossroads would suffer from it, isle shouldn't have a problem either as the beach part doesn't have any.

    Slaughtered would be a problem in the future because the map is just basically a horizontal surface, were displacements are both ground and cliff at the same time. Detail props on the ground will also cover the cliffs which is why slaughtered never had detail props which is why this actually isn't a problem unless someone wants to add detail sprites to it.

    Mvally has very few sprites I think? So that shouldn't be a problem.

    What am I missing?

    What's left is maps like Silo and that swamp map, which heavily use detail props, a lot of them being models
     
    Last edited: Apr 16, 2014
  14. Beerdude26

    Beerdude26 OnThink(){ IsDownYet(); }

    Messages:
    7,243
    Likes Received:
    13
    Trophy Points:
    0
    Do we have this? https://developer.valvesoftware.com/wiki/Func_detail_blocker

    Prevents detail sprites from being placed somewhere.

    EDIT: Also, I allowed detail models to use VertexLitGeneric, as suggested in the tip here: https://developer.valvesoftware.com/wiki/Detail_props#Models. I don't know how useful it is, but it might be nice.
     
    Last edited: Apr 16, 2014
  15. Silk

    Silk Mapper

    Messages:
    3,147
    Likes Received:
    36
    Trophy Points:
    0
    We didn't before, but I'm not sure after the engine port. L4D2 has it.
    Once Hammer is done compiling I'll check and edit this post
     
  16. Trickster

    Trickster Retired Developer

    Messages:
    16,576
    Likes Received:
    46
    Trophy Points:
    0
    Omneh's maps are arguably the biggest issue when it comes to this, but his maps are also some of the best, so I'm inclined to want to get them working with this, as I always felt it ruined Insurrection (the Swamp map) and Silo.
     
  17. Silk

    Silk Mapper

    Messages:
    3,147
    Likes Received:
    36
    Trophy Points:
    0
    I would advise against it if those sorts of maps do not get optimized for larger distance first.
    With optimization ... it's probably possible but an impact on performance can't be avoided even then. It's worth a try though. I hate the short distance from a visual perspective.

    Also beerdude, the detail_prop_blocker does not show up in the list I'm afraid.

    Edit: Vertexlitgeneric for detail models could be handy in specific situations. It would solve one of the problems I and Flasche will have with an experiment of ours. We'll see about performance.
     
    Last edited: Apr 16, 2014
  18. Beerdude26

    Beerdude26 OnThink(){ IsDownYet(); }

    Messages:
    7,243
    Likes Received:
    13
    Trophy Points:
    0
    It's func_detail_blocker.
     
  19. Silk

    Silk Mapper

    Messages:
    3,147
    Likes Received:
    36
    Trophy Points:
    0
    Was just some words to describe it, I did look for the correct name in Hammer though :)

    Edit:
    Canyon with 8000 detail distance and over twice the maximum total amount of detail sprites in the map (I cheat the engine)

    https://www.youtube.com/watch?v=B7UR6ulx7MQ

    It still has problems of course, but only just started experimenting.
     
  20. Trickster

    Trickster Retired Developer

    Messages:
    16,576
    Likes Received:
    46
    Trophy Points:
    0
    Fuck me that's awesome.
     

Share This Page