Jump to content

==[TASK]== Tree poly reduction


aeonios
 Share

Recommended Posts

1 minute ago, aeonios said:

We do use texture lod though

We do ? Could it be a setting to always use the lod x of the texture ? Since we generate them. I always thought we generated them for nothing.
 

 

2 minutes ago, aeonios said:

The engine can't remove triangles from models without destroying them, pretty much. There are ways for automating that for closed geometry, but not for open geometry like leaf planes, as far as I know.

I heard super tux cart has a lod system, do they only have closed geometry models ? Most (if not all) our models use open geometry.

 

Link to comment
Share on other sites

3 minutes ago, stanislas69 said:

We do ? Could it be a setting to always use the lod x of the texture ? Since we generate them. I always thought we generated them for nothing.

I'm pretty sure I've seen texture lod flickering artifacts on both terrain and models (particularly grass props) due to the lack of trilinear filtering. You'd likely only see it in atlas though, or if you remove camera restrictions since the transition distance is pretty far.

6 minutes ago, stanislas69 said:

I heard super tux cart has a lod system, do they only have closed geometry models ? Most (if not all) our models use open geometry.

If they use geometry mips then they're probably pre-generated using a human-guided process. There are also techniques for mipping terrain geometry dynamically, even though it isn't technically closed, but the concerns are different than for something like palm leaves. This isn't even really an LOD issue though, since you don't necessarily have to be zoomed out far enough for LOD to kick in for the trees to eat your GPU. If it could be fixed automatically I'd be working on that instead.

Link to comment
Share on other sites

8 minutes ago, aeonios said:

I'm pretty sure I've seen texture lod flickering artifacts on both terrain and models (particularly grass props) due to the lack of trilinear filtering. You'd likely only see it in atlas though, or if you remove camera restrictions since the transition distance is pretty far.

I suppose it was Z-fighting. We use mipmaps for textures, I don't think, that it's called LOD.

 

Link to comment
Share on other sites

IIRC some engines replace 3D object (like trees) with a (pre-generated) 2D flat picture when viewing from further away, that would incredibly reduce the amount of tris on the screen, wouldn't it? (even though it might look a bit ugly when switching between 3D and 2D)

  • Like 1
Link to comment
Share on other sites

8 minutes ago, niektb said:

IIRC some engines replace 3D object (like trees) with a (pre-generated) 2D flat picture when viewing from further away, that would incredibly reduce the amount of tris on the screen, wouldn't it? (even though it might look a bit ugly when switching between 3D and 2D)

True, it's the very popular technique, but it costs memory (there're also some nuances). There are few ways to blend 2D and 3D nicely. So we can try it too, at least it's possible to implement it for the pyrogenesis.

Link to comment
Share on other sites

24 minutes ago, wowgetoffyourcellphone said:

Pretty sure the other trees don't have back faces. :) I think the back faces on the cretan palms are there because otherwise they'd be visible at low viewing angles.

I really don't know. It's possible though.

14 minutes ago, niektb said:

IIRC some engines replace 3D object (like trees) with a (pre-generated) 2D flat picture when viewing from further away, that would incredibly reduce the amount of tris on the screen, wouldn't it? (even though it might look a bit ugly when switching between 3D and 2D)

Those are called impostors, and they only work at long as the angle between the camera and the object doesn't change by much. For games where you control a character with a fairly low camera angle and relatively slow movement across the terrain this can work fairly well. For 0ad it wouldn't really work at all.

  • Like 1
Link to comment
Share on other sites

10 minutes ago, aeonios said:

Those are called impostors, and they only work at long as the angle between the camera and the object doesn't change by much.

Did you ever use imposters with not a simple texture?

10 minutes ago, aeonios said:

For 0ad it wouldn't really work at all.

I only may suggest you to play on the big Jebel-Barkal map. And I'm not even talking about cinematics.

Link to comment
Share on other sites

6 minutes ago, vladislavbelov said:

Did you ever use imposters with not a simple texture?

What?

6 minutes ago, vladislavbelov said:

I only may suggest you to play on the big Jebel-Barkal map. And I'm not even talking about cinematics.

Eh.. maybe?

As an aside I ran a few simple tests and it turns out that most of the old trees except for pines and palms really don't use back faces. I suspect that all of enrique's trees do however (as he showed doing in his tutorial video). None of the bushes seem to use backfaces either. I'm curious to see how they'd look if backface drawing was enabled.

Link to comment
Share on other sites

10 minutes ago, aeonios said:

What?

You said about the technique at all, that it only work for low angle changes. But there're imposters with 3D textures (not shots from different angles) too, and they don't have such problem. Obviously it's more expensive, but not so much as an original hipoly model.

Link to comment
Share on other sites

  • 3 weeks later...
  • 8 months later...
On 5/24/2018 at 10:17 PM, Alexandermb said:

is there a way to make the tress behave as the sinking ships ?

Yes, but if I remember correctly, the code that handles ships is hardcoded to an attribute on ships. We'd probably want to base it on a new attribute, put the roll/sink properties in the XML, and update ships to use the new properties too. This would allow us to adjust the roll rate, etc. for different types of entities without having to recompile.

Link to comment
Share on other sites

On 2/21/2019 at 10:25 AM, stanislas69 said:

1. @aeonios Could you tell me if the following gaia.7z tree_cretan_date palms are better ? Also could you run some kind of profiling to see what kind of performance drop we are dealing with ?

I have no idea how to do profiling, but from an aesthetic standpoint, I can definitely tell that they are lower quality. What about if we mix them 50/50? Low poly meshes mixed in with the high poly meshes. Would reduce the number of polygons rendered overall while introducing some minor visual variation.

Link to comment
Share on other sites

9 minutes ago, wowgetoffyourcellphone said:

I have no idea how to do profiling, but from an aesthetic standpoint, I can definitely tell that they are lower quality. What about if we mix them 50/50? Low poly meshes mixed in with the high poly meshes. Would reduce the number of polygons rendered overall while introducing some minor visual variation.

Or if trees are made using leaf's and branches as props and later use geometry instancing, certanly trees can't become 100% low poly because flora is the visual core on maps, i mean ugly land textures + ugly flora = The new Flat AoE copy.

  • Like 2
Link to comment
Share on other sites

8 hours ago, wowgetoffyourcellphone said:

I have no idea how to do profiling, but from an aesthetic standpoint, I can definitely tell that they are lower quality. What about if we mix them 50/50? Low poly meshes mixed in with the high poly meshes. Would reduce the number of polygons rendered overall while introducing some minor visual variation.

The main problem for me is that I have a high end computer so I can't test that much ^^

But yeah their quality is less. Though it's not that bad is it ? Only when you really zoom.

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...