Game Development Community

Not a power of 2?..." error

by Steven Chiu · in Constructor · 07/21/2008 (10:40 am) · 7 replies

When exporting the free Arteria3d Medieval castle sample, I got the "Not a power of 2? Something wrong" error message from interiorIO.cc @ 1560. Any clue for this?

#1
07/21/2008 (10:51 am)
Probably a texture size error. All textures must be power of 2, like 256x256 or 64x128...

2
4
8
16
32
64
128
256
512
1024x1024 etc...
#2
07/21/2008 (7:26 pm)
I've checked the texture size in used on map section, they are all power of 2.
#3
07/21/2008 (8:41 pm)
This is in the lightmapping texture - this can be thrown for other reasons. Have you already updated to 1.0.5.1? If so, I will export it and see if I can find the problem.
#4
07/22/2008 (7:23 am)
Yes, I use 1.0.5.1. I'll send file to you, thanks.
#5
07/27/2008 (9:28 pm)
OK - I got the file, sorry for delaying, I've had a busy week. The problem with this .csx file is that the scales are wrong. To fix this, open the .csx file in notepad, and find all instances of this

="-0"

and change it to this:

="32"

in addition, change all instances of this:

scale=""

to

scale="1"
#6
07/27/2008 (11:58 pm)
It fixes the exporting problem, any clue for causing this?
#7
07/28/2008 (5:37 am)
No idea - the default geometry_scale (the one that was causing the "divide by zero" error) defaults to 32 on map creation. I can only guess that somehow the worldspawn entity was corrupted (either by hand, or by some importing issue). I went ahead and updated constructor so that if it gets sees these sort of bogus values again, it will set them to the default - this will be in the next release.