FuncGodot Geometry Generator

Geometry generation class that is instantiated by a FuncGodotMap node.

Signals

Signal Description
declare_step Emitted when a step in the geometry generation process is completed. It is connected to FuncGodotUtil's print_profile_info() method if the FuncGodotMap's Show Profiling Info build flag is set.

Methods

Method Description Return type
Tools
is_skip(face: FaceData) Returns whether a given face is skipped entirely for both collision shape and visual mesh generation. Local method bound to the supplied Map Settings. Bool
is_clip(face: FaceData) Returns whether a given face is considered only for collision shape generation only. Local method bound to the supplied Map Settings. Bool
is_origin(face: FaceData) Returns whether a given face is considered only for entity origin calculations only. Local method bound to the supplied Map Settings. Bool
Patches
sample_bezier_curve(controls: Array[Vector3], t: float) Sample a Bezier curve defined by an array of control points at a given parametric value t. While not limited to [0.0, 1.0], it is assumed to be normalized unless extrapolation is desired. Vector3
sample_bezier_surface(controls: Array[Vector3], width: int, height: int, u: float, v: float) Sample a Bezier surface defined by a flat array of control points with a given width M and height N, along two parametric values U and V. Note: U and V here are not related to texture UV coordinates. Vector3
get_triangle_indices(width: int, height: int) Returns an integer index array for triangulation of a vertex grid with a given size width x height. Array[int]
create_patch_mesh(data: array[PatchData], mesh: Mesh)
Brushes
generate_brush_vertices(entity_index: int, brush_index: int) Performs planar intersections for each face in a single brush to populate the vertex, normal, UV and tangent arrays. Void
generate_entity_vertices(entity_index: int) Generates vertex data for each brush in a given Solid Class entity. Void
determine_entity_origins(entity_index: int) Calculates entity origin information depending on its Solid Class Origin Type. Void
wind_entity_faces(entity_index: int) Winds and indexes each face's vertices in each brush of a given Solid Class entity. Void
generate_entity_surfaces(entity_index: int) Generates visual and collision shapes for a given entity. Optionally generates surface metadata, if defined by the entity's definition. Void
unwrap_uv2s(entity_index: int, texel_size: float) Performs UV2 unwrapping for a given entity. Void
Main Build Process
build(build_flags: int, entities: Array[EntityData]) Main entrypoint for generating geometry given entities retrieved from parsing a map file. Perform entity and brush vertex generation, determines entity origins, winds and indexes each face, then generates output surfaces and collision shapes for each entity. Error