Skip to content

Conversation

@Azzinoth
Copy link
Owner

@Azzinoth Azzinoth commented Mar 6, 2025

No description provided.

Azzinoth added 30 commits May 31, 2024 21:01
Merging changes from the master branch
… aspect refers to it being a simple tree data structure, which will later be replaced with a much more optimized data structure.
…more compatible with projects that include it; Fixed a bug in the glTF loader and improved its support for nodes and scenes; Moved the LoadGLTF function to FEScene as it should load scenes, not just assets.
…rted) in the glTF loader; Fixed the issue where meshes without normals, texture coordinates or tangents were ignored by the glTF loader; Moved missing normals and tangent calculations from ObjLoader to the GEOMETRY class to ensure the same code could be used by the glTF loader as well; FEScene now properly handles meshes without normals and tangents loaded from glTF.
…ompleted the first iteration of transferring scene hierarchy from glTF files; Fixed a small bug in FENaiveSceneGraph::GetEntity; Added the bPreserveWorldPosition option in FENaiveSceneEntity::AddChild.
…hat functional, needs a lot of additional work to make it proper.
…ced now does not use Transform.TransformMatrix directly (without a function call); Added a significant amount of temporary code to make the scene graph work; Now glm::decompose is used with double precision; Fixed FENaiveSceneGraph::Clear(); Added a temporary FEScene::AddEmptyEntity and TransformUpdate functions; Disabled AABB recalculation optimizations due to scene graph problems.
…un tests; Added a bunch of simple tests for the scene graph; Added IsDescendant and HasCycle functions in the FENaiveSceneGraph class, fixing an issue that allowed cycles to be created in the scene graph; Renamed the class FENaiveSceneEntity to FENaiveSceneGraphNode and updated all functions that contained the word 'Entity'.
…ved scene graph tests; Implemented size_t FENaiveSceneGraphNode::GetImmediateChildrenCount(), size_t FENaiveSceneGraphNode::GetRecursiveChildCount(), and size_t FENaiveSceneGraph::GetNodeCount(); Renamed RemoveNode to DetachChild in FENaiveSceneGraphNode and FENaiveSceneGraph; Implemented proper DeleteNode in FENaiveSceneGraphNode; Improved the handling of the transformation hierarchy in the scene graph node and fixed some issues.
…ot preserve child world transformation, which is needed for glTF scene loading.
…for glm::dmat4; Fixed multiple issues in FENaiveSceneGraphNode and FENaiveSceneGraph; Added GetAllNodes() in FENaiveSceneGraph, which will probably be deleted at some point; Added a first draft of FENaiveSceneGraph::ToJson() function; Added many additional tests for the scene graph.
…e many other small fixes to the glTF loader.
…a simple structure integrity test after saving and loading the scene graph.
…te FEGameModelComponent; Made other fixes for the ECS.
…tancedRenderingComponent to store information from the old InstancedEntity; Introduced FEInstancedSystem to handle other parts of the old InstancedEntity functionality; Shifted almost all processes from using FEEntityInstanced to FEInstancedRenderingComponent; FEVirtualUIContext no longer uses FEPrefab and has been shifted to the new ECS; FENewEntity.h no longer includes FEScene.h for better compatibility; Added GetEntityByEnTT to FEScene for internal usage; Cleaned FEScene of some old functions that were using the old FEEntity.
…ty, FEEntityInstanced and FETerrain classes and files; Renamed FENewEntity to FEEntity; Renamed FEInstancedRenderingComponent to FEInstancedComponent; Introduced FETerrainSystem and FETerrainComponent to aggregate all terrain functionality instead of the FETerrain class; FEResourceManager::LoadFETexture now properly loads GL_R16 textures; Cleaned and moved FEResourceManager::LoadFEHeightmap to FETerrainSystem; Moved all terrain-related functions from FEResourceManager to FETerrainSystem; Improved FEResourceManager::LoadPNGTexture; Added OnComponentConstruct, OnComponentDestroy, and OnComponentUpdate wrappers around the EnTT system, accessible through FEScene; Added FESkyDomeComponent and FESkyDomeSystem; Cleaned the engine from old non-component code.
…names; Renamed 'GetEntityList' to 'GetEntityIDList' to better describe what the function returns; Introduced a templated 'GetEntityIDListWith' function to replace 'GetTerrainList', creating a list of entity IDs with a given component; Added FEScene.inl for better structuring of templated function definitions; Updated FEScene::AddGLTFNodeToSceneGraph to properly use the new entity functionality; Added FELightComponent and FELightSystem to replace the old FELight; FETransformComponent now allows changing position, scale, and rotation in world space, by default, it operates in local space as previously; Deleted many temporary and old variables from FETransformComponent; Renamed FETransformComponent::GetTransformMatrix to FETransformComponent::GetWorldMatrix and added FETransformComponent::GetLocalMatrix; Fixed point and spot light rendering, GPU/CPU memory alignment was incorrect.
… manage component behavior in certain circumstances; Fixed FETransformComponent::SetPosition in !bLocalSpace mode; Added FEComponentsTools class to manage component constraints and requirements; AddComponent in FEEntity now returns bool (instead of T&) based on whether the operation was successful.
…t will not add an entity to the scene graph; FENaiveSceneGraph will now manage its root creation; Fixed FENaiveSceneGraph loading from JSON.
…om the beginning; Renamed FE_SCENE_ENTITY to FE_SCENE_GRAPH_NODE to better reflect its purpose; Renamed FE_NEW_ENTITY to FE_SCENE, which will now be used to represent FEScene; Added a bool argument to FEScene::RegisterOnComponentDestroyCallback to indicate if the callback was called on FEScene.Clear(), as this is important information for some components; Introduced the FESceneManager class to manage the new non-singleton FEScene, this is a very early version and not ready for prime time.
…ne to FESceneManager; FEEntity* now has a GetParentScene() function to help determine which scene should used by other systems; FERenderer::RenderGameModelComponent, FERenderer::RenderGameModelComponentForward, FERenderer::RenderGameModelComponentWithInstanced, and FERenderer::RenderTerrainComponent will now accept FEEntity* instead of components, providing more information for functions (such as the parent scene of the entity); FEScene is no longer a singleton class and now inherits from FEObject; FEScene is no longer a singleton class and now inherits from FEObject. FESceneManager will manage FEScene instances; Added a proper duplication function for FEEntity to not only copy components correctly but also ensure that the entire graph node, along with all children, is copied; Added int MaxSceneComponentCount for additional component creation constraints (default = -1 for unlimited); Fixed FENaiveSceneGraphNode::AddChild to prevent adding an already existing child or itself; Renamed FEInstancedRenderingSystem files to FEInstancedSystem; Added FEInstancedSystem::DuplicateInstancedComponent for proper copying of InstancedComponent; Added FETerrainSystem::DuplicateTerrainComponent for proper copying of TerrainComponent; Added FELightSystem::DuplicateLightComponent for proper copying of LightComponent.
…added the test 'Check_Node_AddChild_Function'; Fixed an issue where FENaiveSceneGraph::DuplicateNodeInternal was not assigning the correct parent scene to the duplicated entity.
…ene::AddEntity to FEScene::CreateEntity, FEScene::AddEntityOrphan to FEScene::CreateEntityOrphan, FEScene::AddEntityInternal to FEScene::CreateEntityInternal.
…classes; Made initial steps to replace old camera classes with the new camera system; Corrected the projection matrix calculations in FECameraComponent, previously, the FOV was considered in radians instead of degrees; Transitioned from using bool bLocalSpace = true in TransformComponent to FE_COORDINATE_SPACE_TYPE SpaceType = FE_LOCAL_SPACE for clarity; Added temporary variables to the engine before the proper input system is implemented; FEngine::AddOnAfterUpdateCallback should replace FEBasicCamera::ClientOnUpdateImpl.
…on-shared compilation; Updated FEBasicApplication; Updated OpenXR from 1.1.37 to 1.1.38.
… the FEBasicApplication update; Added a draft function GetLog() to facilitate singleton exchange across DLL boundaries; Added the ENGINE_HEADERS_ONLY option in CMake, which is still not fully implemented.
…ess macro for singletons, ensuring DLL compatibility; Scripts now will get delta time in updates; Improved the hot-loading subsystem of the native script system; Temporarily exposed engine variables related to inputs; Renamed template<typename T> std::vector<std::string> GetEntityIDListWith() to GetEntityIDListWithComponent(); Renamed template<typename T> std::vector<FEEntity*> GetEntityListWith() to GetEntityListWithComponent(); Added FEFileSystem::CopyFile function; In FEFileSystem, all log calls now utilize the correct FE_FILE_SYSTEM topic; Organized all native script files into one folder.
…nalities; Added FEAssetPackage to facilitate centralized storage of files and other binary information in one file; Extended the functionality of FEFileSystem to ensure other systems have the necessary functionality; Added FE_NATIVE_SCRIPT_MODULE as an FEObject to store FEAssetPackage and other information, ensuring that self-contained script modules have everything required to work in the engine and to create/recreate Visual Studio projects for editing; Scripts can now define if they should be runnable in editor mode; Removed FECoreScriptManager from the engine; User script projects will now use FECoreScriptManager to store and pass script data from DLLs, previously, both the engine and DLLs shared the same class definition, leading to occasional undesired memory overlaps; Both supported camera types are now defined by script camera controllers instead of hardcoded classes; Added CameraScript.fescripmodule as a built-in resource of the engine to bundle up the standard camera controller(need more work, currently will only work with debug or release mode); The native script system is operational but brittle, more time is needed to enhance its stability; Added scene flags to differentiate between editor and game mode scenes; FEScene now has a new flag variable to easily determine scene type; Added FESceneManager::InstantiatePrefab to simplify prefab addition.
…ensure that each build has the correct timestamp available to the engine; Added UpdateTimestamp.cmake to instruct Visual Studio on a pre-build step for creating Timestamp.h; Introduced std::string FEngine::GetEngineBuildVersion() to retrieve the engine build timestamp; Fixed a problem with the compilation of the engine in non-DLL mode; Renamed std::vector<std::string> FEResourceManager::GetPrefabList() to GetPrefabIDList() to better reflect the function's return value; Made extensive updates to ensure FEInput is a usable input system for scripts; FEInput will now use the same callback system as FEWindow in FEBasicApplication, though it should be further improved; Updated FEVirtualUIComponent to work with the new callback system of FEWindow; In all native script-related classes, void OnCreate() was renamed to void Awake() to better align with Unity's naming schema, using it as a reference system; Added a templated FENativeScriptComponent::GetVariableValue() for a more convenient way to retrieve script variable values; Scripting system now preserve user-modified script variables after DLL recompilation; Extended script system support to include not only basic variable types (float, glm::vec3, etc.) but also engine-specific types like FEPrefab, FEMesh, and their std::vector collections; Added a series of templated functions in FENativeScriptSystem to organize the saving, loading, and comparing of script variables; FENativeScriptSystem::InitializeComponentInternal will now properly call the script's Awake() method; If unable to find FENativeScriptModule by ActiveModuleID, the scripting system will attempt to locate it by DLL ID; User scripts now save the engine version and debug/release mode information in the DLL, and the script system will load this information to eliminate some errors; Added functions like template<typename T> T* CastToScriptClass(FENativeScriptComponent& Component) to help get a pointer to a script class in user scripts; Introduced template<typename T> std::vector<FEEntity*> GetEntityListWithScript(FEScene* Scene) and template<typename T> std::vector<T*> GetScriptList(FEScene* Scene) to assist in retrieving needed lists of entities in user scripts; Added GetNativeScriptModuleByDLLModuleID function to FEResourceManager to simplify linking NativeScriptModules to DLLModules. std::vector<FEEntity*> FEScene::GetEntityByTagComponent(std::string Tag) will aid in retrieving needed entities in both engine and user scripts; Improved FESceneManager::DuplicateScene function.
…EViewport class files and decoupled it from FECameraComponent; Deleted deprecated skyDome.h; Fixed an issue where FEResourceManager::Clear() was not calling the correct destructors, only the base FEObject destructor; FEResourceManager::CreatePrefab can now accept an optional scene description; Added std::string FEResourceManager::ReadDLLModuleID(const std::string& DLLFilePath); Updated FEResourceManager::CreateNativeScriptModule; Introduced FENativeScriptConnector and NativeScriptTemplate files, which will be used to initialize user native scripts; FENativeScriptSystem now loads the appropriate version of the DLL based on Debug/Release mode; Improved FEAssetPackage by adding functionality to update/delete individual assets and fixed several issues; Added folder-related functionality to the FEFileSystem class; InstancedComponent should now be initialized only after PrefabInstanceComponent to resolve some loading order issues; Made Json::Value ToJson() of FEEntity public; Updated FEEntity::FromJson to ensure all FEObject fields are initialized correctly; Added a PrefabDescription flag option to FEScene to mark scenes used as prefab descriptions; Added CreateEntityFromJson method to FEScene to simplify loading individual entities; Added FESceneManager::Clear() method to ensure proper cleanup.
…dditional check in FERenderer for correct initialization of the light cascade framebuffer; Renamed some getter functions in FEResourceManager; Improved edge case handling in FEAssetPackage; FENativeScriptComponent will no longer be deleted from an entity if its initialization fails; Added FESceneManager::UnRegisterAllComponentCallbacks to unregister scenes that become inactive; FEScene::SetFlag will now internally call SCENE_MANAGER.RegisterAllComponentCallbacks or SCENE_MANAGER.UnRegisterAllComponentCallbacks depending on the FESceneFlag::Active status.
…ore and manage Visual Studio project data; Removed DLLModuleID from FENativeScriptModule as it is no longer needed; Updated camera script modules.
…ity in static linkage; Renamed RESOURCE_MANAGER.GetEnginePrivateShadersList to RESOURCE_MANAGER.GetEnginePrivateShaderIDList; Renamed CAMERA_SYSTEM.GetMainCameraEntity to CAMERA_SYSTEM.GetMainCamera; Added several helper functions to RESOURCE_MANAGER for creating Visual Studio projects for native script modules (previously part of FENativeScriptProject); Updated the standard camera scripts module; Updated FENativeScriptConnector and FENativeScriptSystem to support static linkage; Moved NativeScriptProject CMake files from Editor to the engine; Updated FEAssetPackage to ensure proper resource packing functionality, some solutions are temporary; Added CopyDirectory function to FEFileSystem; FESceneManager now includes functions to save/load scenes in JSON format; Added functions to FESceneManager to set and get the StartingScene.
…ype is FE_VIEWPORT_FEWINDOW; Renamed Renderer::GetViewport and Renderer::SetViewport to Renderer::GetGLViewport and Renderer::SetGLViewport to differentiate them from FEViewport; Updated SimplifiedRender to support the new camera system's clear color parameter; Updated the camera scripts module; Renamed Registry_ to Registry in FENativeScriptConnector; FENativeScriptConnector will now be part of the engine project if static linkage is chosen; Added extracted camera script code to support cases where the engine is included in other projects with static linkage, this is not an ideal solution but works for now; Renamed NativeScriptProjectData/CMakeLists.txt to NativeScriptProjectData/CMakeLists_Template.txt to better reflect the file's purpose; Moved text replacement functionality from FENativeScriptProject to FEFileSystem and updated function names for clarity.
…; Renamed Parameter and Param in FEShader to Uniform for greater accuracy; Introduced FEShaderUniform and FEShaderUniformValue classes to help manage shader uniforms; Updated FEMaterial to use a more general approach for handling uniforms; Shader system still requires further rework to make it more generalized.
…es to align with overall naming conventions.
…Updated standard camera scripts; Replaced simplified rendering controlled via FERenderer with FERenderingPipeline, now managed through FECameraSystem; Updated FEBasicApplication.
…r and introduced camera temporal jitter to support TAA or thirdparty upscaler; Implemented motion vector calculations as part of the G-Buffer; Introduced camera temporal jitter to support TAA and third-party upscalers; Added a rendering scale option to the Camera component; Renderer no longer directly accesses camera render target parameters to respect the rendering scale; Renamed FE_VIEWPORT_NULL to FE_VIEWPORT_VIRTUAL and set it as the default; Camera component now creates a virtual viewport in its constructor; Renamed FEngine::AddViewport to FEngine::CreateViewport for improved clarity; FEngine::CreateViewport no longer includes ViewportCheckForModificationIndividual to properly trigger viewport resize after creation; Screen space effects are now created using a resolution based on the viewport resolution when a resolution scale is applied; Extended supported formats for FEResourceManager::ExportFETextureToPNG and FETexture::GetRawData; FEInput now correctly sets bLastFrameUpdated for keys; Small README update; Removed some old unused functions.
…restated unresolved ones more clearly; Added new TODO items; Deleted FERenderer::TryToGetLastUsedCameraEntity() and simplified FERenderer interactions with FECameraComponent; Restored correct functionality for FEScene::PrepareForGameModelDeletion and FEScene::PrepareForPrefabDeletion.
…l logging in tests. Updated Google Test from 1.14.0 to 1.16.0. Improved logging messages in FEObject::SetID for better clarity. Added functionality to FEObjLoader and FEResourceManager to support mesh export to OBJ.
… was not properly applied when the engine was the top CMake project; Ensured the FEBasicApplication CMake project is included before checking USE_STATIC_RUNTIME.
@Azzinoth Azzinoth merged commit 34dd4a5 into master Mar 6, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants