GithubHelp home page GithubHelp logo

jasondavies / vray_gltf Goto Github PK

View Code? Open in Web Editor NEW

This project forked from chaosgroup/vray_gltf

0.0 1.0 0.0 8.78 MB

A Python script for rendering glTF files with V-Ray App SDK

License: MIT License

Python 100.00%

vray_gltf's Introduction

V-Ray glTF viewer

Sample render

Overview

The V-Ray glTF viewer is a set of Python scripts for the V-Ray App SDK that allow the parsing and rendering of glTF (.gltf and .glb) files.

Installing and running the V-Ray glTF viewer

With V-Ray App SDK

  • Install Python 3.8 for all users in "c:\Program Files\Python38"

  • Install nightly V-Ray 5 App SDK (Qt version) in "C:\Program Files\Chaos Group\V-Ray\AppSDK". Be sure to choose the Advanced installation type and make sure the installation does not modify any license settings or environment variables.

    Note: In case you accidentally let the V-Ray App SDK installation modify the V-Ray license settings, run the tool setvrlservice.exe or from the start menu search for "Change V-Ray client license settings" to change them.

  • Open a command prompt (press Windows+R, type cmd and press Enter).

  • Execute set path="c:\program files\python38";"c:\program files\python38\scripts";%path%

  • First time only: Execute pip install numpy

  • First time only: Execute pip install pyquaternion

  • First time only: Execute pip install numba

  • First time only: Execute pip install scipy

  • Execute "C:\Program Files\Chaos Group\V-Ray\AppSDK\setenv38.bat"

  • Execute cd /d VRAY_GLTF_FOLDER where VRAY_GLTF_FOLDER is the folder where the file main.py is located.

  • Execute python main.py to see a list of options; use python main.py --help for detailed usage description.

With V-Ray 5 for 3ds Max

The Python binding of the V-Ray AppSDK is also included with V-Ray 5 for 3ds Max and Maya and in this case it is not needed to install the V-Ray AppSDK separately.

  • Make sure you have a recent version of V-Ray 5 for 3ds Max with the Python 3 binding of the V-Ray App SDK included (check if you have the folder "C:\Program Files\Chaos Group\V-Ray\3ds Max 2021\samples\appsdk\python38").

  • Install Python 3.8 for all users in "c:\Program Files\Python38"

  • Open a command prompt (press Windows+R, type cmd and press Enter).

  • Execute set path="c:\program files\python38";"c:\program files\python38\scripts";%path%

  • First time only: Execute pip install numpy

  • First time only: Execute pip install pyquaternion

  • First time only: Execute pip install numba

  • First time only: Execute pip install scipy

  • Execute "C:\Program Files\Chaos Group\V-Ray\3ds Max 2021\samples\appsdk\setenv38.bat"

  • Execute cd /d VRAY_GLTF_FOLDER where VRAY_GLTF_FOLDER is the folder where the file main.py is located.

  • Execute python main.py to see a list of options; use python main.py --help for detailed usage description.

Usage

The V-Ray glTF scripts are command-line only; there is no GUI and all options must be passed on the command line.

Use the --help option to list all possible options and their values.

An example command to render the sample .glb file could look like this (assuming that the vray_gltf project is extracted to d:\temp\vray_gltf):

python main.py d:\temp\vray_gltf\samples\basic\basic.glb --thick_glass --default_lights --default_cam_moffset "(0, 0, -0.5)" --output_file d:\temp\vray_gltf.jpg

Supported features

The glTF parser supports glTF 2.0 with the following extensions:

  • KHR_texture_transform
  • KHR_materials_pbrSpecularGlossiness
  • KHR_materials_transmission
  • KHR_materials_clearcoat
  • KHR_materials_sheen
  • KHR_lights_punctual is mostly working, but light range is not supported

Simple transform animations are supported to some extent. Vertex deformations, either through morphing or skinning are currently not supported.

Most of the sample models provided by Khronos generally render fine, as well as many models from the Windows 3D viewer library.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.