Jump to content

wraitii

WFG Programming Team
  • Posts

    3.395
  • Joined

  • Last visited

  • Days Won

    75

Everything posted by wraitii

  1. Looks better. I wouldn't mind if you added to the grass small patches of leaves / small leaves here and there (or a "grass and leaves" terrain).
  2. Reminds me of some AOE3's screenshots (which is a good thing). It's perhaps a little too saturated, and a little too orange (needs small blots of green here and there, some more yellow stuffs, some more fed). It also looks like you painted grass, when it look more like leaves to me (I'm not sure what you exactly did, though). edit: but overall, it's gorgeous!
  3. I should be able to convert it to normal maps, though it might take me a bit of time, but that's not really a problem. For other textures... If you find a way to make the caustic light map nice, that would be interesting (as a decal), because I don't think I can reuse the trick I'm using for foam.
  4. I take it from TRAC that Alpha 11 is for mid-late august. I'm fairly confident this should take no more than 2 weeks to wrap up. To give a todo list: -Need to fix all and any segfaults/bad memory accesses. -Need to have waves (I'm on that but for some reason it doesn't work I'll investigate). -Need to redo the scenario and random map water settings (probably quick, but necessary). -Should try to definitely fix some border issues on the super fancy shader. Since I distort the depth buffer, it gives a few quirky pixels. It's certainly fixable, however.
  5. It breaks every map in that every map's setting will probably have to be adjusted if we use some changes. If you want to push quick changes, it's probably better to use myconid's watertest or biwater branches, which are cheap improvements. However, depending on when Alpha 11 is set to be released, this may still make alpha 11.
  6. I'll take a look at that in the debugger. Since the water code doesn't really rely on anything else in the game, it's completely possible that there are special cases I haven't yet considered that would crash. In particular since I'm not the most proficient programmer.
  7. I'll have to look into that, I get segfaults but only in Atlas and it seems unrelated to what I'm doing. I've updated on my local repo the fancy shader, but I don't think I've committed that yet. I'm moving on to waves, and per Mythos' advice, will have to give a thorough look at the decal code. BTW, since this is really a complete modification of how refraction worked in the water, I believe every map would need an update. The good thing is that Water Color is now not only used for the fixed function water, so there is a lesser chance of map makers forgetting to change it from the normal blue.
  8. I'll try to finish the water stuffs (notably waves) first, and then port everything else to ARB, I'll check at that time, but there's no reason to imagine it wouldn't work.
  9. Finished fiddling... This should be customizable and good-looking enough. Under this system, the water refraction is modified by depth and murkiness. The deeper/murkier, the more tinted toward "Water Colour", and the more the objects underwater are tinted toward "Water Tint" (! both colours can be very different). Usually, the ground will begin being tinted by Water Tint, and then Water Colour will take over at higher depths. By adjusting murkiness, the depth where the water is completely "Water Colour"-ed can be changed, so you can simulate very muddy water or very clear waters. Furthermore, sky reflection is less visible (at higher angles. In the distance, it's still basically the same). Had a little fun with the scenario editor... Here's the real thing, and here's the fake: (Still have to change the normal fancy water shader to sort of emulate this, though). @Zoot: should be able to. Edit: Sigh, now I want to make a "Polynesia" random map.
  10. Myconid's improvement with normal's blending is what really cuts it when animated, it looks so smooth and watery like. The rest is just eye-candy (though I'm fairly happy with the foam.) I'm fiddling with the refraction/reflection settings again. I think I'll aim for more realism, so water will always be fairly dark when it's deep, even if the water tint is light (murkiness being the limiting factor once more). I'll have water tint color the objects below, and I'll probably lower the amount of sky reflection, it's too high right now (case here, there or even here).
  11. Aaaaaaand it's fixed. All maps should now work. I've also optimized the texture generation, since in Atlas it's remade every turn and it made it really slow.
  12. Okay, I've committed a quick fix that solves a problem around objects above the water (I dunno if it was there from the start, but it definitely is out now), reintroduced the wave scaling effect, which I had lost at some point. Also fixes the shore blending issue, it now looks smooth, and it still fixes the "see far underwater" problem when you looked at the right angle at a slope. Could somebody report on performance? I still have to fix the issue on some scenario maps where the texture is created completely wrong and it results in bugs (such as Saharan Water Holes). Edit: that seems to be a power of two issue.
  13. Seems like it would be working great, Myconid. Basically, you switch shaders on the fly?
  14. Everything's about that in shaders anyway. @DayWalker: thanks for stopping by (what a dedication!). I think for shore waves I'll follow a fairly similar approach, as it's the most practical/easy to do. I've also considered splitting the water meshes in two: one for every "non-coastal" area, and one for every coastal area, but that would probably introduce many other problems... So for waves, I'll probably create quads with a wave shader, and those would slightly move in height over the land. I'l see about that, but it should be all-right.
  15. Fastest way to me would be: Create a heightmap using CrazyBump (from the texture). Start up Gimp/photoshop/whatever and quickly fix the most obvious problems (color inversion…). Load the model in blender, tesselate/subsurf, displace using said heightmap, paint the texture to fix the problems (live in Blender, I mean), save texture, apply the modifier and bake the normals in Blender (using one of many tutorials). Then merge these two files in Gimp/Photoshop/whatever.
  16. Okay, so I've added a few other things to clean the result up. Changed the way refraction works a bit: as depth increases, the water will get more tinted. That way, on the surface, the sunColor will have a great influence, but as depth increase it will start losing it. I've changed the murkiness for the fancy shader to approximate what the super fancy shader does using the water depth (vertically and not from the depth buffer, which is a huge approximation and disregards objects in the water) and the angle of view. In effect, this makes the fancy and the super fancy shader look quite the same, which I believe is good. The basic shader is unchanged, I'd like to make it completely opaque when too deep, but I'm not too sure how to do that. Committed here. Note that I have a bug on some maps with the "distance to shore", such as Nile River where for some reason the texture is too small. Also note that for now, the game will compile the texture once, and never redo it, so if you choose a new map, expect it not to work correctly. I've added a checkbox in the options to activate/deactivate the super fancy water, so it's easier to compare. In this screenshot, fishes are barely visible, and the bottom of the tower is visible but not the top (artifact from using a wrong depth). Also, while the sun has a small influence, it's not very visible. (click to enlarge) On the super fancy shader, the tower is right, you can see the fishes, and the sun color seems to have more influence. And of course, the foam (here on a medium waviness setting). (click to enlarge)
  17. Indeed. I didn't bother researching the right word (we say "sheep" in French). The problem with that is that the top of waves (where whitecaps usually are) are the less distorted. I could easily do that if I knew where the top of waves are, but the texture has no heightmap in its current form.
  18. I dunno. I fear all maps would have to be reworked: since waviness has been completely changed, all oasis maps for example look quite wrong. The different murkiness means that tint also looks differently on some map, it may be darker/lighter than expected. I'll try to make sure that all settings give out about the same expected result for water tint, and more generally murkiness (I might put the depth buffer trick even in the regular fancy shader, it's not that expensive and it looks so right). But I think most maps would have to be redone. Again, I'd ask some of the game mapmakers/artists. base specular strength may also need to go from 0.4 to something like 0.6/0.7.
  19. Well, my understanding of the "murkiness" factor was that it did not represent actual murkiness, but rather was an abstraction of how clear a water was. The "tint" being the color of the water (so if you'd want a muddy water, you'd set murkiness high and the tint would be brown). Color extinction is simulated in that the refraction color gets more tinted (sunColor*tint) as the depth increases, with murkiness as the parameter (see my first sentence). I could mingle with the parameters to make it happen earlier, but I'm not sure it's necessary, I think this decision should be up to the team's artists anyway.
  20. That's the last I uploaded, so that's a yes. Well, thanks then
  21. 1. On the optimized version? I've moved things around, so I may have missed a few stuffs, but I thought the second (optimized) version was right. 2. hadn't thought of that, and it seemed to work for me, but I'll change, thanks.
  22. Can you debug that? I'll see if it's the same cause as mines. Anyway, I've finished modifying to take the depth buffer into account (using gl_fragcoord). Here's some candy: The "normal" fancy shader shows the same transparency everywhere. The "super" fancy shows the water getting more tinted with "eye depth". You'll notice that you can make out the blob in the background, underwater: it looks clearer as it's nearer from the surface and eye. I'd need a proper luminance map to make it perfect. On the tower shot, you'll notice refraction going stronger as the depth rises. (Still have to fix the shores, though). (no foam, waviness is too low).
  23. Always? By loading, you mean load a map? I get a few segfaults now and then which I'll have to track, but not always. @zoot: I need to know if x is [PI/2;-PI/2 ] or [-PI/2;PI/2], pretty much.
  24. I dunno how I got it to work, but I did the same z_n/z_b stuff to gl_fragCoord.z and the depth texture, and by substracting the two I have a usable value. I dunno if it represents the distance accurately (in game tiles) but it works (I've had to distort the coords along the water normals arbitrarily too, or models close under the surface did weird things). The only problem is that it looks like gl_fragcoord.z is glitched on some ATI cards…
  25. Well, I tried to do it, but I guess my island is either too smooth (highly possible) or my parameters are wrong. I'm still messing around with the depth buffer… Had a fun problem with fishes that made everything wrong. Darn fishes.
×
×
  • Create New...