SM3 - Page 7

SM3

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

Post Reply
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: SM3

Post by Beherith »

AF wrote:Until then can we not make it so we could allow multiple versions of a map that are functionally equivilant but have different numbers of layers?

e..g we could mark a set of layers as non-important, and thus they-ll get rendered on faster machines, without leaving lower end machines out in the cold, or machines under heavy stress.

I'm thinking of a new terrain texture quality slider, filtering out layers the mappers flagged as unimportant , and downsampling textures
I highly disagree.
The load isnt all that big, and my 3 year old gfx card has no trouble running it on high quality.

Would everyone please do me a favor and test the map I uploaded? It uses 5 2k*2k textures in 4 blend operations (also 2k*2k blendmaps).
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Re: SM3

Post by Tobi »

I used it yesterday while testing, got 20-30 FPS on my 9300M IIRC.
Satirik
Lobby Developer
Posts: 1688
Joined: 16 Mar 2007, 18:27

Re: SM3

Post by Satirik »

using tilesize=16 for grass stuff it looks even nicer, can't do the same for rock or you see the tiles when zooming out, would need more rock mixing like you did for grass to hide them, and yes the bumpmapping is not working

anyway good job !
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: SM3

Post by hoijui »

i like this (AFs) suggestion, though i have no idea about all this stuff, if it was possible, how difficult and what not.. but sounds nice :D
Auswaschbar
Spring Developer
Posts: 1254
Joined: 24 Jun 2007, 08:34

Re: SM3

Post by Auswaschbar »

Code: Select all

[      0] Segmentation fault (SIGSEGV) in spring 0.80+.0.0 (Debug)
Stacktrace:
./spring() [0xceca77]
/lib64/libc.so.6(+0x32230) [0x7f0a83782230]
/usr/lib/libIL.so.1(iConvertPalette+0x425) [0x7f0a85e24315]
/usr/lib/libIL.so.1(iConvertImage+0x1fb) [0x7f0a85e248cb]
/usr/lib/libIL.so.1(ilConvertImage+0x10f) [0x7f0a85e24b1f]
/home/karl/spring/source/rts/Rendering/Textures/Bitmap.cpp:291
/home/karl/spring/source/rts/Map/SM3/Sm3Map.cpp:336
/home/karl/spring/source/rts/Map/ReadMap.cpp:62
/home/karl/spring/source/rts/Game/Game.cpp:416
/home/karl/spring/source/rts/Game/PreGame.cpp:238
/home/karl/spring/source/rts/Game/PreGame.cpp:152
/home/karl/spring/source/rts/System/SpringApp.cpp:849
/home/karl/spring/source/rts/System/SpringApp.cpp:977
/home/karl/spring/source/rts/System/Main.cpp:111
/home/karl/spring/source/rts/System/Main.cpp:128
Got this when loading beheriths testmap with latest master.
Frostregen
Posts: 179
Joined: 17 Jul 2007, 00:52

Re: SM3

Post by Frostregen »

Beherith wrote: Would everyone please do me a favor and test the map I uploaded? It uses 5 2k*2k textures in 4 blend operations (also 2k*2k blendmaps).
Runs fine ~400fps.

Btw, your blendmap res is way to high.
Isn't the whole point of SM3 to save texture memory to allow larger maps?
I reduced them to 256x256, which gives the same result ingame. (I think)

Question: Are SM3 maps still required to be square?
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: SM3

Post by Beherith »

Did some tests with less layers and lower levels of details, set to 1024 textures, improvements were very low.

Still around 100 fps, high terrain detail and shadows added as well.

Also, I tried DDS, but it shows up as black :(
Frostregen
Posts: 179
Joined: 17 Jul 2007, 00:52

Re: SM3

Post by Frostregen »

frostregen.darkstars.co.uk/sm3_testmap.sd7

It's your map with 256x256 blendmaps,
textures still 2048 but converted to jpg,
and tilesize 32 for grass.

This moves filesize to 8,5mb with little quality difference.
Last edited by Frostregen on 12 Dec 2009, 02:26, edited 1 time in total.
Satirik
Lobby Developer
Posts: 1688
Joined: 16 Mar 2007, 18:27

Re: SM3

Post by Satirik »

Frostregen wrote:frostregen.darkstars.co.uk/sm3_testmap.sd7

Its your map with 256x256 blendmaps,
textures still 2048 but converted to jpg,
and tilesize 32 for grass.

This moves filesize to 8,5mb with little quality difference.
almost the same except for the flow which shouldn't be resized that much
Frostregen
Posts: 179
Joined: 17 Jul 2007, 00:52

Re: SM3

Post by Frostregen »

Flow had not been resized?

Code: Select all

		[trocks]
		{
			File=Maps/res/rocks+det.jpg;
			TileSize=50;
		}
	
		[bgrass1]
		{
			File=Maps/res/bgrass1+det.jpg;
			TileSize=32;
		}		
	
		[ggrass1]
		{
			File=Maps/res/ggrass1+det.jpg;
			TileSize=32;
		}

		[bgrass2]
		{
			File=Maps/res/bgrass2+det.jpg;
			TileSize=32;
		}
		
		[flow]
		{
			File=Maps/res/flow+det.jpg;
			TileSize=50;
		}
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: SM3

Post by Argh »

Also, I tried DDS, but it shows up as black
Try that test map I posted, I would like confirmation that it's DDS.

And I tested yours- it's a lot smaller than mine, but performance was worse- 25-30 FPS vs 30-40.

I'll take a look at the "size of blendmap" optimization, that sounds like a useful idea.
Satirik
Lobby Developer
Posts: 1688
Joined: 16 Mar 2007, 18:27

Re: SM3

Post by Satirik »

Frostregen wrote:Flow had not been resized?
resized the texture, on behe's map you see small strips around the hills
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: SM3

Post by Argh »

Heightmaps must be powers of two. So either you have 512 (8X8) or you must use 16X16.

Not real happy about that, it's going to mean a lot of workarounds, to get the sizes I actually want.
Satirik
Lobby Developer
Posts: 1688
Joined: 16 Mar 2007, 18:27

Re: SM3

Post by Satirik »

Argh wrote:Heightmaps must be powers of two. So either you have 512 (8X8) or you must use 16X16.

Not real happy about that, it's going to mean a lot of workarounds, to get the sizes I actually want.
why does it have to be a power of two ?
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: SM3

Post by Argh »

It just does, apparently. Crashed and told me to use nearest power-of-two.

More irritating is that I can't use a double-resolution heightmap, or have it just read RAW correctly, so the resulting heightmaps aren't that great.
Frostregen
Posts: 179
Joined: 17 Jul 2007, 00:52

Re: SM3

Post by Frostregen »

Did you try png 16 bit gray? (no idea if it works)
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: SM3

Post by Argh »

No, but PNG with alpha made Spring crash, not holding my breath on that.
Frostregen
Posts: 179
Joined: 17 Jul 2007, 00:52

Re: SM3

Post by Frostregen »

You're fast...
just tested it. works flawlessly :)
Even using 16bit of detail, as far as i can tell.

Btw, why alpha for a heightmap?
PNG supports 16bit grayscale natively.

Still... square + power of two is extremely limiting.
Can't even think of a reason (opengl wise) why this limitation exists.

Code: Select all

512, 1024, 2048, 4096, 8192, 16384 which corresponds to
8     16     32    64   128   256 in spring mapsizes.
Hmmm, would be interesting how well spring handles those extreme sizes.
Last edited by Frostregen on 12 Dec 2009, 01:44, edited 5 times in total.
User avatar
Peet
Malcontent
Posts: 4383
Joined: 27 Feb 2006, 22:04

Re: SM3

Post by Peet »

64x64 (Block Wars) works alright. Go for 256! :D
Frostregen
Posts: 179
Joined: 17 Jul 2007, 00:52

Re: SM3

Post by Frostregen »

Damn, 256x256 won't load ;)

Code: Select all

[      0] Loading map informations
[      0] Loading sm3_testmap.sm3
[      0] loading heightmap (Maps/res/h2.png)...
[      0] Failed to convert heightmap image (Maps/res/h2.png) to grayscale image.
Hrm, 128x128 won't load too... std::bad_alloc

Code: Select all

[      0] Loading map informations
[      0] Loading sm3_testmap.sm3
[      0] loading heightmap (Maps/res/h2.png)...
[      0] heightmap size: 8193x8193
[      0] initializing heightmap renderer...
[      0]   generating terrain normals for shading...
[      0] initializing texturing system...
[      0]   parsing texture stages...
[      0]   loading textures and blendmaps...
[      0]     loading texture bgrass1 from Maps/res/bgrass1+det.jpg...
[      0]     loading blendmap gGrass1Blender from Maps/res/Maskggrass1.png...
[      0]     loading texture ggrass1 from Maps/res/ggrass1+det.jpg...
[      0]     loading blendmap bGrass2Blender from Maps/res/Maskbgrass2.png...
[      0]     loading texture bgrass2 from Maps/res/bgrass2+det.jpg...
[      0]     loading blendmap RockBlender from Maps/res/Maskrocks.png...
[      0]     loading texture flow from Maps/res/flow+det.jpg...
[      0]     loading blendmap flowBlender from Maps/res/flow.png...
[      0]     loading texture trocks from Maps/res/rocks+det.jpg...
[      0]   generating blendmap mipmaps...
[      0]   loading blendmaps into OpenGL...
[      0]   initializing terrain node shaders...
[      0]   deleting temporary blendmap data...
[      0] Index buffer data size: 55488
[      0] Loading Map
Hell, even 64x64 crashes :(

Code: Select all

[      0] Loading unit definitions
[      0] Loading feature definitions
[      0] Generating trees
[      0] Creating unit textures
[      0] Initializing map features
Did you test on 64bit OS or something?
Last edited by Frostregen on 12 Dec 2009, 02:54, edited 1 time in total.
Post Reply

Return to “Engine”