[info-performer] Error loading large textures

Date view Thread view Subject view Author view

rick.van.haasen++at++philips.com
Date: 06/18/2003 08:54:03


Hi,

I experience a problem loading large textures.
The problem boils down to the following:

I created a simple object file "test.pfa" which
defines a square with a texture on it (the contents
of this file is included in this e-mail below).

Viewing it with perfly ('perfly test.pfa') looks correct.
When I use anoter texture (by changing the entry
"texture.rgb") this also works as expected .
I used several formats, all 24 bit true color (IRIS RGB, TIF and JPEG)
without any problem (Performer on IRIX supports
the TIF and JPG formats).
The resizing of images with dimensions not equal to
powers of 2 is automatically taken care of.
Everything OK so far.

Now, when I use an image file for the texture with
an image whose size exceeds a certain amount,
the texture does not appear.

I use a Onyx-3400/IR-4 which should be able to
handle textures up to 4K by 4K.

These are the results of some tests:

         Image dimensions - texture visible?
------------------------------------------
case 1 - 2048 x 1024 - yes
case 2 - 2048 x 2048 - yes
case 3 - 3008 x 2000 - yes
case 4 - 3500 x 2000 - no
case 5 - 4096 x 4096 - no

I would think that for case 3 Performer internally scales
and stores the texture image as a 4K by 2K image.
The same would hold for case 4, but, this one is not
visible !?!?!?

In my own application (instead of using Perfly) I experience
exact the same behaviour.
What I can see is that pfTexture->loadFile() doesn't cause
the problem (I checked this by writing the texture to an rgb
image using pfTexture->saveFile and checked the result with
a viewer). This looked OK.
Further pfTexture->loadFile() doesn't give an error.

I do get an error from the draw proces:
OpenGLError 0x501 -- Invalid value

Does anyone know what the problem is?

Rick

=============== Line 1 of test.pfa starts on next line ==========
0xdb0ace00 26 # header
#---------------------- Length Lists
4 1
#---------------------- Length List 0
1 0 -1
4
#---------------------- Vertex Lists
5 1
#---------------------- Vertex List 0
4 0 -1
77.2486 -16.5574 27.3128
24.8008 45.1359 23.208
56.3121 -55.8182 -23.208
3.86434 5.87501 -27.3128
#---------------------- Color Lists
6 1
#---------------------- Color List 0
1 0 -1
0.8 0.8 0.8 1
#---------------------- Normal Lists
7 1
#---------------------- Normal List 0
2 0 -1
-0.613526 -0.479852 0.627159
-0.613526 -0.479852 0.627159
#---------------------- TexCoord Lists
8 1
#---------------------- TexCoord List 0
4 0 -1
1 0
1 1
0 0
0 1
#---------------------- Materials
0 1
#---------------------- Material 0
1
1
0.100000001
0.200000003 0.200000003 0.200000003
0.800000012 0.800000012 0.800000012
1 1 1
0 0 0
1 1
-1
#---------------------- Textures
1 1
#---------------------- Texture 0
"texture.rgb"
0
1 1 1 1 1
0x7fff 0x4000 0x4000 0x4000
1 1 1
0 0 0 0
1
0 0 -0.550000012 1 -1 1.54999995 -2 2 -1
0 0 -0.5 0.25 -1 0.400000006 -2 0.75 -1
0 -1
1 1 1
0 0
0 0
-1 -1
-1 -1 -1 -1 -1
-1
0 -1
0
1
-1
#---------------------- GeoStates
3 1
#---------------------- GeoState 0
5 2 # PFSTATE_ENLIGHTING
6 2 # PFSTATE_ENTEXTURE
8 2 # PFSTATE_CULLFACE
15 0 # PFSTATE_FRONTMTL
17 0 # PFSTATE_TEXTURE
-1
-1
#---------------------- GeoSets
10 1
#---------------------- GeoSet 0
8 1
0
2 0 -1
4 0 -1
2 0 -1
2 0 -1
2 1 1
0 -1
0 0
-1
0xffffffff
-1
2 3.86434364 -55.8182373 -27.3127613 77.2485504 45.1358871 27.3127613
-1
-1
-1 0 0 0 0
-1
-1
#---------------------- Nodes
12 1
#---------------------- Node 0
2 # Geode
1
 0 # gsets
0xffffffff 0xffffffff 0xffffffff 0xffffffff
0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
-1 # user data
2 40.5564 -5.34118 0 68.1192
"coral1.3ds"
=============== Previous line is last line of test.pfa ==========

------------------------------------------------------------------------------------------------
Rick van Haasen Philips Research
Laboratories Eindhoven
Building: WY8-48 Prof. Holstlaan 4
Phone: +31 40 2744357 5656 AA Eindhoven
Fax: +31 40 2744660 The Netherlands
E-mail: rick.van.haasen++at++philips.com
-------------------------------------------------------------------------------------------------


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Wed Jun 18 2003 - 08:57:45 PDT