Skip to content

Releases: HenrYxZ/sombra

Multi-Threading Optimized

18 Oct 21:20
Compare
Choose a tag to compare

Optimization of rendering using multiprocessing. Now it's using about 30% of the memory it used before and it's faster.
That's because now rays are created and traced in the same function that goes in parallel.

Also now using imap_unordered function for memory optimization (https://docs.python.org/3/library/multiprocessing.html#multiprocessing.pool.Pool.map)

Multi-Threading

28 Dec 04:38
Compare
Choose a tag to compare
  • Use many processes with multiprocessing library
  • This is a first version, it's not efficient with memory. It creates every ray at the beginning (memory expensive) and creates a pool with all of them, in the future maybe it would be better to create some of the rays, start the workers, wait for them, then create more rays, and assign to workers like that in a loop until the entire screen is finished
  • At resolution of 720p it took ~10GB of RAM for 8 processes

Pathtracing + Caustics

27 Dec 22:15
Compare
Choose a tag to compare
  • Pathtracing with Russian Roulette
  • Caustics using Light Raytracing (Backwards Raytracing) with Illumination Maps

(see pathtracer.py inside examples)

Depth of Field

12 Jul 01:27
Compare
Choose a tag to compare

Add Depth of Field (an out of focus effect) by using a virtual camera lens, with parameters:

  • f: focal distance, which is the distance from the view window (image plane) to the focal plane (where every object is in focus)
  • ap_sx: aperture size in the horizontal coordinate
  • ap_sy: aperture size in the vertical coordinate

Fix: Animation & Simulation

28 Jun 17:53
f042f70
Compare
Choose a tag to compare
  • Fix variable with same name, light for barycentric shading and light for scene lights in compute_color function
  • Fix error when animation_out folder doesn't exist, in create_animation function

Animation & Simulation

24 May 17:44
Compare
Choose a tag to compare
  • State class that stores position, velocity, rotation, angular velocity, scale and mass.
  • Simulation module that include RigidBody with a simulate_physics function, which changes State using a given time delta. The Simulation has a run function that will simulate physics on each RigidBody of the system for the duration time of the simulation.
  • Animation module which includes Keyframe and Transform, and can create a series of keyframes using a list of states and then use the list of keyframes to render a list of images.

Reflection

25 Apr 21:28
Compare
Choose a tag to compare
  • Reflection for implicit surfaces
  • Normal Maps

Textures

09 Apr 03:43
Compare
Choose a tag to compare

Features:

  • UV Mapping for Plane and Sphere
  • Environment Mapping
  • Image Textures
  • Solid Image Textures

Shadows

31 Mar 03:02
Compare
Choose a tag to compare

Hard shadow calculation for:

  • Point lights
  • Spot lights
  • Directional lights

Simple shapes and shaders

24 Mar 02:59
Compare
Choose a tag to compare
  • Diffuse, specular and border shaders
  • Sphere and plane objects
  • Directional, point and spot lights