Skip to content

spec_plug_patch

Jan Boon edited this page Mar 14, 2026 · 2 revisions

title: Patch Mesh Plugin Specification (2000) description: Specification for the 3ds Max patch editing plugin used for Ryzom landscape authoring published: true date: 2026-03-14T14:48:09.744Z tags: editor: markdown dateCreated: 2026-03-14T14:44:59.249Z

Translated from "fr 2000 3d spec_plug_patch" — the specification for the custom 3ds Max EditPatch plugin modification used for Ryzom landscape authoring. {.is-info}

Patch Mesh Plugin Specification for 3ds Max

Version 1.0

Goal of Version 1.0

This version must allow, by modifying the EditPatch plugin of 3ds Max, to obtain a patch mesh using the same subdivision technique as the one that will be implemented in Ryzom. Additionally, this plugin will introduce some extra tools to correct the shortcomings of the original version regarding tangent editing.

Subdivision

The patches used in Ryzom are quad patches. The subdivision method used makes it easier to "bind" (attach a vertex to the edge that faces it) vertices. Furthermore, it is possible to join one patch with 2 or 4 smaller ones.

EditPatch's Subdivision

Here is an example where binding will be used to join patches of different sizes:

Four quad patches of different sizes in 3ds Max, with a gap where they need to be bound together

Here is the result after binding a vertex:

Same patches after binding one vertex, showing the mesh partially connected but with remaining gap

In the current version of EditPatch, it is impossible to "bind" the second vertex. The modifier is incapable of performing this operation because the subdivision method it uses does not allow it:

Close-up of EditPatch subdivision showing the limitation — the standard subdivision cannot handle multiple binds on one edge

Above, we can see the subdivision of the first triangles of EditPatch. It subdivides without adding a vertex to achieve binding. It therefore cannot bind more than one point on a patch, and even less 3 points on one edge:

EditPatch subdivision pattern showing why binding is limited to one point per edge

First Modifications to Make

The first modification to make is to change the quad subdivision in EditPatch. We will use a method close to the one used in ROAM:

ROAM-like triangle subdivision algorithm showing levels 0 through 5, with right isosceles triangles recursively split by adding a vertex at the center of the hypotenuse

This algorithm only works with right isosceles triangles. A quad will therefore be considered as two triangles. The rule to follow for subdividing a triangle is: add a vertex at the center of the longest edge. This produces two new right isosceles triangles. The subdivision can then be continued recursively. The subdivision must obviously be propagated to neighboring edges.

Here is an example simulated with EditMesh summarizing everything that will be possible to model with our new modifier:

Multiple patches of different sizes (labeled "Patch de taille 1", "Patch de taille 1/2", "Patch de taille 1/4") correctly bound together using the new subdivision method, with dotted lines showing the minimum subdivision mesh

  • It will still be possible to bind two or four patches on one edge (not three).

  • The two (or four) bound points will be distributed uniformly along the edge.

The dotted lines show the minimum subdivision generated to visualize the object (level 0 subdivision).

Tangent Editing

A tangent normalization command at vertices will be added. It will make the n tangents around selected vertices coplanar, collinear, and unit length.

A "super coplanar" mode, added to the "coplanar" and "corner" modes, will allow editing a tangent in coplanar mode while ensuring length consistency between tangents. Exclusive editing via this mode ensures C1 continuity at the vertex.

Version 1.1

Version 1.1 will implement:

  • Editing and visualization of noise.
  • Editing of mapping.

Clone this wiki locally