ComfyUI > Nodes > ComfyUI libigl > Scramble Int Field

ComfyUI Node: Scramble Int Field

Class Name

ScrambleIntField

Category
geometrypack/analysis
Author
PozzettiAndrea (Account age: 2240days)
Extension
ComfyUI libigl
Latest Updated
2025-12-22
Github Stars
0.06K

How to Install ComfyUI libigl

Install this extension via the ComfyUI Manager by searching for ComfyUI libigl
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI libigl in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

Scramble Int Field Description

Enhances 3D mesh segment distinction by reassigning integer values using greedy graph coloring.

Scramble Int Field:

The ScrambleIntField node is designed to enhance the visual distinction between adjacent segments of a 3D mesh by reassigning integer field values. This is particularly useful in scenarios where segmentation results in adjacent segments having similar label numbers, which can make it difficult to visually differentiate between them. The node achieves this by employing a technique known as greedy graph coloring, which ensures that neighboring segments are assigned distinct values, thereby maximizing contrast. This process involves analyzing the adjacency of mesh faces and reassigning integer values in a way that spreads them across the original value range, using a method inspired by the golden ratio for perceptual evenness. The primary goal of this node is to improve the clarity and visual appeal of segmented 3D models, making it easier for you to interpret and analyze the data.

Scramble Int Field Input Parameters:

mesh

The mesh parameter is a required input that represents the 3D model you wish to process. It must be of type TRIMESH, which is a data structure used to store and manipulate 3D triangular meshes. This parameter is crucial as it provides the geometric and topological information needed for the scrambling process. The node will analyze the mesh's face adjacency and integer field data to perform its operations.

field_name

The field_name parameter is a required string input that specifies the name of the integer face field you want to scramble. By default, this is set to "seg", but you can change it to any field name present in your mesh's face attributes or metadata. This parameter determines which set of integer values will be reassigned to maximize contrast between adjacent faces.

seed

The seed parameter is an optional integer input that allows you to specify a random seed for the color assignment order. It has a default value of 0 and can range from 0 to 0xffffffff. This parameter is useful for ensuring reproducibility in the scrambling process, as it controls the randomization aspect of the color assignment, allowing you to achieve consistent results across different runs.

Scramble Int Field Output Parameters:

mesh

The output mesh is of type TRIMESH and represents the processed 3D model with scrambled integer field values. This output retains the original geometry of the input mesh but with modified face attributes or metadata, where the specified integer field has been reassigned to enhance visual contrast between adjacent segments. This makes it easier to visually distinguish different parts of the mesh, aiding in analysis and interpretation.

Scramble Int Field Usage Tips:

  • To achieve consistent results, use the seed parameter to control the randomization of color assignments. This is particularly useful if you need to reproduce the same scrambling effect across multiple runs.
  • Ensure that the field_name you specify corresponds to an existing integer field in your mesh's face attributes or metadata. This will prevent errors and ensure that the scrambling process is applied to the correct data.
  • Use this node to enhance the visual clarity of segmented 3D models, especially when adjacent segments have similar integer labels that make them hard to distinguish.

Scramble Int Field Common Errors and Solutions:

Field '<field_name>' not found, returning unchanged

  • Explanation: This error occurs when the specified field_name does not exist in the mesh's face attributes or metadata. The node cannot find the integer field to scramble, so it returns the mesh unchanged.
  • Solution: Verify that the field_name you provided matches an existing integer field in your mesh's face attributes or metadata. Ensure there are no typos and that the field is correctly defined in the mesh data.

Output: scrambled <n_labels> segments using <max_color> colors

  • Explanation: This is not an error message but a confirmation that the scrambling process was successful. It indicates the number of segments scrambled and the number of colors used.
  • Solution: No action is needed. This message confirms that the node has executed successfully and provides information about the result.

Scramble Int Field Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI libigl
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Models, enabling artists to harness the latest AI tools to create incredible art.