Hi, I’m new to Panda 3d and am loading in models. All my models load in and are visible. However, they are blank white. When I look at the them in pview and press L they show my textues. When I load in the .egg files from the models folder, they all show texture. I have tried this by using collada, then dae2egg and maya with blender. All with the same result. They work in pview after pressing L but only show white in pnada 3d. Im really confused. Iv’e done so much research but cant find anything. Is it lighting? Do I have to add code? Or is there a bug I can fix? Any advice is appreciated.
L enables lighting, so you’ll have to add lights to your Panda3D scene in order to reproduce the effect of pressing L in pview.
I’m not sure what it is about your particular model that causes it to only show textures when there are lights applied. You’d need to share your .egg file - or at least the top section, with the material and texture definitions - for us to be able to tell you.
Its just a webpage texture on top of every side of a cube. In pview it works great. And how would I add lighting? Iv’e looked into that as well, and there doesn’t seem to be any simple lighting really. I tried all white and clearing lighting but that did not do anything. It won’t let me attach the file so here is the text of the .egg file.
{ Z-up }
Material {
diffr { 0.640000 }
diffg { 0.640000 }
diffb { 0.640000 }
specr { 0.500000 }
specg { 0.500000 }
specb { 0.500000 }
shininess { 12.5 }
emitr { 0.000000 }
emitg { 0.000000 }
emitb { 0.000000 }
}
TeenInkOne.png {
“./tex/TeenInkOne.png”
envtype { MODULATE }
}
Cube {
{
{
1.000000 0.000000 0.000000 0.000000
0.000000 1.000000 0.000000 0.000000
0.000000 0.000000 1.000000 0.000000
-0.158242 0.261159 0.502549 1.000000
}
}
<VertexPool> Cube {
<Vertex> 0 {
0.8417576551437378 1.2611591815948486 -0.49745142459869385
<UV> {
0.000000 0.000000
}
}
<Vertex> 1 {
0.8417576551437378 -0.7388406991958618 -0.49745142459869385
<UV> {
1.000000 0.000000
}
}
<Vertex> 2 {
-1.1582424640655518 -0.7388405203819275 -0.49745142459869385
<UV> {
1.000000 1.000000
}
}
<Vertex> 3 {
-1.1582419872283936 1.2611596584320068 -0.49745142459869385
<UV> {
0.000000 1.000000
}
}
<Vertex> 4 {
0.841758131980896 1.2611587047576904 1.5025485754013062
<UV> {
0.000000 0.000000
}
}
<Vertex> 5 {
-1.1582422256469727 1.2611593008041382 1.5025485754013062
<UV> {
1.000000 0.000000
}
}
<Vertex> 6 {
-1.1582427024841309 -0.7388403415679932 1.5025485754013062
<UV> {
1.000000 1.000000
}
}
<Vertex> 7 {
0.84175705909729 -0.7388412952423096 1.5025485754013062
<UV> {
0.000000 1.000000
}
}
<Vertex> 8 {
0.8417576551437378 1.2611591815948486 -0.49745142459869385
<UV> {
0.000000 0.000000
}
}
<Vertex> 9 {
0.841758131980896 1.2611587047576904 1.5025485754013062
<UV> {
1.000000 0.000000
}
}
<Vertex> 10 {
0.84175705909729 -0.7388412952423096 1.5025485754013062
<UV> {
1.000000 1.000000
}
}
<Vertex> 11 {
0.8417576551437378 -0.7388406991958618 -0.49745142459869385
<UV> {
0.000000 1.000000
}
}
<Vertex> 12 {
0.8417576551437378 -0.7388406991958618 -0.49745142459869385
<UV> {
0.000000 0.000000
}
}
<Vertex> 13 {
0.84175705909729 -0.7388412952423096 1.5025485754013062
<UV> {
1.000000 0.000000
}
}
<Vertex> 14 {
-1.1582427024841309 -0.7388403415679932 1.5025485754013062
<UV> {
1.000000 1.000000
}
}
<Vertex> 15 {
-1.1582424640655518 -0.7388405203819275 -0.49745142459869385
<UV> {
0.000000 1.000000
}
}
<Vertex> 16 {
-1.1582424640655518 -0.7388405203819275 -0.49745142459869385
<UV> {
0.000000 0.000000
}
}
<Vertex> 17 {
-1.1582427024841309 -0.7388403415679932 1.5025485754013062
<UV> {
1.000000 0.000000
}
}
<Vertex> 18 {
-1.1582422256469727 1.2611593008041382 1.5025485754013062
<UV> {
1.000000 1.000000
}
}
<Vertex> 19 {
-1.1582419872283936 1.2611596584320068 -0.49745142459869385
<UV> {
0.000000 1.000000
}
}
<Vertex> 20 {
0.841758131980896 1.2611587047576904 1.5025485754013062
<UV> {
0.000000 0.000000
}
}
<Vertex> 21 {
0.8417576551437378 1.2611591815948486 -0.49745142459869385
<UV> {
1.000000 0.000000
}
}
<Vertex> 22 {
-1.1582419872283936 1.2611596584320068 -0.49745142459869385
<UV> {
1.000000 1.000000
}
}
<Vertex> 23 {
-1.1582422256469727 1.2611593008041382 1.5025485754013062
<UV> {
0.000000 1.000000
}
}}
<Polygon> {
<TRef> { TeenInkOne.png }
<MRef> { Material }
<Normal> {0.000000 0.000000 -1.000000}
<VertexRef> { 0 1 2 3 <Ref> { Cube }}
}
<Polygon> {
<TRef> { TeenInkOne.png }
<MRef> { Material }
<Normal> {0.000000 0.000000 1.000000}
<VertexRef> { 4 5 6 7 <Ref> { Cube }}
}
<Polygon> {
<TRef> { TeenInkOne.png }
<MRef> { Material }
<Normal> {1.000000 -0.000000 0.000000}
<VertexRef> { 8 9 10 11 <Ref> { Cube }}
}
<Polygon> {
<TRef> { TeenInkOne.png }
<MRef> { Material }
<Normal> {-0.000000 -1.000000 -0.000000}
<VertexRef> { 12 13 14 15 <Ref> { Cube }}
}
<Polygon> {
<TRef> { TeenInkOne.png }
<MRef> { Material }
<Normal> {-1.000000 0.000000 -0.000000}
<VertexRef> { 16 17 18 19 <Ref> { Cube }}
}
<Polygon> {
<TRef> { TeenInkOne.png }
<MRef> { Material }
<Normal> {0.000000 1.000000 0.000000}
<VertexRef> { 20 21 22 23 <Ref> { Cube }}
}
}
panda3d.org/manual/index.php/Lighting
The default that pview uses is a combination of a directional light and an ambient light.