PDA

View Full Version : Texture optimization


tommulder
01-03-2003, 03:43 PM
hey one and all im back again .... again !

and just a quick question because im now concentrating on level designing (too many work arounds involved in new gameplay tricks)

what is better for level running speed;

a 256x256 image OR the image divided into 4 (that is 4 128x128) images?

i have some level plans up and running i'll put some pistures up later for you lot to abuse or criticise images/icons/tongue.gif thanks 4 nehelp guys n gals luckin at ur probs now...

Maddieman
01-03-2003, 03:54 PM
too many work arounds involved in new gameplay tricks <font size="2" face="Verdana, Arial">Rubbish...you don't know what you're talking about. graemlins/tinyted.gif images/icons/wink.gif

As for your question; guessing I'd say dividing it into four would cause more problems with framerate, because there would be more things to keep track of. 256x256 textures are pretty small anyway; but it all depends on how big your level is, and how many textures your using.

Nothing you didn't know, I'm betting.

Either way, looking forward to seeing your work.

tommulder
01-03-2003, 04:30 PM
ok thats kool. im doin a huge level, but at the moment im fiddling with geometry and im on the 4th build of testing so im guna write the story out and then start modelling.

Rubbish...you don't know what you're talking about. <font size="2" face="Verdana, Arial">ok im sorry :$ but to put in a KOOL gameplay improvement MP isnt the most versitile engine is it???

i'll upload some pictures to my website and then link hem into this post soon okay?

cheers maddie check back in acouple of hours images/icons/wink.gif

Maddieman
01-03-2003, 04:43 PM
Looking forward to it.

MP isnt the most versitile engine is it???
<font size="2" face="Verdana, Arial">It depends how far you are willing to push it. graemlins/hhg.gif

tommulder
01-03-2003, 05:27 PM
It depends how far you are willing to push it. <font size="2" face="Verdana, Arial">but it takes ages to make all the coding work 2gether and you cant EASILY put 2gether a new element; it is limited to the commands remedy coded in yea?

well here are the shots hope they all appear :S

http://members.lycos.co.uk/parlipharlovsite/files/subway_shot_prerender_1.jpg

http://members.lycos.co.uk/parlipharlovsite/files/subway_shot_prerender_2.jpg

http://members.lycos.co.uk/parlipharlovsite/files/subway_shot_prerender_3.jpg

there ya go, it is the geometry testing level so any suggestions please tell


(edit) the pistures aint working!!!

they are at the following links, just copy and paste...

http://members.lycos.co.uk/parlipharlovsite/files/Subway_Shot_PreRender_1.jpg

http://members.lycos.co.uk/parlipharlovsite/files/Subway_Shot_PreRender_2.jpg

http://members.lycos.co.uk/parlipharlovsite/files/Subway_Shot_PreRender_3.jpg

...bugger sorry about that :S

[ 01-03-2003, 05:31 PM: Message edited by: tommulder ]

Maddieman
01-03-2003, 06:15 PM
Looking good - is the level based around some sort of plot or theme (other than being a subway)? The only thing that bothers me is the distinct lack of exits, or is that just the camera angles? Either way, the community could do with some new levels to play.

but it takes ages to make all the coding work 2gether and you cant EASILY put 2gether a new element; it is limited to the commands remedy coded in yea?
<font size="2" face="Verdana, Arial">That's half of the fun. images/icons/smile.gif

Keep up the good work.

tommulder
01-03-2003, 06:30 PM
well i try and bulk my levels out with more objects etc

i have exits hidden but i do no how to use them images/icons/tongue.gif hehehe

i still have to write the plot for it that was just a test for geometry stuff.

That's half of the fun. <font size="2" face="Verdana, Arial">yes but i dont have the time to do that... decent levels take long enough as it is!

i just watched saving private ryan so im thinkin about... lots of people get mown down by heavy machine guns etc...

Co&Co
01-04-2003, 04:15 AM
Those screenshots look very nice! A final render would make the level great. ( and good ai, and good gameplay, and cinematics, and....)

images/icons/grin.gif

looking good,

keep on going

mph
01-04-2003, 04:20 AM
I agree with Maddie, using 4 small textures instead of 1 large one probably isn't going to help performance - slicing up your polygons like that would create more triangles. You're better off sticking to tried and tested ways of optimising performance: ie, use exits well, keep polygon counts as low as possible, use the dummy material on unseen polygons etc etc.

The geometry you made looks nice, keep it up. I'd be careful about making large outdoor areas though (ala Omaha beach) To create that kind of thing (and have it run decently) you'd have to make it in a valley with sheer sides images/icons/wink.gif

Maddieman
01-04-2003, 04:34 AM
Not to mention that the enemy count has a significant impact on the framerate. I made a level with over 20 enemies on screen, and as expected, it ran at about 13-10 fps.

Co&Co
01-04-2003, 01:09 PM
I think it doesn't matter which of the 2 methods you use, never tried deleting polygons though. I always work with the dummy texture.

tommulder
01-04-2003, 06:45 PM
thanks for the positive support guys images/icons/tongue.gif

ummm i meant to have a machine gun blasting civvies down....

im thinkin military convoy getting hit (by a gang) and then a last stand by surviving marines.

i cant decide wether to be a civvie and find a gun then kill everyone, a marine and defend the train then attack the gang kill leader etc or gang member to take train and cargo then defend gangs base

okay then pole... civvie, marine or gang? or mebbe something else...

oh BTW co en co that isnt the final level, im just testing some stuff, good lookin level vs fps, ai plans etc, it defnatley isnt goin to be used.

biXen
01-04-2003, 06:47 PM
I think it was Marvel (geometry mapper for MP) who said that collisions are the number one dragger of framerates for Max Payne... that means, bullets, enemies, anything active that interacts with other things. If you make your levels well you won't need many enemies in one place anyway, balance is essential...

zephyrin_xirdal
01-05-2003, 12:29 AM
mph mentioned using dummy material for unseen polygons. I know about that, but what about completely deleting unseen polygons? Well, it has the drawback, that you can't manipulate the mesh anymore, but as a very last step of finishing a level, deleting the unseen ones would be possible.
Now my question: Would deleting the unseen polys (instead of giving them dummy-texture) improve performance? images/icons/confused.gif

mph
01-05-2003, 04:02 AM
Now my question: Would deleting the unseen polys (instead of giving them dummy-texture) improve performance?<font size="2" face="Verdana, Arial">I get the feeling that it wouldn't. At the very best it would probably be equivalent to using the dummy material, though it's probably worse. I mean, don't Remedy say you should keep booleans to a minimum?

Besides, there wouldn't be much point having a dummy material if you didn't use it to mark polygons that shouldn't be rendered. Remedy used the dummy material in their subway levels, so I reckon it's probably the best way.

Co&Co
01-05-2003, 04:13 AM
okay then pole... civvie, marine or gang? or mebbe something else...
<font size="2" face="Verdana, Arial">I think "gang" would be cool! Also there are a lot of gang-like characters in max payne which you can use.

tommulder
01-05-2003, 07:00 AM
mph you said something about keeping booleans to a minimum...

ummm i use booleans alot, shoud i, say for pillars and detail NOT subtract them into the room? the main reason i do this is that it will divide um lightmaps nicely, and i dont notice any lag becasue of it...

oh well anyone else got thier view on the player being gang/civvie/marine.other???

it would be cool if someone could make me a nice texture for the marine.... i cant do that :S blue combat gear, flak jacket and helmet. Even better someone make a model!!! but just the texture i need really, thanks images/icons/smile.gif

oh BTW im not goin to have a release date for this BUT i will be posting on my website the progression of this okay? images/icons/tongue.gif

My Home Page (http://members.lycos.co.uk/parlipharlovsite/) (Click on the link to "Projects page")

Maddieman
01-05-2003, 07:47 AM
blue combat gear, flak jacket and helmet. <font size="2" face="Verdana, Arial">Erm...just use the nypd cop character.

tommulder
01-05-2003, 08:32 AM
nah i dnt mean like the nypd suit, i might use that as the model minus the visor but.... like the marines in MGS 2 in the tanker hold... you no wot i mean? oh btw the mod part of the site will be up soon.

maddie wot u think, civvie, gang or marine (or other)???

Maddieman
01-05-2003, 08:41 AM
Why not all three? graemlins/hhg.gif

Using the same level, plot out 3 routes, starting from three different jumppoints; and then define it as three different levels in the levels.txt.

I'm not bothered to be honest, do what you think is best.

As for the marines, have you seen what kemical did to the cop skin in his Matrix Lobby mod? That might be closer to what you had in mind.

mph
01-05-2003, 09:10 AM
@tommulder

When I say keeping booleans to a minimum, I mean avoiding booleans that aren't *necessary*. So creating pillars by subracting is alright, but deleting polygons instead of covering them with the dummy material doesn't seem like a good idea to me.

In Remedy's boolean tutorial they talk about keeping booleans to a minimum, as every time you boolean, things have to be calculated, and these calculations aren't going to be 100% perfect (which is why welding geometry regularly is important, as it keeps the errors within a reasonable level)

This doesn't mean you shouldn't use booleans, I just wouldn't use them when there's a perfectly good alternative (especially an alternative that's known to work, as in this case)

tommulder
01-05-2003, 09:23 AM
rite then the "projects" part of my sit is uploaded now, i will be updating it with info every couple of days ok?

maddie, the thing is doing 3 different AI routes will take along time. I think i will do it from 1 way because i will have to reverse all enemies targets.. mebbe if enough people like the mod i will do it i dunno i dnt have alot of time really...

@mph, okay its just i do subtract alot from my rooms, and altho it makes nicer lightmaps it does increase poly counts.

zephyrin_xirdal
01-05-2003, 11:31 AM
Deleting a face doesn't involve a boolean operation. I cite a passage from the basic-room tutorial, which makes clear, that deleting faces can be done for some purpose:"You should not also ever delete faces from rooms or anything that you plan to Boolean later. If a face (polygon) is deleted a volume is is no longer defined -- Booleans become impossible. We'll get back to these issues in more detail later." But they don't get back to it later -- at least I didn't find the passage anymore. But I think I've read the face-deleting thing as an optimization-tool anywhere around. I'll search again and let you know.
As far as I understand, there's no negative effect with deleting faces, as the gameengine doesn't calculate volumes (as MaxEd does). In turn I smell a slightly negative effect when using the dummy-texture for unseen faces: The faces are stored in the level-file, which makes it bigger. Correct me, if I'm wrong.

tommulder
01-05-2003, 11:50 AM
i cant correct you, but i wosnt planning on deleting faces as i cant easily edit the level at a later date... and geometry doesnt take up a huge amount of space (at least when exported) it is the bitmaps. thanks for all your help tho!

mph
01-05-2003, 03:16 PM
deleting a face doesn't involve a boolean operation<font size="2" face="Verdana, Arial">Good point. I tend to think of any operation that affects things physically as being a boolean, but you're right, I don't recall it being described as one. It still seems to me like a special kind of operation that warrants some kind of special name though... is there one? (other than "delete")

I was under the impression that when they were referring to deleting faces in the tutorial, they were talking about deleting polygons out of meshes, rather than the actual rooms which are the boundary between the player area and the void.

For example, the front of a broken drinks vending machine is a polygon, with another polygon deleted from the middle of it - that to me seems like the way the delete function should be used (on an object inside a room and sparingly)

Deleting polygons out of the rooms just seems like a bad thing to me, but of course I've got no way to prove it so I might be wrong. It's just that in a lot of other game engines, gaps in the geometry are a bad thing.

Neither of the subway levels have polygons deleted out of the rooms (as far as I've seen) Remedy always covered their polygons with either skybox or dummy. So I prefer to play it safe and stick to what I've seen done.


The faces are stored in the level-file, which makes it bigger
<font size="2" face="Verdana, Arial">I find it difficult to believe that the faces take up that much space in the exported level file. As tommulder said, a lot of the space is spent on redistributing textures (it must be at least half) In that case you're better off dropping a few textures from your level. It's a lot less effort and a lot quicker.

You should not also ever delete faces from rooms or anything that you plan to Boolean later
<font size="2" face="Verdana, Arial">Doesn't the first half of that sentence (before the "or") kind of answer this question anyway? The way I read it, that sentence is telling me to never delete faces from my room.

If they ever do get around to explaining deleting in more detail, I reckon they'd probably just explain why you shouldn't delete faces from rooms, rather than providing any insights that'll revolutionise Max Payne mapping... (that last sentence is a little more over the top than I was intending, but you know what I mean)

zephyrin_xirdal
01-05-2003, 03:51 PM
Yeah, mph, I guess you are right. After I read your post I again had a look at the subway level and didn't discover any deleted polygons. But dummy-texture instead. The thing is: I think I remember to have read the deleting thing anywhere. And I thought it was in the Remedy-tutorials. Meanwhile I tend to the opinion of false memory images/icons/smile.gif I thought deleting a face would be useful for instance when you have a crate which stands on the floor and so close to a wallcorner that the player-camera never gets into a position from where two of the sides of the crate can be seen. In this case I could safely delete the bottom and two walls of the crate. I already did it and when I test it ingame it's fine. With a rectangular crate I spared three faces equalling six triangles that way. But as you said: Where's the advantage over using the dummy-texture? I will investigate further and let you know.

P.S.: Ah yes, and having holes in the geometry is of course not a good idea. If worldspace is seen through it there will be the hall-of-mirrors-effect. And death on touch ... But with the crate-example above this problem won't arise. If you really get behind the crate with the camera, the crate simply will seem to disappear.

[ 01-05-2003, 04:00 PM: Message edited by: zephyrin_xirdal ]

biXen
01-05-2003, 05:21 PM
Faces with dummy textures doesn't get drawn, hence it's not more of an optimization to delete the face, you just rule out more possibilities later. The reason you put the dummy on it is that otherwise the engine would draw stuff you normally won't see. It's the same thing with exits, it's a way of dividing areas up so only the visible ones will be drawn. I'm sure most of you understand this, but it had to be cleared up images/icons/smile.gif

tommulder
01-06-2003, 11:02 AM
I would be willing to put money that the dummy textured faces dont even get exported... and if you think well why can you rip the dummy texture from level files if it isnt used, you can put 200 textures in the file, use 3 and it will still export all 200 textures...

tommulder
01-06-2003, 03:27 PM
oh crap thats all i need MPH betting AGAINST me in a mapping question.

rrrrrr if only i could be right sometimes! but i dnt think they worried about export times, they want 2 make the levels run fast!

mph
01-06-2003, 04:18 PM
Well at least you haven't bet any money images/icons/wink.gif

Though I didn't mean they wanted to cut down the exporting times from MaxED - of course, it would be nice... (then again, I have only myself to blame for always exporting an entire level, rather than just a selection)

I meant that they probably couldn't be bothered to write the code to stop dummy polygons been exported into the compiled level. I mean, what would be the point? If the game engine has the ability to not-draw polygons, and if there's no benefit from deleting polygons in terms of game performance, I get the feeling they'd rather do something else (like sleep, or eat pizza) rather than spend their time writing pointless code.

tommulder
01-06-2003, 04:36 PM
hmmm mph that makes frightening sense, why did i not see that? oh well no money bet so its kool images/icons/tongue.gif hehe

fair play tho, i totally see what you mean.

well i have started the geometry now, so expect some new pictures on my site tomorrow or the day after, the page for them is right here (http://members.lycos.co.uk/parlipharlovsite/newpage0.html) so please do check it out if you have any spare time; email or post here what you think. Cheers for all your help, and MPH... SHAME ON YOU for being so mean to a young lad like myself images/icons/frown.gif


images/icons/tongue.gif hehe i will be gr8 someday!!! just like you mph images/icons/grin.gif

mph
01-06-2003, 04:56 PM
Those geometry test screenshots on your site are nice - I'll make sure to check out any new screenshots you put up (and then scrutinise them under a microscope images/icons/grin.gif )
i will be gr8 someday!!! just like you mph images/icons/grin.gif <font size="2" face="Verdana, Arial">You know, the positioning of that smiley could be interpreted in two different ways... images/icons/wink.gif

biXen
01-06-2003, 05:41 PM
Well what are we discussing here? I don't think a face with a dummy texture get's drawn/processed in-game. Are we talking about the same thing?

tommulder
01-06-2003, 05:44 PM
now now MPH dont get ahead oof yourself.. and after all i am such a young and innocent child.. i could only mean it one way!

hehe but yea it would b gr8 if you could do that - learn from the best to be the best images/icons/grin.gif that is or course mapping...
graemlins/ted.jpg graemlins/ted.jpg graemlins/ted.jpg

mph
01-07-2003, 12:44 AM
I'd be willing to bet that dummy textured polygons do get exported. It makes sense to use the engine's ability to not-draw polygons (used for other materials such as charactercollision_nodraw" etc) rather than take the effort to stop dummy polygons being exported from MaxED.

mph
01-07-2003, 06:45 AM
Well what are we discussing here?<font size="2" face="Verdana, Arial">tommulder was just suggesting that polygons which have been textured with the dummy material don't get exported from MaxED (rather than not being rendered)... kinda like MaxED automatically deleting dummy textured polygons for you... (which ties in above with the whole discussion about the merits of deleting or dummy texturing)

I was just saying that they must be exported, as all that probably happens with a dummy face is that the game engine doesn't bother to render it (like you said) The game engine obviously has the ability to not-render polygons, because other material types like "charactercollision_nodraw" don't get rendered, yet are still there as you can collide with them - so it was probably simpler for Remedy to make it so that dummy texured polygons don't get rendered, rather than write a whole new bit of code into MaxED to stop them from being exported in the first place.

So, yes, we're talking about the same thing.

biXen
01-07-2003, 06:51 AM
Ahh, so then we agree... images/icons/wink.gif

tommulder
01-07-2003, 03:22 PM
oh great now u ganging up on poor, little tommie, just think or his feelings! images/icons/frown.gif

nah i c wot u mean, but who knows mebbe the remedy ppl are control freaks or something!

Maddieman
01-07-2003, 03:26 PM
who knows mebbe the remedy ppl are control freaks or something! <font size="2" face="Verdana, Arial">Remedy? Control freaks? Not a chance. images/icons/rolleyes.gif

tommulder
01-07-2003, 03:28 PM
hmm well u neva no they made an extremeley polished game didnt they images/icons/rolleyes.gif