feneur Posted June 16, 2012 Report Share Posted June 16, 2012 Plumo, he hasn't got any code in the game yet But yeah, let's just say that if he keeps up like this it's not going to be long until the question is asked Quote Link to comment Share on other sites More sharing options...
myconid Posted June 16, 2012 Author Report Share Posted June 16, 2012 How hard do you think it would be to fix this?Really easy. The shadowmap needs to be passed into the water shader, and the water shader can just draw shadows on the water surface.If Myconid tackles shadows, he might as well try to fix this too.historic_bruno already gave you the answer to that. I'd recommend to change the default depth bias to something like 0.005 when the GPU supports 32bit depth buffers.And it hurts my eyes not seeing the 0 AD development team banner on his profile It's a pretty banner, though I'm just in it because I like the hacking. Quote Link to comment Share on other sites More sharing options...
Gen.Kenobi Posted June 16, 2012 Report Share Posted June 16, 2012 Can I say? Oh, no.. Anyways, I'll say it out and loud:I LOVE YOU MAN!Seriously! This is amazing! You know, bump, spec and AO maps are almost a MUST in today's AAA engines and games, and you making it happen in 0.a.d., and Open-Source... It just blows my mind away.Thank you from the bottom of my heart! Quote Link to comment Share on other sites More sharing options...
myconid Posted June 17, 2012 Author Report Share Posted June 17, 2012 (edited) Thank you from the bottom of my heart! You're very welcome! Now trying to get the mapping stuff cleaned up. Here's a peek (NB: automatically generated normal/height maps are pretty bad, but hopefully you get an idea about what's possible).Edit: I know about the seam. I must have broken something while cleaning up the normal mapping. Will look into it.Edit2: Never mind. I win the stupid mistake prize. Edited June 17, 2012 by myconid 1 Quote Link to comment Share on other sites More sharing options...
myconid Posted June 17, 2012 Author Report Share Posted June 17, 2012 Final patch for model normal/parallax/specular/emissive mapping should be dropping tomorrow. I somehow managed to mess up my git-svn setup, so the patch will also include patches #1493 and #1497, sorry! Testing specularity now. Here are a couple more pics: The first one uses greyscale specularity to model the marble, the second uses colour specularity to model the metallic parts on the columns. They look better in motion... 1 Quote Link to comment Share on other sites More sharing options...
Pureon Posted June 17, 2012 Report Share Posted June 17, 2012 Fantastic images Quote Link to comment Share on other sites More sharing options...
Gen.Kenobi Posted June 17, 2012 Report Share Posted June 17, 2012 Amazing! Quote Link to comment Share on other sites More sharing options...
zoot Posted June 18, 2012 Report Share Posted June 18, 2012 What is needed to get some of this into A11? I have some time at a mediocre PC this week. Quote Link to comment Share on other sites More sharing options...
historic_bruno Posted June 18, 2012 Report Share Posted June 18, 2012 Very nice What is needed to get some of this into A11? I have some time at a mediocre PC this week.At the moment, we want to review patches for http://trac.wildfiregames.com/ticket/1493 and http://trac.wildfiregames.com/ticket/1497 which I believe are prerequisites for some of the enhancements. Quote Link to comment Share on other sites More sharing options...
myconid Posted June 18, 2012 Author Report Share Posted June 18, 2012 What is needed to get some of this into A11? I have some time at a mediocre PC this week.Every bit of testing counts. Once I release the patch, please give it a try and give me some feedback Quote Link to comment Share on other sites More sharing options...
myconid Posted June 18, 2012 Author Report Share Posted June 18, 2012 (edited) Very nice At the moment, we want to review patches for http://trac.wildfire...com/ticket/1493 and http://trac.wildfire...com/ticket/1497 which I believe are prerequisites for some of the enhancements.Thanks. Yes, those need reviewing, though don't commit them just yet because they'll also be included in this patch (without changes AFAIK). Edited June 18, 2012 by myconid Quote Link to comment Share on other sites More sharing options...
myconid Posted June 19, 2012 Author Report Share Posted June 19, 2012 PATCH: Normal, parallax, specular, emissive and lightmapping (AO etc)The attached archive contains the "final" patch/files for all the above. It's here and not on Trac because of Trac's 512k size limit.I decided to generate the diff manually, to avoid including the two other patches in this one. While they are not explicitly included, they are still prerequisites.The instructions to patch everything are a bit longish, and maybe it would have been easier if I wrote a script for it, but it's a one-off thing so I couldn't be arsed. Here goes:1) Extract the patch archive to $patdir2) cd to the 0ad/ directoryFirst we apply #1493 and #1497.3) patch -p0 -i $patdir/cpp/dependencies/multicoord.diff4) patch -p0 -i $patdir/cpp/dependencies/multitexture2.diff5) copy UPDATEACTORS.sh into your 0ad/binaries/data/mods/public/art/actors directory and run it from there.Then we apply the new patch.6) patch -p0 -i $patdir/cpp/modelmapping.diff7) Copy $patdir/cpp/graphics and $patdir/cpp/renderer into the 0ad source directory to merge the new files in the right directories.Then we copy over the new shaders.8) Copy $patdir/glsl into 0ad/binaries/data/mods/public/shaders/glsl, replacing the old files.And finally, the config file.9) Copy $patdir/config/default.cfg to 0ad/binaries/data/config, replacing the old file.Update workspaces and compile. Here you need to run the game to copy over the config. If everything goes correctly, the game should run and nothing should look different than usual.To start using the new features, go into your local.cfg file and set preferglsl and gentangents to true. (At the end of the file you'll also notice a materialmgr.quality setting. The version of the material that is loaded depends on the materialmgr.quality setting in the config (which is out of 10, float). For instance, parallax is only enabled if the config setting is >= 8. If it's smaller, the material redirects to a simpler version of itself that only contains normal mapping, which redirects to the completely basic material if the quality setting is not >= 3).The archive contains a "demo" folder, which has some test files you can try. Copy the $patdir/demo/art directory over the game's 0ad/binaries/data/mods/public/art directory and merge them.This will add a new model called "mars_temple2", found under "Actors (All)" in Atlas.That's pretty much it. Good luck modelmappingpatch.zip Quote Link to comment Share on other sites More sharing options...
k776 Posted June 19, 2012 Report Share Posted June 19, 2012 Got as far as running UPDATEACTORS.sh and I ran into this:% ./UPDATEACTORS.shsed: 1: "./campaigns/flora/trees ...": invalid command code .sed: 1: "./campaigns/flora/trees ...": invalid command code .Probably because I'm on a Mac? Quote Link to comment Share on other sites More sharing options...
myconid Posted June 19, 2012 Author Report Share Posted June 19, 2012 Got as far as running UPDATEACTORS.sh and I ran into this:% ./UPDATEACTORS.shsed: 1: "./campaigns/flora/trees ...": invalid command code .sed: 1: "./campaigns/flora/trees ...": invalid command code .Probably because I'm on a Mac?Maybe (never had a Mac). You can use these files instead.actors.zip Quote Link to comment Share on other sites More sharing options...
k776 Posted June 19, 2012 Report Share Posted June 19, 2012 Compiling now. mycoid, if you have time, can you pop on IRC and I'll provide questions/feedback as I test this. Quote Link to comment Share on other sites More sharing options...
myconid Posted June 19, 2012 Author Report Share Posted June 19, 2012 Compiling now. mycoid, if you have time, can you pop on IRC and I'll provide questions/feedback as I test this.I'd love to, though I really need to get some sleep (I'm in Europe!). Can we do it some time later? Quote Link to comment Share on other sites More sharing options...
k776 Posted June 19, 2012 Report Share Posted June 19, 2012 Sure. The game compiled fine, and it looks just like it did before. I guess that's a good thing?I'm having trouble noticing any of the new effects. I guess an artist needs to come in after this is added and add heaps of new effects for each building? Quote Link to comment Share on other sites More sharing options...
iap Posted June 19, 2012 Report Share Posted June 19, 2012 Ok, now it's my turn to say thank you!Everything here looks amazing, and it's really good to see a lot of development that is not planned, but contributed.From this discussion I also learned alot, so the benefit is double! Sorry for not being able to compile and test, but I really want to see these changes in the next alpha (or the alpha after that, no rush).I do have a thechnical question, that I'm not shue if it was answered before:If the AO is "burned" into the texture itself, dosn't it ruins the texture for future use? A "burned" texture is just a modified, or "photoshoped" picture, Is'nt there a programatic way to do this? Or will it be to complicated for the CPU?And really, thank you for your effort. Quote Link to comment Share on other sites More sharing options...
myconid Posted June 19, 2012 Author Report Share Posted June 19, 2012 (edited) Sure. The game compiled fine, and it looks just like it did before. I guess that's a good thing?I'm having trouble noticing any of the new effects. I guess an artist needs to come in after this is added and add heaps of new effects for each building?Definitely a good thing! There are some instructions about how to get a test model in the game, right after the patching instructions. You need to copy across some files, and you'll have a test model available in Atlas, which you can add to maps or whatever.Ok, now it's my turn to say thank you!I do have a thechnical question, that I'm not shue if it was answered before:If the AO is "burned" into the texture itself, dosn't it ruins the texture for future use? A "burned" texture is just a modified, or "photoshoped" picture, Is'nt there a programatic way to do this? Or will it be to complicated for the CPU?You're welcome! Regarding your question, the AO texture is held separately from the base colour texture, and they are only combined together (really fast by the hardware) while they are being drawn to the screen. This way, there only needs to be a low-quality AO texture that is unique for each model, while the high-quality colour texture can be reused. Edited June 19, 2012 by myconid Quote Link to comment Share on other sites More sharing options...
halcyonXIII Posted June 19, 2012 Report Share Posted June 19, 2012 I'm getting a segfault when trying to load the mars_temple2 model in Atlas, and also when loading certain scenario maps although not always. For example if I first try loading "Acropolis 2" then 0AD crashes, however if I load a map which doesn't crash, such as "Savanna Ravine", before loading "Acropolis 2", then "Acropolis 2" won't crash either.I've attached the call stack generated by gdb after reproducing the crash in Atlas.0ad_atlascrash_modelmappingpatch_callstack.txt Quote Link to comment Share on other sites More sharing options...
myconid Posted June 19, 2012 Author Report Share Posted June 19, 2012 (edited) I'm getting a segfault when trying to load the mars_temple2 model in Atlas, and also when loading certain scenario maps although not always. For example if I first try loading "Acropolis 2" then 0AD crashes, however if I load a map which doesn't crash, such as "Savanna Ravine", before loading "Acropolis 2", then "Acropolis 2" won't crash either.I've attached the call stack generated by gdb after reproducing the crash in Atlas.Ah thanks, this is the sort of testing I'm talking about! Looks like it could be an Nvidia incompatibility (the exception is in the driver), though it's hard to tell which of the 3 patches is at fault here. Edit: It's probably my fault, of course..Please check if setting the materialmgr.quality to 0 and gentangents to false helps at all. Oh, you should also try without GLSL...If that doesn't help, you'll need to try recompiling, adding one patch at a time and checking which one breaks it... Edited June 19, 2012 by myconid Quote Link to comment Share on other sites More sharing options...
halcyonXIII Posted June 19, 2012 Report Share Posted June 19, 2012 When adding one patch at a time, 0AD didn't start crashing until I copied the glsl shaders into "binaries/data/mods/public/shaders/glsl", at step 8 of your instructions. Setting "gentangents = false" and "preferglsl = false" also stopped the crashing. Quote Link to comment Share on other sites More sharing options...
myconid Posted June 19, 2012 Author Report Share Posted June 19, 2012 (edited) When adding one patch at a time, 0AD didn't start crashing until I copied the glsl shaders into "binaries/data/mods/public/shaders/glsl", at step 8 of your instructions. Setting "gentangents = false" and "preferglsl = false" also stopped the crashing.Good work! I wish software testers were all as thorough as you are.The problem is with the model_common.xml file -- it doesn't test if tangents/extra UVs are provided in each model, so those end up becoming null pointers somewhere in the driver. ATI drivers probably checked for this, though Nvidia drivers don't. Will need to do it myself.Thank you! Edited June 19, 2012 by myconid Quote Link to comment Share on other sites More sharing options...
Pureon Posted June 19, 2012 Report Share Posted June 19, 2012 Great work guys Quote Link to comment Share on other sites More sharing options...
Gen.Kenobi Posted June 19, 2012 Report Share Posted June 19, 2012 Indeed!I just have a coupple of questions Art-wise, specially when creating future assets for the game and maybe future mods.On Blender I'm used to work with 3 different textures: One is difuse, another one is greyscale for the specularity and the other one could be also greyscale (for bump) or mapped "normals" - from Gimp's plugins or if I'm in the mood, from some serious 3d detailing and baking the normals into a new texture.I know it may seen a quite a dumb question, but how does it work? How do you control the intensity of the normals, the influence of the specularity.... these things. I have very limited codding knowladge, I only did some really basic actor codding so far, but I'm really excited about this. Will it be controled like this suggests? http://trac.wildfiregames.com/ticket/1493Thanks again for your awesome work, and sorry for such questions. Best regards! 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.