Okay, so here’s the deal. I went home, and I tried this out on a much easier level that I created. Just a few simple rectangular boxes (based prisms), that each have a texture on them. The way I added textures to all of them was this process:
Step 1: I added a cube to the 3D View, and manipulated its X,Y,Z values to create a thin rectangular based prism.
Step 2: I repeated Step 1 in order to create a platform-like level
Step 3: I downloaded all my textures and saved them to one folder
Step 4: I right-clicked one platform, tabbed into EDIT MODE, and selected Smart UV Project.
Step 5: In the UV/Texture window, I opened up a new image from my texture folder; I scaled out the UV selection to make the image fit better on the platform.
Step 6: I created a new material, and I called it whatever the image looked like. For example, Rainbow.
Step 7: I created a new texture, under the Rainbow material, and loaded the Rainbow image under it.
Step 8: I checked off under Mapping: Coordinates - UV & Map - UVMap
Step 9: I believe I did the exact same process for all platforms.
Here is a photo of the map I have:
So, I load up this code into Geany.
import sys, os
from direct.showbase.ShowBase import ShowBase
from panda3d.core import Filename
class MyApp(ShowBase):
def __init__(self):
ShowBase.__init__(self)
self.environ = self.loader.loadModel("/c/Users/AdamLaptop/Documents/BlenderMaps/MapProject/tex/cubetest.egg")
self.environ.reparentTo(render)
self.environ.setPos(0,0,0)
app = MyApp()
app.run()
And the error I receive is this:
And here is my cubetest.egg code:
<CoordinateSystem> { Z-up }
<Material> "Brick 1" {
<Scalar> diffr { 0.640000 }
<Scalar> diffg { 0.640000 }
<Scalar> diffb { 0.640000 }
<Scalar> specr { 0.500000 }
<Scalar> specg { 0.500000 }
<Scalar> specb { 0.500000 }
<Scalar> shininess { 12.5 }
<Scalar> emitr { 0.000000 }
<Scalar> emitg { 0.000000 }
<Scalar> emitb { 0.000000 }
}
<Group> Cube.004 {
<Transform> {
<Matrix4> {
4.000000 0.000000 0.000000 0.000000
0.000000 1.000000 0.000000 0.000000
0.000000 0.000000 0.100000 0.000000
-11.766403 -8.798506 0.000000 1.000000
}
}
<VertexPool> Cube.004 {
<Vertex> 0 {
-7.7664031982421875 -7.798505783081055 -0.10000000149011612
<UV> {
1.372680 0.333334
}
<UV> yabee_shadow {
0.660837 0.338173
}
}
<Vertex> 1 {
-7.7664031982421875 -9.798505783081055 -0.10000000149011612
<UV> {
1.378052 2.084065
}
<UV> yabee_shadow {
0.661827 0.660837
}
}
<Vertex> 2 {
-15.766403198242188 -9.798505783081055 -0.10000000149011612
<UV> {
-0.372680 2.089436
}
<UV> yabee_shadow {
0.339163 0.661827
}
}
<Vertex> 3 {
-15.766401290893555 -7.7985053062438965 -0.10000000149011612
<UV> {
-0.378051 0.338705
}
<UV> yabee_shadow {
0.338173 0.339163
}
}
<Vertex> 4 {
-7.766401290893555 -7.798506259918213 0.10000000149011612
<UV> {
3.134153 0.338704
}
<UV> yabee_shadow {
0.995160 0.339163
}
}
<Vertex> 5 {
-15.766403198242188 -7.798505783081055 0.10000000149011612
<UV> {
3.128782 2.089435
}
<UV> yabee_shadow {
0.994170 0.661827
}
}
<Vertex> 6 {
-15.76640510559082 -9.798505783081055 0.10000000149011612
<UV> {
1.378052 2.084064
}
<UV> yabee_shadow {
0.671507 0.660837
}
}
<Vertex> 7 {
-7.766406059265137 -9.798506736755371 0.10000000149011612
<UV> {
1.383422 0.333334
}
<UV> yabee_shadow {
0.672496 0.338173
}
}
<Vertex> 8 {
-7.7664031982421875 -7.798505783081055 -0.10000000149011612
<UV> {
3.128783 -1.422769
}
<UV> yabee_shadow {
0.994170 0.004840
}
}
<Vertex> 9 {
-7.766401290893555 -7.798506259918213 0.10000000149011612
<UV> {
3.134153 0.327962
}
<UV> yabee_shadow {
0.995160 0.327503
}
}
<Vertex> 10 {
-7.766406059265137 -9.798506736755371 0.10000000149011612
<UV> {
1.383422 0.333333
}
<UV> yabee_shadow {
0.672496 0.328493
}
}
<Vertex> 11 {
-7.7664031982421875 -9.798505783081055 -0.10000000149011612
<UV> {
1.378052 -1.417399
}
<UV> yabee_shadow {
0.671507 0.005830
}
}
<Vertex> 12 {
-7.7664031982421875 -9.798505783081055 -0.10000000149011612
<UV> {
-0.372680 0.333333
}
<UV> yabee_shadow {
0.339163 0.328493
}
}
<Vertex> 13 {
-7.766406059265137 -9.798506736755371 0.10000000149011612
<UV> {
-0.378051 -1.417398
}
<UV> yabee_shadow {
0.338173 0.005830
}
}
<Vertex> 14 {
-15.76640510559082 -9.798505783081055 0.10000000149011612
<UV> {
1.372681 -1.422769
}
<UV> yabee_shadow {
0.660837 0.004840
}
}
<Vertex> 15 {
-15.766403198242188 -9.798505783081055 -0.10000000149011612
<UV> {
1.378052 0.327962
}
<UV> yabee_shadow {
0.661827 0.327504
}
}
<Vertex> 16 {
-15.766403198242188 -9.798505783081055 -0.10000000149011612
<UV> {
-0.383422 0.333334
}
<UV> yabee_shadow {
0.327504 0.338173
}
}
<Vertex> 17 {
-15.76640510559082 -9.798505783081055 0.10000000149011612
<UV> {
-0.378051 2.084065
}
<UV> yabee_shadow {
0.328493 0.660837
}
}
<Vertex> 18 {
-15.766403198242188 -7.798505783081055 0.10000000149011612
<UV> {
-2.128782 2.089436
}
<UV> yabee_shadow {
0.005830 0.661827
}
}
<Vertex> 19 {
-15.766401290893555 -7.7985053062438965 -0.10000000149011612
<UV> {
-2.134153 0.338705
}
<UV> yabee_shadow {
0.004840 0.339163
}
}
<Vertex> 20 {
-7.766401290893555 -7.798506259918213 0.10000000149011612
<UV> {
-0.383421 -1.422769
}
<UV> yabee_shadow {
0.327504 0.004840
}
}
<Vertex> 21 {
-7.7664031982421875 -7.798505783081055 -0.10000000149011612
<UV> {
-0.378051 0.327962
}
<UV> yabee_shadow {
0.328493 0.327504
}
}
<Vertex> 22 {
-15.766401290893555 -7.7985053062438965 -0.10000000149011612
<UV> {
-2.128782 0.333334
}
<UV> yabee_shadow {
0.005830 0.328494
}
}
<Vertex> 23 {
-15.766403198242188 -7.798505783081055 0.10000000149011612
<UV> {
-2.134153 -1.417398
}
<UV> yabee_shadow {
0.004840 0.005830
}
}}
<Polygon> {
<TRef> { rainbow.jpg }
<TRef> { rainbow.jpg }
<TRef> { GTA Floor.001 }
<MRef> { "Brick 1" }
<Normal> {0.000000 0.000000 -1.000000}
<VertexRef> { 0 1 2 3 <Ref> { Cube.004 }}
}
<Polygon> {
<TRef> { rainbow.jpg }
<TRef> { rainbow.jpg }
<TRef> { GTA Floor.001 }
<MRef> { "Brick 1" }
<Normal> {0.000000 0.000000 1.000000}
<VertexRef> { 4 5 6 7 <Ref> { Cube.004 }}
}
<Polygon> {
<TRef> { rainbow.jpg }
<TRef> { rainbow.jpg }
<TRef> { GTA Floor.001 }
<MRef> { "Brick 1" }
<Normal> {1.000000 -0.000000 0.000000}
<VertexRef> { 8 9 10 11 <Ref> { Cube.004 }}
}
<Polygon> {
<TRef> { rainbow.jpg }
<TRef> { rainbow.jpg }
<TRef> { GTA Floor.001 }
<MRef> { "Brick 1" }
<Normal> {-0.000000 -1.000000 -0.000000}
<VertexRef> { 12 13 14 15 <Ref> { Cube.004 }}
}
<Polygon> {
<TRef> { rainbow.jpg }
<TRef> { rainbow.jpg }
<TRef> { GTA Floor.001 }
<MRef> { "Brick 1" }
<Normal> {-1.000000 0.000000 -0.000000}
<VertexRef> { 16 17 18 19 <Ref> { Cube.004 }}
}
<Polygon> {
<TRef> { rainbow.jpg }
<TRef> { rainbow.jpg }
<TRef> { GTA Floor.001 }
<MRef> { "Brick 1" }
<Normal> {0.000000 1.000000 0.000000}
<VertexRef> { 20 21 22 23 <Ref> { Cube.004 }}
}
}
This is all totally new to me, so please, if you see thousands of issues, or just one issue, be sure to be critical. Be as hard as you can on me, because I enjoy criticism as it makes me learn much better. I want to thank everyone that has been helping me, and I hope my format of using photos and code isn’t too much of a nuisance for anyone!