Skip to content

Commit

Permalink
PopcornFX Gem 2.15.4
Browse files Browse the repository at this point in the history
  • Loading branch information
ValPKFX committed Mar 9, 2023
1 parent 6d483fd commit c4d0024
Show file tree
Hide file tree
Showing 11 changed files with 65 additions and 37 deletions.
2 changes: 1 addition & 1 deletion Code/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# https://www.popcornfx.com/terms-and-conditions/
#----------------------------------------------------------------------------

set(POPCORNFX_VERSION 2.15.3)
set(POPCORNFX_VERSION 2.15.4)
set(POPCORNFX_LICENSE O3DE)

if (PK_O3DE_MAJOR_VERSION GREATER_EQUAL 2205)
Expand Down
21 changes: 11 additions & 10 deletions Code/Include/PopcornFX/PopcornFXBus.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,21 @@

namespace PopcornFX
{
class PopcornFXEmitterRuntime;
}

namespace PopcornFX
{
class CFilePack;
#if PK_O3DE_MAJOR_VERSION > 2210
static constexpr AZ::Uuid EmitterComponentTypeId = AZ::Uuid("{515957e3-8354-4048-8d6c-98628ef21804}");
static constexpr AZ::Uuid EditorEmitterComponentTypeId = AZ::Uuid("{B62ED02E-731B-4ACD-BCA1-78EF92528228}");
static constexpr AZ::Uuid AssetTypeId = AZ::Uuid("{45047C35-64F7-43BA-B463-000081B587C3}");
#else
static const AZ::Uuid EmitterComponentTypeId = AZ::Uuid("{515957e3-8354-4048-8d6c-98628ef21804}");
static const AZ::Uuid EditorEmitterComponentTypeId = AZ::Uuid("{B62ED02E-731B-4ACD-BCA1-78EF92528228}");
static const AZ::Uuid AssetTypeId = AZ::Uuid("{45047C35-64F7-43BA-B463-000081B587C3}");
#endif

class PopcornFXEmitterRuntime;

struct StandaloneEmitter
{
Expand Down Expand Up @@ -430,14 +439,6 @@ namespace PopcornFX
};
using PopcornFXEmitterEditorComponentEventsBus = AZ::EBus <PopcornFXEmitterEditorComponentEvents>;

#if PK_O3DE_MAJOR_VERSION > 2210
static constexpr AZ::Uuid EmitterComponentTypeId = AZ::Uuid("{515957e3-8354-4048-8d6c-98628ef21804}");
static constexpr AZ::Uuid EditorEmitterComponentTypeId = AZ::Uuid("{B62ED02E-731B-4ACD-BCA1-78EF92528228}");
#else
static const AZ::Uuid EmitterComponentTypeId = AZ::Uuid("{515957e3-8354-4048-8d6c-98628ef21804}");
static const AZ::Uuid EditorEmitterComponentTypeId = AZ::Uuid("{B62ED02E-731B-4ACD-BCA1-78EF92528228}");
#endif

class PopcornFXProfilerRequests
: public AZ::EBusTraits
{
Expand Down
4 changes: 2 additions & 2 deletions Code/Platform/Linux/PAL_linux.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

set(LY_PACKAGE_SERVER_URLS ${LY_PACKAGE_SERVER_URLS} "https://downloads.popcornfx.com/o3de-packages")
set(package_name PopcornFX-${POPCORNFX_VERSION}-${POPCORNFX_LICENSE}-linux)
set(pk_package_hash 92cdd0675546d56ae30511da7e689f179b62e91064bc9f8f9b86c9f34ec72a52)
set(pk_package_id WAyVE9npfW6LezRL)
set(pk_package_hash d3977d4c24474376ca3058b57524502349a22468eb4f96e422c577ac4e9443b8)
set(pk_package_id SyfMKMHrQk9KKwZS)

ly_associate_package(PACKAGE_NAME ${package_name} TARGETS PopcornFX PACKAGE_HASH ${pk_package_hash})
pk_download_package_ifn(${package_name} ${pk_package_id})
Expand Down
4 changes: 2 additions & 2 deletions Code/Platform/Mac/PAL_mac.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

set(LY_PACKAGE_SERVER_URLS ${LY_PACKAGE_SERVER_URLS} "https://downloads.popcornfx.com/o3de-packages")
set(package_name PopcornFX-${POPCORNFX_VERSION}-${POPCORNFX_LICENSE}-mac)
set(pk_package_hash 3b86f2a24940622897a51bc54875a0cc88f4d653ac6738357fba9d98b71b0c35)
set(pk_package_id Dx8Bumnv6JMPHTyx)
set(pk_package_hash 504df01b29bf59cfe3c1ec22b29641e728c411ff60bae79a0468e3136174964b)
set(pk_package_id 5cheqdwMvyaaSn98)

ly_associate_package(PACKAGE_NAME ${package_name} TARGETS PopcornFX PACKAGE_HASH ${pk_package_hash})
pk_download_package_ifn(${package_name} ${pk_package_id})
Expand Down
4 changes: 2 additions & 2 deletions Code/Platform/Windows/PAL_windows.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

set(LY_PACKAGE_SERVER_URLS ${LY_PACKAGE_SERVER_URLS} "https://downloads.popcornfx.com/o3de-packages")
set(package_name PopcornFX-${POPCORNFX_VERSION}-${POPCORNFX_LICENSE}-windows)
set(pk_package_hash 52ae35d50236bce4f18c68ff25f7a666bb5c3dfdf7171255316738ecf0eea8e8)
set(pk_package_id Fy4x9kVx86NYPu8Y)
set(pk_package_hash 2c33dc945512cb1a3f8bce22e140d6747ba90e0ee0d7a2674ae13af01797b407)
set(pk_package_id hBPWpXze4nNvB36C)

ly_associate_package(PACKAGE_NAME ${package_name} TARGETS PopcornFX PACKAGE_HASH ${pk_package_hash})
pk_download_package_ifn(${package_name} ${pk_package_id})
Expand Down
3 changes: 2 additions & 1 deletion Code/Source/Asset/PopcornFXAsset.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

#include <AzCore/std/string/string.h>
#include <AzCore/Asset/AssetCommon.h>
#include <PopcornFX/PopcornFXBus.h>

#if defined(O3DE_USE_PK)
#include <pk_particles/include/ps_effect.h>
Expand All @@ -32,7 +33,7 @@ namespace PopcornFX {
{
public:

AZ_RTTI(PopcornFXAsset, "{45047C35-64F7-43BA-B463-000081B587C3}", AZ::Data::AssetData);
AZ_RTTI(PopcornFXAsset, PopcornFX::AssetTypeId, AZ::Data::AssetData);
AZ_CLASS_ALLOCATOR(PopcornFXAsset, AZ::SystemAllocator, 0);

PParticleEffect m_Effect = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ namespace PopcornFX {

{
public:
AZ_EDITOR_COMPONENT(PopcornFXEmitterEditorComponent, "{B62ED02E-731B-4ACD-BCA1-78EF92528228}");
AZ_EDITOR_COMPONENT(PopcornFXEmitterEditorComponent, EditorEmitterComponentTypeId);

PopcornFXEmitterEditorComponent();

Expand Down
51 changes: 38 additions & 13 deletions Code/Source/Integration/Preloader/PopcornFXRendererLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -782,10 +782,19 @@ bool PopcornFXRendererLoader::_AddTextureToLoad( const char *texturePath,
return false;

//Load Texture
AzFramework::AssetSystem::AssetStatus status = AzFramework::AssetSystem::AssetStatus_Unknown;
EBUS_EVENT_RESULT(status, AzFramework::AssetSystemRequestBus, CompileAssetSync, texturePath);
if (status != AzFramework::AssetSystem::AssetStatus_Compiled)
CLog::Log(PK_ERROR, "Could not compile image at '%s'", texturePath);
bool apConnected = false;
AzFramework::AssetSystemRequestBus::BroadcastResult(
apConnected, &AzFramework::AssetSystemRequestBus::Events::ConnectedWithAssetProcessor);
if (apConnected)
{
// If the Asset Processor is available, make sure the assets are compiled.
AzFramework::AssetSystem::AssetStatus status = AzFramework::AssetSystem::AssetStatus_Unknown;
EBUS_EVENT_RESULT(status, AzFramework::AssetSystemRequestBus, CompileAssetSync, texturePath);
if (status != AzFramework::AssetSystem::AssetStatus_Compiled)
{
CLog::Log(PK_ERROR, "Could not compile image at '%s'", texturePath);
}
}
AZ::Data::AssetId streamingImageAssetId;
EBUS_EVENT_RESULT(streamingImageAssetId, AZ::Data::AssetCatalogRequestBus, GetAssetIdByPath, texturePath, azrtti_typeid<AZ::RPI::StreamingImageAsset>(), false);
if (!streamingImageAssetId.IsValid())
Expand Down Expand Up @@ -841,13 +850,20 @@ bool PopcornFXRendererLoader::_AddGeometryToLoad(const char *geometryPath,
{
AZ::Data::AssetId assetId;

AzFramework::AssetSystem::AssetStatus status = AzFramework::AssetSystem::AssetStatus_Unknown;
EBUS_EVENT_RESULT(status, AzFramework::AssetSystemRequestBus, CompileAssetSync, geometryPath);
if (status != AzFramework::AssetSystem::AssetStatus_Compiled)
bool apConnected = false;
AzFramework::AssetSystemRequestBus::BroadcastResult(
apConnected, &AzFramework::AssetSystemRequestBus::Events::ConnectedWithAssetProcessor);
if (apConnected)
{
CLog::Log(PK_ERROR, "Could not compile model at '%s'", geometryPath);
return false;
// If the Asset Processor is available, make sure the assets are compiled.
AzFramework::AssetSystem::AssetStatus status = AzFramework::AssetSystem::AssetStatus_Unknown;
EBUS_EVENT_RESULT(status, AzFramework::AssetSystemRequestBus, CompileAssetSync, geometryPath);
if (status != AzFramework::AssetSystem::AssetStatus_Compiled)
{
CLog::Log(PK_ERROR, "Could not compile model at '%s'", geometryPath);
}
}

EBUS_EVENT_RESULT(assetId, AZ::Data::AssetCatalogRequestBus, GetAssetIdByPath, geometryPath, azrtti_typeid<AZ::RPI::Model>(), false);
if (!assetId.IsValid())
{
Expand All @@ -872,10 +888,19 @@ bool PopcornFXRendererLoader::_AddGeometryToLoad(const char *geometryPath,

AZ::Data::AssetId PopcornFXRendererLoader::_LoadTexture(const CString &path)
{
AzFramework::AssetSystem::AssetStatus status = AzFramework::AssetSystem::AssetStatus_Unknown;
EBUS_EVENT_RESULT(status, AzFramework::AssetSystemRequestBus, CompileAssetSync, path.Data());
if (status != AzFramework::AssetSystem::AssetStatus_Compiled)
CLog::Log(PK_ERROR, "Could not compile image at '%s'", path.Data());
bool apConnected = false;
AzFramework::AssetSystemRequestBus::BroadcastResult(
apConnected, &AzFramework::AssetSystemRequestBus::Events::ConnectedWithAssetProcessor);
if (apConnected)
{
// If the Asset Processor is available, make sure the assets are compiled.
AzFramework::AssetSystem::AssetStatus status = AzFramework::AssetSystem::AssetStatus_Unknown;
EBUS_EVENT_RESULT(status, AzFramework::AssetSystemRequestBus, CompileAssetSync, path.Data());
if (status != AzFramework::AssetSystem::AssetStatus_Compiled)
{
CLog::Log(PK_ERROR, "Could not compile image at '%s'", path.Data());
}
}

AZ::Data::AssetId streamingImageAssetId;
EBUS_EVENT_RESULT(streamingImageAssetId, AZ::Data::AssetCatalogRequestBus, GetAssetIdByPath, path.Data(), azrtti_typeid<AZ::RPI::StreamingImageAsset>(), false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class CPopcornFXFeatureProcessor : public CPopcornFXFeatureProcessorInterface
{
public:
AZ_RTTI(CPopcornFXFeatureProcessor, "{D86216E4-92A8-43BE-123F-883489C75BA1}", CPopcornFXFeatureProcessorInterface);
AZ_CLASS_ALLOCATOR(CPopcornFXFeatureProcessor, AZ::SystemAllocator, 0);

CPopcornFXFeatureProcessor();
virtual ~CPopcornFXFeatureProcessor() = default;
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# O3DE PopcornFX Plugin

Integrates the **PopcornFX Runtime SDK** into **O3DE** as a Gem.
* **Version:** `v2.15.3`
* **Version:** `v2.15.4`
* **O3DE:** `21.11`, `21.11.2`, `22.05.0`, `22.10.0`
* **Supported platforms:** `Windows`, `MacOS`, `Linux`, `iOS`, `Android`

Expand Down
8 changes: 4 additions & 4 deletions gem.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"gem_name": "PopcornFX",
"display_name": "PopcornFX 2.15.3",
"display_name": "PopcornFX 2.15.4",
"license": "Community",
"license_url": "https://www.popcornfx.com/popcornfx-community-license",
"origin": "Persistant Studios - popcornfx.com",
"repo_uri": "https://downloads.popcornfx.com/o3de-repo",
"origin_uri": "https://downloads.popcornfx.com/o3de-repo/PopcornFX-2.15/O3DE_PopcornFXGem_v2.15.3_Win64_Linux64_Mac64.zip",
"version": "2.15.3",
"last_updated": "2023-02-23",
"origin_uri": "https://downloads.popcornfx.com/o3de-repo/PopcornFX-2.15/O3DE_PopcornFXGem_v2.15.4_Win64_Linux64_Mac64.zip",
"version": "2.15.4",
"last_updated": "2023-03-09",
"type": "Code",
"summary": "The PopcornFX Gem provides real-time FX solution for particle effects.",
"canonical_tags": [
Expand Down

0 comments on commit c4d0024

Please sign in to comment.