forest screens - sexy new screens at the bottom !
nothing particularly interesting, just thought I'd show the results of me messing with the forests demo for a couple of days. So, I've added some crappy trees built quickly in blender, changed the grass colour maps and added some more grass textures, added some robots walking around, and changed the landscape to use triplanar texturing for its shader ( = nice auto-splatted cliffs etc.). I think its starting to look quite nice (apart from the trees..). Framerate doesn't seem to go down much at all unless you add loads of hi-poly meshes. Oh and I also made some little mushrooms and a bush and added them as well. If anyone is interested I'd be happy to upload a zip. Enjoy!
This is cool !!!!!
If you could create a zip with source and media I would like to add this to the as a Demo to the next release.
Also I'm going to include Caelum support in the 1.1.a release which is all about cool sky's -- combine this with your forest work and we have a great demo basis.
your wish is my command
note: i changed the update timings a bit for the grass and trees to update every other frame, i think it's a little faster, but i may be mistaken in my naivity..
hmm, i dont think adding combining caelum with ogreforests is going to be very easy unfortunately. The main reason being that imposters can't respond to dynamic lighting. The grass also gets its lighting from the colourmap, making it impossible (as far as i can tell) to vary lighting on forest objects.
I've quickly hacked in the 'dirty' skymanager, and the only things that respond to lighting are the batched trees in the foreground - screenshot below.
I managed to customise the triplanar shader to accept lighting params in another project, so I confident of correctly shading the landscape, but the imposters and grass represent a problem
I'm going to look into the pagedGeometry api docs to see if there's a way to do it. Even affecting imposters with ambient light would be enough i think.
Looked into it, and apparently you can assign colour maps to treeLoader instances on the fly, from images or ogre texture objects - yay!. Seen this function in the SVN, looking forward to that next binary!
Nice work bharling.
will look a lot nicer with better trees and dynamic lights, hold tight
Done added caelum
Its almost looking like the sexiest thing ever to grace my computer screen
apart from the onset of a few niggles which I'm trying to iron out.
Niggle #1: Flickering clouds - anyone else get this with the caelum demo? I thought it might be my GFX card, but have tested on ATI and NVIDIA and get the same issue. Hopefully its a simple setup issue and not a full on caelum bug. Although if it is, I imagine its somewhere in a shader so should be fixable. Andy - the fix for this that I PM'd you is actually horse crap and does not work (of course
Niggle #2: dissapearing trees - Light level seems to affect the batched geometry's material's alpha value (maybe my material is screwed). When the sun sets, the trees gracefully fade out! check the last screen. Really weird.
I've worked out how to alter the forest colour maps depending on the sky, and just have to make a couple of shader adjustments to get the terrain shaded as well, so a bit more work to be done in that area.
ok - no more flickering clouds, if anyone else has the same problem, the cloud blend time needs to be set to something very high:
self.caelumSystem.getClouds().setCloudBlendTime(7200 * 24)
sky looks Lush now
ok, quite a major update to this, I'll be commiting a proper demo to svn shortly. No screenies, but you can check out the improvements yourself in this zipfile... I think this one is significantly better
if anyone has any decent tree models they feel like donating, please go ahead
Just made this pine tree on Blender i hope you like it!
You can use it for whatever you want, but I would like if you put my name when you use it.
I am gonna see if I can make a normal tree, like an oak or something.
Yeah, sorry forgot to mention you'll need that patch
heres some new screens, will upload a new zip shortly
thanks for the tree dan, i will credit you
Yay! Got it working!
Caelum is very realistic, and combined with ogre forest becames killer
By the way, the water in these last screens looks great!
Looking forward to the next release!
ok, here he is
Have replaced my trees with your ones and it looks a lot better already!
Also fixed the fog so it should go dark at night. Still struggling to effectively change the foliage colours at night, but have some ideas on how to fix that. Finally I also attempted to add some sound, but that is not working yet.
Have also been trying to tweak the framerate a bit, would be interested to know how well it runs. There is a lot of garbage in the file that needs cleaning up...
Also occasionally I seem to get a crash on startup, I think its a problem with one of the meshes, hopefully I've removed it from the version at the link
That was fast!
Thats incredible! everything looks really good!
Though I have found some trees and mushrooms underwater hehehe, but they're probably aquatic.
You can take really beautiful screenshots! You could make an screensaver out of it.
Now, who knows whats gonna be in the next release?
sharks, bridges, boats? hehehe, just letting my imagination go wild
cool glad u like it
so what sort of framerates are you getting on your setup? On my p3 2.8hgz 2MB ATI X1650 i get between 30 - 80 fps.
so then my TODO's at the moment:
Add a raysceneQuery to the tree placement algo to stop things going underwater (or better still, load from a pre-made list)
tweak the landscape shader a bit for sand / snow
work out how to shade the trees without having to *arrg* reload the geometry pages completely.... maybe by applying some predefined color maps, but still needs reloading
Get the sound going - using the open_al soundstream with an ogg file sounds weird, the sound plays once really fast and thats it. need to have a look at that one.
managed to implement most of those TODO's ( apart from shading the foliage .. bit of a biggy that one... )
resorted to plib for sound, which also doesn't seem to be working properly, guess I need to read up on the API documentation.
the zip file is updated in the same place
Note, its a bit bigger now due to the addition of an ambient .wav file from the freesound project.
Hey! downloading right now...
I am getting between 85 and 140 frames per second on a Geforce 7800 GTX 256mb
But on my computer at my grandmother's it gets a lot slower, though I don't remember the frame rate. next time I go there I'll check the video card as well as the fps.
The problems I found were:
At the very beginning of the game, its day and the sound is playing but after a few seconds of 0,3 fps the days turns into night and the sound stops playing.
I also noticed that when I move the camera around, either with the mouse or the movement keys, the water planes seems to flicker up and down, causing part the margins to show or hide.
Besides that I think its great! The shader is really hard to get working the way you want, I tried altering it once with a scene full of transparent textured planes and i couldn't make it right.
I just saw this: http://www.ogre3d.org/phpBB2/viewtopic.php?t=36655
Have a look at the videos, the second and the last one are the best
The shadow casting on the grass is incredible, i have no idea how they've done it.
I have more time on the weekends, my weeks are very busy with school and everything.
Next weekend I'm gonna try making some other trees to make the forests flora more diverse. Hehe
Well, PagedGeometry and OgreForests are in fact one and the same (I know because I was trying to write a python version, but was happy to give up on that when andy wrapped it for PO1.1!), so we already have access to the features in your link above.
Yeah, I'm getting the problem with the flickery water plane myself, I'm thinking it could be a float precision thing, will see what can be done.
as for framerates I'm quite happy with that so far, it seems to be playable ( I'd define playable as a minimum of 35fps ) on everything I've tried it on so far, even when the number of trees is drastically increased.
So, I think its nearly ready to release as a 'showcase' demo, heres the final things I'd like to do before release:
1. Clean up the code and comment properly (split up the _createScene so folks can see what's happening)
2. Maybe add an ocean shader if I can find a good example that wont break anything.
3. Tweak the foliage distribution and grass density maps, to end up with rocks and weeds underwater, and trees and shrubs above, shouldn't be hard.
4. Sort out the sound
5. Possibly add a player character (just the ninja or robot for now) in a 3rd person perspective like oblivion, and do some basic abilities like jump / fight (again not hard at all). Of course, doing that will bring into question the issue of shadows....
Very cool -- I can't wait to see the demo..
Update (and cheeky help request)
I've managed to get the cg ocean shader ( oceanHLSL_Cg.frag / .vert ) working in the forest demo which almost looks good. Trouble is that the shader is set up to use a cubic skybox and not a 2d reflection texture, therefore the reflections all look a bit skewed. I've been randomly tweaking the shader without really knowing what I'm doing, so if anyone has experience with cg, I'd be very grateful for any pointers on how to make this work with a 2d texture rather than a skybox.
the shader I'm using is in demos\media\materials\programs\oceanHLSL_cg.frag / .vert. I've set up the material by modifying the ocean.material at runtime, and piping the rtt texture into the second texture unit (it actually worked first time, certainly wasn't expecting that!) When you look at the water, it seems that the 2d texture is being mapped onto a box as if it were a skybox.
good news is that the framerate seems exactly the same as before, yay!
sorted, the next demo is going to look nice
Thatss what I call water!
Very nice indeeed! Can't wait to see it!
<Biting my nails>
When the demo is released I'm gonna go strait to the part you use the water shader.
I've been dieing to know how to use them!
its up already, same place
I still think the water is a little b0rked somehow, but its nearly there.
I've added a folder called water to the media folder ogreforests, you'll find everything there. Its really just the ocean material with some slight mods made to the cg shaders.
EDIT: heres some screenies, starting to look rather nice now I think
On close inspection I seem to have randomly caught the water noise at the same delta in both screenshots, I assure its not static though!
What a coincidence! hehe
The water is great now!
But here at my grandmother's, with a GeForce 5200
I get between 3 and 6 fps heuheueh
When I get back home, I'm gonna really enjoy it.
Congratulations on the great work!
[Edit] Sorry, this is probably a naive question. What's with the white stuff that's below the horizon? And why are the flags in:
## Initialise Caelum
self.caelumSystem = caelum.CaelumSystem(self.root, self.sceneManager )
# ,createSkyDome=skyDome, createClouds=clouds
commented out in the python 1.1b snapshot demo?
There's no setSkyColourModel() or setSkyGradientsImage() in the Demo_Caelum01.py file... how does things magically work?
White stuff below horizon - dunno, seems to be the render target not updating fast enough, or could be some bug in the shader. Theres still some work to do on that. I'm currently trying to sort out a proper fresnel effect on the water, and sort out what happens when you go underneath (need to set up another sceneManager and render target I think).
I think Caelum kind of hard-codes its sky color maps etc, again I haven't looked properly at the API, I just wanted to get a bare bones app working. Those lines are commented out because Andy reccomended to do that to get it working, and it did
theres more to come soon.
Now, who knows whats gonna be in the next release?
sharks, bridges, boats? hehehe, just letting my imagination go wild
actually Whales, flying ones (of course), and other goodies
I'd like to get unified texture shadowing in there as well, but its a bit of a pain with so many deformed meshes (landscape, whales etc..)
As a heads up here has been some changes in the latest Caelum so I'll tweak the demo code when I build a new binary to ensure compatibility..
Possibly happen over the week end
Just an update screeny - still a bit of a way to go, but have got some nice translucent water going, am working on a bump / specular map for it too
Am gonna have a go at PSSM
as well, stay tuned..
That does look good.
What is in the bottom right, hiding in the grass? If you could see 1 or 2 fish right under the surface of the water that would probably add a lot of appeal also.
Yeah I know what you mean about the grass. Its a bit weird, the plane seems to be clipping the pagedGeometry grass. I thought it was something to do with the rendertarget setup, but I think its actually in the materials (alpha blending etc.). Not really sure how to fix that one.
As for fish, I might add something along those lines, but currently it does not use true fresnel distortion which you'd expect to see under the water, again hopefully I'll implement that soon, but it will likely cost some fps.
I have been looking closely at how Crysis does water ( CryEngine2 is an awesome engine ). I think I can implement everything apart from the vertex distortion (FFT transformation is way beyond my GCSE maths ability .. )
As I said, my next goal is to get bump-mapped specular highlights on the water, hopefully soon
I was actually talking about a red mushroom-like looking thing, where the land meets the water, towards the bottom ridge edge of the picture. Am I seeing things?
I don't know why, but I'm a sucker for the fresnel water, even if it doesn't look at all realistic as a lake. I guess I like swimming in clear water like that, lol.
yeah thats a mushroom
Am going to do a little tweaking today, then do an SVN commit of the demo
caelum patch s not working on my computer may I've done something wrong ? this is the console message
Traceback (most recent call last):
File "C:\PythonOgre\setup.py", line 79, in <module>
File "C:\Python25\lib\distutils\core.py", line 139, in setup
raise SystemExit, gen_usage(dist.script_name) + "\nerror: %s" % msg
SystemExit: usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: setup.py --help [cmd1 cmd2 ...]
or: setup.py --help-commands
or: setup.py cmd --help
error: no commands supplied
when I run the setup file inton python ogre folder
are you typing:
python setup.py install
from the command prompt? just double clicking the setup.py file wont work. If thats not it, then I have no idea, sorry!
I'm sorry but what do you mean by comamnd prompt ? ( sorry i don't the command name in english )
Sorry I mean the DOS window.
you could try making a file called 'runposetup.bat' in the folder and copy and paste that code above into it. Then double-click that file. Should work i think.
it run slowly on my laptop but tank to you I made it work.
nice job by the way.
Finally had some time to update this demo a bit now. Mainly trying to speed it up, as it is too slow a the moment.
So I have moved all frame updates into one listener class, and tried to clean it up somewhat. This has resulted in a small FPS increase, but mainly tree loading seems smoother now (less jitter). Still some more to do. I promise I will finally commit it to the SVN tonight, so someone with a bit more skill could optimize it a bit more!
ok you can check it out of the SVN now! note it may not work with python-ogre SVN version, but will work with the latest binary release.
Wowzers, this is pretty neat. The model->impostor effect is a bit obvious, but I guess that switching at a bigger distance would have a severe impact in performance?
Btw, what's the deal with those blue-ish patches of terrain?
I noticed a small glitch: from the starting position, if I look up i see a black spot in the sky more or less straight ahead, and it follows the camera. It looks as if there's a poly missing from the skydome. Maybe it's something with the far clipping plane or something like that.
I can post screens if needed.
This looks great..
One issue on my machine (crap laptop) is that after about 5-10 seconds frame rates go to hell (from >30fps to <0.5!!!)..
This is either an graphics card/ogre or Caelum issue and can be resolved by disabling the fog and startfield in Caelum.
componentMask = caelum.CaelumSystem.CaelumComponent (\
# caelum.CaelumSystem.CAELUM_COMPONENT_STARFIELD |\
# caelum.CaelumSystem.CAELUM_COMPONENT_GROUND_FOG |\
self.caelumSystem = caelum.CaelumSystem(self.root, self.sceneManager, componentMask)
Yeah, I'm getting the same 'black spot in the sky' thing myself. It kind of started when I began messing with the nearClipDistance to fix an issue with the water ( its a bit of a balancing act it seems!). Regarding forest detail switching, yes it does have a pretty big impact on framerate (especially adding lots of grass). I'm trying to work out whether I actually need to call forest.update() every frame (which also affects fps big time). I've reduced the forest updates to 4 fps and I can't really see any difference. I'm going to try turning off forest updates altogether.
Thanks for that andy, must admit I have not seen it do that on any system I've tested it on so far. I'll put that code into the demo and leave it as an option in case anyone suffers the same issues.
Are the clouds showing on your system? they should be, but having just tried it on another PC, they have dissapeared again!!
it seems to depend on the order of creation of trees versus sky
Are the clouds showing on your system? they should be, but having just tried it on another PC, they have dissapeared again!! Evil or Very Mad it seems to depend on the order of creation of trees versus sky
Interesting. I added Caelum to my app and never saw clouds (even when I copied in the code from your demo). So, are you saying you've noticed a change in clouds vs no clouds depending on when you created the sky? I think I still wasn't getting them with trees turned off. But any info you have related to this would be most helpful.
I do see clouds in the forest demo, too, which is the strangest part. Though I'm still using the one that came with 1.1 or whatnot.
Well something odd is going on somewhere. The clouds will appear in the demo by simply moving creatSkySystem() after createTrees(). I'm guessing some render queue is getting messed up, but I know not what