Josh4Help
Josh4Help

Reputation: 43

Ursina Python Engine: Lighting, Shadows And Bloom Effects

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?

Upvotes: 3

Views: 5453

Answers (3)

eating.crap
eating.crap

Reputation: 1

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)

Upvotes: 0

Tanay
Tanay

Reputation: 661

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()

Upvotes: 10

laltin
laltin

Reputation: 1151

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

Upvotes: 3

Related Questions