Commit Graph
63 Commits
Author SHA1 Message Date
adminandClaude Opus 4.8 7536e8ec8b Fur als 4. Paint-Map + Ziel-Opacity-Blend
Fur wird die vierte kanonische Paint-Map (RGB=Farbe, A=Länge). Integration
über Seed (kahl), GPU/CPU-Paint, Undo, Netzwerk-Sync, Persistence (fur.png,
v6) und Live-RT-Hook im FurShellRenderer. HUD-Binding (Toggle/Picker/Alpha)
aktiviert. Fur-Alpha lerpt jetzt zu einer Ziel-Opacity (Slider_FurOpacity)
statt additiv Richtung 1 zu akkumulieren (zwei Brush-Passes: Fade + Deposit).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-03 21:35:53 +02:00
adminandClaude Opus 4.8 43791abc79 Add fur-map support, skinned driver, and world-down curvature to fur shell
FurShell now reads an RGBA fur map (RGB = per-texel strand colour,
A = fur length) so the standalone look can be driven per-texel. Alpha 0
clips the whole shell stack (root included) so a painted body shows
through; _SolidRoot keeps the opaque base shell only for the full-coverage
prototype. White map default keeps the standalone prototype unchanged.

FurShellRenderer drops the MeshFilter requirement and resolves its mesh
per frame: on a SkinnedMeshRenderer it borrows the SkinnedColliderBaker's
per-frame baked pose so the fur follows the animation with no extra bake.

Curvature/gravity now bends strands toward WORLD down (converted into
object space via unity_WorldToObject) instead of object-local down, so a
rotated player mesh droops downward correctly. Identity rotation is
unchanged, so the test sphere is unaffected.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-03 20:47:15 +02:00
adminandClaude Opus 4.8 bf4297a3b1 Add generic shell-texturing fur shader and renderer
FurShell.shader renders N normal-extruded shells with per-strand
alpha-cutout for hair/fur/grass on any mesh (needs only normals/UVs).
Parameters cover length, density, thickness, taper, tip fill, curvature,
per-strand direction randomness, wind sway and silhouette strand stretch.

FurShellRenderer drives every parameter via MaterialPropertyBlock and
draws the mesh shellCount times with RenderMeshInstanced from
beginCameraRendering (works in edit, game and screenshot cameras).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-03 17:34:58 +02:00
adminandClaude Opus 4.8 50efc7e8b3 Fix: wheel over UI scrolls the list instead of zooming the camera
The orbit rig read the wheel unfiltered for zoom, so scrolling a paint-mode
scroll list also zoomed the camera. Gate the zoom behind a shared
InputUtil.PointerOverUi() helper (EventSystem raycast); MeshPainter's private
IsPointerOverUi() now delegates to the same helper (DRY).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-03 16:04:51 +02:00
adminandClaude Opus 4.8 ba7f3c2e89 Move settings to Settings.json and add master volume
Replace the former per-value PlayerPrefs storage with a shared human-readable
Settings.json store (GameSettings). MouseSensitivity keeps its public .Multiplier
API and only swaps its backing to the JSON store, so the camera controllers stay
untouched. Add a MasterVolume facade that drives the AudioMixer's exposed
"MasterVolume" parameter (loaded from Resources, linear<->dB mapping), applied at
startup and on change, plus a MasterVolumeSlider binder. The default is the level
currently authored on the mixer instead of an arbitrary constant.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-03 15:30:44 +02:00
adminandClaude Opus 4.8 f586ef7a15 Simplify HUD layout save path to a fixed PaintHud.json
Drop the scene-derived hudSaveId/key mechanism and save the HUD layout to a
single PaintHud.json under persistentDataPath.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-03 14:52:22 +02:00
adminandClaude Opus 4.8 6ef4f56394 Store paintings as per-painting folder of PNGs + JSON
Replace the flat binary .paint format with a folder per painting under
Paintings/<key>/: albedo/emission as sRGB PNGs, the packed MSO map split
into human-readable metallic/occlusion/smoothness grayscale PNGs, and the
non-baked scalars (name, size, emission intensity, camo/height knobs) in
painting.json. MSO.B is always 0 (pack shader), so the split round-trips
losslessly with no alpha ambiguity. Public API (SavePaintAs/LoadPaintByName/
ListSavedPaintings/PaintExists/DeletePaint) and the network snapshot path
(WriteCanonicalMaps/ReadCanonicalMaps) are unchanged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-03 14:52:16 +02:00
adminandClaude Opus 4.8 cadc8f8b17 Bind PaintHud to the scene-authored canvas
Drop the code-gen canvas/EventSystem bootstrap and the layoutPrefab
instantiation; the canvas and its panel now live in the scene, so PaintHud
binds to its first child at startup instead of building the UI at runtime.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-03 10:32:42 +02:00
adminandClaude Opus 4.8 fbbb4f7419 Fix low-opacity paint never reaching the target colour
Paint RTs were ARGB32 (8 bpp). Repeated source-over at low alpha rounds
back to the previous value once the per-stroke decrement dst*alpha drops
below half an LSB, so it freezes at a grey floor (~0.5/alpha in 255ths) -
e.g. black at low opacity never reaches 0. Switch the accumulation buffers
to ARGBHalf (16-bit linear). The sRGB round-trip stays at the byte boundary
(seed decodes on upload, ReadRtPixels re-encodes on readback), so canonical
bytes and CPU/GPU parity are unchanged - only the accumulation gained bits.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-03 10:32:29 +02:00
adminandClaude Opus 4.8 0c0a250015 Fix players colliding with the idle FreeCamera capsule
The FreeCamera's CharacterController stayed enabled permanently, so its
invisible capsule sat in the play area at (0,1,0) and blocked players even
when the freecam was not in use: the controller script disables only itself
in Awake, not the independent CharacterController collider.

Keep the capsule out of the physics world unless the freecam is actually
flying: disable it in Awake and toggle it with SetActive (enabled before the
teleport in SyncToCurrentView, which preserves the current enabled state).
Also ignore collision against all live players instead of just the first on
each activation, since Physics.IgnoreCollision is reset when the capsule is
toggled off and back on.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-02 20:06:53 +02:00
adminandClaude Opus 4.8 d867452dcb Fix: allow wheel zoom while sprinting (Shift)
The orbit camera suppressed wheel zoom whenever Shift/Ctrl was held, to
reserve Shift/Ctrl+wheel for the paint brush resize. But Shift is also
the sprint key, so sprinting blocked zoom outside paint mode.

Gate the reservation on PanEnabled (set only by PaintMode.Enter/Exit), so
the wheel is only claimed for brush resize while actually in paint mode;
otherwise it zooms normally.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-02 18:26:35 +02:00
adminandClaude Opus 4.8 0d14980a76 Fix maps never binding due to partial-class static init order
MapPropIds (in MeshPainter.Backend.cs) referenced the *Id fields from the
MeshPainter.cs partial in its field initializer. Static field-initializer
order across partial-class files is unspecified in C#; after the script
reorg the composite array initialized before the *Id fields and captured 0
for every property id. HasProperty(0) is always false, so AssignMapTexture
bound no maps at all -> the shader fell back to its white default textures,
making every fresh avatar fully glossy (smoothness 1) and emissive.

Build MapPropIds lazily on first access (runtime, after all static
initializers) so the file order no longer matters. The per-stroke allocation
savings are preserved; only a single null-check per call is added.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-02 16:23:37 +02:00
adminandClaude Opus 4.8 e23fae0c50 Reorganize scripts into subfolders by responsibility
Move scripts under Assets/Scripts/ into Components, GameMode, Helper,
Network, Enum, Struct and ScriptableObject folders. Pure file moves
(plus folder .meta files); no code changes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-02 15:02:15 +02:00