[tuhopuu-devel] Aqsis export for Blender
Jonathan Merritt
tuhopuu-devel@blender.org
Fri, 04 Jun 2004 12:46:26 +1000
Hi Chris,
> To reduce conflicts try to merge as often as possible.
> I do it monthly, but I should probably be doing it weekly.
Thanks for that tip. I had thought that perhaps more often would be
much easier, but wondered if there was some reason for a longer interval.
>>> * There is no source/blender/aqsis/intern dir
>>
>>
>> If this is the accepted layout then we'll move over to it.
>
> Who knows ... maybe down the road common parts of the exporters
> can be merged together to reduce duplication?
It would be nice if there were some more common code. Certainly some of
the path handling and directory creation stuff is common. It would also
be good to separate out some of the common functions for handling
transformations that seem to crop up a few times. The bulk of the
exporters will probably always need to be different though. In the
Aqsis exporter, for example, we will have to do a shadow rendering pass
for spotlights, which requires a whole custom setup for each one.
>> I also have a question about where the best location might be to
>> store shaders? These will need to be placed in a location where they
>> can be distributed in a final build. One option is to distribute
>> these shaders with Aqsis. However, they are not much immediate use
>> without Blender, and in the longer term they may also be useful to
>> any RenderMan renderer used with Blender. For these reasons, it's
>> possibly better that they become part of Blender itself. What do you
>> think?
>
>
> I would look at how the plugin sources and stock python scripts
> are distributed. Maybe keep the shader sources in
> source/blender/aqsis/shaders and either compile or copy
> the source files (whichever is most appropriate) to where the
> release tarball is created. See the Makefile in the release
> directory to see how the other extras are handled.
OK - the path you've given is actually their current location! (I'm not
sure whether you knew that in advance :-).
I've tried to separate the final, "it does everything" form of each
shader from a set of shading language functions (stored in header files)
that implement the basic mechanics of the shading. My main reason for
doing this is to allow entirely customized, 3rd party shaders to be
built that contain elements which simulate parts of the internal Blender
materials very well. So, for example, if a shader writer wanted to
combine a custom specular hilight with Blender's Oren-Nayar diffuse
illumination, this would easily be possible and wouldn't require
duplication of the source code.
So, some of the shading source is in the same category as header files
required for plugins, and some can be regarded as pre-compiled for 95%
of users. All of it should be available to the end user in source form
though.
>>> -- I think the only conditions on our side is that the
>>> code does not leave tuhopuu uncompilable on some platforms
>>> (and on platforms where it doesn't compile there should be a
>>> flag to turn off the aqsis feature).
>>>
>>>
>>
>> I have added such a flag to the scons build system already. In the
>> configuration file, this flag is:
>> USE_AQSIS = 'false'
>> It should essentially revert to a fully-functional, non-Aqsis
>> configuration.
>
>
> Great ... I can probably help out with the Makefile's build
> when I get a bit of free time.
That sounds good! :-) I'm a fairly active Python user outside of
Blender, so the syntax of files used by scons makes a lot of sense to
me. While I can also use Makefiles, I'm far less confident about them.
> Just out of curiosity, how many people will be working on
> this blender/aqsis integration?
Currently, anywhere from 1 to about 5, depending on how you count! :-)
The project was initially started by Paul Gregory and Philippe
LePrince. Since the creation of the Aqsis CVS copy, I'm the only one to
make any commits. :-( However, Paul is currently working on a refactor
of the image display component of Aqsis (which has direct implications
for Blender integration), and all Aqsis developers have commit access to
the current CVS copy. We also have a few people who seem to be building
and playing with it; which bodes well for the early discovery of any
major bugs.
Jonathan Merritt.