Archived

This topic is now archived and is closed to further replies.

Quake3 Face Subdivision

This topic is 5502 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites