I'm glad this was brought up. How does a material proxy affect the number of batches done? For example, I have a player model who uses a single texture. However, I have the model's triangles divided up so that there are 3 separate vmts referenced. Each vmt uses the same texture file, but each one has a proxy that will change the texture's color. IE, the player's shirt is tinted with one color while the pants are tinted with another color. Is that causing an extra draw call even though the same texture is used?
On Sun, Oct 19, 2008 at 11:34 AM, Jay Stelly <[EMAIL PROTECTED]> wrote: > The engine will load all of the skins for any models used in the level. > Unused skins are not optimized out. For an individual prop performance > with/without skins should be the same. You'll still have the same > number of batches (usually 1) for a static prop with skins. If you > place larger numbers of instances of the props, the engine will have to > switch textures between instances. That will cost some performance but > it most likely won't add up to very much. The original version of > Source that shipped with HL2 did not handle this as well as the current > version, so it may be more of an issue if your mod is still using that > version as opposed to the orange box version. (L4D is even more optimal > on this, for what that's worth). But I'd expect the difference here to > be probably <10% of you static prop bar in showbudget even with large > numbers of instances. If the other skins also had different shaders > (not just texture changes) then that would cost a bit more, but I don't > have any data for that so you'll have to do the experiment and measure > it. > > The best thing you can do for performance on static props is get down to > one batch. So use a single material on the whole model. After that the > performance differences of other choices should be small. > > Jay > > > >> -----Original Message----- >> From: [EMAIL PROTECTED] >> [mailto:[EMAIL PROTECTED] On Behalf Of >> Garry Newman >> Sent: Sunday, October 19, 2008 6:15 AM >> To: Discussion of Half-Life Programming >> Subject: Re: [hlcoders] Static prop skins = more draw calls? >> >> If by multiple skins you mean multiple materials on the same >> model, then yeah, it would definitively be less expensive to >> have a single material. >> >> If by multiple skins you mean different skins that you can >> switch between, then I'd say no, it's exactly the same.. >> because all it's really doing there is using a different material. >> >> garry >> >> On Sun, Oct 19, 2008 at 12:54 PM, Robert Briscoe >> <[EMAIL PROTECTED]> wrote: >> > Hi guys, >> > >> > I've been building some props recently which have a variety >> of multiple skins, such as barrels with different colours and >> trees with different foliage etc. But I'm concerned as to how >> Source handles props with multiple skins, If I have a prop >> with 5 skins, will that mean, in turn, that the prop will >> also have 5 draw calls (one for each skin)? Im wondering >> which is the optimal way to approach it, either five >> different props or one object with 5 different skins... >> > >> > Thanks! >> > >> > Robert Briscoe >> > >> > Send instant messages to your online friends >> > http://uk.messenger.yahoo.com >> > >> > _______________________________________________ >> > To unsubscribe, edit your list preferences, or view the >> list archives, please visit: >> > http://list.valvesoftware.com/mailman/listinfo/hlcoders >> > >> > >> >> _______________________________________________ >> To unsubscribe, edit your list preferences, or view the list >> archives, please visit: >> http://list.valvesoftware.com/mailman/listinfo/hlcoders >> >> > > _______________________________________________ > To unsubscribe, edit your list preferences, or view the list archives, please > visit: > http://list.valvesoftware.com/mailman/listinfo/hlcoders > > _______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders

