Skip to content

[Feature-Request] Support for normal maps #4

@NetroScript

Description

@NetroScript

With TexturePacker you have the option to automatically create a normalmap file which has the same positions + regions for the supplied normalmaps as the texture file. But when using this plugin for godot the normal file which can be also generated is completely ignored.

A simple fix for a spritesheet (which I used in my project now) could be f.e. adding

		if sheet.has("normalMap"):
			var normalsheetFile = source_file.get_base_dir()+"/"+sheet.normalMap
			var normalimage = load_image(normalsheetFile, "ImageTexture", [])
			for sprite in sheet.sprites:
				sprite.filename += "_n"
			create_atlas_textures(sheetFolder, sheet, normalimage, r_gen_files)

after this (This code assumes that the file extensions are trimmed, otherwise you would have to change it slighty)

This also creates "empty" normalmaps (if the original spritesheet had no normalmap for a specific texture) instead of no normalmap at all- I don't know if this would be the intended functionality. Additionally it doesn't really leave room for customisation (if the user f.e. wanted a specific folder for all the normal maps).

But it would be nice if this or something similar was added to the import of spritesheets and tilesets

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions