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

Out dated/Incorrect information in Documentation: Viewport as Texture edition. #10673

Open
UselessToolsWasTaken opened this issue Feb 11, 2025 · 4 comments
Labels
area:manual Issues and PRs related to the Manual/Tutorials section of the documentation enhancement topic:rendering topic:shaders

Comments

@UselessToolsWasTaken
Copy link

Your Godot version: v4.3.stable.steam

Issue description: Out dated/Incorrect information in Documentation

URL to the documentation page: https://docs.godotengine.org/en/stable/tutorials/shaders/using_viewport_as_texture.html

Unfortunately I was unable to find a solution on my side that works within what the Doc says.

The problem comes at the point where you are to add a ViewportTexture to the object. That is simply impossible, as an error pops up informing you "Can't create a ViewportTexture on resources saved as a file. Resource needs to belong to a scene.". I tried a clean slate project, a different scene, whatever else I could think of.

I'm either extremely stupid, or this is simply incorrect information on the Doc.

@UselessToolsWasTaken
Copy link
Author

I am in fact stupid. I think the sleep deprivation has seeped in. I had the F---- Material saved as a file, Disregard. This is such a Catch 22 though, should be made abundantly clear regardless ,BUT not an issue.

@tetrapod00
Copy link
Contributor

Can you point out which lines/paragraphs you think caused confusion and could use some improvement? If there's a common problem here (and in my experience using ViewportTextures is very fiddly), we can definitely change the wording or add a clarification.

@UselessToolsWasTaken
Copy link
Author

I think that specifically here is where the mistake happened for me:


Applying the texture
Now go into the MeshInstance3D and add a StandardMaterial3D to it. No need for a special Shader Material (although that would be a good idea for more advanced effects, like the atmosphere in the example above).

MeshInstance3D > GeometryInstance > Geometry > Material Override > New StandardMaterial3D

Then click the dropdown for the StandardMaterial3D and click "Edit"

Go to the "Resource" section and check the Local to scene box. Then, go to the "Albedo" section and click beside the "Texture" property to add an Albedo Texture. Here we will apply the texture we made. Choose "New ViewportTexture"


There is no information that the Shader/Material HAS to be local to the MeshInstance3D. It doesn't tell you to make one, but if someone who's like me, pre-made a bunch of Materials and Applied them, this will be a headscratcher. The wording of the error is clear-ish enough to finally get it all understood. But the Doc could have a specific warning box or something along the lines, saying "Hey, just make sure that material is right here on this bad boy and not a locally saved file" you know?

@tetrapod00 tetrapod00 added enhancement topic:rendering area:manual Issues and PRs related to the Manual/Tutorials section of the documentation topic:shaders labels Feb 11, 2025
@tetrapod00 tetrapod00 reopened this Feb 11, 2025
@tetrapod00
Copy link
Contributor

Great, thanks for the clarification and suggestion! I'll see if we can improve this somehow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:manual Issues and PRs related to the Manual/Tutorials section of the documentation enhancement topic:rendering topic:shaders
Projects
None yet
Development

No branches or pull requests

2 participants