ScratchData LogoScratchData
Back to uiopscratch327's profile

Marching Cubes Caster (kind of)

UIuiopscratch327•Created December 4, 2021
Marching Cubes Caster (kind of)
238
207
3226 views
View on Scratch

Instructions

WASDQZ & Arrow Keys or Mouse F to add stuff, R to destroy stuff, Use the Numbers 0-6 to generate different terrain. Press P and H to show/hide parameters. If you set the camMovment to 1, you can walk around!

Description

https://turbowarp.org/611497337 Terrains (Press on keyboard): 0-2: random noise at different scales 3-4: sphere 5-6: ground ViewModes: 0-1: test colors 2: shadow 3: strange / bounds 4: normals 5: Diffuse 6: Phong model (Diffuse + Reflection + Ambient) 7: Textured (Color, Roughness & Normal) size: how big the world is (size)^3 dTime: how fast the directional light rotates wide: how wide to render BG: different backgrounds GridStep: adds the Motion Blur/sharper if stationary Resolution: how many rays/frame (squared) It is not exactly marching cubes, It only uses bilinear interpolation on rays to see where it intersects. It is kind of a ray-marching deal in that it marches through each voxel, and sees if the start and end point both lie outside the interpolation of the four corners of the square. It is not a traditional ray marcher in that there is no distance formula, and it basically raycasts through each march. It was fun implementing phong shading and procedural noise maps.

Project Details

Project ID611497337
CreatedDecember 4, 2021
Last ModifiedDecember 15, 2021
SharedDecember 15, 2021
Visibilityvisible
CommentsAllowed