Gestalt on 9/7/2005 at 08:58
A few days ago I got sort of curious about what sort of framerate hit it would cause if I added a lot of grass static meshes to the small outdoor area of the mission I've been working on, more or less covering the ground with them. The hit wasn't as bad as I anticipated (I doubt anyone with a Radeon 9700 or above would notice the difference), but I don't think it'll be a good idea for FMs until another year or so has passed.
I thought you might want to see a screenshot for curiosity's sake, in any case. They're not all in the frame(most are), but the area this shot was taken in has 533 grass meshes at 18 polygons each, which works out to about 9600 polygons.
(
http://img231.imageshack.us/my.php?image=nephgrass8fm.jpg)
Inline Image:
http://img231.imageshack.us/img231/4788/nephgrass8fm.th.jpg
Vigil on 9/7/2005 at 10:04
Looks really good! Though it would look better if the grass skin were redone to be less bushy and match the color of the underlying grass texture better.
Does Flesh have any support for objects only being rendered when within a certain radius from the player?
Ziemanskye on 9/7/2005 at 12:53
How are you lighting them? That's the real hit in most of this, though 500+ static meshes of any type visible at once is a bit excessive, even for me (I think my record, in UT2k4 rather than in Flesh, was 386)
Gestalt on 9/7/2005 at 13:16
The area is lit by a single FL_OmniNoShadow plus the torches way up on the walls. I think the torches' light radius is small enough that they don't affect anything on the ground, though.
I'm hoping Flesh has some kind of dynamic LOD thing built in, but I'm not sure. If it does, I have an idea for creating big fields of grass that I'll try out later.
I'm pretty sure the engine supports geometry instancing and that's why this isn't a slideshow, but I'm not entirely sure. I think I recall someone mentioning it in a DX2 preview a long time ago.
Ziemanskye on 9/7/2005 at 13:28
Geometry instancing?
If by that you mean what I think you mean, that's kind of what static meshes are/what they do.
LOD thing. Not on static meshes, not in unrealengine2 variants (if you want to see why, watch HL2 as the trucks and things get less blocky as you approach them). This certainly hasn't shown it when I've had massive streets, though I guess if it's doing it's job right it'd be almost imperceptable.
I don't think we have any kind of decolayer control either (like grass in UT2k3/4, or HL2, where the little details are controlled by a radius from the player)
And with the lights - be very careful.
The three thing's I've so far found that really kill framerate are, (worst) lights - almost in contravention of normal theory, it seems flesh prefers a low number of big lights to lots of small ones, also try experimenting with the AmbientVertex light-type, (middling) lots of particles, and (lightest of these) a detailed skybox.
Gestalt on 9/7/2005 at 13:37
Whoops. Apparently it was a regular FL_Omni. Time to experiment with different light types.
I might be able to get this to run fairly well, theoretically.
Mortal Monkey on 9/7/2005 at 13:50
Quote Posted by Ziemanskye
Geometry instancing?
If by that you mean what I think you mean, that's kind of what static meshes are/what they do.
From the ATI Catalyst documentation:
"Geometry Instancing allows the VPU to create multiple objects from a single geometric model, rather than passing an entire new model for each item on the screen. This increases the rendering speed of images such as leaves, or grass."
I doubt geometry instancing would go well with LOD models though.
Ziemanskye on 9/7/2005 at 14:00
Well, that's nice Mortal Monkey.
It may not be accurate (in my head I mean, I'll trust the sales pitch) but that's just what I tend to think of as "Static mesh theory", since they same on computation by always being identical - their vertices never move, so you don't need to recompute them for each instance.
It does work with LOD stuff, it doesn't really care what the meshes are so long as they don't deform in anyway (you just instance a different, but lower detail mesh at distance), but Epic left dynamic LODs off of static meshes because it looks ugly when your walls and fountains and windows and whatever leap or contract into having more detail, like the props in HL2 do.
Gestalt on 9/7/2005 at 14:11
Switching all the lights to FL_OmniNoShadow provided a bit of a performance boost, but it sort of ruined the look of the area and I only seemed to gain about 5 fps or so.
If I cut down the number of grass meshes to about 350 or so, I think it might run on my Radeon 9600 (regular) without a hitch. If I go that route, I'll have to at least recolour the grass texture. The fewer grassy areas there are, the more the discrepancy between the mesh textures and the floor's grass texture stands out.
This was originally just a sort of stress test, so I don't know if the grass will stay or not. The level's mostly underground except for this starting area, so adding more detail to the skybox would probably be a waste.
OrbWeaver on 9/7/2005 at 14:12
Quote Posted by Ziemanskye
The three thing's I've so far found that really kill framerate are, (worst) lights - almost in contravention of normal theory, it seems flesh prefers a low number of big lights to lots of small ones, also try experimenting with the AmbientVertex light-type, (middling) lots of particles, and (lightest of these) a detailed skybox.
I am not surprised that the number of lights has a major effect on performance. The engine will have to calculate the shadow and light volumes for all of the visible lights, even if their radii are small.
You might try making the high-up torches into OmniNoShadows, as there are no shadow-casting objects nearby and the player cannot walk near them. That will take at least three shadow-casters out of the equation (just looking at the screenshot).