SM3 - Page 9

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
thesleepless
Posts: 417
Joined: 24 Oct 2007, 04:49

Re: SM3

Post by thesleepless »

no, DevIL does not use OpenGL,

it just happens to be used to load textures into OpenGL.

but in this case it's not since its being used to load heightmap data which will later be converted to OpenGL geometry.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: SM3

Post by Argh »

I'm just saying that in my experience, it hasn't always worked the same across all hardware. And should be tested. That's all.
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7052
Joined: 16 Nov 2004, 13:08

Re: SM3

Post by zwzsg »

lurker wrote:Keep in mind that cob locations fail past 128.
In TA cob location failed at 45x45. Had to make special workaround for my transport scripts to work on 63x63 maps. But I forgot if it was because of inherent limitation of packed xz, or because implementation of get XZ_HYPOT in TA engine failed before the theorical limit.
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: SM3

Post by Beherith »

Image

Normal maps are nice, but eat like 60% of my performance :)
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: SM3

Post by Argh »

Instead of using true normalmaps, we can always burn some "lighting" into the tiles. Kinda forces us to make tiles map-specific, though, and will look bad under some lighting conditions.

I'm going to build Tobi's latest patch, see if that fixed the lighting angles or not.
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: SM3

Post by Beherith »

Argh, that shortcut defeats the whole purpose of normal mapping, if we would want that, we would go back to smf where we used baked normal for lack of anything better.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: SM3

Post by Argh »

Well, it'd give us increased resolution. Not saying it's ideal- compared to baked-in lighting with SMF, it's not. Tobi's changes should be available on Buildbot, I'll get to that here in a bit.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: SM3

Post by Argh »

Whee. Latest Buildbot ran at a crawl. Is the latest standard build assuming MT or something? I just used !rebuild, as always.

Eh, whatever's going on with that build (gf4a81db) is preventing SpringSettings from operating. Meh.

[EDIT]Nevermind. Whatever's going on, it was over here. Killed a few processes, and voila, problem solved. I seem to be having issues with OpenGL stuff committing fratricide...[/EDIT]
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: SM3

Post by Argh »

Tested this. Still not seeing correct rendering of the normalmaps.
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: SM3

Post by Beherith »

SM3 cant render 32*32 maps :(
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Re: SM3

Post by Tobi »

Note I didn't attempt to fix direction, I only fixed specular lighting assuming correct inputs.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: SM3

Post by Argh »

Aha, gotcha.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: SM3

Post by Argh »

Did a test tonight, rather disturbed by the results.

One layer, no blend layers. Replicated Unpleasantville (which is just a repeating grass tile anyhow, under the city blocks).

No bumpmap shows up.

So, repeated test. Built an all-white blend layer, tiny. Bumpmap shows.

68 FPS when empty, vs. 120+ for SMF. 14FPS for detailed scenes without action, half normal performance :P

Now, IDK about you guys, but that makes me scratch my head. Here we should be dealing with one texture, it's all flat, and I know there are a lot of quads because it isn't using ROAM, but wtf. So, I turned the detail level down to 0.25- huge quads. No change at all. It's not a geometry problem. I doubt it's a shader problem, either. This looks like a CPU-side issue from here.

And there were huge lags when I scrolled around- it was like it was re-loading something big enough to halt the entire game-state for a moment. Very weird.

So, um, why is it so slow? Two tiles should be no slower than SMF load, probably faster in most cases. I observed a low number of quads in wiremap, when detail was set low enough. And an all-white blendmap should mean that it's just doing the one pass, right? So, where's the major holdup? Something just isn't right about this at all.

Map test is included, used a dirt texture for final test of some stuff, but it's at exactly the same resolution as the grass tile used. Must have World Builder installed to see it in full detail. The edges don't match up, but it was just a tech test.
Attachments
SM3_Unpleasantville.sdd.zip
(1.89 MiB) Downloaded 27 times
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: SM3

Post by Beherith »

So, I used my ultra heavy testmap for this, 5 layers, all normal mapped.

But sm3 is NOT cpu limited even nearly. The limit seems to be pure GPU to me.


15 fps, lowest detail level in sm3, 5 layers, normal mapping:
Image


18 fps, highest detail level in sm3, 5 layers, normal mapping:
Image

80 fps, highest detail in sm3, 3 layers, no normal mapping

Image

50 fps, highest detail, 3 layers, no bump, cam moving all around like crazy:
Image

All profiles made with very sleepy after 30 secs of sampling.
Inclusive means all the time spent in that function and everything it called, exclusive is time spent only in that function.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: SM3

Post by Argh »

Hrmm, so it's GPU choked?

That makes no sense, though, for a one-layer map. Surely it's not that expensive to draw 16-20 big quads with normalmaps. I don't see slowdown anything like this when I zoom in on a character model, after all. I mean, this is drawing at half the speed of SMF... and technically, it's drawing about as many polygons and identical numbers of texels.

And... at least over here... when I switched back to just the base layer, the performance is the same.
Last edited by Argh on 16 Dec 2009, 11:17, edited 1 time in total.
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: SM3

Post by Beherith »

Want me to run very sleepy with 1 layer?
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: SM3

Post by Argh »

Nah, sleep is good, this isn't exactly life-or-death. Just very dubious about drawing conclusions yet, until we do apples-apples tests. Amongst other stuff, IDK enough about what we see, profiling-wise, in terms of overall CPU load for Spring on 8X8 vs 16X16, no Units actively pathfinding, but I know it's not identical at all, at least over here, even empty-world tests with map drawing off show that.
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: SM3

Post by Beherith »

Just freaking run sleepy. That way youll never again doubt wether something is cpu or gpu limited. Its free, takes a whole 0 seconds to install and is super fast.
If you have debug symbols with your spring then it even shows you function calls, if you have the sauce next to it it will show annotated sauce with cpu time per line of source.

You took a whole 3 minutes to read my analysis, look at the 4 pictures with profiling results, and type up your own post. Yet you still doubt what I said. If you continue to be ignorant of what others wish to tell you...
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Re: SM3

Post by imbaczek »

does this thing work with mingw builds, or do i need msvc? vc++ 2008 express won't build spring master for me, has some super-weird linker errors.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: SM3

Post by Argh »

Uh, I thought you literally meant, "sleepy". My apologies. It's that time of day over here. Can I run it with an ordinary buildbot compile? And yes, if I'm not contributing to other people's insomnia, I'd like to see the results with that testmap I posted, please.

If it's really GPU, something is wrong, I'm fairly certain- but that has to wait for tomorrow, I'll write up a simple test drawing the quads, etc. through Lua, and compare. I just really have trouble believing that, when I have thousands and thousands of triangles of Unit geometry, all normalmapped, in a typical scene.
Post Reply

Return to “Engine”