Skip to content

Change "Advanced Import" to a stack of post-processing steps which transform the Resource #5931

@antonWetzel

Description

@antonWetzel

Describe the project you are working on

Game with 3D assets from Blender

Describe the problem or limitation you are having in your project

I can only replace existing Materials with Godot-Materials in the import process.

The current Advanced Import only allows for general changes

  • if you have a Meshinstance, you can skip it or generate physics
  • if you have a Mesh, you can generate shadows
  • if you have a Material, you can replace it

Related Issues and Requests

Describe the feature / enhancement and how it helps to overcome the problem or limitation

My idea for an alternative would be a stack of scripts (builtin or user written), which get a Resource, calculate avaible options based on the Resource (this specific Resource, not the general Type) and can return a modified version.
(The current "Advanced Import" only is for PackedScenes, but this would work for every Resource if the Preview can render them (and handle the imput))

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

  • The base importer tries to replicate the source as close as possible.
    • Blender would not remove the unique digits, but replace the dot because it is invalid
  • The user would stack steps he wants to perform to get the final result
    • Blender maybe has ['Blender', 'Remove Number Suffix'] as default
  • Selecting a step renders the result and the options are visible

Example

  • The first step is selected, the result of the start is previewed
    • the options are for the current step, which is the Blender Importer
    • image
  • The last step is selected, the result of the whole Stack is previewed
    • the options are for the current step, which is the suffix remover without options
    • image

Advantages

  • As long as the preview can handle the type, this would work for every Resource and conversion between resources
    • blender file: remove a node, replace 2 materials and then convert to a meshlibrary
    • svg: convert to Texture2D with size, fix alpha border and then convert colors
  • the user could add a script for more exotic conversions
    • Render the Mesh from 16 different angles and save the result as a AnimatedTexture2D

If this enhancement will not be used often, can it be worked around with a few lines of script?

Not possible

Is there a reason why this should be core and not an add-on in the asset library?

Not possible

Does someone wants to do the work

I could try to implement this proposal

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions