Ability for `BasePart` to be able to cast shadow while fully transparent

Currently, it is impossible for any type of BasePart to cast shadow when it is invisible.
Making some model cast shadow while all its constituent BaseParts are invisible (transparency = 1)
is especially useful when dealing with FirstPerson camera settings.
Where, our First Person view model is completely different from the Third Person view model.

We don’t want to see the Third Person view model because it will overlap and obstruct the camera vision and we want to see the first person view model only.
Disabling shadow for the first person view model is as simple as setting CastShadow to false.
But its not currently possible for the third person to cast shadow while being invisible.

Adding a property for BasePart such as AlwaysCastShadow/CastShadowWhenTransparent that either has true or false as its value.

Or going much further, Roblox could add a number property such as TransparencyForCastingShadows whose value range from 0 to 1 much like the Transparency property, but that shadows casted by the BasePart will be casted as if the Part’s Transparency be that.
For example, the transparency of a BasePart is 1 (invisible), and the TransparencyForCastingShadows is 0.5. Therefore the casted shadow will be much lighter than if it was fully opaque, somewhere in between of the shadows casted by a fully opaque object and one with 0.9 transparency.

Now, about the use cases.
In any game, shadows play an important role, greater or lesser depending on the type of the genre.
A lot in competitive FPS/Hide N See games or games in which keeping our position secret from the opponents matters a lot.
While very negligible in puzzle/obby/arcade games.

Lets take the example of a famous competitive game, Counter Strike 2.
In this game, on certain maps, it is possible to give away our position to enemy even when they cant see us because of shadows.
So the players must be aware of their shadows and where they are being casted too.

To achieve this, the game shows them the shadow of their Third Person model, and not the First Person model, because its the Third Person that the enemy is gonna see.
Also, to note that the game doesn’t render the third person model to the player who is playing with that character in game.

In Roblox, this is done by making the third person model’s all BasePart’s Transparency to 1.
And the engine doesn’t render the shadow too.
This is why, as mentioned above, this feature is absolutely necessary to be added to achieve this specific mechanic of shadows.

Also to make up for the formalities as said by How to post a Feature Request topic that tells the format for making a feature request.
Here’s how if this issue is addressed, it would improve my development experience because
it would allow me to make a certain type of game mechanic involving shadows as mentioned above that would in turn make the playing experience better for players where they get feedback for even the smallest actions they make in game.

Thats all! Thank you for reading, excuse me if I made any grammatical mistakes, I am not even that good in english.

35 Likes

ShadowTransparency would probably be a better property name than TransparencyForCastingShadows, and perhaps UseShadowTransparency instead of AlwaysCastShadow to allow it to be used with opaque parts as well.

10 Likes

At this point, I’d even take shadows only taking Transparency into account and ignoring LocalTransparencyModifier. The latter’s so infrequently used that I’m pretty sure even the camera scripts don’t use it any more, so it shouldn’t be a breaking change.

5 Likes

It should be for transparent surfaceappearances too

3 Likes

Reply for bumping up the request

3 Likes

Bumping this, we need this. (please)

4 Likes

Can engineers just read this? Bumping it again.

1 Like

A bump, again

2 Likes

Yes, this would be a really useful feature, especially for all the horror game devs out there!
Though instead of that, it would be nice if we get a ShadowTransparency property, which ranges from 0 to 1, and you can do some really cool tricks by setting its Value to negative 10, like we have with ColorCorrectionEffects.

Edit: A ShadowColor property would also be pretty cool!

would love this feature, can an engineer please read and respond?

it will very cool but ofc and i would like use that for shadow of own character but well they are dont will notice it and dont will add it, sad we can use only bug and it will work only for windows and android correctly (any apple device have a issue with that ofc).

put a forcefield with transparency -inf and get exact same effect

1 Like

You can already do this, just take a part, put its transparency to infinity by just holding the “9” key, then add a highlight to the object and disable said highlight

Your method makes the object look solid on mobile

I agree with this feature request.The ability for ‘BasePart’ to be able to cast shadow while fully transexparent would be great.It would be great for designing some good shadows there and over there, making our buildings look cooler.I hope Roblox Corporation adds this one day.Thanks for reading.

1 Like

But still, an api function will be much better and self explanatory than some hacky way of doing it whose knowledge is hidden in the shadows of some old dev’s minds which will become lost media overtime.

TLDR; i tried making my response sound cool, if it doesn’t make sense, I meant that they should add a property to the api, in simple terms.

Also it doesn’t work on MeshParts.

It does, I just checked, but I do aggree with you that they should make it a feature

Bump, we need this.

Currently the only way to do it is with a ForceField part with a negative transparency of -(2 ^ 1024).

This currently only works with DirectX and completely fails under OpenGL for mobile. Unsure how it affects Metal and Vulkan.

I was just thinking about this feature a few weeks ago! This would be super helpful, and also it would be neat if they was a variable darkness for shadows (right now there’s either a shadow or there isn’t)

(sorry didn’t mean to reply)