-
Posts
3.433 -
Joined
-
Last visited
-
Days Won
76
Everything posted by wraitii
-
Previewing a map in the game setup screen.
wraitii replied to Spahbod's topic in Game Development & Technical Discussion
Wouldn't it be easier to store them in subfolders? -
I'll give a look at their shaders, could always learn something. I've got a system that should be all-right, but won't look that good…
-
Thing is, I don't think proper waves texture will do given the way this works. The necessity to do it 360° means that even when upscaling (what I've got on my working copy) there will be some (pretty serious) artifacts. The other solution would be to put waves only in some places, but that wouldn't work so well I think. The best is probably to use a 1 dimensional gradient and then apply a texture (like my foam texture) to re-create the illusion. I'm not surprised that even Red Alert 3 doesn't have waves on the shores. I'm still pondering simply having this done texturally to have the shape of the coast correctly.
-
Post-processing effects test (SSAO/HDR/Bloom)
wraitii replied to myconid's topic in Game Development & Technical Discussion
You can probably merge some things together. In the ARB shader, to stay under the 8 texcoords used, I had to put the v_tex and the v_los vec2 together in a vec_4, for example. -
Okay, so I've finished my first shot at waves. It rocks along with the foam, slightly moves up and down but not too much. The vertices are a bit rough, it doesn't look extremely smooth, there are a few textures that get squished here and there. I haven't had time yet to do that. The system is pretty easy to understand, harder to have in practice: I basically look for the shore, create a point there and another a bit farther at sea, and then connect all those contiguous points. This has the benefit of completely lacking the "holes" or overlapping when using quads. It may however produce artifacts if the water is a too concave pond (I think the RM map Oasis should be able to showcase that), or when two patches of land are too close together. The effect is sort of scaled with waviness for now, but it's not perfect. Here's the mesh around the afore-screenshoted island (you can see why it doesn't look smooth: it's pinned to the vertices' position to some extent): Here's two shots showing the waves when far from the shore and when on the beach: I'll try to smooth the effect now, and fix a few problems, and treat a few special cases. If somebody cares, it would be great to have a nice animated wave texture (from the sea on to the crashing on the beach, then the starting to retreat to the water). Or at least something a tad nicer than what I've added. Warning: I have not really optimized the wave mesh generation, so Atlas may be very slow for now. Also, it only works on superfancy, I think. It may crash in some circumstances, I haven't really tested yet.
-
Got some quad stuff going on with the waves, but I'm not really happy with it. It either looks rough (given that to do that properly I must go 360), or there's clipping problems... or rendering problems. And I can have other issues with concave stuffs, and with angles getting weird. I may go with some clever texturing job, or some clever axis-aligned quad, it looks like it would basically be easier and just as good. I'll see.
-
I think you should aim for half way between the first and last draft. If that doesn't work, choose the first.
-
Post-processing effects test (SSAO/HDR/Bloom)
wraitii replied to myconid's topic in Game Development & Technical Discussion
I still think your HDR looks oversaturated, Myconid. While I like the effect for a screenshot, it'd probably get tedious in-game. Of course, you've probably set that as a setting by now . -
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).
-
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!
-
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.
-
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.
-
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.
-
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.
-
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.
-
Post-processing effects test (SSAO/HDR/Bloom)
wraitii replied to myconid's topic in Game Development & Technical Discussion
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. -
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.
-
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).
-
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.
-
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.
-
Post-processing effects test (SSAO/HDR/Bloom)
wraitii replied to myconid's topic in Game Development & Technical Discussion
Seems like it would be working great, Myconid. Basically, you switch shaders on the fly? -
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.
-
Post-processing effects test (SSAO/HDR/Bloom)
wraitii replied to myconid's topic in Game Development & Technical Discussion
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. -
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)
-
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.