2

I Am New To Ursana Engine And I Don't Know It Properly. But I Can Make Games In It. But The Problem Is That My Game Doesn't Have Any <Shadows, Glow, Lighting or Bloom>. So My Game Looks Dead.

Is There Any Way To Make My Game Look Good Using <Shadows, Glow, Lighting and Bloom> In Ursana Engine?

Rabbid76
  • 202,892
  • 27
  • 131
  • 174
Josh4Help
  • 33
  • 1
  • 5

3 Answers3

6

You have to import shaders from ursina and then apply directional light.

from ursina import *
from ursina.shaders import lit_with_shadows_shader 

app = Ursina()
EditorCamera()
Entity(model='plane', scale=10, color=color.gray, 
shader=lit_with_shadows_shader)
Entity(model='cube', y=1, shader=lit_with_shadows_shader)
pivot = Entity()
DirectionalLight(parent=pivot, y=2, z=3, shadows=True, rotation=(45, -45, 45))

app.run()
Tanay
  • 561
  • 1
  • 3
  • 16
3

You have to add lights and also apply lit_with_shadows_shader to entities that will receive shadow.

See more here: https://www.ursinaengine.org/cheat_sheet.html#DirectionalLight

laltin
  • 1,134
  • 12
  • 20
0

i got a problem with world generation, i use perlin_noise for it. the place where i spawn, has shadows(the lit_with_shadows_shader), but when i build more terrain, there are no more shadows.(i got a directional light)

  • 1
    You should ask a separate question mentioning this question. – Tanay Jun 10 '23 at 12:40
  • You need to post this as a new question, not as an answer to this question – Teshan Shanuka J Jun 11 '23 at 10:56
  • If you have a new question, please ask it by clicking the [Ask Question](https://stackoverflow.com/questions/ask) button. Include a link to this question if it helps provide context. - [From Review](/review/late-answers/34525731) – Alez Jun 13 '23 at 10:51