MeshEditor Projection : Fixed tone color of projected views + updated workflows
This commit is contained in:
parent
a66b9e6727
commit
587c342087
7 changed files with 32 additions and 48 deletions
|
|
@ -100,11 +100,11 @@
|
|||
"seed": 304843910,
|
||||
"sparse_structure_steps": 25,
|
||||
"sparse_structure_guidance_strength": 7.5,
|
||||
"sparse_structure_guidance_rescale": 0.7,
|
||||
"sparse_structure_guidance_rescale": 0.01,
|
||||
"sparse_structure_rescale_t": 5,
|
||||
"sparse_structure_sampler": "heun",
|
||||
"sparse_structure_resolution": 32,
|
||||
"sparse_structure_guidance_interval_start": 0.6,
|
||||
"sparse_structure_guidance_interval_start": 0.1,
|
||||
"sparse_structure_guidance_interval_end": 1,
|
||||
"fill_holes": true,
|
||||
"hole_iterations": 1,
|
||||
|
|
@ -136,7 +136,7 @@
|
|||
"shape_guidance_rescale": 0.5,
|
||||
"shape_rescale_t": 3,
|
||||
"shape_sampler": "heun",
|
||||
"shape_guidance_interval_start": 0.1,
|
||||
"shape_guidance_interval_start": 0.6,
|
||||
"shape_guidance_interval_end": 1,
|
||||
"verbose": false,
|
||||
"dino_lock": 0.65,
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
"inputs": {
|
||||
"shift": 3.1,
|
||||
"model": [
|
||||
"40",
|
||||
"13",
|
||||
0
|
||||
]
|
||||
},
|
||||
|
|
@ -432,20 +432,6 @@
|
|||
"title": "Canny"
|
||||
}
|
||||
},
|
||||
"40": {
|
||||
"inputs": {
|
||||
"lora_name": "%E7%A7%BB%E9%99%A4%E5%85%89%E5%BD%B1V2.safetensors",
|
||||
"strength_model": 1,
|
||||
"model": [
|
||||
"13",
|
||||
0
|
||||
]
|
||||
},
|
||||
"class_type": "LoraLoaderModelOnly",
|
||||
"_meta": {
|
||||
"title": "Load LoRA"
|
||||
}
|
||||
},
|
||||
"41": {
|
||||
"inputs": {
|
||||
"model_name": "4xLexicaDAT2_otf.pth"
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
"inputs": {
|
||||
"shift": 3.1,
|
||||
"model": [
|
||||
"40",
|
||||
"13",
|
||||
0
|
||||
]
|
||||
},
|
||||
|
|
@ -431,19 +431,5 @@
|
|||
"_meta": {
|
||||
"title": "Canny"
|
||||
}
|
||||
},
|
||||
"40": {
|
||||
"inputs": {
|
||||
"lora_name": "%E7%A7%BB%E9%99%A4%E5%85%89%E5%BD%B1V2.safetensors",
|
||||
"strength_model": 1,
|
||||
"model": [
|
||||
"13",
|
||||
0
|
||||
]
|
||||
},
|
||||
"class_type": "LoraLoaderModelOnly",
|
||||
"_meta": {
|
||||
"title": "Load LoRA"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -238,7 +238,7 @@
|
|||
},
|
||||
"20": {
|
||||
"inputs": {
|
||||
"seed": 1000,
|
||||
"seed": 12345,
|
||||
"steps": 4,
|
||||
"cfg": 1,
|
||||
"sampler_name": "euler",
|
||||
|
|
|
|||
|
|
@ -27,24 +27,24 @@
|
|||
"3": {
|
||||
"inputs": {
|
||||
"seed": 12345,
|
||||
"texture_steps": 25,
|
||||
"texture_guidance_strength": 7.5,
|
||||
"texture_guidance_rescale": 0.01,
|
||||
"texture_steps": 12,
|
||||
"texture_guidance_strength": 1,
|
||||
"texture_guidance_rescale": 0.5,
|
||||
"texture_rescale_t": 3,
|
||||
"resolution": 1024,
|
||||
"texture_size": 4096,
|
||||
"texture_size": 2048,
|
||||
"texture_alpha_mode": "OPAQUE",
|
||||
"double_side_material": false,
|
||||
"texture_guidance_interval_start": 0,
|
||||
"texture_guidance_interval_start": 0.6,
|
||||
"texture_guidance_interval_end": 0.9,
|
||||
"max_views": 1,
|
||||
"bake_on_vertices": false,
|
||||
"use_custom_normals": false,
|
||||
"mesh_cluster_threshold_cone_half_angle_rad": 60,
|
||||
"sampler": "heun",
|
||||
"sampler": "euler",
|
||||
"inpainting": "telea",
|
||||
"verbose": false,
|
||||
"dino_lock": 0.35,
|
||||
"dino_lock": 0,
|
||||
"dino_substeps": 2,
|
||||
"dino_foundation_cap": 0.92,
|
||||
"pipeline": [
|
||||
|
|
|
|||
|
|
@ -87,6 +87,12 @@ import ExportMeshDialog from '../components/ExportMeshDialog';
|
|||
|
||||
const AUTO_PROJECTION_SEAM_SAFE_CROP_PX = 0
|
||||
const AUTO_PROJECTION_SEAM_SAFE_BLEND_PX = 0
|
||||
// Per-view Brown–Lowe gain compensation recolours each view to equalise tones across
|
||||
// seams. It inherently shifts the views' ORIGINAL colours (the whole surface tints when
|
||||
// a second view is added), which is not wanted: every view must keep the colour ComfyUI
|
||||
// produced. Residual tonal steps between views are handled by the Seam post-process
|
||||
// instead. The solver is kept available but OFF.
|
||||
const PROJECTION_GAIN_COMPENSATION = false
|
||||
// GPU UV-space projection bake (see utils/gpuTextureBake.js and the projection
|
||||
// analysis). When the platform supports float render targets, each layer is baked
|
||||
// on the GPU: a native depth-map occlusion test + parallel per-texel projective
|
||||
|
|
@ -4160,7 +4166,7 @@ export default function MeshEditorPage() {
|
|||
// with different lighting/tint don't leave a visible colour step at the seam.
|
||||
// Solved across all visible layers; identity for a single layer.
|
||||
let viewGains = null
|
||||
if (layerSnapshots.length > 1) {
|
||||
if (PROJECTION_GAIN_COMPENSATION && layerSnapshots.length > 1) {
|
||||
try {
|
||||
viewGains = solveViewGains(
|
||||
layerSnapshots.map(l => l.pixelData),
|
||||
|
|
|
|||
|
|
@ -556,12 +556,14 @@ export function dilateProjectionGutter(outputData, coverage, width, height, radi
|
|||
if (src[i]) {
|
||||
continue
|
||||
}
|
||||
// Only fill genuinely empty gutter texels. A texel that belongs to another
|
||||
// island (occupancy == 1) but isn't covered must keep its own content — the
|
||||
// dilation must not paint one chart's colour onto a different chart.
|
||||
if (useOccupancy && uvOccupancyMask[i]) {
|
||||
continue
|
||||
}
|
||||
// An uncovered texel is either an island's OWN under-covered edge (occupancy
|
||||
// == 1 — what produced the thin white UV-seam lines: no view's bake reached it)
|
||||
// or an empty inter-island gutter (occupancy == 0). We now fill BOTH, but an
|
||||
// island texel may only borrow colour from neighbours that are ALSO on an island
|
||||
// (same-chart extension). Borrowing from a filled gutter (occupancy 0) is the
|
||||
// gutter→neighbour-chart step that leaks one view's colour onto a DIFFERENT
|
||||
// chart, so that single direction stays forbidden.
|
||||
const fillingIsland = useOccupancy && uvOccupancyMask[i]
|
||||
let sumR = 0
|
||||
let sumG = 0
|
||||
let sumB = 0
|
||||
|
|
@ -583,6 +585,10 @@ export function dilateProjectionGutter(outputData, coverage, width, height, radi
|
|||
if (!src[ni]) {
|
||||
continue
|
||||
}
|
||||
// Same-chart extension only when filling an island texel (see above).
|
||||
if (fillingIsland && useOccupancy && !uvOccupancyMask[ni]) {
|
||||
continue
|
||||
}
|
||||
const no = ni * 4
|
||||
sumR += outputData[no]
|
||||
sumG += outputData[no + 1]
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue