Jump to content


Community Members
  • Posts

  • Joined

  • Last visited

  • Days Won


Everything posted by DanW58

  1. Okay, so I go into the ~/0ad/binaries/mods/public/ folder, I create a zip file, include the four files in /shaders/glsl/ and all the xml files in /art/materials/ and then rename the file? EDIT: The "mod.json" in it is just a text file I should write and include in /public/ ?
  2. Hrmmm... The last Windows I worked with was XP; I wasn't aware of "compressed folders" at all. I'm so sorry.
  3. Ouch! Wouldn't just copying the four shader files to the glsl folder work? @maroder I'm sorry, switching versions is not what I intended for anyone to do. @Stan` I'll check out OBS. EDIT: simplescreenrecorder is working pretty well, though ...
  4. I'm installing "simplescreenrecorder". I have no idea what binaries zip compressed you are talking about; this is just a few files, none are binary, just a few k. There's a bunch of .xml files, one .vs file and thre .fs files. All are a few k in size. I'll make an updated patch file. In the meantime, here's just the shaders; you can replace them alone, in the shaders folder, ..0ad/binaries/data/mods/public/shaders/glsl/ model_common.fs model_common.vs terrain_common.fs water_high.fs
  5. All I can find is an LXQt Configuration Manager, and it has keyboard shortcuts, but there's no entry for "screen recording". I actually switched myself to Lubuntu; I don't know if that has anything to do with it...
  6. Cool! Thanks. I never knew I had a built-in screen capture. EDIT: Doesn't work at all...
  7. Sounds like an idea. How can I capture video, though? I've never done that. I'm on Ubuntu. (In any case, you don't need to use SVN to apply my mod; you can just do it by hand, though you might want to backup or rename each original file before replacing it.)
  8. Actually, I just improved the shine on the skin, by toning it down with what I call "purity" in the new shader, namely the % of influence of the Fresnel reflecting layer. For a car-paint, purity is 100%. For a plastic it can range from 40% to 75%. I found about 60% does the trick for human skin. Otherwise it looks like it's got oil on it. Even making the shininess low, it doesn't work, as it makes the skin look like it's in shiny nylon. The only way to tone down the shine is by dialing down the % of the surface participating in Fresnel specularity.
  9. This "metal detecting" shader keeps getting better. Even as I work in the new shader, once in a while I use the current shader (I mean MY current shader, the metal one), as a test bed for ideas, as well as for my gaming pleasure. I just added two very, VERY subtle effects to human skin: An emissive 0.01 red added glow just to account for body heat; and a sort of emissive 0.03 red glow modified by shadows AND by sunColor, but not modified by view angle or light incidence; in other words a very slight and primitive sub-surface scattering effect. Together with Fresnel gloss this keeps making skin more and more natural-looking. In the shot below, it is hopeless to try and notice these things, but when the women go into the shadow of the trees or come out into the sun, you do notice a hint of translucency, barely noticeable, but it makes a world of difference. The perception of translucency is from the fact that the shadow side of the arms glows a tiny bit brighter when the arm is hit by the sun on the other side. Look at the woman in the sun, and at the two women in the shadow of the trees. Do the women in the shadow look a bit "cooler" than the one in the sun? It's very subtle, but it's there. And the Fresnel highlights of skin happen at particular moments, at particular angles, hard to catch in a screenshot, but when they happen they also add a ton of realism. None of the women in the image are catching the sun in a specular way at the moment I got this image capture, but the men mining metal did catch some rays. You people don't know what you are missing. Yes, there are things you can criticize about this metal and skin detection hacks shader, but the benefits far outweigh the costs, and it is a FUN shader that keeps surprising the eye, such as by putting metal particle glints on the "metal" rocks for mining; an unintended but highly beneficial "bug". So far, as far as I know, NOBODY has ever even looked at this shader; nobody has tried it. They just look at the still pictures I post, and they lean back on their armchairs and criticize... Most of the benefits are dynamic; they cannot be appreciated from still images.
  10. This is too hard. I got a level of darkening... sort of under the water rather than above it... ...and what it took to get there is unspeakable. These are the last few lines of getRefraction() { ....................... float term1 = clamp( 0.9999*worldPos.y - refrWorldPos.y, 0.0, 1.0 ); float term = pow( term1, 240.0 ); float temp = clamp( term, 0.0, 1.0 ); vec3 mulfactor = vec3(0.382 * temp + 0.618); return vec4(mulfactor*refrColor, alpha); } It took a lot of experimentation to get there, and I've no idea why the numbers work. A power of 200 doesn't work; but 240 does ... I think I'm banking on some arithmetic error; this probably shouldn't work at all. Of course I was trying to get a smooth function, but just couldn't make it work. And every attempt at lowering the water level through optical tricks failed. And I mean, I did get to lower the water, but the bottom went down with the water, leaving the land floating a few feet above the water like they have antigravity technology... Might work for Atlantis... I'd better get back to work on the new shader.
  11. Thanks. I got myself momentarily distracted with the water shader, trying to make coasts look wet. I couldn't do it in the terrain shader, as it has no information of water level; and the water shader doesn't have information about the terrain. I almost gave up, but then I thought, "what if I drain the water a bit?, lower the level, then I should be able to give the exposed rim a wet look. So far I think I've succeeded lowering the water level by one yard, but I'm still looking for how how to repaint the exposed part. All I got so far is arctifacts around the top of islands; I mean edges of islands towards the top of the screen look like they have water gaps...
  12. Thank both of you; I know all I needed to know today, and it's only 2pm.
  13. @vladislavbelov What's the difference between, varying float waterDepth; and what comes through the x channel of ... uniform sampler2D depthTex; ? I was trying to drain a bit of the water and implement a "wet shore" look for terrains other than sand, but I'm having trouble understanding the code.
  14. Yes, I was asking about skyboxes specifically. I don't get the connection to .png. All the ones I saw, with or without LOD's, were .dds files. My question is still the same. I tried changing the blurriness of the sky's reflections on water by LOD- biasing the texture cube reads, but it had no effect; which may mean there were no LOD's. So the question is, were LOD's missing in that particular map due to using an older sky without LOD's?, and if I get the right sky with LOD's it will work?, or does the engine strip LOD info from sky-boxes? Never mind, I guess I just have to look in the xml files to find a map that calls for a sky with LOD's and try it there... I'm going to try implementing a wet shoreline in water_high.fs; I think I can do it by draining a bit of the water ... OMG, the water shader code is so complex; there's depth as a uniform, depth as per refraction, depth read from depth.Tex texture stating buffer precision issues, so this is Z-depth? I'm lost...
  15. @Loki1950 I had GIMP 2.1 already; didn't know it could open dds, LOL I have a problem with GIMP, though; every time I try to copy a selection, it quits on me like exit(0). @Stan` Been looking at the skyboxes and some have LOD's; some don't; which is kind of perplexing. All the ones that have LOD's are 512 in size, and include cumulus, dark2, mountainous, overcast, stormy, stratus, sunny, sunny1, sunset, sunset2 and twilight. All the ones that do NOT have LOD's are 256 in size, and include cirrus, cloudless, dark, default, fog, rain, sunrise and sunset1. So, you've said that the engine does something programmatically at runtime with the skyboxes, something along the lines of making them player-centered; but my question is, @vladislavbelov whatever we have in the end, does it have LOD's? I'm asking because all the work I'm doing of ensuring that blurriness of reflections and phong shading agree with each other, all the math for matching AO numbers to LOD bias, all is for nothing without LOD's in the skybox; I absolutely need LOD's... for this shader to do its magic. By the way, I just came up with the idea for a new "dynamics" uniform uniform vec4 dynamics; Where, dynamics.r = red-hot dynamics.g = gore dynamics.b = (not used (yet)) dynamics.a = age .r, or "Red-hot" would be a channel to communicate object temperature, which the shader translates into a black-body radiation color to be added to emissive color. .g, or "Gore" is for fading in blood stains for units in battle. .b, ... .a, or "Age" is what I've been working on, for fading ageing looks as an object ages, such as rust on metals. But the idea is not well formed yet; there's only one Ageing channel, so I could do one of the three but not the others. Still thinking... EDIT: No, that's right; I can only represent one parameter, that is, a unit can age, or it can bleed, or it can glow red, but only one of them; but the shader doesn't know how it should interpret the one channel, so the dynamics uniform tells the shader how to interpret or manifest the "Ageing" channel (renaming overdue). EDIT2: I also wanted to add a thin level of wetness to terrains, as an added Fresnel gloss, just above the waterline, to represent wetness from the waves, but I can't seem to find any height data, water or terrain, in terrain_common.fs...
  16. @vladislavbelov Done. https://code.wildfiregames.com/D3603
  17. No, what I was trying to do was, well, yes, refraction; the reading of the ocean bottom, I was trying to bias the texture read, to get a more blurry image as depth increases. You have multiple fetches there, I think for that purpose, but I wanted to add a bit more blur by biasing the reads.
  18. Thanks, Stan! I've learned so much today... So when I tried to use LOD bias for ocean bottoms, why did it not work? Hrmmm....
  19. There's a plug-in for GIMP. I downloaded the compressonator suite, but it comes in a .tar.gz with ABSOLUTELY no instructions on what to do with it. I uncompressed it into a folder but can't get it to work. I guess I'll get the GIMP plug-in. So now I'm starting to understand. I thought there'd be a humongous texture somewhere, for each map. So now the question is, what the engine puts together for a terrain, at run-time, does that have LOD's?
  20. Interesting! Another question for you, Stan, I'm looking for where the maps are; I can't find them. I find the textures used in the maps, but not the maps themselves. Unless they are the dds textures --I don't have any tools to open them yet, gotta get them...
  21. @vladislavbelov Okay, good to hear. Well, take my work in halted progress, then. I have many comments I put on it you should find useful. water_high.fs EDIT: I think the reason this mitsuba code is so complex is that it's mixing Fresnel with roughness. I always knew they could not be combined linearly... Glad somebody tackled it, though I'm not sure what to do with it; seems big. EDIT2: The one problem that shader mod has is with reflected objects and terrain. I can't get them reflections to show but very faintly. I get them stronger if instead of, reflCol = mix( sky, reflections, reflections.a); I write, reflCol = min( sky, reflections ); Seems something with the alpha channel in the reflections is not as expected. You might be able to figure out what I messed up.
  22. Nice work! I'm browsing through the terrain textures. They are awsome! I did find the cause of the Acropolis terrain being so bright problem, though: medit_city_pavement.png is pretty bright, and medit_city_pavement_spec.png, though itself not too bright, brings the total light, the albedo, over the top. Best thing would be to get rid of medit_city_pavement_spec.png. The only way any specularity can work with such rough material is by having a super-low specular power; and a physics based shader would dial down the brightness of specularities with low spec power, but most shaders don't. (The more polished and smooth a surface is, the smaller the specular spot from a light source, but by the same token it is more concentrated; the converse is also true; but no shaders except mine account for that.) You should take it out; replace it with a black 1-texel texture; and save it for when there's a better shader. The skyboxes, I see there's 6 .dds textures in each folder. I thought they'd be packed into a single file, but maybe I'm misremembering.
  23. Thanks! I still have an issue with reflections, though; they've nearly disappeared on me; but the more deeply I look into the code the less I seem to understand. Near the end of the shader, Fresnel is multiplied by an alpha channel coming together with the reflections ... My head is spinning. I just deleted a line that modulated Fresnel by shadows ... shadows don't affect Fresnel in the real world, unless it's some highly non-linear material good to build lasers with; but not water ... But anything I touch seems to break everything ...
  • Create New...