Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MaterialType] defnitions and serializations #112

Closed
Hinageshi01 opened this issue Feb 3, 2023 · 0 comments
Closed

[MaterialType] defnitions and serializations #112

Hinageshi01 opened this issue Feb 3, 2023 · 0 comments
Assignees

Comments

@Hinageshi01
Copy link
Contributor

Hinageshi01 commented Feb 3, 2023

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

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

No branches or pull requests

1 participant