Jump to content
The Dark Mod Forums

SteveL

Member
  • Posts

    3666
  • Joined

  • Last visited

  • Days Won

    62

Posts posted by SteveL

  1. The engine will stop us using the alpha channel for lit materials. All light interactions are drawn "blend add", which ignores alpha. For solid objects, the background color is always black so you wouldn't know that a blend had been used. But for transparencies, the background is whatever solid object has already been drawn, and the brightness of the foreground object is simply added to the colour in the background.

     

    That said, the milky stage could be light-interacting too of course so it shouldn't be a problem.

  2. We could make those flasks fully light-responding like AH's window. So they don't show up in the dark at all. That way people don't have to tweak RGB settings to get them to look right in a given setting.

     

    A simpler example of a lit transparency (simpler than the window def above) is our cobwebs. They need a bump map, which can be the fake _flat, then a blend add stage to hold the diffusemap. Obs rediscovered that adding a bump map can make flasks and other transparencies light-interacting.

     

    The one disadvantage is they don't ever get shadowed, so they can be oddly lit by a light the other side of a wall.

    • Like 1
  3. Cool. It doesn't have to be a noisemaker of course, you can be less disruptive than that. A thrown object or if there are none to hand, even a thrown readable might make him pause and turn his head without dropping anything. But that might not be enough of a distraction to stop him hearing you, I must admit I've never attempted it. I'm always pretty pleased with myself if I make a light bearer drop the light :)

  4. ...its overkill to make a highpoly version for most models you would want to put in the game.

    Don't you always want to make a high-poly version to create a good normal map for the lower poly versions? Normal maps aren't just for surface detail, they also make lower-poly versions look higher poly by smoothing out the shading.

    • Like 1
  5. For a translucent light-interacting decal, here's one of our standard cobwebs. It generates a rough normal map and a specular map from the diffuse image:

    textures/darkmod/decals/webs/cobweb1
    {
      qer_editorimage textures/darkmod/decals/webs/cobweb1_ed
      translucent
      noshadows
      twosided
      nonsolid
      sort 5
    
      bumpmap heightmap (textures/darkmod/decals/webs/cobweb1, 2)
      diffusemap textures/darkmod/decals/webs/cobweb1
      
      {
        blend specularmap
        map textures/darkmod/decals/webs/cobweb1
        red .25
        green .25
        blue .2
      }
    }
    
    You can see it's light-interacting if you wave a lantern round in front of it. Also, it won't glow in the dark like most transparent materials do. The glass crack decals work the same way.

     

    For an alpha-tested version, our ivy pieces are a good example:

    textures/darkmod/decals/vegetation/ivy_mixed_pieces
    {
      surftype15
      description "foliage"
      noshadows
      nonsolid
      noimpact
      twosided
      qer_editorimage textures/darkmod/decals/vegetation/ivy_mixed_pieces_ed
    
      {
        blend diffusemap
        map textures/darkmod/decals/vegetation/ivy_mixed_pieces
        alphaTest 0.1
      }
    
      specularmap textures/darkmod/decals/vegetation/ivy_mixed_pieces_s
      bumpmap textures/darkmod/decals/vegetation/ivy_mixed_pieces_local
    } 
    • Like 1
  6. atdm:door_96x48_2hinge

     

    I just tried it and it seems (to my surprise) that yes doors rotate using the global axes not local ones. It's defined by the "rotate" spawnarg which defaults to "0 90 0", meaning +90 degrees round the global y axis. If your door's axis is horizontal but still aligned along either the x or z axes in DR, you can probably get the right result by using the x or z axes: 90 0 0 or -90 0 0 or 0 0 90 etc

     

    If it's at bizarre angle, then post its "rotation" spawnarg and we can try to work out the right values for the "rotate" spawnarg.

  7. Well, I might have an idea, but let me ask. Can I spawn the player in a crouch from the start? If not, can I disable crouch?

    You can probably make the player crouch by firing off a session command -- whichever one the "crouch" key is bound to -- from a target or a script. I don't know whether you can disable it though.
    • Like 1
  8. Just one example would do...

     

    NB Thinking about it again, I might be on the wrong track here. Walls have thickness, so an FS touching the inside of a wall shouldn't be considered to be in a neighbouring visleaf. Typically, the "insides" of walls are not part of your map at all, they are in the void. As long as you don't build your map inside a big box, that is. If you have a surrounding box, then nothing is "void" and it screws up the renderer's optimizations.

  9. Something that's been bugging me for a while is that some patch func_statics like roof beams get rendered although I'm in a different visleaf.

     

    For example, r_showtris or giving the walls a caulk texture shows that even though I'm standing outside the house, a lot of the beams inside the house are being rendered. (Visportals all closed)

     

    Did anyone else have their architectural patch func_statics leak into other visleafs - and did anyone find a way to stop it?

    Yes I've noticed that happen from time to time.

     

    - make sure all verts are within the room or flat on the wall

    The flat-on-the-wall thing might be the problem. I've noticed the engine sometimes uses a margin of error -- an epsilon -- when deciding whether surfaces touch or cross. During dmapping for example, 0.1 units is used. Surfaces less than 0.1 apart are considered to be both touching and crossing. That's probably why DR's minimum grid size is 0.125. Any smaller, and surfaces separated by one min grid unit would get merged during dmap. If the same logic applies in the renderer, then an FS touching a wall could be treated as crossing it.

     

    It might be something entirely different of course. Does anyone have an easy-to-recreate example that I could test? Like a specific model that when placed against a wall ends up being rendered from outside the room?

    • Like 1
  10. As stated, the stealth score 0, all loot run of the level has been finished.

    Hope it does your level justice, Sotha.

     

    Great playthrough! You really are very good at this game. I've never finished a mission on 0 stealth yet. Nice video style by the way. No talking means the viewer gets to hear what you the player hears -- very important in TDM.

     

    I'd not thought of using moss arrows like that, but it seems obvious now I've seen you do it. I've only ever used them to make quick dashes possible.

     

    The one tip I can contribute is that you can drop bodies down the drains much more quietly by simply manoeuvring them into the hole instead of shouldering them -- not that you needed to given your good timing!

    • Like 1
  11. Ignore the warnings about backwards triangles. They'll be gone in the next TDM release.

     

    I don't know what the spew over unknown commands in default.cfg is about... I don't have those words in my default.cfg. But I don't think that problem caused your segfault.

     

    The warnings about multiple brush sides having visportal texture on them should be taken seriously, and could conceivably screw up dmap's data structures -- a likely cause of your segfault. Check your portal brushes. They should have exactly one face with visportal texture and the rest should be nodraw.

     

    If nothing works, PM me the map and let me try dmapping it in my (Windows) debug build to see whether I can spot the problem.

×
×
  • Create New...