Modify world.egg in roaming ralph

Hello all!! I am newbie…
I tried to load my own world.egg into Roaming ralph project!
for instance…
self.environ = loader.loadModel(MYDIR+"/models/my_world")

but I got some error messege", line 65, in init
ralphStartpos = self.environ.find("**/start_point").getpos()
AsserttionError: !is_empty() at line 943 of panda/src/pgraph/nodePath.cxx

I export ‘my_world.egg’ from 3dsmax normally.
Is it has a special method to export .egg file that contain terrain data?
Thank you !!

The Roaming Ralph environment model has something more than your model.

To indicate the starting position of Ralph, the makers of the model created a mesh with just 1 vertex and called it start_point, and placed it at the position where Ralph should start roaming. As you can see in the script:

ralphStartpos = self.environ.find("**/start_point").getPos()

This function gets the position of that starting position mesh and using this method they place Ralph at that starting point.

So, in the terrain in 3dsmax, create a plane, call it “start_point”, rightclick, convert to editable poly, remove 3 vertices, center the pivot point at the remaining vertex, and now you can export. (dunno if this is not 100% accurate, I havent used 3dsmax for a long time)

Hope this helps.

Oh! it 's work! :open_mouth:
An error has gone.
I export that vertex (names start_point) as a pose.
But how can I create a terrain,my model can walk on, in 3DSMax?
( if I export only the vertex when I run an application there was no terrain)

In a tutorial it has only one file names “world.egg”.
Is it contain both position data and meshes of terrain?
I can create a position data (start_point) from your suggestion!!
but how can I create meshes of terrain and how to export it?

Thank you very much!!

Uh? You can export two meshes at the same time, can’t you?
1 mesh with start_point, and the other the terrain…

I create a vertex names “start_point” and I create a plane names “floor” in test.max.
I export them to .egg file.
In “Export Setting” I set the export type to “pose” .
In “Option” box there are “Export Entire Scene” and “Export Meshes” radio button. I choose “Export Meshes” and add “start_point” and “floor” to a box below.

“Export All Frame” and “Use Frame” radio button I choose “Use Frame”.
Then I click “Ok” and click “Export Now”.

When I run the appliction I can’t see my floor that I has created.
( I think the floor I has created is too big enough )
Did the setting in “Export Setting” is wrong?
Help me please. :blush:

I do not think the export settings were wrong. But I think a max user can better answer your question :slight_smile:

But hm… It could be the plane that was wrong. It could be indeed too small, but also try flipping the plane normal. That might help, becuase Panda3D renders by default just 1 side of the plane.

Oh it work!!
I check “Double-sided Polygon” check box in ‘Export Setting’ window!
I think I forget to flip my plane to normal in 3DSmax.
Thank you very much!!! :astonished:

And one more question :blush:
I notice trees and stones in “Roming Ralph”.
I can’t control my model walks through them.
They must have colission detection,I think.

And then I want add my own trees name “tree”.
I try to looking for some lines in “Roaming Ralph” code to modify them.
But I can’t.

How can I add my own trees in the scene.
Help me,please. :blush:

Anyway you can do this in blender???