Top Related Projects
A modern open source rendering engine for animation and visual effects
Mitsuba 2: A Retargetable Forward and Inverse Renderer
The Persistence of Vision Raytracer (POV-Ray)
Advanced shading language for production GI renderers
Universal Scene Description
Quick Overview
LuxCoreRender is an open-source, physically-based rendering engine. It's designed for creating photorealistic images and animations, utilizing advanced rendering techniques such as bidirectional path tracing and metropolis light transport. LuxCoreRender can be used as a standalone application or integrated into 3D modeling software like Blender.
Pros
- Highly accurate and photorealistic rendering results
- Supports a wide range of materials, lighting techniques, and camera models
- Open-source and actively maintained by a dedicated community
- Offers both CPU and GPU rendering capabilities
Cons
- Steep learning curve for beginners
- Rendering times can be long, especially for complex scenes
- Documentation can be sparse or outdated in some areas
- Limited built-in scene creation tools compared to full 3D modeling software
Code Examples
LuxCoreRender can be used as a Python module. Here are a few examples:
- Creating a simple scene:
import pyluxcore
config = pyluxcore.Properties()
config.Set(pyluxcore.Property("renderengine.type", "PATHCPU"))
config.Set(pyluxcore.Property("scene.camera.lookat.orig", [0, -5, 1.5]))
config.Set(pyluxcore.Property("scene.camera.lookat.target", [0, 0, 0]))
scene = pyluxcore.Scene()
scene.Parse(pyluxcore.Properties().
Set(pyluxcore.Property("scene.objects.sphere.shape", "sphere")).
Set(pyluxcore.Property("scene.objects.sphere.material", "mat_white")))
engine = pyluxcore.RenderConfig(config, scene).Create()
session = pyluxcore.RenderSession(engine)
session.Start()
session.Stop()
- Setting up a material:
props = pyluxcore.Properties()
props.Set(pyluxcore.Property("scene.materials.mat_red.type", "matte"))
props.Set(pyluxcore.Property("scene.materials.mat_red.kd", [0.8, 0.0, 0.0]))
scene.Parse(props)
- Adding a light source:
props = pyluxcore.Properties()
props.Set(pyluxcore.Property("scene.lights.sun.type", "sun"))
props.Set(pyluxcore.Property("scene.lights.sun.dir", [-0.5, -0.5, -1.0]))
props.Set(pyluxcore.Property("scene.lights.sun.gain", [1.0, 1.0, 1.0]))
scene.Parse(props)
Getting Started
To get started with LuxCoreRender:
- Download and install LuxCoreRender from the official website.
- For Python integration, install the
pyluxcore
module:pip install pyluxcore
- Create a new Python script and import the module:
import pyluxcore
- Set up a basic scene configuration, create objects, materials, and lights using the
pyluxcore.Properties()
andscene.Parse()
methods. - Create a render config and session, then start rendering:
engine = pyluxcore.RenderConfig(config, scene).Create() session = pyluxcore.RenderSession(engine) session.Start()
For more detailed instructions and advanced usage, refer to the LuxCoreRender documentation and examples in the GitHub repository.
Competitor Comparisons
A modern open source rendering engine for animation and visual effects
Pros of appleseed
- More active development with frequent updates and releases
- Extensive documentation and user guides available
- Strong focus on artistic and production-ready rendering
Cons of appleseed
- Smaller community compared to LuxCore
- Less integration with popular 3D software packages
- Steeper learning curve for beginners
Code Comparison
appleseed:
import appleseed as asr
project = asr.Project('my_project')
scene = project.get_scene()
camera = asr.Camera('pinhole_camera', 'camera', {'film_width': '0.024'})
scene.cameras().insert(camera)
LuxCore:
import pyluxcore
config = pyluxcore.Properties()
config.Set(pyluxcore.Property('scene.camera.type', 'perspective'))
config.Set(pyluxcore.Property('scene.camera.fieldofview', 45))
scene = pyluxcore.Scene(config)
Both repositories offer powerful rendering capabilities, but they differ in their approach and target audience. appleseed focuses on production-ready rendering with extensive documentation, while LuxCore has a larger community and broader software integration. The code examples demonstrate the different syntax and setup processes for each renderer.
Mitsuba 2: A Retargetable Forward and Inverse Renderer
Pros of Mitsuba2
- Designed for differentiable rendering, making it suitable for machine learning applications
- Supports Python bindings, allowing for easier integration with data science workflows
- Offers a more modular architecture, facilitating easier extension and customization
Cons of Mitsuba2
- Less mature and potentially less stable compared to LuxCore
- Smaller community and fewer resources available for support
- May have a steeper learning curve for users not familiar with differentiable rendering concepts
Code Comparison
Mitsuba2 (Python):
import mitsuba
mitsuba.set_variant('scalar_rgb')
from mitsuba.core import load_file
scene = load_file('scene.xml')
LuxCore (C++):
#include <luxcore/luxcore.h>
luxcore::RenderConfig *config = luxcore::RenderConfig::Create("scene.cfg");
luxcore::RenderSession *session = luxcore::RenderSession::Create(config);
Both renderers use configuration files to define scenes, but Mitsuba2's Python interface may be more accessible for some users. LuxCore's C++ API might offer better performance for certain applications. The choice between the two depends on specific project requirements, such as the need for differentiable rendering or integration with existing workflows.
The Persistence of Vision Raytracer (POV-Ray)
Pros of POV-Ray
- Longer history and established user base
- Extensive documentation and tutorials available
- Simpler scene description language for beginners
Cons of POV-Ray
- Limited support for modern rendering techniques
- Slower rendering performance compared to LuxCore
- Less frequent updates and development
Code Comparison
POV-Ray scene description:
sphere {
<0, 0, 0>, 1
texture {
pigment { color rgb <1, 0, 0> }
finish { phong 0.7 }
}
}
LuxCore scene description (using PyLuxCore):
scene = pyluxcore.Scene()
props = pyluxcore.Properties()
props.Set(pyluxcore.Property("scene.objects.sphere.shape", "sphere"))
props.Set(pyluxcore.Property("scene.objects.sphere.material", "mat_red"))
scene.Parse(props)
Both LuxCore and POV-Ray are open-source rendering engines, but they differ in their approach and capabilities. LuxCore is more modern and physically-based, offering advanced features like unbiased rendering and spectral light transport. POV-Ray, while older, has a simpler scene description language and a wealth of community resources. LuxCore generally provides faster rendering and more realistic results, but POV-Ray may be easier for beginners to learn and use.
Advanced shading language for production GI renderers
Pros of OpenShadingLanguage
- Widely adopted in the film and VFX industry, with support from major studios
- Extensive documentation and community resources
- Flexible and extensible shading language designed for production use
Cons of OpenShadingLanguage
- Steeper learning curve compared to LuxCore's material system
- May require more setup and integration effort in custom rendering pipelines
- Less focused on physically-based rendering compared to LuxCore
Code Comparison
OpenShadingLanguage:
shader plastic(
color Cs = 1,
float Kd = 0.5,
float Ks = 0.5,
float roughness = 0.1,
output closure color BSDF = diffuse(N)
) {
BSDF = Cs * (Kd * diffuse(N) + Ks * microfacet("ggx", N, roughness));
}
LuxCore:
Material *mat = MatteTranslucent_Create(scene);
mat->SetColor(Property("kd", 0.5f, 0.5f, 0.5f));
mat->SetColor(Property("kt", 0.0f, 0.0f, 0.0f));
OpenShadingLanguage offers more flexibility in shader creation, while LuxCore provides a simpler API for material definition. OSL's approach allows for more complex shading models, but LuxCore's method is more straightforward for basic physically-based materials.
Universal Scene Description
Pros of OpenUSD
- Widely adopted industry standard for 3D data interchange
- Extensive documentation and community support
- Flexible and extensible architecture for various use cases
Cons of OpenUSD
- Steeper learning curve due to complex architecture
- Larger codebase and potentially higher resource requirements
- Primarily focused on scene description rather than rendering
Code Comparison
OpenUSD example (Python):
from pxr import Usd, UsdGeom
stage = Usd.Stage.CreateNew("myScene.usda")
xformPrim = UsdGeom.Xform.Define(stage, "/myXform")
spherePrim = UsdGeom.Sphere.Define(stage, "/myXform/mySphere")
stage.Save()
LuxCore example (Python):
import pyluxcore
config = pyluxcore.Properties()
config.Set(pyluxcore.Property("scene.camera.lookat.target", [0, 0, 0]))
config.Set(pyluxcore.Property("scene.objects.sphere.shape", "sphere"))
engine = pyluxcore.RenderConfig(config).Create()
OpenUSD focuses on scene description and data interchange, while LuxCore is primarily a rendering engine. OpenUSD offers a more comprehensive ecosystem for 3D pipelines, but LuxCore provides more direct control over rendering processes.
Convert
designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
LuxCoreRender
LuxCoreRender is a physically correct, unbiased rendering engine. It is built on physically based equations that model the transportation of light. This allows it to accurately capture a wide range of phenomena which most other rendering programs are simply unable to reproduce.
You can find more information about at https://www.luxcorerender.org
Building
Tool requirements
First, ensure you have a suitable toolchain:
- Windows: MSVC >= 194x latest version
- Linux: gcc 14
- MacOS Intel: XCode 15.2
- MacOS Arm: XCode 15.4
Ensure the following software is also installed and available in the PATH:
- Git
- Github CLI (for dependency signature checking: optional, but recommended)
- Python 3
- Conan (
pip install conan
) - CMake
For Windows, ensure the command line is configured for building (vcvarsall.bat
).
Quick build
git clone https://github.com/LuxCoreRender/LuxCore.git
cd LuxCore
git checkout for_v2.10
make deps
make
This will download LuxCore source code and LuxCore precompiled dependencies, configure CMake and start the build.
Nota: second make
statement can also name a specific target. Examples:
make luxcore
make pyluxcore
make luxcoreconsole
make luxcoreui
Build type
Build type can be controlled by environment variable LUX_BUILD_TYPE
.
Available build types are Release
and Debug
(case sensitive). Default is Release
.
Other commands
make clean
: clean build tree (delete intermediate files)make clear
: remove build treemake config
: configure/reconfigure projectmake deps
: update dependenciesmake doc
: build Doxygen documentation
LuxCore library
LuxCore is the new LuxCoreRender v2.x C++ and Python API. It is released under Apache Public License v2.0 and can be freely used in open source and commercial applications.
You can find more information about the API at https://wiki.luxcorerender.org/LuxCore_API
LuxCoreUI
This is the most complete example of LuxCore API usage and it is available in
the samples/luxcoreui
directory.
To see how it works, just run luxcoreui
from the root directory:
Linux/MacOS:
./out/install/Release/bin/luxcoreui scenes/cornell/cornell.cfg
Windows:
out\install\Release\bin\luxcoreui scenes\cornell\cornell.cfg
(assuming you selected Release as a build type)
LuxCoreConsole
This is a simple example of a command line renderer written using LuxCore API and it is
available in the samples/luxcoreconsole
directory.
Just run luxcoreconsole
from the root directory with:
Linux/MacOS:
./out/install/Release/bin/luxcoreconsole -D batch.halttime 10 scenes/cornell/cornell.cfg
Windows:
out\install\Release\bin\luxcoreconsole -D batch.halttime 10 scenes\cornell\cornell.cfg
(assuming you selected Release as a build type)
Authors
See AUTHORS.txt file.
Credits
A special thanks goes to:
- Alain "Chiaroscuro" Ducharme for Blender 2.5 exporter and several scenes provided;
- Sladjan "lom" Ristic for several scenes provided;
- Riku "rikb" Walve for source patches;
- David "livuxman" Rodriguez for source patches;
- Daniel "ZanQdo" Salazar for Sala scene and Michael "neo2068" Klemm for SLG2 adaptation;
- Mourelas Konstantinos "Moure" for Room Scene;
- Diego Nehab for PLY reading/writing library;
- HDR Labs sIBL archive and SHT Lab for HDR maps;
- Chronosphere for Cornell Blender scene;
- libPNG authors;
- zlib authors;
- OpenEXR authors;
- OpenImageIO authors;
- Tomas Davidovic for SmallVCM, an endless source of hints;
- GLFW authors;
- ImGUI authors;
- Cycles authors for HSV/RGB conversion code;
- OpenVDB authors;
- Eigen authors;
- Yangli Hector Yee, Steven Myint and Jeff Terrace for perceptualdiff;
- Michael Labbe for Native File Dialog;
- Sven Forstmann's quadric mesh simplification code.
- SpdLog authors
License
This software is released under Apache License Version 2.0 (see COPYING.txt file).
Top Related Projects
A modern open source rendering engine for animation and visual effects
Mitsuba 2: A Retargetable Forward and Inverse Renderer
The Persistence of Vision Raytracer (POV-Ray)
Advanced shading language for production GI renderers
Universal Scene Description
Convert
designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot