3
2013
2D Grid Fake Shadow
Using the same code from previous 2D Raycasting Visibility Voxel Travelsal, but added dynamic grid array update (using screenshots..), so now the walls (obstacles) are updated realtime on the 2D grid.
FEATURES:
– Converted the whole thing to C#
– Any object visible to camera can block visibility (particles also, with adjustable alpha or color..see image#2, threshold was 0.15)
– Adjustable obstacle scan (in webplayer demo 3.0, tree casts shadows only from the trunk part, not as a whole object)
– Adjustable ray & shadow step resolution
TODO:
– Using GetPixel..change to GetPixels() Done
– Make resolution adjustable (now its fixed size, 320×320 obstacle grid texture, thats why webplayer is 320×320 also) Done
– Could try this same method with the previous fake shadow shader (had problems getting a dynamic obstacle map back then..)
– Dynamic resolution? (near player = fine, far = coarse?), then scanning should be faster?
– Fade out based on distance (could be done in shader also..)
Webplayer:
http://unitycoder.com/upload/demos/VoxelTravelsalShadow/ (v2.0)
http://unitycoder.com/upload/demos/VoxelTravelsalShadow2/ (v3.0)
—
Image#2: Also particles can cast shadows (or anything that is visible to the camera..)
Related Posts
1 Comment + Add Comment
Leave a comment
Recent posts
- MotionVector Effect: Object “disappears” when paused
- [GreaseMonkey] Unity Forum Fixer
- UnityHub: Make Hub application background Translucent
- Customize SpriteShapeRenderer quality (but has issues)
- Editor tool: Copy selected gameobject’s names into clipboard as rows (for Excel)
- Editor tool: Replace string in selected gameobject’s names
- UnityHub: Enable built-in Login Dialog (no more browser login/logout issues!)
- Use TikTok-TTS in Unity (with WebRequest)
- Create Scene Thumbnail Image using OnSceneSaved & OnPreviewGUI
- webgl+javascript TTS
- Using Moonsharp (LUA) + Unity Webgl
- Using 3D gameobject prefabs with Unity Tilemap + NavMesh Surface
Recent Comments
- [Asset Store] Point Cloud Viewer & Tools on
- [Asset Store] Point Cloud Viewer & Tools on
- Vector3 maths for dummies! on
- UnityHub: Make Hub application background Translucent on
- UnityHub: Make Hub application background Translucent on
- Install Android SDK+JDK+NDK for Unity (without AndroidStudio or Unity Hub) on
- Install Android SDK+JDK+NDK for Unity (without AndroidStudio or Unity Hub) on
- [Asset Store] Point Cloud Viewer & Tools on
Do you plan on release this little experiments you make as open source? It would be great for those looking to see how you accomplished things 😉