Quake3 Face Subdivision

Started by
2 comments, last by Daywalker313 21 years, 5 months ago
Forward: This doen''t have anything to do with curves! In Quake 3 there is the shader keyword "deformVertexes" to animate surfaces like water with sin functions to create waves. The problem is that the QIII engine subdivides the faces for that like this: Click me Is there a tutorial or techdocument describing their subdivision technique and how they determine how many subdivisions to do.
Advertisement

The mapper specifies that with the tessSize keyword.

IIRC, that''s done in the map compiler. ID has made that source available, so you should download it and read it.
"the map compiler"
You mean its source is available?
Can you tell me where 2 dl it because I coulnd''t find any informations about that.

I had the same problem when working on my quake 2 bsp viewer.

What I do is run a check on every water polygon size. If any polygon is greater then 64 units (I got the size from the quake 2 source), I split the polygon in two and then recursively run the two polygons through my CheckPolygonSize function until every piece is less then 64 units. When a polygon does need to be split, I end up splitting it along the levels world axis. This works pretty good except for the T-Junctions it creates. You can sometimes see cracks in some places were the water animates. Just to let you know, I''m animating the water like what you see in quake 3 (with waves).

A way around the T-Junction problem might be to reconstruct new polygons all together along the world axis, but I haven''t tried that yet.

What I would suggest is to look at the quake 2 source code. The water polygons are subdivided like the picture you showed.

This topic is closed to new replies.

Advertisement