LuxCore icon indicating copy to clipboard operation
LuxCore copied to clipboard

Feature request: ThunderLoom/WIF support?

Open callym opened this issue 3 years ago • 1 comments

It looks like ThunderLoom has a way to use more standard weave patterns, but uses the same BRDF as the current cloth material?

I've got a teeny bit of experience with raytracing (mostly limited to working through some of raytracing in one weekend), but I'm not sure how easy it'd be to port this? I guess it'd be sort of similar to the Metal material (in terms of loading a file and parsing?), and wouldn't need to touch any of the actual hard rendering code that's already been written?

Any pointers for where I'd even start would be ideal, this is obviously a super low prio so I wouldn't mind trying it out.

callym avatar Nov 01 '21 09:11 callym

I guess it'd be sort of similar to the Metal material (in terms of loading a file and parsing?), and wouldn't need to touch any of the actual hard rendering code that's already been written?

It may be a bit more complex than the Metal material because you have to implement sampling strategies, PDFs, etc.. To add a new material to LuxCore, you have to implant a new Material object: https://github.com/LuxCoreRender/LuxCore/blob/master/include/slg/materials/material.h

You can follow the implementation of a simple material like "matte" to have an idea of how it works:

  • matte header => https://github.com/LuxCoreRender/LuxCore/blob/master/include/slg/materials/matte.h
  • matte code => https://github.com/LuxCoreRender/LuxCore/blob/master/src/slg/materials/matte.cpp
  • matte parsing code => https://github.com/LuxCoreRender/LuxCore/blob/3700c8811bff7e7c787e52b96045c9d4b2b83878/src/slg/scene/parsematerials.cpp#L183

Dade916 avatar Nov 01 '21 09:11 Dade916