[Bf-cycles] Status Open Shading Language
blender at dingto.org
Tue Jun 5 00:09:55 CEST 2012
I spent nearly the whole day on OSL and made some progress! :)
1) Compile OSL lib
I managed to compile OSL libs (Trunk) on Ubuntu Linux x64 (12.04).
Some notes to that:
-OSL needs flex and bison, which is not said in their INSTALL file.
Installed them from the Ubuntu repository.
- I had to recompile Boost 1.49 and OIIO (Trunk) with cxxflag -fPIC,
otherwise OSL won't build.
- I had to disable acum_test, testshade and shaders in OSL (cmake)
because I got linker errors with those. Those things are unit tests,
test apps and example shaders.
Needs to be investigated, but not urgently needed for Blender, those
things are optional.
As a result I got OSL libs (bin, include, lib folder are needed).
2) Cycles and OSL
I did some fixes and commited to SVN to get OSL building, but it's still
a long road I am afraid.
If you want to give it a try or even better want to help:
-Enable WITH_CYCLES_OSL in cmake.
-Set "CYCLES_OSL" path to point to the libs. (
Fixes where I am unsure: I changed isfinite to std::isfinite in
kernel_accumulate.h, otherwise it complains when compiling for OSL. Is
that fix correct?
3) Current status:
-First thing is to get the kernel to compile, there are a few errors in
osl/nodes but they can be handled later.
-We have to remove the dependency of "oslexec_pvt.h" in osl_shaders.cpp,
that should not be needed anymore, see OSL 0.6.0 where it says:
"* ShadeExec API overhaul -- an app using it no longer needs
ShadingSystemImpl internal knowledge."
That's where I am at the moment, any feedback and help would be great.
Am 03.06.2012 23:31, schrieb Brecht Van Lommel:
> Hi Thomas,
> Thanks for bringing things up to date somewhat, I haven't really
> looked at in the past few months. I wouldn't expect major changes are
> needed, but it's probably not compiling at the moment and some code
> tweaks will be needed.
> On Sun, Jun 3, 2012 at 6:42 PM, Thomas Dinges<blender at dingto.org> wrote:
>> 4) Proposal
>> I realize this is not an immediate and urgent task but I want to propose
>> the following integration process for OSL in Cycles:
>> a) Build a stable library of OSL (OSL 1.1 at this time) for Linux (then
>> Windows, Mac) which works with our other libraries.
>> b) Fix possible issues and get Cycles to compile with the OSL libs.
>> c) Port over remaining nodes/shaders to OSL and check existing OSL code.
>> d) Write support for custom OSL shaders, by adding a OSL node or
>> something similar.
>> It would be good to at least have "a" and "b" done, and keep it working
>> on "b" level. Any other work then can be done step by step and when
>> resources are available.
>> I would like to hear your opinion (especially yours Brecht) on that,
>> could that work?
>> I guess I can do some more work and fixes, but until now I was not able
>> to build the OSL libraries myself, so it's a bit guessing if the code
>> works or not.
> If others like to contribute to the OSL backend and get it compiling
> working, that's fine with me. I only have limited time at the moment,
> can give some pointers and advice, but further it's probably up to
> others at the moment.
> I'd say OSL itself is pretty much working as well as we would need it
> to work. There might be some minor bumps that we run into when we
> decide to use it for an actual release but overall I just don't really
> have any requests to improve OSL itself. I've contributed patches to
> get things building on Windows, and that's probably the main area
> where more tweaks are needed in OSL itself, it's not quite working out
> of the box there. It's similar with OIIO, things are quite well
> production tested, just not really maintained for
Blender Developer, Artist and Musician
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Bf-cycles