Commit Graph

47 Commits

Author SHA1 Message Date
Garry Newman
1dfd1de087 Thumb Textures (#3677)
Adds a universal way to get thumbnail images.

- `thumb:entities/sents/npc/scientist.sent` - resources/assets
- `thumb:mount://ns2/ns2/models/effects/exosuit_part1.model.vmdl` -mount files
- `thumb:facepunch.snowman` - packages

This greatly simplifies UI like the spawnmenu that needs to show thumbnails for these things.

We also add `AssetTypeFlags.IncludeThumbnails`. If this is set then when the package is published, any asset types with this flag will include a "[path].c.png" thumbnail image of it.

Also does Api++ protocol increase.
2025-12-27 17:55:57 +00:00
Layla
252d5fbd5a Clipping tool (#3668) 2025-12-27 11:05:06 +00:00
Layla
6c8a5613c1 Scene mesh per triangle physics materials (#3673) 2025-12-27 11:00:03 +00:00
Layla
677282f1cd fix typo causing unduck headroom check to fail 2025-12-23 14:30:40 +00:00
Layla
592575afe5 fix small mistake in EnhancedCcd 2025-12-22 22:15:21 +00:00
Layla
7a3cccfcb4 Rigidbody isbullet (#3649) 2025-12-22 21:35:49 +00:00
Layla
35aedbbd79 Advanced properties (#3652) 2025-12-22 08:31:55 +00:00
Lorenz Junglas
08c4ae6d73 Animgraph pose node optimizations (#3646)
* AddPoseOperation skip work when added transform is equal to identity

* SubtractPoseOperation skip work when added transform is equal to identity

* Fast path for BlendUpdateNode when weights are 1

Don't emit expensive pose op just forward the pose with weight 1

* Fast path for Blend2DUpdateNode when weights are 1

Don't emit expensive pose op just forward the pose with weight 1

* Avoid allocation of Actions in MergeDescendants
2025-12-22 07:09:45 +00:00
Garry Newman
d84f64c2c3 Fix wheel joint steering axis 2025-12-19 16:37:54 +00:00
Lorenz Junglas
bf8a22f40b Avoid allocations in MergeDescendants by using recursion instead of yield return (#3644)
yield return creates a lot of garbage and is easily avoidable here, by using recusing instead.
2025-12-19 12:12:51 +01:00
Lorenz Junglas
4a050a9ab9 Animation optimizations v3 (#3635)
* Cleanup SkinnedModelRendererSetBoneMerge

* Proper bookkeeping for SkinnedModelRenderer Hierarchy

* Use ConcurrentQueue instead of Channel to reduce lock contention

* Limit animation update parallelism to Environment.ProcessorCount - 1

* BoneMerge in parallel

* Speed up native anim decompression using (lock-free) LRU posecache

* Remove some unused debug counters
2025-12-18 17:02:20 +01:00
Garry Newman
f241f16212 Simplifies WheelJoint creation (#3639) 2025-12-18 14:44:35 +00:00
Layla
1b9ac54a83 Mapping tools resize mode (#3630) 2025-12-17 12:47:10 +00:00
Garry Newman
67e5970382 Fix exceptions in ParticleModelEmitter when model is null 2025-12-17 08:40:37 +00:00
Layla
f40e74a093 Edge cut tool (#3629) 2025-12-16 17:22:03 +00:00
Carson Kompon
574de7aa0c Scene Mapping - Fast Texturing Tool (#3573)
- `PolygonMesh.SetFaceTextureCoords()` now properly sets `IsDirty`
- Added `PolygonMesh.GetFaceTextureCoords()`
- Added `FastTextureWindow` (which extends RectEditor.Window) and `FastTextureSettings` classes
- Added `MeshRectangle` which is a RectEditor `Rectangle` that contains faces from a mesh unwrapped within the rectangle, reflecting any transform changes made back to the associated mesh faces
- Added `EdgeAwareFaceUnwrapper` class which handles all UV unwrapping
- Added a "Fast Texturing Tool" button to the Mapping Tool's Texture Mode which opens a FastTextureWindow with the selected faces. This can also be opened with the shortcut CTRL+G (from the Texture Mode OR the Face Mode)
- If a Fast Texturing Tool window is open and the faces are deselected (or the user exits the Mapping Tool) the window will automatically close itself
- Implemented U/V Alignment Settings (+ Horizontal/Vertical Flip)
- Implemented Inset X/Y Settings
- Implemented Square Unwrap, Planar Unwrap, and Use Existing mapping modes
- If the selected material has a rect asset, you can double-click on a rect to automatically fit your UV rectangle to the one you double-clicked. (You can also toggle the visibility of the material's rects)
- Implemented the "Pick Edge" button which allows you to select an edge from the unwrap and automatically orient the UVs so that the selected edge is aligned with the grid.
- Added `Rectangle,CanDelete`, used by MeshRectangles so they cant be deleted
- Fixed `RectView.DragResizeRect` behaviour so that resizing a rect will snap the dragged edges to the grid instead of just increasing/decreasing by the grid size
- Added Panning/Zooming to the Rect Editor
- Disabling the Grid in the RectEditor now disables grid snapping
- Can now resize rects in on themselves to resize in the other direction without making an invalid rect
- Added Tile View to RectView
2025-12-12 11:20:30 -05:00
Matt Stevens
85802c7d35 Terrain: Create buffers once with sane defaults, make sure they are always bound 2025-12-12 12:38:53 +00:00
Layla
4e9cf595ff mapping tool mesh selection mode (#3588) 2025-12-10 16:27:44 +00:00
Garry Newman
5046b22eee Sandbox updates 3 (#3589)
* Gibs copy tint
* Add ClientEditableAttribute
* Panel based ControlSheet supports ToggleGroup
* Panel based ControlSheet hides empty titles
* Fix SliderControl default step
* Fix SliderControl text box resizing
* Fix slidercontrol number entry not getting styled
* ControlSheetGroup support ShowIf
* Make wheel joint properties ClientEditable, add steps
2025-12-10 14:43:30 +00:00
Sam Pavlovic
c227181ca2 Add terrain flags and make NoTile an option (#3575)
* Add terrain flags and make NoTile an option
This makes removes unused uvrotation from material
Fixes NRE if storage is null
Adds flags enum per material for future use
https://files.facepunch.com/sampavlovic/1b0911b1/ShareX_fKdgnanxbh.mp4

* Default NoTiling to false

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* The changes from commit e0c1c801c0 to fix normals on notile got accidentally reverted on 87a6fde918, readd normals rotation for notile, update shaders

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-10 07:19:03 -03:00
Layla
dbca8f8fa0 suspension disabled just limits the suspension to zero internally so it doesn't fly off into space, also set suspension and steering spring defaults to 10 hertz, 1 damping (#3584) 2025-12-09 19:18:05 +00:00
Alex Guthrie
2a235be3f8 Fix AgX (#3574)
Fix AgX tinting by adjusting math, use AgX punchy look
https://files.facepunch.com/alexguthrie/1b0911b1/fixed_agx.png
2025-12-09 03:02:11 +00:00
Layla
a9089d3780 unfuck the ordering of rebuilding in mesh component so mesh is built before collider, also don't use gameobject scale to scale geometry (#3572) 2025-12-08 18:12:16 +00:00
Lorenz Junglas
6808d8768e Shutdown fixes (#3553)
* Stop generating solutions via -test flag add -generatesolution

* Add TestAppSystem remove Application.InitUnitTest

Avoids some hacks and also makes sure our tests are as close to a real AppSystem as possible.

* Add shutdown unit test

shuts down an re-inits the engine

* Properly dispose native resources hold by managed during shutdown

Should fix a bunch of crashes

* Fix filesystem and networking tests

* StandaloneTest does proper Game Close

* Make sure package tests clean up properly

* Make sure menu scene and resources are released on shutdown

* Report leaked scenes on shutdown

* Ensure DestroyImmediate is not used on scenes

* Fix unmounting in unit tests not clearing native refs

* Force destroy native resource on ResourceLib Clear
2025-12-08 15:55:11 +01:00
Tony Ferguson
6f362470f5 Dresser randomizer (#3551)
* add randomize button to dresser, it's public so you can use it
2025-12-07 13:23:55 +00:00
Garry Newman
fa5bdccba7 Add Panel.GameObject (#3567)
* Add Panel.GameObject
* Add virtual Panel.OnVisibilityChanged
* Obsolete Panel.Scene.set
2025-12-07 13:08:37 +00:00
Layla
fa284e585b Physics filter pair (#3566) 2025-12-07 11:15:48 +00:00
sboxbot
ac7f12719b SceneModel changes (#3559)
* Expose GetBoneVelocity
* Document SceneModel.Bones, expose HasBoneOverrides
* Fix spelling
* GetBoneVelocity( int ), fix GetBoneVelocities assert

---------

Co-authored-by: yuberee <59583743+yuberee@users.noreply.github.com>
2025-12-07 10:26:48 +00:00
Antoine Pilote
87a6fde918 New Terrain format (#3558)
- Now supports drawing on a BaseLayer and OverlayLayer
- Terrain Tools displays a material palette in a sidebar
- Added C# API to sample terrain material at a given position
- Can now import multiple splatmaps at once mapping to texture indices ( [0, 3], [4, 7], etc.)

https://files.facepunch.com/antopilo/1b0511b1/sbox-dev_An6nbxpqe3.mp4
2025-12-05 12:14:12 -05:00
Kicks
5bcf235db8 Categorize uncategorized base components
Categorizes PostProcessVolume, Terrain, and MoviePlayer.
2025-12-05 11:41:48 +00:00
Layla
9729470a9e add gravity scale to physics body markup (if you want a model to have negative gravity like a balloon) (#3535) 2025-12-03 10:23:05 +00:00
Layla
fa4e01729e Wheel joint (#3497) 2025-12-01 12:47:49 +00:00
Layla
abfa79f610 fix impact gib velocity (#3513) 2025-12-01 09:28:15 +00:00
sboxbot
6c26b3bde9 ParticleEmitters aren't finished until they've emitted at least once (#3506)
Co-authored-by: nixx quality <nixx@is-fantabulo.us>
2025-11-30 17:59:28 +00:00
Layla
16809db787 fix ducking modifying body height, stomping over user changes (#3463) 2025-11-29 11:16:50 +00:00
sboxbot
bc133aba24 Fix SoundscapeTrigger Error if source or SoundFile is not valid (#3489)
* Fix SoundscapeTrigger error if source or SoundFile is not valid
2025-11-29 07:23:29 +00:00
sboxbot
a02d870efb Update MapInstance to support scene maps (#3490)
* Update MapInstance to support scene maps
2025-11-29 07:21:57 +00:00
Sam Pavlovic
920e3760bc Bunch of SSR fixes (#3481)
* Fix SSR not reprojecting correctly and drifting on downsample, reference original code and backport some of the stuff from motion vectors too, major cleanup

* Logic for RenderTarget.GetTemporary probably shouldn't ceil, causes a lot of drifting in SSR even though the logic is correct, can see downsampling up to 10 and still remaining sharp

https://files.facepunch.com/sampavlovic/1b2511b1/sbox-dev_dB9j5ipUTA.mp4

* Barriers are very strict on Intel ARC, make them explicit for SSAO and SSR, while at it make this logic for SSR simpler

For reference this is how it could appear on Intel ARC B580

https://files.facepunch.com/sampavlovic/1b2511b1/sbox-dev_UjkEGVD4k4.mp4

* CommandList.ResourceBarrierTransition for Textures/RenderTargets

* Fix Reflections_GetHitPositionReprojection while being aware of Motion::Get for future Motion Vector API, deal with temporal stability better

https://files.facepunch.com/sampavlovic/1b2811b1/sbox-dev_He8gAbtPau.mp4

* Build shader

* Format
2025-11-28 14:35:05 -03:00
sboxbot
0238870553 Reimplement impact damage system for Rigidbody (#3491)
* Impact damage system added to Rigidbody
* Fix Rigidbody Velocity and AngularVelocity not getting applied if object wasn't created yet
* Props only ignite from impact damage if it's significant
* Fix gibs not properly inheriting parent object velocity
2025-11-28 14:55:50 +00:00
sboxbot
f3d06f6850 Fix gibs being network spawned twice (#3466)
Co-authored-by: Kicks <nolandimensions@gmail.com>
2025-11-28 14:10:01 +00:00
Tony Ferguson
f58e41b52d Switch Dresser's initialization from OnAwake to OnStart -- fixes null Network.Owner case (#3474) 2025-11-28 10:51:11 +00:00
Layla
a6794e92af fix Voice.LaughterScore not being hooked up (#3464) 2025-11-27 15:26:23 +00:00
Jusvit
d6e72110b5 Fix various public-facing XML comments 2025-11-27 12:37:51 +00:00
Matt Stevens
94d8c22b84 Revert "Render DebugOverlay before UI"
This reverts commit dd44dc6eb8.
2025-11-26 15:58:29 +00:00
Sam Pavlovic
b0e3a8d964 Terrain Fixes - Seamsless & Optimizations (#3442)
* Fix terrain seams and optimize

Overlap LODs by one step to fix holes in LOD transitions
Reuse vertices that exist on same key when building diamond square

https://files.facepunch.com/sampavlovic/1b2411b1/8mb.video-eW2-tNb22a60.mp4

* Add NoTile class and make terrain use it
https://files.facepunch.com/sampavlovic/1b2411b1/sbox-dev_R1FwUmLhvu.mp4
https://files.facepunch.com/sampavlovic/1b2411b1/sbox-dev_YhKyIwvhve.mp4

* Sure why not Mr. Robot
2025-11-26 15:49:41 +00:00
Matt Stevens
dd44dc6eb8 Render DebugOverlay before UI 2025-11-24 23:09:56 +00:00
s&box team
71f266059a Open source release
This commit imports the C# engine code and game files, excluding C++ source code.

[Source-Commit: ceb3d758046e50faa6258bc3b658a30c97743268]
2025-11-24 09:05:18 +00:00