My model wont display

Hey sorry im not sure if this shoud be in the c++ or pipelining section but if its in the wrong section sorry.

No matter what iI do my model wont load its been loading for 10 mins. I exported it to root. ( c:) and use this to load it

window->load_model(framework.get_models(), “/c/teap.egg”);

which should work I lifted it from the tuturials. Is their anything i can do.

Here is my full code incase it reveals my failure.

 #include "pandaFramework.h"
#include "pandaSystem.h"
 
PandaFramework framework;
 
int main(int argc, char *argv[]) {
    //open a new window framework
  framework.open_framework(argc, argv);
    //set the window title to My Panda3D Window
  framework.set_window_title("My Panda3D Window");
    //open the window
  WindowFramework *window = framework.open_window();
 
  //here is room for your own code

window->load_model(framework.get_models(), "/c/teap.egg");
 
    //do the main loop, equal to run() in python
  framework.main_loop();
    //close the window framework
  framework.close_framework();
  return (0);
}

When you say “it can’t be found”, do you mean you get an error message that your model wasn’t loaded properly, or do you only mean that you can’t see it onscreen when you run?

What happens if you try to run pview from the command line:

pview /c/teap.egg

?

Does the file c:/teap.egg in fact exist?

David

I think you may not write the code correctly and forgot to write these two codes

NodePath environ = window->load_model(framework.get_models(), “models/environment”);
environ.reparent_to(window->get_render());

check this page again:
panda3d.org/manual/index.php/L … anda_Model

My problem has changed now after i re complied. By the way it shows up in the model viewer. It now says model loading in the comand box but it never loads in the main window. It would just leave it but im sure panda doesnt take 10 mins to load one model. does it? And sorry im followed the tuts but at the moment im just trying to load a model , i am using this

panda3d.org/manual/index.php/Loading_Models

I copied the cody and just changed the path to make sure the .egg is working.

Hi. I understand your confusion, but hold on.
You say “It now says model loading in the comand box but it never loads in the main window.”.
My guess is, that what you are seeing is the last message displayed in the console. Doesn’t mean it’s still loading.
I think your model is out there, but since you did not create a camera, the render sceen is not ‘looking’ at your model.
I suggest to go back to the first steps of the manual, play with the grassy scenery, then go to the manual part a camera is attached, play with the camera, and THEN add your own model to see if you can spot it with the camera.

I tried i coppied and pasted one of the tuturials and changed the file name to my model ill try scaling up the model incase i cant see because of culling .