myconid Posted June 24, 2012 Author Report Share Posted June 24, 2012 Definitely looks better, but have you tried tweaking the 'blending range'? In GPU Gems, they seem to obtain rather epic results with a range of 'roughly 10 to 20 degrees'.Already done, though I guess that last pic was a bit messy. How about this one:Triplanar + normal mapping + specular mapping. The stretching problem is solved. I should note that triplanar texturing is a pretty GPU intensive effect: it replaces every texture access with 3x accesses, and memory access is pretty much the slowest operation. I think I'll make it so it lives in a separate material of its own that is used for cliff textures..On a completely different subject, did you know that Nvidia's CG compiler can automatically convert a subset of GLSL to ARB assembly? That means it may be possible to 'port' some of the lighter GLSL effects (eg AO) to ARB with very little effort... 2 Quote Link to comment Share on other sites More sharing options...
myconid Posted June 24, 2012 Author Report Share Posted June 24, 2012 Then a biome would select different versions of the above based on the angles things faced. You could do things like75-90 degrees vertical: granite rock180-270 degrees (z-axis rotation): snow+grass (south facing has less snow on ground)This would sort of blur the distinction between manual and generated maps, making both tasks easier. Of course, if map-makers didn't like the way something looked, they could override with a forced normal ground type too.I'm not sure I understand your suggestion, Sonarpulse. Are you talking about storing that information in the terrain files? Quote Link to comment Share on other sites More sharing options...
FeXoR Posted June 24, 2012 Report Share Posted June 24, 2012 Already done, though I guess that last pic was a bit messy. How about this one:Triplanar + normal mapping + specular mapping. The stretching problem is solved. I should note that triplanar texturing is a pretty GPU intensive effect: it replaces every texture access with 3x accesses, and memory access is pretty much the slowest operation. I think I'll make it so it lives in a separate material of its own that is used for cliff textures..[...]That looks much better on slopes!Is the effect used for every terrain texture tile? Because if I get it right it's mainly helpful when the gradient of the terrain is high and so might only be used there. Then the resource needs might be not that much of an issue.It seams like not all textures are in a right angle towards each other. This could look strange at the border sometimes I guess? Quote Link to comment Share on other sites More sharing options...
myconid Posted June 24, 2012 Author Report Share Posted June 24, 2012 (edited) That looks much better on slopes!Is the effect used for every terrain texture tile? Because if I get it right it's mainly helpful when the gradient of the terrain is high and so might only be used there. Then the resource needs might be not that much of an issue.It seams like not all textures are in a right angle towards each other. This could look strange at the border sometimes I guess?The idea is to make a special material just for slopes to avoid using this everywhere.Whatever you see that looks odd, it's most probably intended. When used like this, the triplanar effect is a trick that removes one type of artifact (the stretching) and replaces it with other artifacts that are hopefully a lot less noticeable..Edit: Or maybe it's not intended... I'll look into it. Edited June 24, 2012 by myconid Quote Link to comment Share on other sites More sharing options...
FeXoR Posted June 24, 2012 Report Share Posted June 24, 2012 (edited) The idea is to make a special material just for slopes to avoid using this everywhere.Whatever you see that looks odd, it's most probably intended. When used like this, the triplanar effect is a trick that removes one type of artifact (the stretching) and replaces it with other artifacts that are hopefully a lot less noticeable..Edit: Or maybe it's not intended... I'll look into it.For sure it looks better. And I guess theres no way to avoid textures in non-right angles towards each other (and the textures where originally not meant for that). So at the bottom and top (where the effected terrain meats the unaffected parts) textures doesn't line up well. Still it's better than the extreme texture distortion without the effect.EDIT:Cliff textures and "multi-planer" can be combined for super basic "biomes"That would a normal ground type:Then a biome would select different versions of the above based on the angles things faced. You could do things like75-90 degrees vertical: granite rock180-270 degrees (z-axis rotation): snow+grass (south facing has less snow on ground)This would sort of blur the distinction between manual and generated maps, making both tasks easier. Of course, if map-makers didn't like the way something looked, they could override with a forced normal ground type too.Great idea!The problem is: It has to be implemented twice: Once for simulations to be used in atlas and once for the RMGEN part (since it has no access to simulation AFAIK).I think it would be highly valuable to think of fusing RMGEN into simulations. So one could add e.g. a circular wall in Atlas by drawing a box. Edited June 24, 2012 by FeXoR Quote Link to comment Share on other sites More sharing options...
Sonarpulse Posted June 24, 2012 Report Share Posted June 24, 2012 (edited) I'm not sure I understand your suggestion, Sonarpulse. Are you talking about storing that information in the terrain files?Basically with normal multi-planer projection, one uses the same texture for all perspective. I am saying based on the direction the surface normal faces, a different texture is projected. (I edited my first post to make the angles clearer.)E.G. for very horizontal normals (i.e. very steep surfaces, a rock/cliff texture is used, but for very vertical surface normals (i.e. flat surfaces), a grass texture is used. Edited June 24, 2012 by Sonarpulse Quote Link to comment Share on other sites More sharing options...
myconid Posted June 24, 2012 Author Report Share Posted June 24, 2012 Basically with normal multi-planer projection, one uses the same texture for all perspective. I am saying based on the direction the surface normal faces, a different texture is projected.E.G. for very horizontal normals (i.e. very steep surfaces, a rock/cliff texture is used, but for very vertical surface normals (i.e. flat surfaces), a grass texture is used.I see. This sort of thing could be useful for implementing something like seasons. For example, you could have dynamic snow that accumulates on surfaces higher than P and less steep than X angle. Or seasonal plants that bloom over Q texture at Y angle... Quote Link to comment Share on other sites More sharing options...
wraitii Posted June 24, 2012 Report Share Posted June 24, 2012 I'm very curious to see that in the game... I think it'll make a cliffy map like my Corsica random map look really good.Adding a terrain that changes depending on the orientation is a good idea, but should imo not be a priority: it can be faked pretty well right now, even by RM. Quote Link to comment Share on other sites More sharing options...
Pureon Posted June 24, 2012 Report Share Posted June 24, 2012 Just wanted to say the rock mountain screenshot above looks fantastic 3 Quote Link to comment Share on other sites More sharing options...
Potter Posted June 24, 2012 Report Share Posted June 24, 2012 Just wanted to say the rock mountain screenshot above looks fantastic +1. I really really like the new look of cliffs !!! Quote Link to comment Share on other sites More sharing options...
Mythos_Ruler Posted June 24, 2012 Report Share Posted June 24, 2012 Ho-leee-cow that cliff looks rad. Quote Link to comment Share on other sites More sharing options...
feneur Posted June 24, 2012 Report Share Posted June 24, 2012 Splendid work Quote Link to comment Share on other sites More sharing options...
zoot Posted June 24, 2012 Report Share Posted June 24, 2012 On a completely different subject, did you know that Nvidia's CG compiler can automatically convert a subset of GLSL to ARB assembly? That means it may be possible to 'port' some of the lighter GLSL effects (eg AO) to ARB with very little effort...If this is true, I think even the programming dept will like it Quote Link to comment Share on other sites More sharing options...
zoot Posted June 24, 2012 Report Share Posted June 24, 2012 Triplanar + normal mapping + specular mapping. The stretching problem is solved. I don't know if it has been prepared for testing yet, but this is what I get in Atlas:In-game I get a similar message, though it renders everything but terrain. Quote Link to comment Share on other sites More sharing options...
Gen.Kenobi Posted June 25, 2012 Report Share Posted June 25, 2012 I'm speechless The bump map on the montains are just awesome!A question, though, will the use of both types of displacement maps be "read" by the game engine? Or just the one with the "normal" gradient. (not the ones with black&white old bump) ?ROCK ON GUYS! Quote Link to comment Share on other sites More sharing options...
zoot Posted June 25, 2012 Report Share Posted June 25, 2012 I believe it selects one on the basis of a 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). Quote Link to comment Share on other sites More sharing options...
Zeta1127 Posted June 25, 2012 Report Share Posted June 25, 2012 Haha, no I was just kidding.Or was I?Impressive.Already done, though I guess that last pic was a bit messy. How about this one:Triplanar + normal mapping + specular mapping. The stretching problem is solved. I should note that triplanar texturing is a pretty GPU intensive effect: it replaces every texture access with 3x accesses, and memory access is pretty much the slowest operation. I think I'll make it so it lives in a separate material of its own that is used for cliff textures..On a completely different subject, did you know that Nvidia's CG compiler can automatically convert a subset of GLSL to ARB assembly? That means it may be possible to 'port' some of the lighter GLSL effects (eg AO) to ARB with very little effort...Most impressive. Quote Link to comment Share on other sites More sharing options...
Wijitmaker Posted June 25, 2012 Report Share Posted June 25, 2012 Splendid! myconid, DUDE - who are you? You certainly aren't the average programmer that visits our forums. What is your story? Are you a student? Working as a programmer? Do you work in game development? Your making this look to easy (not that I'm complaining - because the game is going to be forever better because of the additions your making). Quote Link to comment Share on other sites More sharing options...
k776 Posted June 25, 2012 Report Share Posted June 25, 2012 Very nice work on the hills myconid.I second Jason's enquiry. Tell us a bit about yourself. How did you find 0 A.D.? Have you done other game development? What do you plan to do after finishing your renderer changes? Keen to pick up other features 0 A.D. needs? (like multiple obstructions per entity). Quote Link to comment Share on other sites More sharing options...
zoot Posted June 25, 2012 Report Share Posted June 25, 2012 (edited) I don't know if it has been prepared for testing yet, but this is what I get in Atlas:...Is resolved in latest commit: Edited June 25, 2012 by zoot Quote Link to comment Share on other sites More sharing options...
myconid Posted June 25, 2012 Author Report Share Posted June 25, 2012 A question, though, will the use of both types of displacement maps be "read" by the game engine? Or just the one with the "normal" gradient. (not the ones with black&white old bump) ?The black and white bump mapping algorithm is pretty old and not supported, however I do use such "bump" maps (heightmaps) for the parallax effect, which is the "new version" of bump mapping in a sense. It should also be possible to generate normal maps from bump maps, if that's an issue for you.I don't know if it has been prepared for testing yet, but this is what I get in Atlas:In-game I get a similar message, though it renders everything but terrain.Fixed, sorry. A bunch of broken debug stuff, mostly.myconid, DUDE - who are you? You certainly aren't the average programmer that visits our forums. What is your story? Are you a student? Working as a programmer? Do you work in game development? Your making this look to easy (not that I'm complaining - because the game is going to be forever better because of the additions your making).I second Jason's enquiry. Tell us a bit about yourself. How did you find 0 A.D.? Have you done other game development? What do you plan to do after finishing your renderer changes? Keen to pick up other features 0 A.D. needs? (like multiple obstructions per entity).I'm a programmer, though not a game programmer. In my day job, I need to know more about AI, optimisation ('pathfinding') and scripting than about 3d graphics. Don't want to sound overly mysterious or anything, I just don't know what else to tell you. I discovered 0AD a couple of years ago, and I've always wanted to contribute, so here I am! After I'm done with the renderer, I'll just pick out something that looks interesting... not sure what yet. Quote Link to comment Share on other sites More sharing options...
Pureon Posted June 25, 2012 Report Share Posted June 25, 2012 Don't want to sound overly mysterious or anything, I just don't know what else to tell you. That's probably more than what I've revealed about myself, so I suspect it's enough to satisfy the curious amongst us Quote Link to comment Share on other sites More sharing options...
WhiteTreePaladin Posted June 25, 2012 Report Share Posted June 25, 2012 AI, optimisation ('pathfinding') and scriptingImprovements in all of those areas are greatly needed, if you're still interested in working on this project after the graphics. Quote Link to comment Share on other sites More sharing options...
myconid Posted June 25, 2012 Author Report Share Posted June 25, 2012 (edited) Improvements in all of those areas are greatly needed, if you're still interested in working on this project after the graphics. After I'm done with the graphics (which could be a while from now), I might have a look at scripting. As long as I can find interesting problems to solve, I'm happy. I should probably mention that by saying I know stuff about scripting I mean I know stuff about writing compilers and VMs... probably a bit different from what's done in 0ad, but I should find something I can help with. Edited June 25, 2012 by myconid Quote Link to comment Share on other sites More sharing options...
zoot Posted June 25, 2012 Report Share Posted June 25, 2012 As long as I can find interesting problems to solve, I'm happy. Can haz grass? (Here is a page about the technique. I realize it's not super simple!) 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.