Commit graph

250 commits

Author SHA1 Message Date
QuantumCoderQC 13a2f4538a move shape key textures to dedicated directory 2021-11-02 13:42:09 +01:00
SaxonGao-SZ 34897c9747
feature: Use project name for web title
feature: Use project name for web title
2021-10-13 20:52:36 +08:00
tong 128efcc0ef Use haxe_times prefs field 2021-09-21 14:56:12 +02:00
tong 3920c475be No haxe times param 2021-09-21 14:43:47 +02:00
Moritz Brückner ecddc0af92 Add assert() macro 2021-08-27 01:26:00 +02:00
Moritz Brückner 1eb087125f Fix 'armory' define 2021-08-19 22:27:09 +02:00
Moritz Brückner 2347348504 Switch to ES6 on krom target
See https://github.com/armory3d/armorcore/issues/32
2021-08-19 22:26:30 +02:00
Moritz Brückner c56a0c3a72 Fix accidental module reloading caused by name conflicts of global vars 2021-08-11 14:32:21 +02:00
Moritz Brückner ea8c13686c Implement basic addon reloading 2021-08-04 22:56:11 +02:00
Moritz Brückner 549040fc09 Fix publishing with live patch enabled 2021-07-25 20:13:47 +02:00
Moritz Brückner 0456d5f080 Remove legacy code stub 2021-07-24 18:21:06 +02:00
Moritz Brückner 1edc7a9469 Live patch: support for adding nodes 2021-07-20 20:53:37 +02:00
N8n5h 404a1248a1 Make clusterNear be the same as in LightObject 2021-03-13 13:30:25 -03:00
N8n5h cf99e5a382 Fixed point lights breaking for Krom Windows with shadow map atlas
https://github.com/armory3d/armory/issues/2110#issuecomment-787913813
2021-03-01 18:39:32 -03:00
N8n5h 5f8b92f9c3 Applied flip workaround for point light too for html5 and atlas
The same concept for spot lights was applied for point lights;
the difference is that because point lights require to do the projection in the shader, the first inversion was applied in sampleCube() when returning the uv coordinates.
"_FlipY" was added to replace "_InvY" in "PCFFakeCube()" because the inversion is only necessary for shaders and not anything else, otherwise it would break rendering of other parts.
2021-03-01 18:39:32 -03:00
tong 3e15ed9b5c Write debug param by default 2021-02-25 14:06:31 +01:00
N8n5h 1c3e24a8fd Add support for shadow map atlasing
With this it is now possible to enable atlasing of shadow maps, which solves the existing limitation of 4 lights in a scene. This is done by
grouping the rendering of shadow maps, that currently are drawn into their own images for each light, into one or several big textures. This was
done because the openGL and webGL version Armory targets do not support dynamic indexing of shadowMapSamplers, meaning that the index that
access an array of shadow maps has to be know by the compiler before hand so it can be unrolled into if/else branching. By instead simply
using a big shadow map texture and moving the dynamic part to other types of array that are allowed dynamic indexing like vec4 and mat4, this
limitation was solved.

The premise was simple enough for the shader part, but for the Haxe part, managing and solving where lights shadow maps should go in a shadow map
can be tricky. So to keep track and solve this, ShadowMapAtlas and ShadowMapTile were created. These classes have the minimally required logic
to solve the basic features needed for this problem: defining some kind of abstraction to prevent overlapping of shadowmaps, finding available
space, assigning such space efficiently, locking and freeing this space, etc. This functionality it is used by drawShadowMapAtlas(), which is a
modified version of drawShadowMap().

Shadow map atlases are represented with perfectly balanced 4-ary trees, where each tree of the previous definition represents a "tile" or slice
that results from dividing a square that represents the image into 4 slices or sub-images. The root of this "tile" it's a reference to the
tile-slice, and this tile is divided in 4 slices, and the process is repeated depth-times. If depth is 1, slices are kept at just the initial
4 tiles of max size, which is the default size of the shadow map. #arm_shadowmap_atlas_lod allows controlling if code to support more depth
levels is added or not when compiling.

the tiles that populate atlases tile trees are simply a data structure that contains a reference to the light they are linked to, inner
subtiles in case LOD is enabled, coordinates to where this tile starts in the atlas that go from 0 to Shadow Map Size, and a reference to a
linked tile for LOD. This simple definition allows tiles having a theoretically small memory footprint, but in turn this simplicity might make
some functionality that might be responsibility of tiles (for example knowing if they are overlapping) a responsibility of the ones that
utilizes tiles instead. This decision may complicate maintenance so it is to be revised in future iterations of this feature.
2021-02-04 17:53:59 -03:00
Moritz Brückner 3f1200417c Cleanup imports 2020-12-17 23:34:38 +01:00
Moritz Brückner 0bda1abfb7 Optimize on_same_drive() calls 2020-12-17 23:19:56 +01:00
Moritz Brückner 397d860a5a Cleanup write_data.py 2020-12-17 22:57:09 +01:00
Moritz Brückner d7e5d07e52 Only use relative paths when path/reference are on the same drive 2020-12-17 22:25:00 +01:00
E1e5en 59c31950c8 Added option for HTML5 Settings
- Disable browser context menu - disable the browser context menu for the canvas element on the page (index.html).
2020-12-02 20:54:14 +03:00
Moritz Brückner 8814326bab write_data.py: cleanup and improve chromatic aberration section 2020-11-28 23:12:21 +01:00
E1e5en d084a8297e Windows Settings – Publish and action after
Windows Settings:
Visual Studio Version - select the studio version for which the project will be exported. Options: 2010, 2012, 2013, 2015, 2017, 2019. Default: 2019.
Update - checks the installed versions of Visual Studio on the PC and adds (installed) to the version in the list if available (for information). Example:
sample_vs_2
Action After Publishing - select an action after a successful publication. Options:
Nothing - do nothing. Default value;
Open In Visual Studio - open the project in the corresponding studio version;
Compile - compilation of the project;
Compile and Run - compile and run the project. Then the executable file will be copied to the windows-hl folder (where the resources are located).
Mode - compilation mode. Options: Debug, Release. Default: Debug.
Architecture - the architecture for which the application will be built. Options: x86, x64. Default: version of the user’s PC architecture.
Compile Log Parameter - setting the output of messages during compilation:
Summary - show the error and warning summary at the end. Default value;
No Summary - don \ 't show the error and warning summary at the end;
Warnings and Errors Only - show only warnings and errors;
Warnings Only - show only warnings;
Errors Only - show only errors.
More details can be found here - MSBuild command-line reference (I took only part of the settings).
Count CPU - specifies the maximum number of concurrent processes to use when building. More details can be found here - MSBuild command-line reference. The default is 1. Maximum value: the number of CPUs in the system (function multiprocessing.cpu_count()).
Open Build Directory - open the folder with the application after a successful build. If the Compile and Run option is selected, then the executable file will be copied to the windows-hl folder (where the resources are located) and this folder will open. Otherwise, the folder where the given Visual Studio file is going will open.
The user will also receive a message if the studio version selected for export and for opening in the studio or compilation is not on the PC. And a list of installed ones will be issued. Example:

Visual Studio 2017 (version 15) not found.
The following are installed on the PC:
- Visual Studio Community 2019 (version 16.8.30711.63)
To obtain information about the installed versions of Visual Studio, use the vswhere.exe utility (open source) included in Kha (located in the …\ArmorySDK\Kha\Kinc\Tools\kincmake\Data\windows).
2020-11-24 20:41:50 +03:00
luboslenco 085146b245 Write cascade params only when shadows are enabled 2020-11-05 11:04:11 +01:00
Moritz Brückner 863ec518f8 Set file encoding to utf-8 2020-10-18 17:50:35 +02:00
E1e5en 1a34e202a7 Add Android Settings + LN Set Vibrate
1. For the new settings to fully function, you need to update the submodules so that this Pull Request (https://github.com/Kode/kincmake/pull/100) gets into armsdk. Extended settings via khafile.js.

2. Added Android Settings panel:
- invisible until the target platform android-hl is added to the list;
- inactive until the target platform android-hl is selected in the list.
Options:
- Orientation;
- Compile Version SDK - from 26 to 30, default 29;
- Minimal Version SDK - from 14 to 30, default 14;
- Target Version SDK - from 26 to 30, default 29;
- Permissions - a list of permissions. If I will duplicate entries in the list, then only unique entries will be included during export. By default, the list is empty;
- Android ABI Filters - a list of platforms to build for (arm64-v8a, armeabi-v7a, x86, x86_64). If I will duplicate entries in the list, then only unique entries will be included during export. By default, the list is empty. If the list is empty, then all platforms will be used (as before).

3. The enum (names of permissions) and the function have been added to the utils.py modules, which adds the specified value to the list of permissions. Feature added for ease of use from different locations (different logical nodes).

4. List of permissions:
- ACCESS_COARSE_LOCATION - Allows an app to access approximate location;
- ACCESS_NETWORK_STATE - Allows applications to access information about networks;
- ACCESS_FINE_LOCATION - Allows an app to access precise location;
- ACCESS_WIFI_STATE - Allows applications to access information about Wi-Fi network;
- BLUETOOTH - Allows applications to connect to paired bluetooth devices;
- BLUETOOTH_ADMIN - Allows applications to discover and pair bluetooth devices;
- CAMERA - Required to be able to access the camera device;
- EXPAND_STATUS_BAR - Allows an application to expand or collapse the status bar;
- FOREGROUND_SERVICE - Allows a regular application to use Service.startForeground;
- GET_ACCOUNTS - Allows access to the list of accounts in the Accounts Service;
- INTERNET - Allows applications to open network sockets';
- READ_EXTERNAL_STORAGE - Allows an application to read from external storage;
- VIBRATE - Allows access to the vibrator;
- WRITE_EXTERNAL_STORAGE - Allows an application to write to external storage.

5. Added logical node Set Vibrate:
Category: Native
Pulses the vibration hardware on the device for time in milliseconds, if such hardware exists.
Input parameters:
- Milliseconds - time in milliseconds (data type Int, default value 100).
When adding the logical node Set Vibrate, the permission is automatically added to the list, even if the target android-hl has not been added to the export list (using a function from utils.py).
2020-10-17 16:47:54 +03:00
Moritz Brückner e8b1859e8b Add "armory" flag on export so libraries can differ between Armory and Kha 2020-09-11 14:43:59 +02:00
Moritz Brückner f6cf1e4731 Rename f to khafile for better readability 2020-08-28 13:25:54 +02:00
Moritz Brückner b458438c70 Fix android target options 2020-08-28 13:09:23 +02:00
Lubos Lenco 78aec97c95
Merge pull request #1744 from MoritzBrueckner/world-export
Multi-world support
2020-07-07 11:07:25 +02:00
Moritz Brückner b994b1d575 Remove cloud constants from compiled.inc 2020-07-06 18:14:15 +02:00
tong c89a40da85 Add haxe --times flag on verbose not debug_console 2020-06-25 13:02:56 +02:00
tong 413406f3d3 Generate Main.projectVersion 2020-05-10 21:25:01 +02:00
Lubos Lenco 61ff96786f Metal fixes 2020-05-04 00:19:11 +02:00
Moritz Brückner f5a40efec4 Fix annoying error message at first Armory2D start from Blender 2020-01-13 11:04:39 +01:00
luboslenco f310776985 Use webassembly for ammo+krom 2019-11-16 14:11:32 +01:00
luboslenco 01920b99c7 Fix android target name 2019-09-08 19:08:47 +02:00
luboslenco 24867658f1 Deprecated cleanup 2019-08-24 11:50:27 +02:00
Alexander 000ec17e3d Chromatic aberration 2019-08-08 20:02:42 +02:00
Alexander f521828edc Lens dirt masking 2019-08-08 18:56:56 +02:00
luboslenco ff3ca27aa9 Separate format lib 2019-08-04 15:31:25 +02:00
unknown 4664c5ff9a Flag cleanup 2019-07-14 15:41:40 +02:00
unknown 05b43aca02 Emit arm_audio 2019-06-22 17:06:02 +02:00
unknown 8bccdd9879 lz4 compress stubs 2019-06-22 11:29:05 +02:00
luboslenco 060448e555 More dof changes 2019-05-31 14:11:39 +02:00
luboslenco bde6cfa76f Keep compatible 2019-05-24 09:34:59 +02:00
Sidar Talei d0893c78b4 gpu_dof > dof.aperture_fstop 2019-05-24 03:53:30 +02:00
luboslenco 297a7b8281 b28 fixes 2019-05-20 14:32:48 +02:00
luboslenco 4a754e8b3a Expose khafile params 2019-05-10 18:29:59 +02:00