PopcornFX v2.18

Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
  1. Home
  2. Docs
  3. PopcornFX v2.18
  4. Editor UI
  5. Rendering interface editor

Rendering interface editor

Overview

The rendering interface editor is opened when double-clicking on an asset of type “rendering interface” (with the “.pkri” file extension) inside the content browser.

This is the window that allows you to edit rendering interfaces, which can then be used to compose materials / feature-sets.

Renderer Interface Editor
.pkri files editor

A minimal UI is available for editing rendering interface files (.pkri).

When editing a custom .pkri file, there are three parts to consider:

  • What rendering features should be available to the project
  • What are the properties of those features (per particle data, constants, ..)
  • What data PopcornFX Editor should send to the shader if that feature is enabled (only required for in-editor rendering or if your engine integration uses PK-SampleLib’s RHI implementation to render particles)

Rendering features

Rendering features

  1. Rendering interface name (only used for display in the material editor)
  2. Rendering features list
  3. Creation dialog

This list displays every features defined by this rendering interface file.

Rendering feature

Rendering feature properties

  1. Rendering feature properties, this order determines the order in which they will be displayed in the renderer’s detail panel
  2. Creation dialog
  3. PopcornFX rendering only (PK-SampleLib’s RHI implementation)

When selecting a feature from the features list, its properties are displayed.

Rendering feature property

Rendering feature property

  1. Description that will be displayed when hovering that property in the renderer’s detail panel
  2. How that property should be displayed in the UI and named when retrieved in code
  3. Whether it’s an image, color, .. not all property types are supported by PopcornFX Editor shaders
  4. Property type (Note: only Link and Property are valid types):
    1. If Link, this is a per particle value
    2. If Property, this is a per renderer value (constant)
  5. Property category, is it not allowed to leave this empty, to have properties/pins displayed without a parent category, use “General
  6. Default value, will depend on the property’s Exported Type
  7. Pin visibility rules: allows to display that property under conditions

When selecting a rendering feature property, its properties are displayed.

 

IMPORTANT: The UI allows to modify various properties (Custom Name, Active, Exec Stage, ..) that are not used internally. You should only modify properties numbered above. The UI for editing rendering feature properties will be improved in future versions.

 

Note: Some rendering feature properties (ie. Diffuse.DiffuseMap) are setup as “Link” while this is a draw call constant. This is only to enable the value to be exported to parent graphs. Data types are special cases and will end up being a renderer property once the graph is compiled. Only numeric values are expected to be per particle values (Float1, float2, ..).

Rendering feature shaders infos

Rendering feature editor rendering

  1. Determines which vertex data should be available in the vertex and fragment shaders
    1. UseUV: Mesh / Billboard / .. texcoords will be passed to the vertex and fragment shaders. Texcoords can be generated (on CPU / GPU for billboards and ribbons) or directly loaded from the source mesh.
    2. UseNormal: Vertex normals should be passed to the vertex and fragment shaders (ie. lighting operations). Normals can be generated (on CPU / GPU for billboards and ribbons) or directly loaded from the source mesh.
    3. UseTangent: Vertex tangents should be passed to the vertex and fragment shaders (ie. lighting operations). Tangents can be generated (on CPU / GPU for billboards and ribbons), directly loaded from the source mesh or generated.
    4. UseMeshUV1: Mesh Texcoord1 set should be passed to the vertex and fragment shaders. Only available for mesh renderers.
    5. UseMeshVertexColor0: Mesh Color0 channel should be passed to the vertex and fragment shaders (ie. VAT materials). Only available for mesh renderers.
    6. UseMeshVertexColor1: Mesh Color1 channel should be passed to the vertex and fragment shaders (ie. VAT materials). Only available for mesh renderers.
  2. Determines which scene samplers are available in the fragment shader
    1. SampleDepth: Scene’s depth texture will be sampled (ie. lighting operations, depth fade features)
    2. SampleNormalRoughMetal: Scene’s “normal/roughness/metalness” texture will be sampled (ie. lighting operations)
    3. SampleDiffuse: Scene’s diffuse texture will be sampled (ie. lighting operations)
  3. UseSceneLightingInfo: If true, scene lighting informations (directional light, ..) will be available in the fragment shader (ie. lighting operations)
  4. Determines which rendering feature properties (constants) should be available in the vertex and fragment shaders. Values are string values that should be properties from this rendering feature (data properties or scalar/vector properties). Supported property types (Exported Type) are:
    1. dataImage (InputType must be Property or Link). If InputType is Link, this property will be visible as a renderer pin, allowing better graph customization.
    2. int, int2, int3, int4 (InputType must be Property)
    3. float, float2, float3, float4 (InputType must be Property)
  5. Determines which textures should be flagged linear. By default, all textures are flagged sRGB.

 

If in doubt, contact support@popcornfx.com.

Was this article helpful to you? Yes No

How can we help?