Skip to content

Bake autoshader #727

@TrevorBlythe

Description

@TrevorBlythe

Description

Autoshader eats a good chunk of fps even though its not really changing I feel like you should be able to just bake it and not have all that fps drop.

Also: when you bake into a mesh, its missing the texture.

Activity

TokisanGames

TokisanGames commented on Jun 20, 2025

@TokisanGames
Owner

The "autoshader" portion of the material is quite inexpensive. It takes about 0.04ms or 3% of the 1.3ms on my 3070. However, if that's too much for you, you can turn it off and manually paint the same thing with the slope filter on the brush in a few minutes. Or you could write a script to use the API and bake it yourself (applying your own slope calculation, which you can copy from the shader) in 30 minutes or so.

The array mesh is not missing a texture. There is no texture. The arraymesh isn't there for you to use like a normal object. It's not an optimal mesh. It's there for you to use as reference. Perhaps you want to bring it in to blender to do set your scene, or into houdini to align with procedurally generated mountains. If you need it as a mesh, you can take it into blender and remesh it so it's a bit more optimal. Then you could add UV maps and consider using it as a regular object. But you should know what you're doing and why you want to do that.

TrevorBlythe

TrevorBlythe commented on Jun 20, 2025

@TrevorBlythe
Author

Maybe my PC trash, autoshader takes up like 30 out of my 200 fps and I really need optimize it for low.

If I wrote a script to bake it would you add it to the library ? Maybe as a node in the demo? I already wrote a script for a node to generate random noise terrains in the editor.

TokisanGames

TokisanGames commented on Jun 20, 2025

@TokisanGames
Owner

To do it right, you could make a PR and add it to the Terrain3D menu. Follow along with one of the others there, like directory setup or the other bakers, not the channel packer. "Bake Autoshader..." is fine.

If that's too complicated, you could make a PR, adding a script in the extras directory.

If that's still too much, you can add a script here and someone can add it in later.

To be optimal, use the Base texture mostly, but use the Overlay and blend values on the edges to blend. Use the shader as a guide as it uses the channels.

Regarding terrain genreation, see #101. It should be in the menu and will be eventually. You're welcome to make it happen.

added
enhancementNew feature or request
ideaJust an idea, which may or may not be implemented
on Jul 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestideaJust an idea, which may or may not be implemented

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @TokisanGames@TrevorBlythe

        Issue actions

          Bake autoshader · Issue #727 · TokisanGames/Terrain3D