Move a 3d model in a terrain .bam file

thanks @serega-kkz
i’ll try it but lets continue the topic

Using deprecated DirectStart interface.
Known pipe types:
(all display modules loaded.)
:express(warning): Filename is incorrect case: /c/Users/Cherry.Venkat-HP/Desktop
/Panda3DRacer/landscape.bam instead of /c/Users/Cherry.Venkat-HP/Desktop/Panda3D
:express(warning): Filename is incorrect case: /c/Users/Cherry.Venkat-HP/Desktop
/Panda3DRacer/landscape.bam instead of /c/Users/Cherry.Venkat-HP/Desktop/Panda3D
:express(warning): Filename is incorrect case: /c/Users/Cherry.Venkat-HP/Desktop
/Panda3DRacer/landscape.bam instead of /c/Users/Cherry.Venkat-HP/Desktop/Panda3D
:loader(error): Couldn’t load file landscape.bam: not found on model path (curre
ntly: “/c/Users/Cherry.Venkat-HP/Desktop/Panda3DRacer;/c/Users/Cherry.Venkat-HP/
Traceback (most recent call last):
File “”, line 247, in
game = Game()
File “”, line 73, in init
File “”, line 161, in setup
terrain = base.loader.loadModel(“landscape.bam”)
File “C:\Users\Cherry.Venkat-HP\AppData\Local\Programs\Python\Python38-32\lib
site-packages\direct\showbase\”, line 298, in loadModel
raise IOError(message)
OSError: Could not load model file(s): [‘landscape.bam’]

can you fix it

I’m not clear on how that’s different to what I was describing…

Presuming that you have multiple blend-files–e.g. one with your terrain and one or more with your other model or models–you might do as follows: First, call “blend2bam” on your blend-files, producing model-files. And second, load those model-files in your program, and move them in your code.

Or are you saying that you have multiple objects within the same blend-file, and that you want to move one of the models in that blend-file separately from the others?

If so, then you might search the scene-graph for that one model after loading it into Panda, and then move the NodePath that’s returned from that search. See this page for more on searching the scene-graph.

If I’m still off, could you perhaps please write out in more detail what it is that you’re asking after?

Based on the error messages, it seems that the file-name that you’re using when loading your model has incorrect capitalisation–specifically, it looks like you’re attempting to load “landscape.bam”, while the file is in fact named “Landscape.bam”. (Note the capitalisation of the first letter.)

1 Like

Thaumaturge, has already answered, the whole point is that I’m on Windows, respectively, I don’t have this problem. Which is really strange.

I have made changes to eliminate this.

Why did you move this topic back to the “Compiling or Editing Panda Source Code” category?

I posted this in the “General Discussion” section, because you started your first post without any details.

1 Like

i have windows 7

a “general discussion” first of all when i was making this discussion
I Expected people to “compile and edit code”
but fine im accepting it as “General discussion”

its basically FORZA HORIZON
where bots move around the terrain
i think i have two approaches
may be like making panda3d doing the job or
may be animating the terrain
Like spawning cars to roam around you and they get deleted when your not around it
is there a way to do this in
any of these approaches

I read it but don’t understand what it actually does?
there are more pictures and objects there.

Okay, I think that I understand you on that, now.

(I’m not familiar with Forza Horizon, but “bots [moving] around the terrain” is clear enough, I think.)

I’m not sure of what you mean by either “making panda3d doing the job” or “animating the terrain”, but there are are few different approaches to loading characters, and one of them does involve spawning and deleting objects as you describe. Both of these should be possible in Panda3D, indeed.

One approach is to place the models for your characters in the level-model. You then search the scene-graph as I mentioned in a previous post, and use the results to define your characters.

Another is to use code to generate (i.e. spawn) characters, and (if called for) to delete them under appropriate conditions. You can see a simple version of this in my “Beginner’s Tutorial”.

If you’re planning on having a very large terrain, and on having characters appear and disappear according to the player’s presence, then I’d suggest the second of those two approaches. The first would seem to call for an awful lot of hand-placed characters, I would imagine. Further, it would by nature provide only the specific spawn-locations that you define, which may run counter to giving an impression of characters coming and going freely.

can panda3d really do it! if so i feel glad

If you’re referring to having a loaded model move around in a loaded environment, then it very much can, I believe!

is this tutorial(playlist) good

or is there another youtube tutorial

i mean playlist

check out the whole playlist

just wanted to see.
did you check this out

Um, I’m not sure that I follow. Check what out?

the youtube playlist up ahead of the forum a little

Ah. No, I haven’t looked at that.