Pages: [1]
Print
Author Topic: Material based on png file blocks POV-ray rendering  (Read 1379 times)
kap
Newbie
*
Posts: 3



View Profile
« on: January 26, 2011, 03:10:40 PM »

I will produce a drawing of a room with the walls covered with tiles 20x40 cm. Hence I defined the material as tiles of the mentioned size in a repeated pattern and based on the png file as image. This image was produced in Gimp in the standard colour mode rgb, and saved in the png format.

But now, when I try to render this, nothing happens, no error message, nothing! So I created a new test drawing in Cycas with just one wall in the material as above (and course light and camera), exported the drawing into the pov format, to see what code was produced for POV-ray. In a terminal window I ran POV-ray with this file, and now I saw the error message that stopped the rendering. It said: "Parse Error: Keyword 'transmit' cannot be used with non color-mapped image."

Next test was to in Gimp save the tile image in the jpg format and redefine the material in Cycas. That worked fine. So I compared the code and found a difference: for the png case in the material declaration (texture - pigment there was a keyword "transmit 0, 1.0" but in the jpg case there was not. An extract for png:

#declare Kakel_20x40 =
texture {
pigment { color rgbt <0.962121,0.962121,0.962120,0.000000> }
pigment { image_map { png "/home/kaj/CYCAS3//tex/Kakelplatta-02d.png" map_type 0 transmit 0, 1.0   } scale <0.40, 0.20> translate <0.00, 0.00> rotate 90*x }
...

So I edited the .pov-file for the png case, removed the "transmit 0, 1.0" keyword, and put it into POV-ray, and now it worked fine. (Note: Kakel is Swedish for tile)

The third test was to change the tile image in Gimp another time, now with the colours in indexed mode, 255 colours and save it in png. Also now the produced code contained the "transmit 0, 1.0" keyword, but the rendering went fine.

In all these cases the colour, declared from Cycas, in the generated .pov-file, was "rgbt".

So for what reason is the "transmit" keyword there at all? Well one reason could be that the png can contain transparency as opposed to jpg, however only for indexed colours. But if you do not use this facility, you lose a lot of resolution having to use indexed colours instead of rgb. Maybe this is a limitation in Gimp, but from there I could use just 255 colours, much less than what the rgb can produce. So if Cycas could read the png file and, depending on the colour coding, add or remove the "transmit" keyword, it should be a good thing.
Logged
Pages: [1]
Print
Jump to: