Instantly share code, notes, and snippets.
Code plumber. I worked on Unity game engine (2006-2021). Since 2022 contributing to Blender. Also some games, demoscene, etc.
- Kaunas, Lithuania
- https://aras-p.info
- @aras@mastodon.gamedev.place
- @aras_p
aras-p /unity_6_empty_web_build.md
Last activeMarch 13, 2025 04:51
Unity 6 "empty" web build file sizesThis short post by Defold people about "empty project build size" comparison between Defold, Unity and Godot(twitter,mastodon) sparked my interest.
It is curious that Godot builds seem to belarger than Unity? Would not have expected that! Anyway.
Away more extensive Unity "web" build comparison and analysics is over athttps://github.com/JohannesDeml/UnityWebGL-LoadingTestbut here are just my short notes in trying out Unity 6 (6.0.23 - Oct 2024).
aras-p /metal_shader_compiler_cache_location.md
Last activeOctober 29, 2024 00:46
Apple Metal Shader Compiler Cache locationAs pergfx-rs/gfx#3716 (comment) :
macOS has a system shader cache at $(getconf DARWIN_USER_CACHE_DIR)/com.apple.metal
On my MacBookPro that is under/var/folders/52/l9z1nqld5yg99tb_s3q6nyhh0000gn/C
- System shaders:
/var/folders/52/l9z1nqld5yg99tb_s3q6nyhh0000gn/C/com.apple.metal
- Blender shaders:
/var/folders/52/l9z1nqld5yg99tb_s3q6nyhh0000gn/C/org.blenderfoundation
Delete all the folders in there to clear the cache.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
# windows: | |
make developer nobuild | |
cd ..\build_windows_x64_vc17_Release | |
cmake -DWITH_PYTHON_SAFETY=OFF -DWITH_ASSERT_ABORT=OFF -DWITH_ASSERT_RELEASE=OFF -DWITH_RENDERDOC=ON . |
aras-p /blender_size_release.txt
Last activeAugust 6, 2023 11:22
blender.exe (2023 Aug 1) size breadown with Sizer, Release This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
# Sizer --min=10 --templatemin=20 --classmin=20 --filemin=30 blender.exe | |
# using Sizer https://github.com/aras-p/sizer/releases/tag/v0.6.0 | |
# my build is with these settings *OFF*: WITH_CYCLES_OSL, WITH_MATERIALX, and without CUDA/HIP/SYCL/oneAPI bits either. | |
# Release build config | |
Functions by size (kilobytes, min 10.00): | |
847.90: gpu_shader_create_info_init gpu_shader_create_info.obj | |
141.40: ?initFunctionMap@ColladaParserAutoGen15Private@COLLADASaxFWL15@@AEAAXXZ COLLADASaxFWLColladaParserAutoGen15PrivateFunctionMap.obj | |
123.30: ccl::integrate_surface<16777659> kernel_sse41.obj | |
120.56: ?createFunctionMap__library_effects__allChildren@FunctionMapFactory@COLLADASaxFWL14@@SAAEBV?$map@KUFunctionStruct@?$ParserTemplate@VColladaParserAutoGen14Private@COLLADASaxFWL14@@VColladaParserAutoGen14@2@@GeneratedSaxParser@@U?$less@K@std@@V?$allocator@U?$pair@$$CBKUFunctionStruct@?$ParserTemplate@VColladaParser |
aras-p /blender_size.txt
Last activeAugust 5, 2023 17:47
blender.exe (2023 Aug 1) size breadown with Sizer, RelWithDebInfo This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
# Sizer --min=10 --templatemin=20 --classmin=20 --filemin=30 blender.exe | |
# using Sizer https://github.com/aras-p/sizer/releases/tag/v0.5.0 | |
# my build is with these settings *OFF*: WITH_CYCLES_OSL, WITH_MATERIALX, and without CUDA/HIP/SYCL/oneAPI bits either. | |
# RelWithDebInfo build config | |
Warning: PDB file is created with incremental linking, some information might be misleading. | |
Functions by size (kilobytes, min 10.00): | |
847.90: gpu_shader_create_info_init gpu_shader_create_info.obj | |
141.40: ?initFunctionMap@ColladaParserAutoGen15Private@COLLADASaxFWL15@@AEAAXXZ COLLADASaxFWLColladaParserAutoGen15PrivateFunctionMap.obj | |
123.14: ccl::integrate_surface<16777659> kernel_sse41.obj |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
// just attach this to an empty game object. | |
// Unity 2021.3: fine | |
// Unity 2022.3: displays PVRTC_RGBA2 value. | |
// This happens with enums that contain some Obsolete values. | |
// | |
// Looks like a regression since inspector got changed to UIToolkit, | |
// the code inside UIToolkit enum property field does not handle | |
// obsolete entries correctly. And compared to IMGUI enum field, | |
// also loses any potential enum localization. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
diff --git a/io_scene_fbx/export_fbx_bin.py b/io_scene_fbx/export_fbx_bin.py | |
index c5cd93a7..f15b3a8a 100644 | |
--- a/io_scene_fbx/export_fbx_bin.py | |
+++ b/io_scene_fbx/export_fbx_bin.py | |
@@ -1688,7 +1688,8 @@ def fbx_data_object_elements(root, ob_obj, scene_data): | |
animatable=True, animated=((ob_obj.key, "Lcl Rotation") in scene_data.animated)) | |
elem_props_template_set(tmpl, props, "p_lcl_scaling", b"Lcl Scaling", scale, | |
animatable=True, animated=((ob_obj.key, "Lcl Scaling") in scene_data.animated)) | |
- elem_props_template_set(tmpl, props, "p_visibility", b"Visibility", float(not ob_obj.hide)) | |
+ elem_props_template_set(tmpl, props, "p_visibility", b"Visibility", float(not ob_obj.hide), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Unity 2022.2.0f1 official release. | |
I get changes from version control, about a dozen files changed (1 commit), then I open Unity. | |
It takes about one minute to open the project. The project Assets is 23GB (143k files), it also references | |
some local packages which is 8GB (63k files). Large part of project assets folder is custom data not used | |
by Unity's import pipeline ("baked" files for game, under StreamingAssets folder, 13GB, 47k files). | |
63s: InitializeProject | |
62s: InitialRefreshV2 | |
54s: RefreshInternalV2 | |
30s: ImportOutOfDateAssets |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
// just going through Data/Managed/UnityEngine.xml in Unity 2023.1.0a22, letters A to C, | |
// searching for "[]" finds these public APIs that take arrays as parameters. Then next to | |
// them I looked whether they have a List<> or NativeArray<> variants. Some do have List<>, | |
// very few have native array. Most of them would be good candidates to take a Span<T>, | |
// in some cases that might reduce the need for also having "an integer offset and number of items" | |
// arguments that some (minority) of them do. | |
// | |
// This is only A..C so far, or maybe like 10% of the UnityEngine.xml API. UnityEditor.xml probably | |
// has a ton of similar ones :) |
NewerOlder