Hi devs. A few hours ago i remembered that one guy from some another game made working camera, which can print an image according on thing in front of it. And the i asked myself - why don’t recreate it in studio?
And after hour of work i made it:
Yes, it absolutely not looks like a camera, but it works
How it works:
Basically we moving that cube in top right corner along all of big part, and on every move step raycasting from this cube.
If raycast find something, we take position of cube at the moment and painting “pixel” on surface gui according to Raycast.Instance.Color
How to set it up:
Type in console require(workspace.UltraHDCamera.ModuleScript):Generate()
to add “pixels” to surface gui.
Or require(workspace.UltraHDCamera.ModuleScript):Destroy()
to destroy all pixels
Pixel size sets by changing CellSize
property in UIGridLayout inside Surface gui
When you’re done, put something in front of camera and run the game.
After launch will be incredible lags, don’t worry studio won’t crash (most likely), because code giving itself time to rest.
Notes:
I didn’t used CFrame or any transformations, so camera will work strange if you rotate it.
If you added or destroyed frames and didn’t do any other actions, don’t press CTRL + Z
If studio crashing, add task.wait()
in main script
Model
Camera.rbxm (8.5 KB)
Unfortunately i can’t get better quality render cuz my pc was about to explode on 200x200 px
Try to imagine, our pc doing this 60 times per second with with hundred times better quality