My Neat 2D World Generator Doesn't Seem to Work in 3D Beyond Editor

Godot Version

4.6.stable

Question

I don’t work with 3D very often due to this, just looking at the inspector is daunting, theres like dozens of different things to try to get it working…

Anyway 5 years ago I made a little world generator for CS50 and just recently I found the extra assets I made for it, so I’m working on it and the idea comes up to try fudging it into 3D - it worked! In the editor…

Basically it works like I read in the docs, take 3D model MeshInstance, change Albedo’s texture to ViewPortTexture. Set the world as a child, as you can see below. But it’s not taking in game, here’s the result.

Here’s the result: underwhelming.

Not sure where to start, so asking here. It says it did the work via the print statements.

Wow if I had a nickel (and I do) for every time I asked for help and then figured it out randomly, I’d have atleaast 2 nickels just from this site:

extends MeshInstance3D

func _ready() -> void:
	self.mesh.material.albedo_texture = $SubViewport.get_texture()