Problem: Partial Objects Visibility - Creating a Darkwood-Style Camera

Introduction

This Text Is Translated :

I attempted the challenge of creating a Darkwood-style camera system in Roblox. The result? Roblox isn’t quite ready for this type of camera system yet. Let me walk you through my journey of exploration and the challenges I faced.
What is a Darkwood Camera System?


Link:Recreating Darkwood’s Vision Effect in Unity

For those unfamiliar, Darkwood’s camera system revolves around two key elements:
• Objects in the game world
• Areas of visibility
Objects appear partially in the visibility area. By default, objects outside this area are darkened, while those within it show proper detail. This creates the signature restricted cone of vision that makes Darkwood’s atmosphere so tense and immersive.
Implementing in Roblox: Initial Planning
If we were to implement this in Roblox, we would need to create 2-3 folders or separations:
1. For moving objects like mobs
2. For actual map objects
3. Potentially for hallucination map objects (since Darkwood has hallucinations when outside visible areas)
The movement part might need separation if you want to create a “last memory” effect where you can see the last position you saw a mob. However, this feature isn’t in the original Darkwood, so it could be omitted.
This leaves us with:
1. Actual map objects
2. For moving objects like mobs
Initial Approach: Shadow System
Using Roblox’s default shadows wouldn’t work as they become unusable if players change their graphics settings. We needed something more complex and reliable.
Attempt 1: UI Gradient
2

I initially thought about using UI gradient. While searching, I found a script called “DistanceFade” that creates a transparency falloff effect. It seemed perfect until I discovered a critical flaw - it only works on square part faces, making it useless for our purpose.
3
Link:DistanceFade - A transparency falloff effect for your games - Resources / Community Resources - Developer Forum | Roblox

I spent three days developing new code based on DistanceFade before realizing this limitation. It turned out what I saw was just an image creating an illusion, not an actual gradient effect.
Understanding the Mesh vs. BasePart Difference
It’s important to note that there are significant differences between meshes and baseparts in Roblox, which affects how visual effects can be applied to them.
Attempt 2: AssetsService, Editable Image, and Mesh


Link:EditableMesh full tutorial Roblox Studio
After the UI gradient disappointment, I found the AssetsService, Editable Image, and Mesh. This approach creates a reset effect based on the part’s position in adjacent meshes.

I was initially excited - what if we could control the mesh to show only part of it? This seemed like the solution!
Unfortunately, Roblox limited this service to only work with meshes created by you. If you want to use meshes created by player accessories, it won’t function.
Attempt 3: EditableImage
While exploring alternatives, I found Asrobox’s EditableImage flashlight test. It creates a similar effect but has a major flaw - it only works for meshes when using DrawImageProjected.
We still faced the same problem of creating a system that works for any object.


Link: EditableImage flashlight test

I honestly don’t know how his code is, but what if it had an image or surfacegui like DrawImageProjected would handle it? We can also have the system clone the object, enlarge it so that it is above the original object and the light serves as a means of removing the dark area created…

But the problem remains the same using the
DrawImageProjected would need you to have permission from the mesh
Other Considered Solutions
I explored several other approaches:
1. Custom Mesh System: Create an editable mesh for all workspace objects to darken them, then modifying vertices to show what’s underneath as visibility. This was discarded due to poor optimization and limitations on mesh dimensioning. I considered raycasting for each object before defining its darkened mesh, but questioned its viability.
2. Highlight System: Quickly abandoned due to the limitation of only 31 highlights at once.
3. Custom Shader: Guaranteed poor optimization, and beyond my current skill level.
4. GeometryService: Cloning objects and using GeometryService to delete parts of them. Discarded because GeometryService only works with parts. that’s what I understood at least…
5. Camera Darkening with EditableImage: Updating the player’s camera with an editable image to darken it. This idea wasn’t tested. and was immediately discarded because editable image has limitations

Conclusion
This has been my saga in attempting to recreate Darkwood’s camera. I could potentially use meshes like Asrobox did, but there are numerous restrictions to overcome. The ideal system should support partial visibility for:
• SurfaceGUI
• Decals
• Textures
• Images
• Parts
• Meshes (both external and custom)
• OBJ
I’m not saying it’s impossible - it’s clearly possible with limitations. However, the complexity has exceeded my current ideas and capabilities. After spending five days on this problem, I’m exhausted and without a clear path forward. I was particularly disappointed when I realized the limitations of editable mesh.
Thank you for reading about my journey. If anyone has insights or alternative approaches, I’d be grateful to hear them.
Legal Notice
The images and references are examples for studying the Darkwood camera theme. No permission was obtained for referential use. If necessary, please contact SLoorieL@Gmail.com for removal of references used.

  1. What do you want to achieve? Keep it simple and clear!

Any idea or path maybe even example that it is possible to create a camera system in the style of Darkwood
I… I just don’t know which way to go anymore…

  1. What is the issue? Include screenshots / videos if possible!

Above, I hope you understood the problems between basepart and mesh permissions, I thought about it from here… but it would be poorly optimized… >
Link: https://www.youtube.com/watch?v=ShGKldOZyMo

  1. What solutions have you tried so far? Did you look for solutions on the Developer Hub?

I searched, but there are only 3 comments on the forum about Darkwood one about a guy talking about the camera, maybe he came to the same conclusion as me, another about applying weight to the player when holding an object, another commenting on the horror of Darkwood

1 Like