I’ve got issues with sky since 2 days. Ocean and ground are now rendered using fragment shaders, space too. But between those two borders, sky layers were still rendered with this old fixed GPU pipeline… which started to irritate me widely. A few months ago I had the exact opposite feeling: that’s definitively just impossible to design with both techniques in mind. I decided to process to fixed pipeline’s funeral and convert almost everything to shaders. I’ll work much more quietly with only one single philosophy!
Work in progress picture: now working on a complete set of textures for the ground. I’m defining areas of forest, grassy lowland, desert… for planets. But I’m quite sure that the main part of players won’t request to set up their own colony on a hostile designed zone. Who want a city mired in swamps? I need nice balanced landscapes… and I haven’t found this yet… 😉
This time, I’m sure. I’ve got my ultimate fractal compositor. So far, it was quite nice but, somehow, facing a feeling of repeatition while traveling accross the planet. Stereotypic fractal landscape… everywhere. Like crossing again and again the same mountain!?
[nerd mode: ON] I was listening to music… when I get a thought about disharmonic sounds. Obvious!!!
My fractal layers aren’t synchronized anymore, I’ve unleashed frequencies to create kind of resonant waves. Just like soundscapes… Disharmonic fractals… It may look snobbish (hope no), very nerdy (sorry), complex (not, actually), or maybe that’s a very common thing in the world of fractal-geek-mathematician-from-hell, I dunno at all, in fact I don’t care, but…
[nerd mode: OFF] …I’m sure, I’m in love with my new landscapes 😀
Here’s my small changes to the Nvidia/Nfz original ocean shader. It’s now alpha based to obtain something less brightfull and shiny. The main issue is that I still don’t know exactly how I’ll create a nice transition between ocean and shores. Anyway that’s not something really essential at this time 😉
Still working on my HLSL fragment program for terrain splatting. Above is my alpha map.
alpha = alpha*alpha + alpha * dupCO.r * dupCO.g ;
alpha = sqrt( alpha ) ;
alpha = clamp( alpha , 0 , 1 ) ;
Simple process with the under laying texture to avoid a too smooth texture transition. Not perfect… but it’ll be my starting point !
Up to now, splatting was achieved using the fixed-pipeline. But 1/ PSSM needs for itself 3 texture units so I won’t be able to integrate this on a one-pass texture. And 2/ Fixed and programmable pipelines can’t deal together… I have to say good-bye to my old beloved fixed texture unit functions and switch to a full vertex shaders solution. That’s life…
I got finally my own splatting working. Here is the rendering while flying approx. 2000 meters high. I still need to generate the whole texturing of planets, but I’ve got definitively my 256 textures system working.
I always benchmark any of my functions and I was quite surprise of dynamic texture generation time, not what I expected. Either I didn’t understood clearly enough mode definitions, or there is some drivers issues!
Ogre::HardwarePixelBufferSharedPtr pixelBuffer = mDynTexture->getBuffer();
// pixelBuffer->lock( Ogre::HardwareBuffer::HBL_DISCARD ) ; // slow version
pixelBuffer->lock( Ogre::HardwareBuffer::HBL_NORMAL ) ; // Fast!
Step by step. Now, let’s paint the world. The point is to mix different textures smoothly. I’m not gonna need a lot of textures on small scale, but rather a huge amount on large scale. From a technical point of view, it should be more simple. But from a cognitive one, sure it’s gonna be a complete headache 😉