r/GraphicsProgramming • • 25m ago

i think i have some idea now

previous post

thank you all for helping me. several commentors said i have to use point light source so as to get sharp shadow. i did some experiments. as my program shoots random rays blindly so it'd be nearly impossible for a ray to reach a point light source (or light source which has 1 pixel radius). i tried using small light sources. firstly i tried this

it was too dim and i could hardly see the scene so i enlarged the light slightly

it could barely be seen now and as far as i could tell the shadow was quite sharp. then i tried this

the scene was more lit up and the shadow started to show certain degree of blurriness. i think it's the sweet spot. with everything else being unchanged i increased the number of samples

still noisy. not ideal but at least not too ugly. i think i got it

the reason why i don't want to use shadow ray is: my program has a real time mode and i always change the scene and properties of the objects. for example the ball in the scene can be set up to become 50% reflective and 50% emissive. it can be a light source. the list of light sources (and their properties) change during runtime. sometimes i use a skysphere that acts as light source too. isn't it quite complicated to implement shadow ray workflow?

3 Upvotes

1 comment sorted by

•

u/AutoModerator 25m ago

Recently updated rules. Please check that your post is in compliance with Rules 1, 4, 5, and 6 on the sidebar. TL;DR:

  • No showcases.
  • Disclose AI usage in post or project.
  • Present a topic to talk about, e.g. how something works.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.