PDA

Vollständige Version anzeigen : Integration between GeoControl2 and CryEngine Sandbox1 (FarCry)


mauronen
9.August2007, 16:42
These are snapshots taken from Sandbox1.
This is the workflow process that i've used:

GeoControl2:
I've created a basic heightfield with dimension of 4096 (i'm forced to double standard height, 3760, because in Sandbox1 the terrain became too flat)
I've created a "mountains" selection (from 2500 to maximum height)
I've applied Mountain Full Ridged (Classic Alpine 2 snow)
I've applied Thin Flows Deep Invers
I've applied High Sedimentation -Inverse (Last level - soft rocks, very different sized)
I've exported terrain as PGM for Bryce
Sandbox1
I've created a level of 4096 x 4096 x 1 meter
I've imported PGM file
I've textured with some green, rocks and snowIt seems that final result could be appreciable. Clearly nothing comparable with rendering generated by landscape generator as Terragen, Bryce, Vue or Carrara; but this is a real traveling landscape where i can put vegetation and other stuffs.
I've generated an 8192x8192 terrain into GC2, but my graphic card doesn't support heightfields and textures greater of 4096x4096 (Sandbox1 crashes every times).

I need some opinions and some tips about improving final result.

mauronen
9.August2007, 16:43
Other shots:
Last is terrain that i've exported from GC2.

monks
9.August2007, 18:17
Looking promising- I'll be watching this. :)

Yes, you can't have everything- otherwise there'd only be one app in the 3D graphics marketplace! I appreciate the fact that- this could be improved a lot -even with simple plants. What about the textures there? Are you using GeoControl's selections: renderer to create textures or colourmaps for export? I think you should use the GC renderer toget your textures together based on logical connection of terrain + erosion = texture. As Johannes remarked, flow maps and erosion really are a major part of believable terrain.

Also, if you'd like to Mauro- post this up in the ME-DEM boards- if you're using M-E terrain of course. I think a few people over there are still considering Crytek an 1 option for rt stuff.

monks

mauronen
9.August2007, 19:01
Hi Carl. Nice to hear you.
Actually CryEngine and Sandbox1 (both embedded in FarCry) seems to be the only valid environment to build a convincing 3D environment. Keep in mind that this tool has been released in 2003/2004. Actually the only valid alternative is, obviuosly, CrytekEngine2 and Sabdbox2 (both embedded in Crysis that would be out in November).
Concerning about textures, actually i've used FarCry embedded textures, because my aim (until GC2 doesn't allow to import selections and doesn't makes tiles of heightfields) is to deeply understand GC2 workflow and behaviour. Actually i don't know even how could use GC2 renderer to make real textures. As soon as all these factors are available (GC2 tools and my capability to well use it) i will restart to model First Age maps and i will post new tutorials concerning about this workflow process (and, naturally, the work done ;) ).
I hope that with GC2+Sandbox2+CryEngine2 (+huge amount of work and effort :D ) i could realize a real representation of Tolkien and Fonstad vision of First Age.

eFFe
9.August2007, 21:03
Hi mauronen,

I'm also using Sandbox1 (for testing) at the moment and noticed the problems with heightmaps aswell. Imported 1024x1024 heightmaps work fine and create the same heights as in GC2, but the terrain definitely lacks detail and looks quite ugly. For some reason the Sandbox1 importer reduces the contrast and brightness on the 4096x4096 heightmaps and therefore flattens the terrain in game. Comparing the 2 heightmaps (.raw or .pgm) shows that the contrast and brightness levels are the same, so I can confirm the "dimming" happens during import.


Since you asked for opinions and tips:

Try using more layers and finetune the settings in the geometric texture distribution in Sandbox.

Try to get more realistic slopes and change textures (i.e. rocks).

Try using custom textures to get away from FarCry's tropical island look.

To get rid of the purple tint on the textures, change the skycolor to almost white and pick a soft tone for the suncolor (i.e. yellow/orange).



eFFe

mauronen
9.August2007, 21:19
Thanks eFFe.
I'll try to apply your precious tips.
Try using more layers and finetune the settings in the geometric texture distribution in Sandbox
How it works? Could you give me a step-by-step example?

mauronen
9.August2007, 21:34
Another thing eFFe.
I've exported a river flowmap (i've attached it).
How can i create a river using this mask?

Thanks in advance for your help.

cajomi
10.August2007, 07:02
Well, most of the details are gone. Surely the height resolution is only 8 bit, so it would be better to use a 8 bit format, bmp greyscale.
Can the engine use normal maps for heightfields?

Also, I have the impression, that the horizontal resolution is not 4096, but about 512 or 1024. Open GL or direct x can not load a 4096er resolution, that would need to much memory, the limit is there 1024. So a higher resolution can only work with a very good LOD. The solution here would be a texture map, which would add details.

mauronen
10.August2007, 10:06
Hi Johannes.
Sandbox1 support heightfield import of .PGM and .RAW files of 8-bit depth or 16-bit depth.
I've exported from GC2:
1) RAW (16bit) for Carrara
2) PGM for Bryce (that is a 16bit format as explained in your help)
I read into some CryMod community (http://www.crymod.com) forum threads that Sandbox1 treats these kind of files as 16-bit without rescaling, whereas accept 8-bit .BMP files. I've tried to export from GC2 BMP Heightfield grayscale (that would be 8-bit) and import it into Sandbox1 and, in effect, final result is very poor (terrain is very, very rough).
I've noticed that the higher GC2 dimension is the better is final terrain in Sandbox1. Actually my PC limit inhibits me to test 8192x8192 dimension into Sandbox1 (not into GC2 that build a very detailed heightfield).
I assure to you that i've modeled my test heightfield at 4096x4096 into GC2. Actually the limit of my videocard (concerning DirectX driver maximum texture width and height) is 2048x2048 (tested with DirectX Caps Viewer); so, could be that Sandbox1 manages well 4096x4096 terrain, but my videocard rescale it to 2048x2048.
For me, solution is: throw away my old PC and buy a very powerful new one, don't you?

cajomi
10.August2007, 10:29
I think, a new pc is not the point.
It is definitly not a 16bit heightresolution, which is shown in the images and also not a 4096 horizontal resolution. So, at all, that must be smothing algorithm in the engine, which causes this result, may be the LOD settings, which simplify the terrain in the distance.
I have implemented the normal map feature, because as far as I was informed, the game engines can read that. With normal maps, the terrains should look as detailed as in GC. Sure is, that with the smoothing of the cry engine, rivers will not look convincing. The same for roads.

eFFe
10.August2007, 14:10
Thanks eFFe.
I'll try to apply your precious tips.

How it works? Could you give me a step-by-step example?Check out the Sandbox Editor User Manual (http://www.crymod.com/attachment.php?attachmentid=181), page 7 for info about Texture Layers. What you basically need to do is determine on which height and/or slope range you want a layer to appear. Select a layer, choose a texture and move the slider to the lowest altitude you want that layer to start appearing, click "Set Start". Now move the slider to the maximum height for that layer and hit "Set End". Repeat this process with multiple layers until you're happy with the result/look. Same procedure for the slopes, just that you determine angles instead of heights.

Another thing eFFe.
I've exported a river flowmap (i've attached it).
How can i create a river using this mask?There's no real solution for flowing rivers in CryEngine1. I assume you meant rivers that flow down a mountain? As far as I see it, there's only one, quite complicated, way to create such rivers...and the results would not be very convincing. I'm not familair with all the Rivertool options yet, but you'd have to export the water-/flowterrain from GC2 and bring it into a 3D modeling application such as 3DS Max or Maya and apply a water material/shader to it. You'd then have to import it as an object in Sandbox1. The problem would be that the water on the river model would just to flow into one direction, rather than folowing the rivers shape. You'd also have to create such a model for each river to get different flow directions. So there's no point in trying to get realistic rivers into CryEngine1.
CryEngine² however will have an integrated river tool to create realistic flowing rivers, so it would be the best to wait for that. ;)

Well, most of the details are gone. Surely the height resolution is only 8 bit, so it would be better to use a 8 bit format, bmp greyscale.
Can the engine use normal maps for heightfields?The recommended format for heightmaps is .pgm image format for "lossless 16-bit terrain importing/exporting".
I haven't found a way to apply normal maps to terrain yet, I doubt this engine supports that option. It is however possible to use normal maps on terrains in modern engines.

Also, I have the impression, that the horizontal resolution is not 4096, but about 512 or 1024. Open GL or direct x can not load a 4096er resolution, that would need to much memory, the limit is there 1024. So a higher resolution can only work with a very good LOD. The solution here would be a texture map, which would add details.Have a look at attached image for "supported" heightmap resolution, I kinda doubt the extremely high resolutions are really possible in CryEngine1. ;) The upcomming CryEngine² however does feature maps up to 60km wide. :)




btw, I just realized that I overlooked a point and forgot a limitation by the engine. While 4096 heightmaps produce wider terrains, the height/vertical limitation stays the same (255), resulting in stretched (flattened) terrain.

mauronen
10.August2007, 14:50
Check out the Sandbox Editor User Manual, page 7 for info about Texture Layers. What you basically need to do is determine on which height and/or slope range you want a layer to appear. Select a layer, choose a texture and move the slider to the lowest altitude you want that layer to start appearing, click "Set Start". Now move the slider to the maximum height for that layer and hit "Set End". Repeat this process with multiple layers until you're happy with the result/look. Same procedure for the slopes, just that you determine angles instead of heights.

Ah, i knew that before (i've read all manual section that covers terrain aspects). I thought that you talked about some other aspect of layers that i've dont knew. Thanks the same and thanks about river tips. I hope that, in the future, i will ask to you some other tips if i need ;)
I haven't found a way to apply normal maps to terrain yet, I doubt this engine supports that option. It is however possible to use normal maps on terrains in modern engines.
I'm reading many posts at Crymod forum. There would be some options in Database Library > Material. I've attached a shot that shows exploded parameters. Also, there is a Bump Maps on Terrain Tutorial (http://www.crymod.com/thread.php?threadid=7329) that briefly explains some ways to add bumpmaps
...I kinda doubt the extremely high resolutions are really possible in CryEngine1. ;) ...
Some guys at Crymod have built a 8192x8192 terrain...but probably they have a very powerful rigs.
btw, I just realized that I overlooked a point and forgot a limitation by the engine. While 4096 heightmaps produce wider terrains, the height/vertical limitation stays the same (255), resulting in stretched (flattened) terrain.

Right eFFe! I forgot this limitation.

alexcoppo
10.August2007, 16:20
It is definitly not a 16bit heightresolution, which is shown in the images and also not a 4096 horizontal resolution. So, at all, that must be smothing algorithm in the engine, which causes this result, may be the LOD settings, which simplify the terrain in the distance.


As a related item, I have noticed that importing TGAs into Vue6 does not yield the same wonderfully sharp features you can create with GC.

After some experiments, I have come to the conclusion that Vue6 import performs a violent smoothing on the heightfield, luckily, I have also determined that if you perform one or more sharpening passes in the imported heightfield, you get back something quite similar to the original heightfield.

The way to check this effect is to create (with any paint program) a completely black (0) image with just one perfectly white (255) dot inside and use it as a BMP heightfield. Theoretically, the result is a completely flat plain with just one tiny peak; in reality things will be different and therefore you can uderstand what is happening.

For mathematically minded people, it is a case of assessing a filter response using its Impulse response (http://en.wikipedia.org/wiki/Impulse_response).

Bye!!!

P.S.: counting the days towards open GC2 beta...

cajomi
10.August2007, 16:52
@mauronen
For rivers, if you want a separate water, use the "water rised" option in the river and lakes panel.
If the water has not to flow, you can also use the water filled option and create with GC a convincing water using the "deep" map, with fading out effect correspondening to the deepness.

Well , the attached image shows, that normal maps would work. That would have the advantage, that you have not to import a 4096 terrain, but only 512 or 1024 and the rest is added with a 4096 normal map. But I see no option for the normal map, how the channels are intrepreted. Would be great if you try that and show the results, so possibly I can creae a special normal map export for the cry engine.

@alexcoppo
The tif in the function editor will work better than the tga, but it looks like Vue is definitly not really importing the full range of a 16 bit terrain. I am trying to discuss that with the developers, may be they.......

mauronen
10.August2007, 17:56
Well, after some timid attempts, here are some little results:
First shot is for a terrain without normalmap set in Material > Normalmap
Second shot is for a terrain with normalmap set in Material > Normalmap (a bit better)
Third shot is a bring closer view of detail maps applied to layers.
Fourth shot is a detail about Material Editor window. When i've checked "Bump map" in Shader Generation Params section, five entries are enabled in Texture Maps section.

mauronen
10.August2007, 18:08
Here we are five entries expanded with, for each, all customizable parameters.
@cajomi
That would have the advantage, that you have not to import a 4096 terrain, but only 512 or 1024 and the rest is added with a 4096 normal map. But I see no option for the normal map, how the channels are intrepreted.
Shots of previous post are excerpt from 4096x4096x1 Sandbox1 terrain. If i try to build in GC2 a 512x512 or a 1024x1024 heightifield (though i would generate a 4096x4096 normal map in GC2), final result in Sandbox1 would be very very poor (i suppose).


Now i have to go to holidays.
See you to all at the end of August.

eFFe
10.August2007, 19:01
I'm a little bit confused. I get the impression you two (mauronen,cajomi) were talking about two different things.

Well, after some timid attempts, here is some little results:
First shot is for a terrain without normalmap set in Material > Normalmap
Second shot is for a terrain with normalmap set in Material > Normalmap (a bit better)
Third shot is a bring closer view of detail maps applied to layers.
Fourth shot is a detail about Material Editor window. When i've checked "Bump map" in Shader Generation Params section, five entries are enabled in Texture Maps section.

Shots of previous post are excerpt from 4096x4096x1 Sandbox1 terrain. If i try to build in GC2 a 512x512 or a 1024x1024 heightifield (though i would generate a 4096x4096 normal map in GC2), final result in Sandbox1 would be very very poor (i suppose).

I'm reading many posts at Crymod forum. There would be some options in Database Library > Material. I've attached a shot that shows exploded parameters. Also, there is a Bump Maps on Terrain Tutorial that briefly explains some ways to add bumpmapsI read the corresponding forum entry to that tutorial and it is actually a tutorial about applying bump maps to terrainlayers/-textures and not about applying a normal map to the terrain, what I think is what cajomi meant. The attached image shows a little test I did some time ago and is an example of a normal map apllied to a terrain model. On the left you see the original "high poly" model (~178.800 polys) compared to the "low poly" model (~19.600 polys). Basically a normal map is a texture that contains all the detail information of the high poly model. It is then projected onto a low poly version of the same model, giving it the impression of having (almost) as much detail as the high poly version.

Well , the attached image shows, that normal maps would work. That would have the advantage, that you have not to import a 4096 terrain, but only 512 or 1024 and the rest is added with a 4096 normal map. But I see no option for the normal map, how the channels are intrepreted. Would be great if you try that and show the results, so possibly I can creae a special normal map export for the cry engine.I haven't found a solution for that yet, but I'm new to CryEngine1. So eventhough I doubt the engine features that, it still might be possible somehow.

cajomi
10.August2007, 19:03
@ mauronen
Thanks for this well documented approach and have nice holidays!

@eFFe
I think that example looks promising. There should be a way to improve the results.

mauronen
27.August2007, 23:18
Ok. I've played enough with Sandbox1 and, finally, i've imported a 4096x4096 heightfield (High Contrast terrainpreset rescaled) and i've played with diffuse maps,bumpmaps,normalmaps and so on.
This are some shots:

mauronen
27.August2007, 23:20
Last shot:
Soon i'll play with vegetation and some other skies.
Stay tuned!

cajomi
28.August2007, 07:36
This one looks really impressive and also the others are great!!

monks
28.August2007, 15:31
Looking good Mauro!- the first shot of that group of 5 is splendid!

monks

mauronen
29.August2007, 09:16
Thanks Johannes and Carl.
These shots aren't comparable among Bryce, Terragen, Carrara or other landscape generator. But i guarantee to you that nothing comparable among walking and flying through this terrain. The strenght of last generation 3D render is just to ever more depict real environments; and CryEngine1 (and CryEngine 2 at the end ot this year) are leaders of 3D engines and own probably the best WYSIWYP editor.
Next shots will be about Johannes postwork test. Main troubles that' i've found concerns about placing of water areas (rivers and lakes). If i will don't find a solution, rivers will be dry; but the rest of terrain will be covered of vegetation.

Stay tuned!

cajomi
29.August2007, 09:33
I have just found a "bug" in the smoothing algorithm, so the water parts are not clear defined and at the edges the water is running uphill.

mauronen
29.August2007, 10:13
Either my mistake or bug in Sandbox1 (that is in beta as far as 1 year and will be replaced by Sandbox2)

monks
29.August2007, 13:42
Exactly, this is also the point about something like World Wind of Google Earth. You look at the graphics and you might think, hmm pretty nice, but you just can't fully appreciate it until you're navigating, flying, etc and see a whole planet wheeling beneath you. Great stuff!

monks

mauronen
29.August2007, 17:19
I have just found a "bug" in the smoothing algorithm, so the water parts are not clear defined and at the edges the water is running uphill.
I've analyzed shots that have water, and if you refer about white (or almost white) parts of images, they represent sand. These shots are been made at very far distance, and they seem water foam that climb mountains.
This is a shot (made from a lowspec pc, so isn't comparable with other shots made from midspec pc) that shows how sand and how water shores are well defined.