wraitii Posted July 31, 2012 Author Report Share Posted July 31, 2012 Okay, updated patch with the new texture, improved positioning for the waves, some basic foam around the waves.The images should be added by the patch, this time, so nothing else to do.(updated for the latest SVN revision, too).I'm thinking this is the first "working" version. Take a look, report problems or inconsistencies, and suggestions for improving. If all goes well, I might be able to commit it before feature freeze.Should I Trac this in the optic of committing or is it as good in this topic?Edit: for those who feel it is too slow... I've run the Xcode profiler (really awesome stuff there) and found that creating/destroying textures was really inefficient. So I stored those instead to reuse and now the super fancy water shader is basically two times fast.Edit: new patch 3 hours later below. Quote Link to comment Share on other sites More sharing options...
wraitii Posted July 31, 2012 Author Report Share Posted July 31, 2012 Okay, so I'm creating patches way too fast for anybody to follow, but I figured I was kind of "over" with this whole wave business until some people made remarks, so here is the latest version: foam has been slightly improved iirc, a few other stuffs, and a huge speed improvement (on my computer, RenderWater() has gone from being twice as slow as all other rendering functions to being faster than "RenderReflections" on most maps.)Same thing, just apply the patch and it should work. I've added the test map for those who want to see it, so it's a bit heavier.water.patch Quote Link to comment Share on other sites More sharing options...
Wijitmaker Posted July 31, 2012 Report Share Posted July 31, 2012 Wijitmaker, thanks for the waves. To clarify what I needed, I needed mostly an image like your "wave_17" one. The animation could be used to introduce slight perturbations on that particular image (I don't need the wave to move in the texture, because of the system I use).I can do the conversion to normal myself.Sure, can do. So, no moving and do you want it to rise and fall - or just simply to undulate? Quote Link to comment Share on other sites More sharing options...
wraitii Posted July 31, 2012 Author Report Share Posted July 31, 2012 Simple ondulation (to make it dynamic, pretty much) will be fine. Quote Link to comment Share on other sites More sharing options...
myconid Posted July 31, 2012 Report Share Posted July 31, 2012 patching file binaries/data/mods/public/art/textures/terrain/types/water/foam.pngpatch: **** malformed patch at line 1113: \ Pas de retour chariot à la fin du fichier"No new line at end of file". It also appears in the patch, at the end of all binary files. Quote Link to comment Share on other sites More sharing options...
wraitii Posted July 31, 2012 Author Report Share Posted July 31, 2012 Hm. That's pretty weird. What happens if you scrap that line? SVN's definitely fairly annoying… Quote Link to comment Share on other sites More sharing options...
myconid Posted July 31, 2012 Report Share Posted July 31, 2012 The patching sort of works when I do that, though it looks like it corrupts the textures and they fail to load. Quote Link to comment Share on other sites More sharing options...
wraitii Posted August 1, 2012 Author Report Share Posted August 1, 2012 Looks like SVN adds some stuffs in French here and there ("\pas de retour chariot" and some "Modifications de propriétés"). I removed them all by hand, this should work.water.patchIn case it didn't, here's the patch without the binaries, and the two texture files separate.water_nobinary.patchBTW, it looks like I could use a 3D texture "fairly" easily for the waves. So if someone wants to create some sort of "breaching" animated texture (in the same style: the wave would not actually "move" on the texture but the normal map would transform to simulate breaching), I might be able to achieve some result. Quote Link to comment Share on other sites More sharing options...
Gen.Kenobi Posted August 14, 2012 Report Share Posted August 14, 2012 Question are we already able to add water into models? I forgot.Some mills like this would be nice Quote Link to comment Share on other sites More sharing options...
zoot Posted August 14, 2012 Report Share Posted August 14, 2012 Not yet. Myconid had done some nice groundwork on it, but I believe he postponed final implementation for the time being. Quote Link to comment Share on other sites More sharing options...
wraitii Posted October 30, 2012 Author Report Share Posted October 30, 2012 Got this to work again against the latest SVN, no noticeable issues appeared. Should I post a patch to be reviewed or should I commit and then quickfix if by bad luck it does break a few stuffs?(Asking because it's basically mostly art.) Quote Link to comment Share on other sites More sharing options...
k776 Posted October 30, 2012 Report Share Posted October 30, 2012 Well, if it affects ARB(?), probably best to post a patch for review. GLSL is slightly different in that it is opt in, so we don't need to worry about it temporarily breaking. But with ARB, we need to make sure it works on most devices.However, we're still a little while from release so if you feel it's stable, and you'll be online in IRC for a few hours after you commit to fix issues, then maybe it would be alright.Of course, make sure you code is as clean as possible, complies with coding conventions, etc etc. When you look at the code, you should be able to say "This is clean, simple, and optimized.". We don't want a whole lot of code and complexity for little gain. Quote Link to comment Share on other sites More sharing options...
wraitii Posted October 30, 2012 Author Report Share Posted October 30, 2012 I think it's only GLSL at the moment, wether it's activated or not. There were no ARB water shaders before, and I haven't ported those yet.I'll do a series of testing tomorrow, check the code is allright and then commit-IRC if I feel it's allright. Quote Link to comment Share on other sites More sharing options...
wraitii Posted October 31, 2012 Author Report Share Posted October 31, 2012 Okay, there is a conflict with the post-process manager and the very high quality water shader, which is a bit too bad obviously. I believe it's linked to the depth buffer, Myconid's probably changed something at some point. Should be an 'easy' fix (though not right now, I'm getting a haircut) Quote Link to comment Share on other sites More sharing options...
myconid Posted October 31, 2012 Report Share Posted October 31, 2012 I'm not sure what the conflict is, and I don't remember what your code does exactly, but if it contains a line similar to this:pglBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);then you need to do this instead:// first save postproc fbo:GLint fbo;glGetIntegerv(GL_FRAMEBUFFER_BINDING_EXT, &fbo);// do stuff in another fbopglBindFramebufferEXT(GL_FRAMEBUFFER_EXT, wraitiifbo);...// rebind previous fbopglBindFramebufferEXT(GL_FRAMEBUFFER_EXT, fbo); Quote Link to comment Share on other sites More sharing options...
wraitii Posted October 31, 2012 Author Report Share Posted October 31, 2012 And of course that's what it was, thanks a lot Myconid.Okay, I'm taking various screenshots because it looks cool and the new post-proc effects are dead awesome, then I'm busy for a while.I think I'll commit tomorrow morning in case there's any problem. Else I can do it in circa 4 hours, but I'll only be here on and off for 5/6 hours.Link to said screenshots (I'm digging the full skyboxes BTW, but the lower bound should be slightly below the horizon. On the "man" image, I had to touch up the horizon because there were black lines). Apart from said slight touch-up of the horizon, it's all in-game screenshots. 4 Quote Link to comment Share on other sites More sharing options...
Enrique Posted October 31, 2012 Report Share Posted October 31, 2012 And of course that's what it was, thanks a lot Myconid.Okay, I'm taking various screenshots because it looks cool and the new post-proc effects are dead awesome, then I'm busy for a while.I think I'll commit tomorrow morning in case there's any problem. Else I can do it in circa 4 hours, but I'll only be here on and off for 5/6 hours.Link to said screenshots (I'm digging the full skyboxes BTW, but the lower bound should be slightly below the horizon. On the "man" image, I had to touch up the horizon because there were black lines). Apart from said slight touch-up of the horizon, it's all in-game screenshots.Awesome!-progressive darkening of the water based on depth!-foam!-shadows on the water!-waves!Really nice Wraitii!!! :DThe processing cost is not very high, right? Quote Link to comment Share on other sites More sharing options...
wraitii Posted October 31, 2012 Author Report Share Posted October 31, 2012 From earlier testing, the medium setting is on par or faster than the regular one. The super high quality one is probably slower, but I believe it's acceptable...I could fine tune it and add more settings for customization (enabling waves, foam, realistic depth, shadows independently, mainly) if it's needed. Quote Link to comment Share on other sites More sharing options...
k776 Posted October 31, 2012 Report Share Posted October 31, 2012 @wraitii Good work. Go ahead and commit this, and we'll soon find any issues that need fixing.@myconid If you can spare some time, after wraitii has committed his code, to review it, that'd be good. It's alway good to have two pairs of eyes on large code changes. Quote Link to comment Share on other sites More sharing options...
plumo Posted October 31, 2012 Report Share Posted October 31, 2012 @wraitii Some before and after screenshots would be fabulous for next week's report Quote Link to comment Share on other sites More sharing options...
wraitii Posted October 31, 2012 Author Report Share Posted October 31, 2012 Should be committed... And it's probably a bit too late for "before" screenshots, unless someone else wants to do them.Else I could try recreating an existing screenshot. Quote Link to comment Share on other sites More sharing options...
plumo Posted October 31, 2012 Report Share Posted October 31, 2012 That would be cool Also: could you write a very short summary of your new water shader? I'm not that technical Quote Link to comment Share on other sites More sharing options...
Zaggy1024 Posted October 31, 2012 Report Share Posted October 31, 2012 Some before and after screenshots would be fabulous for next week's report Before:After:wraitii: Is there some way you can make the waves curve to fit the shoreline? I think that would probably help to make them not seem as fake... Quote Link to comment Share on other sites More sharing options...
wraitii Posted November 1, 2012 Author Report Share Posted November 1, 2012 @Zaggy: frankly, I don't believe there's an easy way. It should be possible, but using a different system than the one I'm currently using, and I'm probably not going to have enough time to do that now.(note that I'm not completely happy with waves. If most people feel they look fake, I'll deactivate them for the time being). Quote Link to comment Share on other sites More sharing options...
myconid Posted November 1, 2012 Report Share Posted November 1, 2012 @myconid If you can spare some time, after wraitii has committed his code, to review it, that'd be good. It's alway good to have two pairs of eyes on large code changes.OK, will do. Over the weekend. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.