Commit graph

1145 commits

Author SHA1 Message Date
Moritz Brückner ee194a1806 Live patch: support for socket default values 2021-07-10 21:50:30 +02:00
Moritz Brückner 4387d774cc Live patch: add support for node property updates 2021-07-03 19:45:05 +02:00
Moritz Brückner 202138304a Live patch: add support for creating connections between nodes 2021-06-28 12:17:13 +02:00
Lubos Lenco 98eeccd71d
Merge pull request #2082 from armory3d/blender2.9
Blender 2.9 LTS support
2021-05-10 11:14:39 +02:00
Lubos Lenco 30b2093b94 Move game theme to armory.ui 2021-05-07 17:02:31 +02:00
Lubos Lenco 2f1fe4ef0b Move Canvas and game ui to armory.ui package 2021-05-07 15:24:03 +02:00
QuantumCoderQC 5b6875947c New logic node to spawn objects not in current active scene 2021-05-02 01:33:38 +02:00
QuantumCoderQC c185882db8 Revert commit that creates an object if not in scene.
Returns object only if present in active scene
2021-05-01 22:19:29 +02:00
N8n5h 939649f492 Make tileSizes and TileSizesFactor non-static
This solves an oversight that basically made all atlases share the
their tileSizesFactor, a variable used to quickly lookup tile tile sizes
depending on the shadowMapScale. So if cascade size was higher than cube
map size, then point light atlases would use incorrect values and break.
2021-04-28 19:12:45 -03:00
N8n5h 41c6924231 Separate shadow map atlas logic and rendering time 2021-04-24 21:48:24 -03:00
N8n5h 9247b09c88 Add profiling of shadow map atlas logic 2021-04-24 20:31:03 -03:00
Lubos Lenco 6d4952624a
Merge pull request #2161 from N8n5h/light-fix
Remove redundant 0 check when computing tile offset
2021-04-18 16:58:59 +02:00
N8n5h eb01b4652a remove redundant 0 check when computing tile offset 2021-04-18 10:32:36 -03:00
N8n5h c21d17d04e Add visual representation of shadow map atlases to the debug console
This is done to make it easier to understand what is going on with
atlases to help users and also the maintenance of the feature.

Max atlas size and max tile size where moved to the graph to make it
more understandable.
2021-04-18 10:25:27 -03:00
N8n5h da41d1fb17 Fix compile error with debug and shadow map atlas LOD 2021-04-16 11:43:19 -03:00
N8n5h c01b079cf1 Add custom highlighting for debug console
And use it to highlight "not enough lights" with a different color to
bring attention to it.
2021-04-14 01:06:14 -03:00
N8n5h e1cfa2f1da Add shadow map atlases info to the debug console
Display information like tile size, current size, max size, free tiles,
etc. to help debug atlases.
2021-04-14 00:32:54 -03:00
Moritz Brückner cf56c4f1d8 Fix GetSystemName node 2021-04-08 15:44:18 +02:00
N8n5h 63716eea17 Modifications around addLight from Inc
* Removed redundant checks at the start of the function.
* changed the return value to void because the "return false" were
redundant, and simply made it so the lightInAtlas is set at the end of
the function.
* Removed unused variable
2021-04-07 12:44:54 -03:00
N8n5h 614385ea7b Setup callbacks so tiles are notified when a light is removed
A secondary callback is setup so the tile it's also removed from the
activeTiles, because it's freed in a "non standard" way.
2021-04-07 12:44:54 -03:00
Moritz Brückner f64419dd06 Merge branch 'master' into blender2.9
# Conflicts:
#	blender/arm/material/shader.py
#	blender/arm/props_collision_filter_mask.py
#	blender/arm/props_ui.py
2021-04-03 14:12:54 +02:00
Moritz Brückner c5be90d0b0 Cleanup 2021-03-31 20:33:52 +02:00
Moritz Brückner 420033c86d Add API to set Nishita density parameters 2021-03-26 20:59:26 +01:00
Moritz Brückner 845d2aff93 Use switch/case for uniform links 2021-03-26 15:39:18 +01:00
Moritz Brückner 8d812548c4 Use 2D LUT for Nishita skies 2021-03-25 23:29:34 +01:00
knowledgenude 1ad1d564bd
Fix clamp node 2021-03-16 18:27:42 -03:00
N8n5h c7211542b4 Make pointLightData work with lights with cast_shadow=false 2021-03-14 23:21:02 -03:00
Moritz Brückner 5f55b00710 Begin with Nishita LUT implementation for better performance 2021-03-11 23:16:44 +01:00
Alexander Kleemann aec10274f4 Add option to ignore irradiance for baked environments 2021-02-20 15:30:18 +01:00
Alexander Kleemann f1858550d0 Blending fix
Fix for https://github.com/armory3d/armory/issues/1615
2021-02-20 13:51:25 +01:00
SunDaw c5855ad96f Add mask option to pick RB node and physicsworld 2021-02-19 19:42:18 +01:00
Lubos Lenco 84663bc981
Merge pull request #2106 from SunDaw/optimize-sendevent-nodes
Remove array allocation from SendEventNode
2021-02-16 15:48:57 +01:00
knowledgenude 0ee35adc81 Improved FSM 2021-02-14 19:21:26 -03:00
Lubos Lenco 49a599dc66
Merge pull request #2102 from N8n5h/light-fix-2
Add support for shadow map atlasing
2021-02-14 16:32:59 +01:00
SunDaw 6cbe539098 Reuse contacts array instead of creating new
Remove unused import from PhysicsWorld
2021-02-13 17:23:16 +01:00
SunDaw a2e4850b12 Remove array allocation from SendEventNode
Remove entires member variable from SendEvent nodes
2021-02-13 16:56:21 +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
Kevin Leung 4ee1131f6e
[PickLocation] Actually return null when input invalid 2021-01-29 20:54:34 +08:00
knowledgenude 6ef1195816 Update inputmap and add FSM 2021-01-25 20:19:24 -03:00
knowledgenude 081fcb2870 update-inputmap 2021-01-11 18:14:21 -03:00
QuantumCoderQC 80ea09671c Fix Exporter and conversions for Physics World in Blender 2.9.X 2021-01-06 20:26:43 +01:00
knowledgenude ae057508ca
Fix mouse wheel key verification 2021-01-04 12:09:30 -03:00
knowledgenude 24f62623ad add-inputmapper 2021-01-04 11:28:59 -03:00
QuantumCoderQC 174ce72349 Correct Spacing 2020-12-27 00:35:24 +01:00
QuantumCoderQC 4ee36afc0c Add Speed and Loop options for Play Action From Node 2020-12-27 00:29:03 +01:00
Lubos Lenco 2dcd1a951b
Merge pull request #2066 from knowledgenude/master
Fix inverted margin for Kinematic Character
2020-12-26 10:22:31 +01:00
QuantumCoderQC a0422d49f2 Improve physics constraint handling 2020-12-23 16:03:45 +01:00
knowledgenude f836e597d1 fix-inverted-margin 2020-12-22 20:49:03 -03:00
Lubos Lenco 6ee5af2518
Merge pull request #2062 from QuantumCoderQC/conFix
Fix adding physics constraint at game start
2020-12-19 11:20:39 +01:00
QuantumCoderQC 2f911c756e Remove physics constraint helper trait 2020-12-17 15:05:46 +01:00