[Bf-cycles] Cycles, Pictures & file extension

Christian Monfort monfort.c at gmail.com
Wed Aug 15 00:44:50 CEST 2012


Problem solved!!

The OIIO library I was using was way too old (V0.1.13 I think, from
old SVN extraction). I just update OIIO libraries from SVN and it's
now V1.0.5, but it's still buggy.
I downloaded and compiled last? version (V1.1.0) from OIIO site and
all is ok with it.

Christian.

PS: I'm on Ubuntu 12.04 64 with nVidia GTX570


2012/8/14 Christian Monfort <monfort.c at gmail.com>:
> Problem seems not to be in cycles, but in OIIO not being able to load
> the renamed files (I checked with other extension: .bmp, .png, no
> extension; all failed)...
>
> it fails in ImageManager::file_load_image()
> blender/intern/cycles/render/image.cpp @ 222,
> and the caller ImageManager::device_load_image()
> blender/intern/cycles/render/image.cpp @ 388 then replace image by 1x1
> ping image:
> if(!file_load_image(img, tex_img)) {
>         /* on failure to load, we set a 1x1 pixels pink image */
>         uchar *pixels = (uchar*)tex_img.resize(1, 1);
>
>         pixels[0] = (TEX_IMAGE_MISSING_R * 255);
>         pixels[1] = (TEX_IMAGE_MISSING_G * 255);
>         pixels[2] = (TEX_IMAGE_MISSING_B * 255);
>         pixels[3] = (TEX_IMAGE_MISSING_A * 255);
> }
> ... so the pink cube
>
>
> 2012/8/14 Christian Monfort <monfort.c at gmail.com>:
>> Hi again,
>>
>> It seems cycles is doing weird stuff based on picture file extensions:
>>
>> On the default scene switch to cycles, UV unwrap the cube, create a
>> material with just 3 nodes:
>> [ Image.Texture/Color ] <--> [ Color/Diffuse.BSDF/BSDF ] <--> [
>> Surface/Material.Output ]
>>
>> Load a .dds (I'm using DXT5 compression) picture (eg. /tmp/pic1.dds)
>> in Image.Texture node
>> switch veiwport shading method to Rendered in 3D view
>> => All is ok and picture is on all cube faces.
>>
>> Now, copy /tmp/pic1.dds to /tmp/pic1.tga (not very clever, but...)
>> and load the "dds renamed as tga" picture file (/tmp/pic1.tga) in
>> Image.Texture node
>> => The cube turns purple!!!
>>
>> From what I've read on OIIO, it's using plugins to load pictures and
>> tries them all until it find the one that
>> can handle the data in the file you want to load (the same way as
>> Blende, btw), so that should not make any difference...
>>
>> So I can only suppose something is assuming .tga files contains tga
>> data, either in OIIO or in cycles,
>> and does not check any further, because the 2 files are exactly the same...
>>
>> Christian.


More information about the Bf-cycles mailing list