highpoly model wont load (crash)

SO I have this terrain model which I cant load in any way to Panda. It doesnt have materials/textures. I tried exporting with Chicken, but that egg wont load, I then tried exporting to obj, then to egg with obj2egg, same.
Heres an obj: 2shared.com/file/Otg4pxQZ/terrain.html
It loads fine in Blender, but again crash if using obj2egg, then loading with Pview.

Could it be that theres a default limit for faces/vertices per geom?

What kind of crash? And how many polygons are we talking about? The egg loader is a little on the memory-intensive side, so it’s possible to hit the Windows 2GB limit if you have a ridiculous number of polygons.

David

I don’t seem to have an “obj2egg” in my bin folder, but I imported your obj into Blender and then exported it with Chicken. No changes, all defaults. It was viewable in pview and I was able to load it into my own dev sandbox in place of my usual terrain.

No error message is printed out, its the Windows error “Program has stopped working”, check online for solutions.

It could be an issue with Chicken exporter. Here’s an egg exported with it, if I try to load it in Pview, it will crash like that.
2shared.com/file/n_zW5Bi-/terrain.html

Same in my own game

import direct.directbase.DirectStart
from pandac.PandaModules import *

model = loader.loadModel('terrain')
model.reparentTo(render)

run()

I’m able to load your egg file in pview without difficulties. There’s only 65025 quads–130050 triangles–so it’s not a problem with memory. But it does require 65539 vertices, which is three more than 65536, the most you can store with the usual 16-bit index, so this is a suspicious crash.

What version of Panda are you using? We used to have a problem with Panda exceeding this limit in some cases and crashing. Have you tried it with the buildbot release?

If you set “notify-level-display debug”, what output do you get for max_elements_vertices and max_elements_indices? For me it looks like this:

:display:gsg:glgsg(debug): max_elements_vertices = 2048, max_elements_indices = 150000

David

Im using buldbot version from May.

max_elements_vertices = 1048576, max_elements_indices
 = 1048576

Hm. Can you process the egg file with egg2bam without crashing?

David

Forgot to mention, Ive tried and it also crashes

Hmm, well, I will need some more information. Try putting this in your Config.prc file:

notify-level-gobj spam
notify-output debug.txt

then run the egg2bam command and post the output of debug.txt somewhere (it will probably be too large to post directly in the forum). Don’t forget to take these lines out of your Config.prc file afterward!

David

got empty txt file

What! The notify-output line should redirect all of Panda’s normal output into the text file, instead of to the console. Was it still displaying messages on the console? If so, then it suggests it didn’t see the notify-output line; maybe you added it to the wrong Config.prc file?

David

Nothing in the console as well.
If I were using the wrong prc, probably wouldn’t get an empty text file either.

Do you get any output if you run a working egg file?

Yes. For example the box.egg file.
Actually, the txt file is still empty, but this is printed in the console

C:\Users\User\Desktop>egg2bam box.egg -o box.bam

:gobj: Loading texture /c/Panda3D-1.8.0/models/maps/noise.rgb
:gobj(spam): 00237A40.add_vertex(0)
:gobj(spam): 00237A40.add_vertex(1)
:gobj(spam): 00237A40.add_vertex(3)
:gobj(debug): 00237A40.make_indexed()
:gobj(debug): 00237AF4:3.reserve_num_rows(2), size = 4
:gobj(debug): 00237B4C.unclean_realloc(4)
:gobj(spam): 00237AF4:3.set_num_rows(1), size = 2
:gobj(spam): 00237AF4:3.set_num_rows(2), size = 4
:gobj(spam): 00237AF4:4.set_num_rows(3), size = 6
:gobj(debug): 00237B4C.clean_realloc(8)
:gobj(spam): 00237A40.add_vertex(2)
:gobj(spam): 00237AF4:4.set_num_rows(4), size = 8
:gobj(spam): 00237A40.add_vertex(4)
:gobj(spam): 00237AF4:6.set_num_rows(5), size = 10
:gobj(debug): 00237B4C.clean_realloc(16)
:gobj(spam): 00237AF4:6.set_num_rows(6), size = 12
:gobj(spam): 00237AF4:4.set_num_rows(7), size = 14
:gobj(spam): 00237A40.add_vertex(5)
:gobj(spam): 00237AF4:4.set_num_rows(8), size = 16
:gobj(spam): 00237A40.add_vertex(7)
:gobj(spam): 00237AF4:4.set_num_rows(9), size = 18
:gobj(debug): 00237B4C.clean_realloc(32)
:gobj(spam): 00237A40.add_vertex(6)
:gobj(spam): 00237AF4:4.set_num_rows(10), size = 20
:gobj(spam): 00237A40.add_vertex(8)
:gobj(spam): 00237AF4:6.set_num_rows(11), size = 22
:gobj(spam): 00237AF4:6.set_num_rows(12), size = 24
:gobj(spam): 00237AF4:4.set_num_rows(13), size = 26
:gobj(spam): 00237A40.add_vertex(9)
:gobj(spam): 00237AF4:4.set_num_rows(14), size = 28
:gobj(spam): 00237A40.add_vertex(11)
:gobj(spam): 00237AF4:4.set_num_rows(15), size = 30
:gobj(spam): 00237A40.add_vertex(10)
:gobj(spam): 00237AF4:4.set_num_rows(16), size = 32
:gobj(spam): 00237A40.add_vertex(12)
:gobj(spam): 00237AF4:6.set_num_rows(17), size = 34
:gobj(debug): 00237B4C.clean_realloc(64)
:gobj(spam): 00237AF4:6.set_num_rows(18), size = 36
:gobj(spam): 00237AF4:4.set_num_rows(19), size = 38
:gobj(spam): 00237A40.add_vertex(13)
:gobj(spam): 00237AF4:4.set_num_rows(20), size = 40
:gobj(spam): 00237A40.add_vertex(15)
:gobj(spam): 00237AF4:4.set_num_rows(21), size = 42
:gobj(spam): 00237A40.add_vertex(14)
:gobj(spam): 00237AF4:4.set_num_rows(22), size = 44
:gobj(spam): 00237A40.add_vertex(16)
:gobj(spam): 00237AF4:6.set_num_rows(23), size = 46
:gobj(spam): 00237AF4:6.set_num_rows(24), size = 48
:gobj(spam): 00237AF4:4.set_num_rows(25), size = 50
:gobj(spam): 00237A40.add_vertex(17)
:gobj(spam): 00237AF4:4.set_num_rows(26), size = 52
:gobj(spam): 00237A40.add_vertex(19)
:gobj(spam): 00237AF4:4.set_num_rows(27), size = 54
:gobj(spam): 00237A40.add_vertex(18)
:gobj(spam): 00237AF4:4.set_num_rows(28), size = 56
:gobj(spam): 00237A40.add_vertex(20)
:gobj(spam): 00237AF4:6.set_num_rows(29), size = 58
:gobj(spam): 00237AF4:6.set_num_rows(30), size = 60
:gobj(spam): 00237AF4:4.set_num_rows(31), size = 62
:gobj(spam): 00237A40.add_vertex(21)
:gobj(spam): 00237AF4:4.set_num_rows(32), size = 64
:gobj(spam): 00237A40.add_vertex(23)
:gobj(spam): 00237AF4:4.set_num_rows(33), size = 66
:gobj(debug): 00237B4C.clean_realloc(128)
:gobj(spam): 00237A40.add_vertex(22)
:gobj(spam): 00237AF4:4.set_num_rows(34), size = 68
:gobj(debug): 0023885C:2.reserve_num_rows(24), size = 768
:gobj(debug): 002388B4.unclean_realloc(768)
:gobj(spam): 0023885C:3.set_num_rows(1), size = 32
:gobj(spam): 0023885C:3.set_num_rows(2), size = 64
:gobj(spam): 0023885C:3.set_num_rows(3), size = 96
:gobj(spam): 0023885C:3.set_num_rows(4), size = 128
:gobj(spam): 0023885C:3.set_num_rows(5), size = 160
:gobj(spam): 0023885C:3.set_num_rows(6), size = 192
:gobj(spam): 0023885C:3.set_num_rows(7), size = 224
:gobj(spam): 0023885C:3.set_num_rows(8), size = 256
:gobj(spam): 0023885C:3.set_num_rows(9), size = 288
:gobj(spam): 0023885C:3.set_num_rows(10), size = 320
:gobj(spam): 0023885C:3.set_num_rows(11), size = 352
:gobj(spam): 0023885C:3.set_num_rows(12), size = 384
:gobj(spam): 0023885C:3.set_num_rows(13), size = 416
:gobj(spam): 0023885C:3.set_num_rows(14), size = 448
:gobj(spam): 0023885C:3.set_num_rows(15), size = 480
:gobj(spam): 0023885C:3.set_num_rows(16), size = 512
:gobj(spam): 0023885C:3.set_num_rows(17), size = 544
:gobj(spam): 0023885C:3.set_num_rows(18), size = 576
:gobj(spam): 0023885C:3.set_num_rows(19), size = 608
:gobj(spam): 0023885C:3.set_num_rows(20), size = 640
:gobj(spam): 0023885C:3.set_num_rows(21), size = 672
:gobj(spam): 0023885C:3.set_num_rows(22), size = 704
:gobj(spam): 0023885C:3.set_num_rows(23), size = 736
:gobj(spam): 0023885C:3.set_num_rows(24), size = 768
:gobj(debug): 00237A40.reserve_num_vertices(34)
:gobj(debug): 00237AF4:3.reserve_num_rows(34), size = 68
:gobj(debug): 00237B4C.clean_realloc(68)
:gobj(debug): 00238AB0:3.reserve_num_rows(6), size = 12
:gobj(debug): 00238B08.unclean_realloc(12)
:gobj(debug): 00238B38:3.reserve_num_rows(6), size = 12
:gobj(debug): 00238B90.unclean_realloc(12)
:gobj(spam): 00238AB0:3.set_num_rows(1), size = 2
:gobj(spam): 00238B38:3.set_num_rows(1), size = 2
:gobj(spam): 00238AB0:3.set_num_rows(2), size = 4
:gobj(spam): 00238B38:3.set_num_rows(2), size = 4
:gobj(spam): 00238AB0:3.set_num_rows(3), size = 6
:gobj(spam): 00238B38:3.set_num_rows(3), size = 6
:gobj(spam): 00238AB0:3.set_num_rows(4), size = 8
:gobj(spam): 00238B38:3.set_num_rows(4), size = 8
:gobj(spam): 00238AB0:3.set_num_rows(5), size = 10
:gobj(spam): 00238B38:3.set_num_rows(5), size = 10
:gobj(spam): 00238AB0:3.set_num_rows(6), size = 12
:gobj(spam): 00238B38:3.set_num_rows(6), size = 12
:gobj(debug): 00239360.unclean_realloc(768)
:gobj(debug): 00238B08.unclean_realloc(0)
:gobj(debug): 00238B90.unclean_realloc(0)
:gobj(debug): 00239390:3.reserve_num_rows(6), size = 12
:gobj(debug): 002393E8.unclean_realloc(12)
:gobj(debug): 00238AB0:3.reserve_num_rows(6), size = 12
:gobj(debug): 00238B08.unclean_realloc(12)
:gobj(spam): 00239390:3.set_num_rows(1), size = 2
:gobj(spam): 00238AB0:3.set_num_rows(1), size = 2
:gobj(spam): 00239390:3.set_num_rows(2), size = 4
:gobj(spam): 00238AB0:3.set_num_rows(2), size = 4
:gobj(spam): 00239390:3.set_num_rows(3), size = 6
:gobj(spam): 00238AB0:3.set_num_rows(3), size = 6
:gobj(spam): 00239390:3.set_num_rows(4), size = 8
:gobj(spam): 00238AB0:3.set_num_rows(4), size = 8
:gobj(spam): 00239390:3.set_num_rows(5), size = 10
:gobj(spam): 00238AB0:3.set_num_rows(5), size = 10
:gobj(spam): 00239390:3.set_num_rows(6), size = 12
:gobj(spam): 00238AB0:3.set_num_rows(6), size = 12
:gobj(debug): unify_in_place(65535, 1): Geom [ GeomTristrips ], 12 faces
:gobj(debug): 002388B4.unclean_realloc(0)
Writing box.bam
:gobj(debug): Texture file /c/Panda3D-1.8.0/models/maps/noise.rgb found
as ../../../Panda3D-1.8.0/models/maps/noise.rgb
:gobj(debug): Alpha image  found as
:gobj(debug): 00238B08.unclean_realloc(0)
:gobj(debug): 002393E8.unclean_realloc(0)
:gobj(debug): 00237B4C.unclean_realloc(0)
:gobj(debug): 00239360.unclean_realloc(0)

Oh, hmm. How about if you just pview the terrain.egg file instead of using egg2bam?

David

Even weirder. When those prc vars are set,

pview terrain.egg

will start pview with a blank window (not even the triangle), no error, no console output or text file.
When the config vars are disabled, the same crash with no error message.

your spirit is wrong! you have to concentrate you very hard, just focus the exporter and think positiv while exporting.

I don’t think a joke is helping here. People might think the topic is solved when comments are added.

isnt it?

are you still triing to export your terrain and a box?

really there must be something wrong with your spirit!

Banned this troll for the 4th time now. sigh (Or 5th time? I’m starting to lose count of the number of usernames he’s had.)

Anyway, now that that problem’s solved, let’s proceed on the original problem.