Setting an Unreal Engine 5.1 Niagara Particle system to cast shadows from inside a Blueprint - particle-system

I am using Unreal Engine 5.1, and I have a Blueprint that spawns a series of Niagara Particle systems.
I want these systems/particles to cast shadows, but the normal way of doing this (the 'Cast Shadows' setting in the details panel of the Niagara System instance) isn't available on systems created this way
How could I set this from within a Blueprint, or set it as 'true' by default in the System itself?

Found the answer, you can plug the Niagara System reference into a "Set Cast Shadow" node and set that to true.

Related

Spark Profile for Projections Module Configuration Check Failed: MIN_EXECUTORS_LESS_MAX_EXECUTORS

We are on an on-prem stack. I did set up a Projection on a dataset. In the Projection configuration dialog in the build section I left the Text Box in which the Spark Profile can be set empty, as the GUI says: The spark profiles on this projection are managed and adjusted based on data volume. Adjustments to spark profiles will only apply to the next build of this projection.
I schedule the build to run once a day. I consistently succeeds once. From the details of the succeeded build I can see that Spark is using: dynamicAllocationMaxExecutors 40 and dynamicAllocationMinExecutors 2.
When I open the GUI of the projection again (a couple of days later), I can see that Foundry sets the following profile "NUM_EXECUTORS_1". All builds using this profile are failing. In the build details I see: Configuration Check Failed: Min executors must be less than the max executors
Is our Spark Profile wrong/incorrectly configured or is the Projection simply choosing a profile which is not suitable? I would like to let Foundry choose the profile based on the data volume without having to manually adjust it. Can you let me know how to best solve this issue?
Based on the Spark Profiles documentation, when setting NUM_EXECUTORS_1 this adds the following spark configuration spark.executor.instances: 1; spark.dynamicAllocation.maxExecutors: 1. Your stack has the following Spark configuration set as default spark.dynamicAllocation.minExecutors: 2, therefore a pre-launch check MIN_EXECUTORS_LESS_MAX_EXECUTORS fails, since the minExecutors is greater than maxExecutors.
I raised this with the product team, asked whether NUM_EXECUTORS_1 could set spark.dynamicAllocation.minExecutors as well. Other option would be to change the stack default to spark.dynamicAllocation.minExecutors: 1. Thank you for reporting this.
Our onside support team let me know that we have configured a minimum of 2 executors on our stack.
If Foundry then tries to use the profile NUM_EXECUTORS_1 the max value of this profile is below the configured minimum of 2.
Expected behavior of Foundry would be, that the dynamic selection of the Spark Profile honors the configured minimum thresholds. So yes, I would consider this a bug.

Moshi Codegen take longer time since it uses reflection(aka."Class.classForName") to create the generated adapter. Is there a way to avoid this?

Adapters generated via codegen cannot be added in the Moshi.Builder().add(Type, JsonAdapter). So moshi doesn't know how to create the compile-time generated adapter.
It uses reflection to create them, which adds a significant overhead on low-end devices in terms of latency.
is there a way to avoid this? Or should we just replace this with custom type adapters?

How to use an in-process IMFTransform with WinRT MediaPlayer::AddVideoEffect via activatableClassId

WinRT's Windows::Media::Playback::MediaPlayer has support to adding video and audio effects (much like IMFMediaEngine), however I can't find a way to use existing IMFTransform's that I already use with IMFMediaEngineEx::InsertVideoEffect() in MediaPlayer::AddVideoEffect()
MediaPlayer::AddVideoEffect() only takes a string for the "activatableClassId", whereas IMFMediaEngineEx::InsertVideoEffect() allows me to pass in a pointer to my local IMFTransform directly. I don't want to registry a DLL with the system for the class to be activatable, I just want the IMFTransform to be registered locally in-process so that it can be discovered by the classId.
I've searched online but there is very little information. All I found was this Microsoft thread, an old article showing CGreyScale MFT using WRL, and this useful repository which uses an appxmanifest to registry the classes (not what I want to do).
These example seem useful and I implemented the decoration around my existing MFT however the example relies on registering the activatableClassId externally so I still can't tell how to do it in-process. The only thing I could find was RoRegisterActivationFactories() but there's very little information about this so I'm not sure.
Does anyone know how to do this?
Thanks,
Since the MediaPlayer API is WinRT, it will expect to use WinRT activated objects for effects. Alternatively, the lower level win32 MF Media Engine allows you to pass in an IMFActivate for any custom activation.
There are two ways to activate the MFT with WinRT:
Register the MFT to the registry and reference the CLSID, you can refer to this document.
Registration-Free WinRT(which requires the use of an application manifest), you can refer to this blog.
Unfortunately, this means that there is an appmanifest requirement if you wish to register the MFT in-process.

Unreal Engine 4 Blueprint Object initialization

I've just started using Unreal Engine 4, but whenever i choose Object as parent class for my new blueprint, i don't have any constructor (like Construction Script function for Actor)
How can i make a constructor?
I don't want to use Actor becaue the class is storing the equipment data for my character.
Thanks!
I'm afraid it's not possible. Technically Construction Script is not Constructor as you know it from C++. It's somewhat misleading name.
Technically C++ equivalent for Construction Script is AActor::OnConstruction(), not class Constructor.
You must also consider the fact that UObjects are not replicated by default. In future if you would want to make your inventory replicated, you would need to either switch to Actors (which is not that good idea), or write it in C++, where you can explicitly tell, which UObjects should replicate as part of Actor or ActorComponent.
https://github.com/iniside/GameInventorySystemPlugin
Here is Inventory Plugin I'm developing. It's still WIP, but basic functionality is now implemented and it should work with 4.6 version of engine. Right now it's combination of C++ and Blueprint. I also recommend rebuilding it from source if you want to try it out, since default binaries are build against source version of engine.
It should give you nice starting point, to either see how things are done, or just straight to use it.

Swing and JavaFX concurrency

Is there a way to avoid concurrency when using Swing embedded in JavaFX8 (swingNode) or vice versa (JFXPanel) ?
I have two threads (the EDT and the FX application) which manage the UI, this can cause unexpected results...
No, it is not officially possible currently. In both frameworks changes to the structure can only be done on the respective UI thread.
However, in the future this may change, but I do not know of any concrete plans that oracle may have and I cannot find an appropriate task in their jira.
edit: I found the specific thread about this on the javafx mailinglist:
http://mail.openjdk.java.net/pipermail/openjfx-dev/2013-August/009541.html
jira issue: https://javafx-jira.kenai.com/browse/RT-30694
appearently there is an experimental system property that can be set to enable a "single threaded mode": -Djavafx.embed.singleThread=true