Hello, I make a small example with tcastlebox, I put color to FFFFFF, but the image isn’t white, take a look
What am i doing wrong?
Thanks
/BlueIcaro
Hello, I make a small example with tcastlebox, I put color to FFFFFF, but the image isn’t white, take a look
What am i doing wrong?
Thanks
/BlueIcaro
No lighting? You can set emissive color to be regardless of lighting.
It does indeed seem that the box is black because no light shines on it.
In case of TCastleBox, and using it for 2D games (which typically have no lighting), switch the Material
from pmPhysical
to pmUnlit
. Then the Color
(whether it is white or something else) will be correctly visible (it will be used as TUnlitMaterial.Emissive
internally).
The alternative solution is naturally to add some lights, e.g. add TCastleDirectionalLight with direction (0,0,-1). But this is likely unnecessary if you really don’t want to care about lighting – in which case using “unlit” for everything is simpler and more efficient. 2D games typically use “unlit” for everything.
Note: You can check out how a new “Viewport (2D)” component is set up (create new project with "Empty’ template, open view, add “Viewport (2D)”), it has TCastlePlane with unlit by default.
Thanks for all replies. I don’t use lights in 2D, I thought I did not need them
I trying to reply the game pong (Pong - Wikipedia). So I will the option Material = pmUnlit
/BlueIcaro