0

So I'm new to Panda 3D in c++ and I have created collada files or dae files to show in panda 3d. When I view them in pview, they show up without color or texture. So if I press the L hotkey, color and texture shows up. I know this has to do with lighting. The same applies to after I do a dae2egg conversion. When I load my model into my actual program, it is white with no color. The shape is as it should be though. If I use set_color(...), color will appear, but only the solid color that I define then, of course. So I was curious as to how to correct this issue of no color.

  • Are you sure that texture and normals were preserved during the conversion? – Alexander Shukaev Apr 12 '13 at 23:45
  • Yes, when I used pview after the conversion textures would still appear after pressing the l hotkey. That is why I'm so confused. – user1935324 Apr 12 '13 at 23:48
  • Well, this question to too broad to answer. There could be numerous problems, and while you didn't provide any additional details, it is impossible to give any proper suggestion. However, the first that comes to my mind is that something is wrong with your model loader/parser. So check whether the texture is loaded, check whether normals are loaded, check whether the lighting is actually turned on. – Alexander Shukaev Apr 12 '13 at 23:50
  • I apologize that it is rather vague, but that is all I know. I would not mind creating my models another way, I just want a way to create models that, when converted to an egg file, will retain the texture. I haven't invested anytime in models yet, so any ways that are known to work perfectly, would be great answer too. I just was hoping to keep using sketchup. – user1935324 Apr 12 '13 at 23:53

1 Answers1

0

Your object presumably has a material. If you have a material, you need to add one or more light sources to your scene graph for it to show up; that's just how it works. Alternatively, remove the material or disable it using set_material_off(1).

rdb
  • 1,488
  • 1
  • 14
  • 24