It's really not that difficult, the only possible reason I can see
would be that you don't want to waste disk space. If you've got the
imagemagick image conversion tools, you can convert your *entire*
collection using a bash one-liner on linux, presuming it's all
contained within the same directory structure and it just consists of
png files. It's not difficult to add an extra loop over the possible
image formats you want to convert.
find -name '*.png' | while read fileName ; do convert $fileName
${fileName%.png}.tif ; done
> There is code in Blender, open source, that will read most popular
> formats. I just don't understand why the developers don't grab the
> code and pop it into Aqsis?
Yes, there are libraries such as libpng and libjpeg which we could and
will use eventually (these don't arise from the blender project itself
BTW, but they are open source).
The reasons we haven't done this yet are:
1) The fact that there exist open source tools to do the conversion
very easily and automatically, as I explained above.
2) Our limited time. Our core developer team consists of only two
people at the moment. Even if a feature seems trivial to you, "just
doing it" probably takes a week or two of my "spare" time, and some
features take a heck of a lot more. Of course everyone would like
Aqsis to go faster, have more features, be less buggy etc. We just
can't do everything at once, and in practise we've got to put some
things before others.
The next version after 1.6 is likely to support a large number of
image formats, since I'm thinking of using the up and coming
OpenImageIO library. However, this library didn't exist a year ago
when we started on the work for 1.6. Even if we don't end up using
OpenImageIO we're likely to add support for png and jpg during the
next development cycle.
~Chris.
Hmm, this should have been on a single line, but gmail "helpfully"
broke the line for me. oops.
On Tue, Aug 11, 2009 at 5:55 AM,
>WHiTeRaBBiT<<white...@dreamscapearts.com> wrote:
> Sounds like valid points to me, also having a wider support for image
> formats would help Aqsis stand out in the RenderMan crowd. Maybe if
> the developers are interested, and the current round of more critical
> bug fixes and release is done, someone will take it on? One potential
> headache I can image for the developers though is how well different
> formats could actually be supported, I know I've run into real
> headaches dealing with compatibility between my current favorite apps
> (gimp, cinepaint, inkscape, blender).
>
> Anyway it may also be a good idea to log this in as an official
> feature request so they don't forget about it later ;)
> http://sourceforge.net/tracker/?group_id=25264&atid=383973
>
> Eric
>
> On Aug 10, 3:37 pm, Atom <atomicpercept...@gmail.com> wrote:
>> I apologize if I come off sounding too crass. I am just offering up my
>> end-user-experience with Aqsis.
>>
>> The main reason I don't want to convert all my image maps is because I
>> am using other render systems and I already have other scenes linked
>> to those image maps in my library. File space is also a concern (as
>> always). So in a perfect place, yes, I could convert everything, but
>> in my realistic space, I really don't want to re-link all those other
>> scenes.
Fair enough, I think this is quite a good reason to want arbitrary texture
support - I can imagine how much of a pain it would be to relink all your
existing scenes, and I presume it's not easily scriptable at all.
Luckily, I've just thought of a way to provide arbitrary texture loading which
might actually be quite easy for us. So easy in fact that I could probably
implement it today :-) How about this:
When a texture file is opened, we first attmpt to open it with the native
image loading interface. At the moment we only support TIFF, OpenEXR, and the
aqsis zfile format natively. If we can open the image, all is well. OTOH,
when the image format is unrecognised, we call through to a user-defined
external application to convert the texture to TIFF.
I think this behaviour should be set to off by default for predictability and
safety. To specify the external converter application, the user should set an
RiOption, something like:
Option "texture" "string converter" "<converter_executable_name> %I %O"
Where %I is the input file name, and %O is the output file name (possibly just
equal to %I with a .tif appended?) If I wanted to use the "convert" program
from the imagemagick tools, I'd just replace <converter_executable_name> with
"convert".
A remaining issue would be whether we just want this to work for
MakeTexture-like interface calls (and in teqser), or whether it should also
work for textures which are referenced by texture() calls in the shading
language. I think that having it work only with MakeTexture would be
sufficient because people shouldn't really be using non-optimized textures in
the texture() function anyway.
Thoughts and opinions please :-) Is this a good idea? How about the
proposed interface - in particular the naming of the "texture" "converter"
option? Note that this is more of a workaround than a permanent fix, but it
may be very useful to tide us over until we have better native image support
for common formats. Furthermore, we're never going to be able to support
every format under the sun, so it will probably remain useful in the future.
~Chris.
Good call Eric, this certainly solves the problem for use with Mosaic, and
it's renderer-independent to boot!
I'm wondering where that leaves my original suggestion - certainly I think
your script is better for use with MOSAIC, but maybe there's other
circumstances where my proposal would still make sense? TBH I can't think of
any off the top of my head which would justify the extra complexity in the
aqsis code itself.
~Chris.
That's why I thought the default would be to have the feature off. The user
could enable it if they knew what they were doing.
> However, I think those are relatively minor issues.
>
> Are you still thinking of using OIIO eventually? It has plugin
> support for a variety of image formats (and, we are told, "more to
> come"):
> http://openimageio.org/wiki/index.php?title=Main_Page
Definitely, I'm on the mailing list for OIIO, and am following the progress
closely. In fact, I'm currently involved in the development in a minor way
(code reviews, design suggestions based on aqsistex experiances, and some
cmake build system code).
> +1 for making it work only for MakeTexture et al... I can see a lot of
> advantages to having some kind of predictability in the images that
> are used while shading.
Cool. What do think about Eric's suggestion (forwarded) though? It seems
like a wrapper around teqser may be a better option.
~Chris.
PS: I'm not sure what the etiquette for posting to multiple lists at once is.
I'm CC'ing all these posts to both lists so that everyone can follow the
conversation. Apologies to the (hopefully few) people who are getting these
posts twice.
All we're trying to do is give you an option which works now, and that
won't take up a lot of our time which is currently being spent on other
things. You're saying we should reuse the work that others have done -
well that's exactly what we're doing here; reusing all the hard work
that people have put into the imagemagick tools.
> The way I imagine the current code works (remember I have not seen the
> actual code) is that you have a section that loads the TIFF or OpenEXR
> file into a memory buffer/file/array. That is the key intercept. At
> that point in the code, don't give up on a file not found. Fetch the
> source code from Blender that already works and can load other formats
> and keep trying. Examine the file extension and select the appropriate
> function to populate the memory/buffer/file array as needed. I know I
> may be stating the obvious.
Yes. As it happens, I wrote the entire aqsis texturing subsystem, so I
think I know how it works.
If you're thinking about implementing a new texture loader:
1) Create a new implementation of IqTexInputFile. CqExrInputFile should
be a nice easy example to follow.
2) Add the appropriate magic number detection to the guessFileType()
function.
3) Instantiate the new loader class inside IqTexInputFile::open()
whenever the appropriate magic number for your favourite format is
detected.
That's all there is to it. If you think that sounds super simple, then
good - I worked quite hard on getting those abstractions right.
As I stated before, I'm thinking of switching to OpenImageIO for image
IO, so that's rather a disincentive for me to implement more image
loader classes - I don't want my effort to go to waste if we just end up
ditching that part of the code in the end. If not for that, I probably
would have at least implemented support for png and jpeg before aqsis-1.6.
> Is there a guide on building Aqsis on windows?
Some sort of instructions can be found here:
http://wiki.aqsis.org/doc/dev/build
I don't use windows personally so can't really help that much.
> I have tortoise HG installed, is this compatible with Aqsis?
Aqsis uses git to host the source code, not mercurical. If you want to
get the code, the appropriate git command is something like
git clone git://aqsis.git.sourceforge.net/gitroot/aqsis
~Chris.