Simple LEvel Editor for Panda3D (WORKING!)

Hey, nice project, could you make a list at the original post which outlines everything that it can do? Would help figure out instead of reading through everything.

I’ll go edit the first post, but I’ve made an manual, that should be some help:
htmlpreview.github.io/?https://g … index.html

I’ve made a ‘little’ update to the editor.

There’s a new function - a ‘smooth brush’ it will blur the heightmap with it you can turn something like this:

into this:

Some nonsense shaders have been fixed, and to make things faster fog-blur, shadows and distrortions have been removed. The new shaders don’t use vertex tangent and binormal inputs so making new models for the editor should be a bit simpler (normal mapping still works, the fragment shader calculates the needed cotangent frame).

The default save method is now to write the data into a sqlite database, but it can be changed at will as I wrote a few posts up.

Some models have been added to the repo:
-7 barrel models
-3 basket models
-16 rocks
-14 boxes
-3 wood debris
-11 jugs
-4 menhirs
-6 sacks
-5 shelfs
-16 stones
-3 chairs
-5 tables
-128 tile elements (98 walls, 10 floors, 20 corners)
-a wooden fence (6 variants)
-low stone wall
-animated fisherman with idle and talk animations (a bit big, needs to be scaled)
-bad, bowl, bucket, broom, mug, plate, 2 houses, still… dead chicken.

There are still some errors but I hope I can fix’em soon.

Hi, I really want to use this, but I’m getting errors, here is what I get.

andrew@bluebox:~/Downloads/koparka-master$ python main.py
Known pipe types:
  glxGraphicsPipe
(all display modules loaded.)
:display:gsg:glgsg(error): An error occurred while compiling GLSL shader shaders/cloud_v.glsl:
0:2(10): error: GLSL 1.40 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
:display:gsg:glgsg(error): An error occurred while compiling GLSL shader shaders/cloud_f.glsl:
0:2(10): error: GLSL 1.40 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
:display:gsg:glgsg(error): An error occurred while compiling GLSL shader shaders/terrain_v.glsl:
0:2(10): error: GLSL 1.40 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
:display:gsg:glgsg(error): An error occurred while compiling GLSL shader shaders/terrain_f.glsl:
0:2(10): error: GLSL 1.40 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
:display:gsg:glgsg(error): An error occurred while compiling GLSL shader shaders/grass_v.glsl:
0:2(10): error: GLSL 1.40 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
:display:gsg:glgsg(error): An error occurred while compiling GLSL shader shaders/grass_f.glsl:
0:2(10): error: GLSL 1.40 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
:display:gsg:glgsg(error): An error occurred while compiling GLSL shader shaders/fxaa_f.glsl:
0:3(12): warning: extension `GL_EXT_gpu_shader4' unsupported in fragment shader
0:29(15): error: no matching function for call to `texture2DLod(sampler2D, vec2, float)'; candidates are:
0:29(15): error: type mismatch
0:30(15): error: no function with name 'texture2DLodOffset'
0:30(15): error: type mismatch
0:31(15): error: no function with name 'texture2DLodOffset'
0:31(15): error: type mismatch
0:32(15): error: no function with name 'texture2DLodOffset'
0:32(15): error: type mismatch
0:33(14): error: no matching function for call to `texture2DLod(sampler2D, vec2, float)'; candidates are:
0:33(14): error: type mismatch
0:58(2): error: no matching function for call to `texture2DLod(sampler2D, vec2, float)'; candidates are:
0:58(2): error: type mismatch
0:59(2): error: no matching function for call to `texture2DLod(sampler2D, vec2, float)'; candidates are:
0:59(2): error: type mismatch
0:58(2): error: operands to arithmetic operators must be numeric
0:57(14): error: operands to arithmetic operators must be numeric
0:61(2): error: no matching function for call to `texture2DLod(sampler2D, vec2, float)'; candidates are:
0:61(2): error: type mismatch
0:62(2): error: no matching function for call to `texture2DLod(sampler2D, vec2, float)'; candidates are:
0:62(2): error: type mismatch
0:61(2): error: operands to arithmetic operators must be numeric
0:60(33): error: operands to arithmetic operators must be numeric
0:60(14): error: operands to arithmetic operators must be numeric

What kind of video card do you have? Have you installed the latest drivers?

sorry that was the problem thanks :slight_smile:

Yes you must have video drivers installed and also if you notice you have no cursor thats the reason

A big mess up in Python 3.6. Can you please release it for Python 3.6?

The configure for stone, sea and sky doesnt work for me :frowning:

Please make this for android phones,thanks

I don’t think I’ll have any free time to revisit the code and fix bufs/update to py3 in the next month or two.

1 Like

thanks wezu…

Hello, @wezu. Sorry for bumping an old topic. Can you please tell how did you make the terrain brushes for your editor? Were they procedurally generated?

I like your editor, and as every wheel inventor, I want to implement the terrain editing functionality on my own. So I am looking how to make or where to get somewhat realistic terrain brushes.

Hi Wezu,

I’m new to panda3d, and using koparka as editor, it’s really nice one.
I met one issue: it seems missing some files: “koparka/models_walls/props1.dds”, do you have time to check this problem?

Hello @wezu! I ran into a problem: the editor does not save a dictionary with objects of my level. I hit all the checkboxes when saving. Nevertheless, the editor saved all files except the dictionary with objects. As a result, in the file with the level, I see the following picture:Снимок экрана_2021-05-04_12-09-31
But my level looks completely ordinary. My only change in the settings is the change in time. However, I don’t think the object dictionary depends on it. Here is my level:

guys give me a link to kaparka

@Denis_Malinov, here is link to koparka - GitHub - wezu/koparka: A heightmap and/or level editor for Panda3D
Read first post in this topic.

Hello guys, I know this is a super old (and gold) topic, but am glad that I found it.
I want to thank Wezu for such a project.

Am a new learner in Panda3d and in 3D topics in general, I found this project might help me understand how I can create my own terrain, I’ve seen the code but couldn’t understand 100%, So am asking if anyone still knows about it or remember it, and can tell me the steps how the terrain has been created it will be great and save me a lot of time.

Thanks in advance, and please excuse my English.

The magic of the terrain edition of koparka is on the buffpaint.py file. It’s the main workhouse of most mode (heightmap, grass, texture, walk), object mode would be in objectpainter.py.

Its hard to explain line by line how it work, but in short the editor create the main terrain you’re seeing and some buffers. Those buffers and their respective planes are what you’re actually painting on when you create your terrain.

You can find those resulting painting ont the save directory / name of the saved project.

Heighmap.png grass.png and object.json are the saved file of these respective mode on the editor.

If i rember correctly detail1.png and detail2.png are both texture maps for texture mode. Those are actually referenced as atr and atr2 in the code, not detail.
Navmesh files are for pathfinding and are produced by the walk mode.

You’ll also wanna take a look at the shader directory, be sure to look at shader that are actually used (those referenced in the code/config).

If you have more specifics questions, feel free to ask :slight_smile:

2 Likes