Questions regarding performance.

Reveal what you have made so far and get feedback on development.

Questions regarding performance.

Postby Fulcrum on Thu Mar 22, 2012 8:57 pm

I have a couple of questions regarding textures and performance.

1
If I 2 vmt's referencing 1 vtf file will this have increased performance over 2 vmt's referencing 2 vtf files?

2
If I have a map with the ground texture with 2048x2048 (probably going down to 1024x1024 soon) is it worth making a seperate low res texture for the skybox?

3
Is there a shader parameter to disable light mapping on a world texture. I tried unlitgeneric but it removed the colour tinting from the sun? (alternatively is there a way to stop brushes with certain textures from casting shadows?)

4
I heard mipmaps actully inhibit performance due to increased file size, this would make sense since the entire texture is still loaded regardless of the distance from it. Is this true?

Thanks
Fulcrum
Member
Member
 
Joined: Wed Dec 08, 2010 8:06 pm

Re: Questions regarding performance.

Postby TheDanishMaster on Thu Mar 22, 2012 9:36 pm

I don't think you should worry about this since Source is built for stoneage pc's. But about your first question, I doubt you will get increased performance but you will indeed save some space. And the third one, is making it a func_brush and then setting Disable Shadows to yes what you're looking for?
Specs:
MSI P67A-GD55, Intel Core i7 Sandy Bridge 2600k @ 3,4GHz, Corsair 8GB DDR3 1333MHz, 1TB HDD, NVidia GTX580 1,5GB GDDR5, Blu-Ray drive
Image
User avatar
TheDanishMaster
Been Here A While
Been Here A While
 
Joined: Sun Jul 26, 2009 7:02 pm

Re: Questions regarding performance.

Postby stoopdapoop on Thu Mar 22, 2012 9:44 pm

1: Yes, vtf's take up lots of ram, vmt's don't.

2: No, this will just waste ram, Mipmaps automatically do what you're asking about.

3: Not much of a performance question :D But in source, brush models aren't "lit" the way other models are, they're not lit per vertex or per pixel, but instead their diffuse textures are multiplied by a separate "light texture" that's generated per face during map compilation. There's no alternative to this lighting method so you'll have to achieve whatever effect you're trying to create with some clever workaround, what exactly are you trying to do? As far as casting shadows goes, I'm not sure for brush models, but I know that some dynamic entities have a disable shadow input, instead of making your brush a plane brush, see if you can make it into a different brush entity and disable shadows that way.

4:Mipmaps do increase filesize (by 33%) but they do not decrease performance, in fact they actually increase performance. It's difficult to explain why without talking about the pixel pipeline, but long story short: it's faster for the gpu to sample colors from smaller textures, so the further away the object is from the camera, the faster the texture lookup will be on that fragment, because it's sampling from a smaller (therefor faster) mip texture. Most of the calculations that are needed for mip mapping are implemented directly in hardware, so they're really really really fast.
I'm Brown
Image
User avatar
stoopdapoop
Veteran
Veteran
 
Joined: Sun Aug 21, 2005 2:14 am
Location: Ann Arbor, MI

Re: Questions regarding performance.

Postby Dives on Thu Mar 22, 2012 9:48 pm

1: Yeah, it only has 1 vtf to load into memory in that case.
3: If you want a brush to not cast shadows, make it a func_brush with shadows disabled. Alternatively, if you have something that can't be a func_brush (like a displacement), texture it with a material with $alphatest in the .vmt (an alpha channel isn't required).
User avatar
Dives
May Contain Skills
May Contain Skills
 
Joined: Sat Feb 28, 2009 9:54 pm
Location: Moorpark, CA

Re: Questions regarding performance.

Postby Fulcrum on Thu Mar 22, 2012 10:53 pm

Ahh very useful advice everyone thank you!
I couldn't use func_brush since it didn't work too well with garrysmod. (you can't really spawn stuff on it)

For the optimisation fetish I just figured if you're going to make a map best to make it run as best you can.
Fulcrum
Member
Member
 
Joined: Wed Dec 08, 2010 8:06 pm

Return to Under Construction

Who is online

Users browsing this forum: No registered users