Giter Site home page Giter Site logo

optix7courser's Introduction

example11-accumulate-linux

OptiXのチュートリアルとして有名なoptix7courseを、C++17(CUDAがまだC++20に対応していなかった……)で書き換えてみました。C++17や、あとCMake3.18が提供する機能の活用と、行列演算を独自ライブラリからEigenに変更したことで、元ネタよりもコードがシンプルになったと思います。

コース

  1. 開発環境を確認する
  2. OptiXを使用するための前準備
  3. 生成された画像をウィンドウで表示する
  4. ポリゴンを表示する
  5. ポリゴンに陰影をつける
  6. オブジェクトとしてポリゴンを構造化する
  7. 既存の3Dモデルを読み込む
  8. テクスチャーの貼り付ける
  9. 影を生成する
  10. リアルな影を生成する
  11. 積算でノイズを除去する

ビルド

Linuxでシェルを使用する場合

ターミナル上で、以下を実行してください。

$ mkdir build
$ cd build
$ cmake -DOptiX_INSTALL_DIR=/opt/optix -DCMAKE_BUILD_TYPE=Release
$ make

WindowsでPowerShellを使用する場合

PowerShell上で、以下を実行してください。

> New-Item -Path .\\build -ItemType Directory
> Set-Location .\\build\\
> cmake -DOptiX_INSTALL_DIR="C:/ProgramData/NVIDIA Corporation/OptiX SDK 7.4.0" ..
> msbuild -p:configuration=release -p:platform=x64 ALL_BUILD.vcxproj

Visual Studio Codeを使用する場合

.vscodeフォルダにsettings.jsonファイルを作成してください。

{
    "cmake.configureSettings": {
        "OptiX_INSTALL_DIR": "C:/ProgramData/NVIDIA Corporation/OptiX SDK 7.4.0",
        "//": "Linuxの場合は\"/opt/optix\""
    }
}

Visual Studio Codeのステータス・バーをクリックし、以下の状態になるように設定してください(設定するのは、[CMake: [Release]: Ready]の部分と[Visual Studio Community 2019 Release - amd64]の部分です)。

Visual Studio Code - status bar

CTRL-SHIFT-pで[CMake: Delete Cache and Reconfigure]を実行し、CTRL-SHIFT-pで[CMake: Build]を実行してください。

optix7courser's People

Contributors

tail-island avatar

Stargazers

Bipul avatar

Watchers

 avatar

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.