Biomes

I use the heightmap to check slopes. The heightmaps for all the tiles are generated when I do it tho, so I can use neighbouring tiles near the edges.



Got a new grid type “Linked Grid” in the lib now, that links a tile to all 8 surrounding tiles. Using only left, right, up, down to get the slopes, but all eight neighbours for the final blurring of the zone maps.



EDIT: Thinking about storing positive and negative max slopes in the slope map, not just the magnitudes. Maybe even the directions. Or at least make a lower res version with all that info (perhaps even a graph object with heights and slopes). It could come in handy when generating stuff like water paths and roads.



Got something like that going already btw. It’s from this article. That’s way ahead in the future tho.

1 Like

All the data is now available through the terrain loader (elevation, humidity, roughness, slope). Gonna start doing some texturing now with the new image raster.



http://www.jamtlandoutdoors.se/images/dist2/geo_data.png

The most important thing is that the data is serializable so it can be loaded and saved to and from j3o files :slight_smile:

@kwando

You were talking about reducing texture tiling before. I found this article, it shows a few methods. I’m reading this and trying all of the stuff out atm, to make texturing better. Most of it seems to work pretty well. Some of the stuff I’ve actually already embedded into the terrain generation stuff, like mixing several textures (dirt and grass etc) using a noise. I’m not using a simple noise tho, I’m using the roughness and humidity maps etc.



http://udn.epicgames.com/Three/TerrainAdvancedTextures.html



http://www.jamtlandoutdoors.se/images/dist2/low_tiling_close.png



http://www.jamtlandoutdoors.se/images/dist2/low_tiling_far.png

@androlo said:
You were talking about reducing texture tiling before. I found this article, it shows a few methods. I'm reading this and trying all of the stuff out atm, to make texturing better. Most of it seems to work pretty well. Some of the stuff I've actually already embedded into the terrain generation stuff, like mixing several textures (dirt and grass etc) using a noise. I'm not using a simple noise tho, I'm using the roughness and humidity maps etc.


There was some interresting approaches in that article, just read it briefly tho. Hope we see some variant of them inside the BioMonkey :P

BTW, I can't see your uploaded images, webserver seems to be offline :/

Images work for me.

@kwando

Works for me now. Not much to see tho. Had some normal mapped terrain shots as well (a bit more definition) but I’ll save it for the other stuff.



I’ll defenitely try and use some of those approaches. Testing a few of them now. Haven’t had any good results with the scaling “fractal” approach tbh. It requires a very special form of texture I guess, mine just looks weird when I try. Mud was one exception that looked ok.



I’m more interested in how to keep texture count down then reducing tiling tho. Tiling I think can be reduced by using good textures, and intelligent placement.

http://www.jamtlandoutdoors.se/images/dist2/terrain_lit_shadowed.png

1 Like

hmm, then I’m banned from that server someway… or my internet might got a “feature” I do not know about yet… :stuck_out_tongue:

Gonna put up some more images then hehe, with shadows and stuff.



http://www.jamtlandoutdoors.se/images/dist2/terrain_barren.png

Wow, this is killer! I have been trying to decipher your latest API tonight but I can’t figure it out…:frowning:



On the surface of it it looks like you’ve made a nicely synchronised terrain and foliage paging system that will take jme to the next level :smiley:

I can never get my terrain shadows looking that good :slight_smile:

I’ll vote for @androlo to become a CORE member!



Your work are awesome. (Speaking of which, did the river system finish?)

@staugaard

The river system is “kind of finished”. I was messing around with it and concluded it must be GUI based. Had to re-think some stuff, and I also had to do Forester stuff, so it’s been postponed. When this is done I’ll probably get back to it. Either that or the sky.



This system might make it possible to generate river paths and stuff tho. It’s all gonna blend together somehow, sometime…



@monkeychops

I am going to make a preview soon, with only the terrain stuff. Then I’ll sync with the trees and grass, and make another preview, then do some bug fixes and stuff. Then it’s BioMonkey 1.0 time.



The paged terrains I’m using now is not a real terrain system, like terrain grid. It has no lod, and no neighbour stitching. It’s just there because the grid has a higher resolution then terraingrids, and it automatically regulates its size depending on the far camera range. I need these features while working.



The system just generates alpha maps and stuff, so it doesnt matter what system is used to page and render the terrains. I will continue developing this system tho, add lod controls etc. At the very least it’s a good learning experience.



@jmaasing

The shadows are just regular pssm shadows, 1024 map, 1 split. PCF4 filtering. All terrain textures use normal maps. I think I copied the settings from some jME-test initially.



[java]

PssmShadowRenderer pssmRenderer = new PssmShadowRenderer(assetManager, 1024, 1);

pssmRenderer.setDirection(sun.getDirection());

pssmRenderer.setLambda(0.55f);

pssmRenderer.setShadowIntensity(0.6f);

pssmRenderer.setCompareMode(CompareMode.Hardware);

pssmRenderer.setFilterMode(FilterMode.PCF4);

pssmRenderer.displayDebug();

viewPort.addProcessor(pssmRenderer);

[/java]

1 Like
androlo said:
The shadows are just regular pssm shadows, 1024 map, 1 split. PCF4 filtering. All terrain textures use normal maps. I think I copied the settings from some jME-test initially.


I guess you can sort of see the PCF. But my main problem has been balancing splits and resource consumption. I have casters both near and far so I need to split a bit more. Maybe that is something you'll notice for trees or boulders when they are put in the terrain.

But mostly it's the temporal aliasing that is pretty severe and breaks the illusion. Would be really interesting to look at the temporal anti-aliasing algorithms (saving the previous frame of the shadow map and blend with the current) but that is more advanced than I am ready to tackle now :)

@jmaasing

With grass I normally use 3 splits. Grass doesn’t seem to become properly shadowed otherwise (gets too dark often, compared to the terrain). Not sure if it’s because they’re perpendicular to the terrain or something, and that affects the shadowing algorithm. I can’t get any grass shadows at all now, tho. I think they changed it to use some fixed function stuff and I haven’t really gotten it yet.

@androlo



Sounds great! As you know I am really eager to test this :slight_smile:



With regard to the terrain… to be honest your method looks more usable to me than the terraingrid. It might just be my noobishness but I haven’t been able to create a terrain of a size or quality of that in your videos using terraingrid. The tiles don’t seem to page until I am directly on top of them, so it never looks “vast” in the way yours does. If anyone has any tips to make terraingrid page smoothly I’d be please to hear them.

@monkeychops

TerrainGrid works in pretty much the same way, only you have to use much larger terrains atm. With smaller tiles and a finer resolution grid you can keep a smaller area of terrain in memory, as you page in smaller blocks. There are other advantages as well (and dis-advantages too), but that’s why I use it while developing, to get a good measure of how much memory it actually takes to run. That and I also want to test the system using many different viewing ranges, and include the option to set the viewing range when running the apps.



Sploreg actually mentioned doing some alternative lod control for any sized grids etc. so I guess it could be extended into a full-fledged terrain system, but I still can’t see a reason to use/develop this atm. for any reasons other then testing stuff and learning about terrains. Especially not for use in a “semi-official” plugin like BioMonkey. I’m pretty sure a variable sized terrain grid will be added sooner or later, since thats the standard in games, but I need it sooner. :smiley:

@monkeychops said:
It might just be my noobishness but I haven't been able to create a terrain of a size or quality of that in your videos using terraingrid. The tiles don't seem to page until I am directly on top of them,


Just guessing here but maybe you simply are moving the viewpoint to fast. The grid should page in a new tile when it's halfway to it, but it takes some time to page it in/create it. If you are moving the viewpoint to fast it will not have finished loading when the camera arrives.
@jmaasing said:
Just guessing here but maybe you simply are moving the viewpoint to fast. The grid should page in a new tile when it's halfway to it, but it takes some time to page it in/create it. If you are moving the viewpoint to fast it will not have finished loading when the camera arrives.



To me it appears only when you're quite close to it... I tried making the tiles bigger, they still don't page until well after I can already see the place where they're supposed to be :(