▲ 60 r/proceduralgeneration+1 crossposts

[R&D] Fence rails randomization and async terrain height adaptation

My previous post on Godot subreddit: https://www.reddit.com/r/godot/comments/1vdbk0q/rd_procedural_fence_drawing_on_varying_elevation/

This time progress on:
- dedicated pole/rail prefab instead of Godot's default box.
- rails now randomized (position,angle,count)
- a bit better pole height adaptation (no floating in the air on slopes)
- async real time terrain height adaptation

New runtime terrain height painting tool on subdivided grid with limited height in both up/down directions.

No local tessellation since Godot doesn't support it (AFAIK). Since world will be limited, subdivided grid won't be an issue.

u/zdmit — 8 days ago
▲ 425 r/godot

[R&D] Randomized flowers with animation

A bit of overview:
- each flower stem is randomized (bend angle, height, number of stems (1, 2 or 3).
- petals being placed dynamically on stem with approximated Bounding Sphere (radial distance check) to prevent clipping.
- bottom leaf part is a 3 variations prefab.
- petals color randomized via shader. See previous post for context: https://www.reddit.com/r/godot/s/hnFRZ5QuWY

u/zdmit — 16 days ago
▲ 556 r/proceduralgeneration+1 crossposts

[R&D] Procedural fence drawing on varying elevation at runtime

This is a follow up post of a previous one after some of you asked about varying elevation: https://www.reddit.com/r/godot/s/3mll3eEI9f

  • it shoots a raycast downward at every point to find Y elevation of the terrain's collision mesh.
  • it subdivides path and snaps every intermediate point to the ground's rolling elevation.
  • horizontal rails calculate the height difference between their start and end posts and rotate (tilt) on local Z-axis to bridge the slope.

This comment contains a bit of overview of how fence prefab looks like: https://www.reddit.com/r/godot/comments/1vcjhe8/comment/p17im2a/

u/zdmit — 19 days ago
▲ 2.1k r/proceduralgeneration+1 crossposts

[R&D] Procedural fence drawing at runtime

Made in Godot, generated at runtime via player input.

Any arbitrary path (open/close). Possible to connect (merge)/remove paths. Continuous drawing while holding LMB (additive/subtractive).

In addition: texture painting with blending.

Inspired by Tiny Glade.

u/zdmit — 20 days ago

[R&D] Procedural tomatoes/sunflowers at runtime

Proof of concept.

Goal: gridless farming (with a bit of chaos like in real garden) so it doesn't feel like a chess board.

Inspired by Tiny Glade 🐑

Tomatoes, sunflowers are generated procedurally at runtime.

u/zdmit — 25 days ago
▲ 16 r/Houdini

[R&D] Creating watertight mesh from garbage (part 2)

Previous post for reference: https://www.reddit.com/r/Houdini/comments/1v0kfcp/rd_creating_watertight_mesh_from_segmentated/

During experiments stumbled randomly for approach that created even better results (vdb -> vdb intersect -> vdb intersect of original vdb + other vdb massaging. It cuts leftovers from first vdb intersect).

Can't believe its actually looks somewhat usable. Very impressed.

Would be even better once figure out how to create beautiful guides (and something else) for quad remesh though its a different story (interesting how it will be with H22 stock node).

u/zdmit — 1 month ago
▲ 43 r/Houdini

[R&D] Creating watertight mesh from segmentated garbage geo

This is a continuation of my previous exploration (mesh segmentation with attr paint + vex): https://www.reddit.com/r/Houdini/comments/1uwjgcu/rd_mesh_segmentation_with_attribute_paint_and_vex/

Result is somewhat close to what Tencent X-Part does without running diffusion model.

Very fast. On video example mesh only had 200k voxels.

The trickiest parts:

  1. convert opened mesh (huge holes) to VDB while preserving shape silhouette.
  2. preserve as much details as possible.

Of course, there's areas to improve.

u/zdmit — 1 month ago
▲ 49 r/Houdini

[R&D] Mesh segmentation with Attribute Paint and VEX 💛

Proof of concept.

Goal: pure Houdini equivalent to https://github.com/Tencent-Hunyuan/Hunyuan3D-Part (both segmentation and shape reconstruction) without running any model.

surfacedist() does heavy lifting. Extremely fast on ~400k mesh. Near real time on my laptop as i was drawing colors while previewing result.

The amazing part of this segmentation approach is that all i have to do is to draw colors on logical seams, paint a few blobs of color in center a piece to make a connected color island.

Started exploring ways to make Houdini equivalent of Tencent's X-Part (structure-coherent shape decomposition). Tricky one.

Use case: high poly sculpt without groups/scan/llm generated mesh post processing.

u/zdmit — 1 month ago

I added Houdini 20, 21.0+ support to "Extended GLTF ROP" addon by ToniMacaroni

Extended GLTF ROP addon by ToniMacaroni Julian Kittel: https://github.com/ToniMacaroni/HoudiniGLTFExtended

Julian, thank you for all the work!

Why addon?

  1. save node/mesh GLTF extras {...} via prim attributes using the em_ and en_ primitive attribute prefixes.
  2. respect the material_override primitive attribute when creating materials.
  3. split meshes and build hierarchies using the path primitive attribute.

__________________________________

Build issue

His addon resulted in build errors on Houdini 20+ due to HDK update.

I made a pull request that fixes those build errors + added info how to install addon: https://github.com/ToniMacaroni/HoudiniGLTFExtended/pull/1

My repo: https://github.com/animgraphlabgames/HoudiniGLTFExtended/tree/houdini-21-support

__________________________________

Sidefx forum related threads:
- https://www.sidefx.com/forum/topic/98098/
- https://www.sidefx.com/forum/topic/60291/

u/zdmit — 1 month ago

Auto-UV SOP generated a 9-year-old's joke right here

u/zdmit — 1 month ago

[Godot] Made a plugin to drag-and-snap 3D objects by their bounds corners

Use case: you have modular assets for a scene and aligning is a pain in the ass. This plugin solve that.

Its similar to vertex snapping but its not polygonal snapping that already ships with Godot.

Its a bounding box snapping that works on meshes, collision shapes, and nested groups/scenes(.tscn).

Repository: https://github.com/animgraphlabgames/godot-bounds-snapper

Assetlib: pending review.

Note: requires the Godot .NET (Mono) 4.2+ version of the editor because plugin written in C#.

u/zdmit — 2 months ago
▲ 185 r/godot+1 crossposts

[Godot] Made a plugin to drag-and-snap 3D objects by their bounds corners

Use case: you have modular assets for a scene and aligning is a pain in the ass. This plugin solve that.

Its similar to vertex snapping but its not polygonal snapping that already ships with Godot.

Its a bounding box snapping that works on meshes, collision shapes, and nested groups/scenes(.tscn).

Repository: https://github.com/animgraphlabgames/godot-bounds-snapper

Assetlib: pending review.

Note: requires the Godot .NET (Mono) 4.2+ version of the editor because plugin written in C#.

u/zdmit — 2 months ago
▲ 10 r/Houdini

[VEX] Select top/bottom/mid/custom ring of Sphere/Tube SOP

My goal was to select bottom ring of a sphere no matter how many rows/columns it has.

Supports sphere, tube (open/closed). For tube use sort toggle to correctly sort point order.

Code:

int is_quad = (primvertexcount(0, @primnum) == 4);
int in_ring = 0;

if (is_quad) {
    int bottom_up_idx = 0;
    int num_quad_rings = 0;
    
    // robust sorting: evaluates rows by geometric Y-height (ignores ID order)
    if (chi("use_robust_sorting")) {
        vector bmin, bmax;
        getbbox(0, bmin, bmax);
        float h = max(bmax.y - bmin.y, 0.0001); 
        
        float norm_y = (@P.y - bmin.y) / h;
        int my_y = int(rint(norm_y * 10000.0)); // to eliminate floating-point inaccuracies (better approach..?)
        
        int total_quads = 0, cols = 0, quads_below = 0;
        int nprims = nprimitives(0);
        
        // count total quads, columns (quads at same height), and rows below
        for(int i = 0; i < nprims; i++) {
            if (primvertexcount(0, i) == 4) {
                total_quads++;
                vector pos = prim(0, "P", i);
                
                float p_norm_y = (pos.y - bmin.y) / h;
                int test_y = int(rint(p_norm_y * 10000.0)); // to eliminate floating-point inaccuracies (better approach..?)
                
                if (test_y == my_y) cols++;
                if (test_y < my_y) quads_below++;
            }
        }
        
        if (cols > 0) {
            num_quad_rings = total_quads / cols;
            bottom_up_idx = quads_below / cols;
        }
        
    } else {
        // fast sorting: assumes standard Sphere SOP topology
        int cols = len(pointprims(0, 0)); 
        if (cols > 2) {
            int total_rings = nprimitives(0) / cols;
            int current_ring = @primnum / cols;
            num_quad_rings = total_rings - 2; 
            bottom_up_idx = num_quad_rings - current_ring; 
        }
    }
    
    // evaluate target ring index based on dropdown selection
    if (num_quad_rings > 0) {
        int target_idx;
        int mode = chi("ring_mode");
        
        if (mode == 0) {
            target_idx = num_quad_rings - 1;     // Last (Top)
        } else if (mode == 1) {
            target_idx = 0;                      // First (Bottom)
        } else if (mode == 2) {
            target_idx = num_quad_rings / 2;     // Mid
        } else {
            target_idx = chi("ring_index");      // Custom
            if (target_idx < 0) target_idx = num_quad_rings + target_idx; // support negative indexing
        }
        in_ring = (bottom_up_idx == target_idx);
    }
}

// output group and color
string grp_name = chs("group_name");
setprimgroup(0, grp_name, @primnum, in_ring, "set");

if (chi("show_debug_color")) {
    @Cd = in_ring ? chv("debug_color") : set(0.2, 0.2, 0.2);
}
u/zdmit — 2 months ago
▲ 178 r/proceduralgeneration+1 crossposts

Shader based nebula with 100k starfield

u/zdmit — 2 months ago
▲ 42 r/proceduralgeneration+1 crossposts

SVG Kinetic Spirograph

SVG generated/animated using JavaScript and app's API.

Fully parametric meaning its possible to change number of circles, animation speed, jiggle amount, tail bend, etc and whole thing update.

Project to copy with if interested: https://animgraphlab.com/view/7hUXDd9Q6Y

u/zdmit — 2 months ago
▲ 9 r/svg

SVG Kinetic Spirograph

SVG generated/animated using JavaScript. Fully parametric meaning its possible to change number of circles, animation speed, jiggle amount, tail bend, etc.

Project to copy with if interested: https://animgraphlab.com/view/7hUXDd9Q6Y

u/zdmit — 2 months ago