Coder Social home page Coder Social logo

zadinvit / bigpluginmitsuba Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 12.88 MB

Big image group plugin for mitsuba

License: BSD 3-Clause "New" or "Revised" License

CMake 0.30% C++ 73.51% C 0.03% Makefile 0.10% HTML 25.70% Python 0.06% Shell 0.02% PowerShell 0.17% Lua 0.09% Ruby 0.02%

bigpluginmitsuba's Introduction

bigbtf mitsuba plugin This plugin is part of my diploma thesis "Visualization of advanced material appearence representations." plugin allows rendering of BTF textures in MIF format https://github.com/RadomirVavra/MIFlib (The Institute of Information Theory and Automation (UTIA)). Instalation

  1. add code to mitsuba/ext/CMakeLists.txt
  2. Copy folder bigplugin to mitsuba/src/bsdfs
  3. in mitsuba/src/bsdfs edit CMakeLists.txt add a row 3.1. add_plugin(bigbtf bigplugin/bigbtf.cpp)
  4. now you need link libraries (you can use MIFlib 0.4 version from this repository (folder MIFlib) or download newer version from https://github.com/RadomirVavra/MIFlib)
  5. Use Cmake to generate new Mitsuba.sln, in solution go to folder plugins/bsdfs/bigbtf, there are bigbtf project files 5.1. In bigbtf project you need set path to directories which stores MIFlib and PNGlib (in bigplugin folder). So in Linker->General->Additional Library Directories add the path to MIFlib 5.2 In Linker->Input->Additional Dependencies add "MIFlib.lib;PNGlib.lib" 5.3 In bigbtf-obj project go to properties C/C++->General->Additional Include Directories and add the path to MIFlib\include and path to folder with bigbtf plugin include directory, you can add the path to plugin in mitsuba path_to_mitsuba\mitsuba\src\bsdfs\bigplugin\ext\include
  6. Now you can build mitsuba INSTALL project and now you have mitsuba with bigbtf plugin, or you can build only bigbtf plugin and go to build/src/bsdfs/release and copy bigbtf.dll to dist/plugins, this work too and you don't need to reinstall whole Mitsuba

Use To add BTF texture to your object you need to use this tag

<bsdf type="bigbtf" id="basket">
      <string name="filepath" value="F:\vita_skola\mitsubaTestFiles\mifFiles\MAM2014_016.mif"/>
      <boolean name="memory" value="true"/>
      <string name="cubemap_path" value="\cubemaps\081\0256"/>
      <float name="scale" value ="400.0"/>
      <string name="filtering" value="ANIZO_4x"/>
      <integer name="level" value="3" />
    </bsdf>

Only filepath parameter is mandatory, but i recomend use memory tag with true, for load BTF textures to memory while rendering. For UBO reprenzentations of textures you need add path to cubemaps with interpolations indexes. ( <string name="cubemap_path" value="path_to\cubemaps\081\0256"/>) Scale parameteris use to scale size of texture, default value is 7. Plugin support mipmapping and anisotropy filtering, you can use it with parameter filtering, but you need to generate mif files with mipmaps this filtering (you can generate this files with https://github.com/zadinvit/bigConvert)

You can use parameter level to change the default level of filtering, so if you want to start filtering closer to the camera add a positive value.

Types of filtering

  • MIPMAP_LINEAR - mipmapping without interpolation between levels
  • MIPMAP_WEIGHTED - mipmapping with interpolation between levels
  • ANIZO_1x - anisotropy filtering without interpolation between levelx and levely (recommended)
  • ANIZO_4x anisotropy filtering with interpolation between levelx and levely (not recommended - slow + same results as ANIZO_1x)
  • none

For developers You can use big_render.cpp/.hpp for support rendering BTF texture in mif format inf other renders. You only need implement same logic, which i implement in bigbtf.cpp.

Documentation created by VĂ­t Zadina

bigpluginmitsuba's People

Contributors

zadinvit avatar

Stargazers

 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.