Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Approximate / force upgrade modes for Mitsuba 1 files #91

Closed
wants to merge 5 commits into from

Conversation

tszirr
Copy link

@tszirr tszirr commented Apr 16, 2020

Adds two command line flags (-D__load_permissive=1 and -D__upgrade_approximate=1) to the XML loader, which allow to ignore 'unreferenced X' errors and approximately replace currently unsupported features, respectively.

This PR still subsumes #90, since however I split the changes, they will create merge conflicts, if merged simultaneously. Therefore, to merge both, the simplest option is to only merge this one and close the other one.

The approximate load (-D__upgrade_approximate=1) mode can do the following:

  • Transform phong BSDFs and phong NDFs to beckmann w/ approx eq. alpha
  • Replace binary mixture BSDFs
  • Create proxies for coatings
  • Bypass unsupported bumpmap / normalmap nestings
  • Unroll shapegroups / instances (About shape groups/assemblies #22)
  • Try to convert spectrums w/o wavelength specifications to RGB

Additionally, standard upgrades are extended by:

  • Converting hex color codes
  • Bump -> bumpmap (which approx load then bypasses until a plugin is available)
  • diffuse::diffuseReflectance -> diffuse:reflectance

All these features were required by at least one actual Mitsuba 1 scene file on the internet.

For the sunsky required by many scenes, see the old updated PR (#85).

@tszirr tszirr mentioned this pull request Apr 16, 2020
@Speierers Speierers requested a review from wjakob April 16, 2020 13:48
@wjakob
Copy link
Member

wjakob commented Apr 18, 2020

Sorry, I'm not a big fan of this change. Mitsuba 2 aims for compatibility with Mitsuba 1, but it is still under heavy development, so compatibility is subject to a "best-effort with what is already implemented" policy. I wouldn't want to add flags like__upgrade_approximate just to get a Mitsuba 1 scene to parse. Of course it's fine to have these types of modifications, but I don't think they should go into the master branch.

@wjakob wjakob closed this Apr 18, 2020
@wjakob
Copy link
Member

wjakob commented Apr 18, 2020

As always, I am happy to discuss further, but I'll close this PR for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants