How are models split up into triangles by radiant


(Machine for to kill) #1

I’ve been doing a lot of testing on this and though some results have been inconclusive I have managed to find a pattern. I really want someone who knows the engine to try to shed some light on this issue because I’m getting some very strange triangle readings.

Anyway through some testing it seems that radiant regards the faces of a closed object as objects themselves and splits both sides of the surface. This does not happen always. From what I’ve been able to conlude it seems that when the model is created from pure solids (3d max primitive geometry) the triangle splits are fine. When the model however is created from planes or splines, and then these surfaces are joined through things like vertex weld, than radiant splits the surface on both sides creating twice as many triangles. For example a box made from 6 rectangular faces with welded vertexes in such a way so that there are 8 vertices total and there is no leakage from the inside of the box to the outside, would be split into 24 triangles in radiant. While a box made from a primitive geometry object only has 12. Granted a box is something simple and no one would build it from planes. But when making any kind of complex model, like a tank, you have to use splines and surface tools because it’s the quickest and easiest way.
This problem seems to be true for many of the default models. For example the street lights in goldrush are about 150 triangles each (lamp and handle) when they should barely be half of that. Some of the tree trunks from the trees also have about twice as many triangles.

I’m still not sure if the case is indeed so. If somehow either the ase export, or radiant itself does not recognize the full object but insted its component faces and so splits each of them as if they were a spearate entity.

Help, splash, ydanr…someone.


(heeen) #2

i also recognized this as some kind of bug…
i wondered why the tree trunks have no culling on the inside of the trunks, since that would cut away about a quarter of the triangles if you have lots of trees.
strange…


(SCDS_reyalP) #3

radiant doesn’t do anything to models.

q3map might, though it seem like it should dump them into the bsp without doing much to them.

culling should be in the shaders, unless models are special somehow.


(Machine for to kill) #4

Yes improper culling is the problem. No the models aren’t special in anway. That of course depends on your definition of special. Maybe the model shader would need some kind of culling parameter to specify exactly what to render and what not to. Then again why should this problem happen in the first place.

Again the problem is that radiant is treating objects that don’t have an inisde as if they had one, and actually drawing the inside (again with the closed box example).

P.S.
On a different note it seems that the player model is about 2000 triangles. This means that if you’re seeing 20 people on your screen you would have 40000 triangles being drawn just from the player models. That’s just a statement.


(rgoer) #5

The player models all have multiple LODs. The 2000-tri verison of the player models only shows up when you are right on top of the player. The lowest-poly LODs are ridiculously lightweight.


(ydnar) #6

I’m not sure what you’re asking here.

Can you post a screenshot of what you’re talking about?

y


(SCDS_reyalP) #7

radiant doesn’t enter into the equation, unless you are talking about editor performance.

backface culling is controlled by the shader.
http://www.qeradiant.com/manual/Q3AShader_Manual/ch02/pg2_1.htm#cull
That sounds like what you are talking about, but a screenshot would probably make it clear.