Giter Club home page Giter Club logo

assetpipeline's People

Contributors

bxy176179 avatar chaosxdemon avatar gochenryan avatar hinageshi01 avatar ovoaovo avatar t-rvw avatar vtui22 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

assetpipeline's Issues

[Geometry DataStructure]

Current one is simply faced based index mesh.
Edge based data structure is preferred to process geometry algorithm.

References:
CGAL
GeometryCentral
MeshLib
OpenMesh

[Terrain] Sectorize terrain serialization

Description

Currently we serialize all terrain mesh into a single binary file with ending cdbin. This contains the entire scene and it won't scale with increased number of sectorized terrain meshes. Instead, we should seek to create a terrain specific type that may store sectors in different files that gets loaded into the scene based on need.

Success Criteria

  • Create a stand-alone class that would contain all terrain metadata. This should have the ability to load those meshes.
  • This stand-alone class need to be reflected in SceneDatabase for AssetPipeline and RenderDataContext in the engine.
  • The engine should contain logic to decide when to load these files and update the internal mesh data to send them for rendering.

[GenericProducer] import camera related data

For dcc files, models are not always in the (0, 0, 0) world position. So we need to adjust engine camera to frame all models' bbox which we want to view at the same time.

Another way is to import camera data so we can adjust runtime camera according to dcc scene's info. It is more convenient for us.

@Hinageshi01

[MaterialType] defnitions and serializations

What we have for now

MaterialImpl.h:

MaterialID m_id;

Each Mesh has a MaterialID, which can get a Material from SceneDatabase.

std::string m_name;

Name of Material.

TextureIDMap m_textureIDs;

Each Material has a std::map<MaterialTextureType, TextureID>, which can get TextureID by specified MaterialTextureType.
After that we can use TextureID to get a actural texture path from SceneDatabase.

What O3DE have

At the begining, we can refer to the BasePBR material type of O3DE.
BasePBR.materialtype

An explanation of the properties can be found here:
PBR Shading Model

Each PropertyGroup has several property and each property has several attribute including:

  • id
  • name
  • description
  • type
  • default value
  • a link to a variable in one of the shaders referenced by the .materialtype file.
  • ...

The icon √ means that it's necessary for us to serialize this property.

BaseColor

BaseColorPropertyGroup.json

properties:

  • color √
  • factor √
  • textureMap √
  • useTexture √
  • textureMapUv
  • textureBlendMode

Metallic

MetallicPropertyGroup.json

properties:

  • factor √
  • textureMap √
  • useTexture √
  • textureMapUv

Roughness

RoughnessPropertyGroup.json

properties:

  • textureMap √
  • useTexture √
  • textureMapUv
  • lowerBound
  • upperBound
  • factor √

Specular

SpecularPropertyGroup.json

properties:

  • factor
  • textureMap
  • useTexture
  • textureMapUv
  • enableMultiScatterCompensation

Normal

NormalPropertyGroup.json

properties:

  • textureMap √
  • useTexture √
  • textureMapUv
  • flipX
  • flipY
  • factor

Uv

UvPropertyGroup.json

properties:

  • center
  • tileU
  • tileV
  • offsetU
  • offsetV
  • rotateDegrees
  • scale

Irradiance

IrradiancePropertyGroup.json

// Note: this property group is used in the DiffuseGlobalIllumination pass, it is not read by the shaders

We can ignore this PropertyGroup for now.

General Settings

GeneralCommonPropertyGroup.json

properties:

  • doubleSided
  • applySpecularAA
  • enableShadows
  • castShadows
  • enableDirectionalLights √
  • enablePunctualLights √
  • enableAreaLights
  • enableIBL √
  • forwardPassIBLSpecular

How can we expand our Material Sysyem

#122

[OBB] Generation algorithms

GameEngineGems 2 - Chapter 1 Fast Computation of Tight-Fitting Oriented Bounding Boxes

  • AABB
  • OBB by DiTO-k : Ditetrahedron OBB algorithm
  • OBB by PCA

[Terrain] Optimize Elevation Map

Currently we generate elevation at every single vertex unit even when there isn't a vertex being rendered; While this is high resolution and may be useful to run interesting algorithms, it is not optimized for rendering. This issue is opened to optimize the generation such that it is 1:1 even when inter-vertex length is > 1.

[SceneDatabase] add Asset related info for editor only

Currently, class Mesh/Material/Texture contains a source file path to describe where the source asset was from.

We should adjust and save more info:

  • class Asset
    • used Prodcuer class names
    • UTC timestamp when the asset was imported
    • filepath but only file base name is OK, no need to save absolute path
    • what is the display label name in editor
    • md5 hash(unique number for a file)

These data needs to serialize and deserialize only for Editor.
So CatDogConsumer should read class Asset data if it is used in editor, but doesn't read it if it is used in engine.
Generated .catdog.bin should also keep smaller size without class Asset if it is used in the final stage to generate game release package. If not, it can just save all data for editor and engine.

Reference:

  • UnrealEngine - struct FAssetImportInfo and class UAssetImportData

[CatDogProducer/Consumer] Split data struct codes back to themselves

Currently, we need to implement serialization and deserialization codes inside CatDogProducer and CatDogConsumer. And, we need to keep them in order.

So we can split the implementations back to data struct. For example, void Mesh::ImportBinary(const std::fstream&) and void Mesh::ExportBinary(std::fstream&). When designing the data struct, we can implement it if necessary.

To do it more generally, we can design an interface class ISerializeable. It has virtual void ImportBinary(const std::fstream&) = 0 and virtual void ExportBinary(std::fstream&) = 0. All classes which need to do things about serialization should inherit from this interface.

Or try to use CRTP trick in template programing.

So every data struct inherited from ISerializeable is TDerived. For example, they are mesh/material/texture/... in current codebase. We can combine Array<TDerived>+ TDerived::ImportBinary + TDerived::ExportBinary as an item. Every item will be in a list in order. So we can save effort on keeping an eye on Producer and Consumer if their orders are same.

[MeshRenderDataGenerator]

We already had some math shape classes. Then we need to a generator class to input a math shape to output a mesh which has vertex format, position/normal/uv, index buffer so that game engine can use these data to draw it directly.

[Terrain] Support different LOD of terrain generation

Description

Currently terrain meshes can be generated in sectors but they all of the same LOD. This issue covers the effort to generate different LOD or resolution of meshes such that they can be swapped out during rendering time.

Success Criteria

  • Each terrain mesh have their LODs generated.
  • Each terrain mesh must be compatible with their lower and upper LOD mesh (ie no gaps).

[Terrain] Basic multi-texture support

Description

Currently terrain generation supports only one tiled texture. A simple way to support up to 4 texture is to use the color attribute of vertices with each channel indicating the blending of 4 different textures. Note this doesn't have to be the vertex attribute but can also be an output texture that's sampled at rendering time.

Success Criteria

  • Support 4 textures for terrain to be rendered.

[Preprocessor] Requirement about EnumToName

Define an enum can generate const char* GetXXXName(EnumType e) method automatically.

The first version I implemented is:

// Generate names for enum automatically.
#define DEFINE_ENUM_WITH_NAMES(EnumName, ...) \
	enum class EnumName { __VA_ARGS__, Count }; \
	constexpr std::array<const char*, static_cast<int>(EnumName::Count)> EnumName##Names = { #__VA_ARGS__ }; \
	constexpr const char* Get##EnumName##Name(EnumName enumValue) { return EnumName##Names[static_cast<int>(enumValue)]; }

But #__VA_ARGS__ will convert all enums to a single string. For example, Enum class Foo { A, B, C }; will get "A, B, C". So I need to split by comma in compile time or have a better preprocessor than macro.

After some searchs, I can use BOOST_PP_SEQ_FOR_EACH_I in boost. Or use static reflection lib about enum process such as https://github.com/Neargye/magic_enum.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.