So jeronima it occurs to me this question raises many different issues!
One problem seems to be “how many verts can you have in a scene” - note Eric has given a superb example of this in the comments.
Another issue it seems is “how many verts in typical racetrack mesh” …
OK so I dug up a PGR (“pretty good racetrack!”) and drew a few. Here are the figures.
So FYI, number of triangles 294
So FYI, meters length is 903
So FYI, number of triangles 892
So FYI, meters length is 2224
So FYI, number of triangles 506
So FYI, meters length is 1774
So FYI, number of triangles 422
So FYI, meters length is 1574
So FYI, number of triangles 446
So FYI, meters length is 1467
Interestingly, it’s pretty much 300 triangles per km. We can define a new unit “T/km” tris per kilometer! Over many typical tracks it comes out to about
330 T/km !!
I did not reaalize this before, I’ve never tried to quantify it !
Now those are is absolutely typical tracks with a typical number of turns, just like your example tracks or any human racetrack. It is smooth-to-very-smooth mesh. You would only use smoother mesh (more tris) in a really tight simulation. The examples you linked to would have less T/km (I’d probably guess about 200) and mariokart would also have less (I guess somewhere in 200-300).
(Interestingly it gives a measure of how curvy your track is. Of course, curves and hairpins need more tris. I have been able to draw really straight soft ovals with as little as 180 T/km, whereas a track full of hairpins is as much as 600 T/km. To repeat, this is visually smooth to very smooth track, many well-known titles use much less “T/km”, it would appear.)
(If you’re wondering about verts, on a track 300 tris will be between 300 verts and 900 verts depending on the layout used and whether they are shared. Generally it’s the same, 300 tris leads to 300 (shared) verts - just draw a diagram to see.)
So now you know!
If your musical track is going to be say 3 or 4 km long, it is going to have - at the most really - 1000 triangles.
The bottom line is: it is very unlikely you will need more than about 500-1000 tris to create the type of track seen in the two example videos.
I hope this helps!
Thank you for asking this question, I never quantified this before. If before today someone had asked me 'well how many tris in a typical track" I would have at first thought it was obvious, and then drawn a blank at the actual figure even within an order of magnitude.
The answer is about 300 T/km for typical good to very good track smoothness. Considerably less than that for anything “chunky, kiddy or fun looking” and probably a bit more (500? but certainly no more than 700,800) for a few simulation.
IMO if I a producer of the project you describe would be saying "OK guys, we need about 150-200 T/km here! No, let’s go to lunch!:
To summarise some of the many many issues raised here, jeronima,
- it would seem your extrusion method is completely and totally wrong here
- it would seem one can have far more tris in a scene, than you are thinking
- it would seem that the “T/km” for track is tremendously less that you are thinking
- in fact the T/km for track is about 100-300 at the most
- the actual generation of mesh is nothing computationally, the problem is…
- actually “re-importing” mesh is slow
- because of 6, as a rule 3D games do not make LARGE items from fresh mesh actually during gameplay - other than small items.
- because of 5, completely generating mesh at the beginning of a scene, is no problem at all and commonplace in games
To be clear, if you’re having a problem with (7) - that’s because it can’t be done. Heh! But if you’re having a problem with (8), that’s something you’re doing wrong. Possibly you are using way, way too many tris for your track (my guess, that extrusion system is utterly wrong here).
One point, I am glibly saying “oh you generate track…” Of course, everything is relative, but generating objects out of mesh is of course quite difficult or at least, a specialist discipline. ie, “if you worked at Autodesk on writing Maya for a few years” then it’s easy to generate track - heh!!!
So I hope this helps - you now quantitatively know the T/km value for your track ! 210 !