Texture on a .egg model

All right, then it likely is indeed that some part of the process–whether YABEE converting the model, or Panda loading it, or the conversion from egg to bam, or something else–is running into that aforementioned memory limitation instated by Windows.

I’ve run into similar effects myself when exporting and loading large levels, but since I’m using Linux the result is instead simply that my computer becomes unresponsive until the process is complete.

In my case I found that it helped to split my level up into “chunks” (managed in Blender by an add-on).

If that’s not feasible in your case, could you perhaps replace part of the level-model with a heightmap, and then add elements unsuited to a heightmap (like overhangs) via separate models?

(As to implementing a heightmapped terrain, Panda’s GeoMipTerrain class may do the job; I’m not sure offhand of whether it’s been superseded, however.)

I have already experienced GeoMipTerrain but I got stuck on the error:

grutil(error): No valid heightfield image has been set!

I saw that there were already topics on this error but I do not quite understand how to solve it

This error occurs while there’s no heightfield texture set.
You need to call terrain.setHeightfield("your_heightfield.jpg") before generating terrain. But if you are doing this and still getting the error, this is strange.

I did it like that but it doesn’t work. My file is in png but it doesn’t change anything i think

from panda3d.core import *
from direct.showbase.ShowBase import ShowBase

class MyApp(ShowBase):

    def __init__(self):
        ShowBase.__init__(self)

        self.terrain = GeoMipTerrain("map_test")
        self.terrain.setHeightfield("models/HF3.png")
        self.terrain.getRoot().reparentTo(render)
        self.terrain.setBruteforce(True)
        self.terrain.generate()


app = MyApp()
app.run()

This is perfectly valid code. It shouldn’t give any errors, unless your png file is missing or corrupted. I only had to add this line after generate: self.terrain.getRoot().setSz(100) to scale terrain z axis 100 times.

I think you are getting this error because:

  1. Something is wrong with your texture
  2. Something is wrong with your system