Voyager - In-game scene editor

Hi all, whilst working on a side-project, I have made an in-game editor for placing objects in an environment as opposed to the weary process of manually coding all the objects in.

After what I did in the video, the building tool wrote all the code I need in a text file:

self.building18899 = self.loader.loadModel('assets/environment/arctic/buildings/building1.bam')
self.building18899.setScale(3)
self.building18899.setPos(45663.828125, 43457.11328125, -9.174566268920898)
self.building18899.setCollideMask(BitMask32.bit(4))
self.building18899.setH(-89.99999237060547)
self.building18899.flattenStrong()
self.building18899.reparentTo(render)

self.building1_collision9293 = self.loader.loadModel('assets/environment/arctic/buildings/building1collision.bam')
self.building1_collision9293.setScale(3)
self.building1_collision9293.setPos(45663.828125, 43457.11328125, -9.174566268920898)
self.building1_collision9293.setCollideMask(BitMask32.bit(0))
self.building1_collision9293.setH(-89.99999237060547)
self.building1_collision9293.hide()
self.building1_collision9293.reparentTo(render)

self.building1_collision1074 = self.loader.loadModel('assets/environment/arctic/buildings/building1collision.bam')
self.building1_collision1074.setScale(3)
self.building1_collision1074.setPos(45663.828125, 43997.11328125, -9.174566268920898)
self.building1_collision1074.setCollideMask(BitMask32.bit(0))
self.building1_collision1074.setH(-89.99999237060547)
self.building1_collision1074.hide()
self.building1_collision1074.reparentTo(render)

self.building17825 = self.loader.loadModel('assets/environment/arctic/buildings/building1.bam')
self.building17825.setScale(3)
self.building17825.setPos(45663.828125, 43997.11328125, -9.174566268920898)
self.building17825.setCollideMask(BitMask32.bit(4))
self.building17825.setH(-89.99999237060547)
self.building17825.flattenStrong()
self.building17825.reparentTo(render)

self.walkway18112 = self.loader.loadModel('assets/environment/arctic/buildings/walkway.bam')
self.walkway18112.setScale(12)
self.walkway18112.setPos(45183.828125, 43877.11328125, -9.174566268920898)
self.walkway18112.setCollideMask(BitMask32.bit(4))
self.walkway18112.setH(90.00000762939453)
self.walkway18112.flattenStrong()
self.walkway18112.reparentTo(render)

self.walkway17662 = self.loader.loadModel('assets/environment/arctic/buildings/walkway.bam')
self.walkway17662.setScale(12)
self.walkway17662.setPos(45183.828125, 43517.11328125, -9.174566268920898)
self.walkway17662.setCollideMask(BitMask32.bit(4))
self.walkway17662.setH(90.00000762939453)
self.walkway17662.flattenStrong()
self.walkway17662.reparentTo(render)

self.walkway1156 = self.loader.loadModel('assets/environment/arctic/buildings/walkway.bam')
self.walkway1156.setScale(12)
self.walkway1156.setPos(45183.828125, 43157.11328125, -9.174566268920898)
self.walkway1156.setCollideMask(BitMask32.bit(4))
self.walkway1156.setH(90.00000762939453)
self.walkway1156.flattenStrong()
self.walkway1156.reparentTo(render)

self.walkway18646 = self.loader.loadModel('assets/environment/arctic/buildings/walkway.bam')
self.walkway18646.setScale(12)
self.walkway18646.setPos(45183.828125, 42797.11328125, -9.174566268920898)
self.walkway18646.setCollideMask(BitMask32.bit(4))
self.walkway18646.setH(90.00000762939453)
self.walkway18646.flattenStrong()
self.walkway18646.reparentTo(render)

self.walkway12383 = self.loader.loadModel('assets/environment/arctic/buildings/walkway.bam')
self.walkway12383.setScale(12)
self.walkway12383.setPos(45183.828125, 44237.11328125, -9.174566268920898)
self.walkway12383.setCollideMask(BitMask32.bit(4))
self.walkway12383.setH(90.00000762939453)
self.walkway12383.flattenStrong()
self.walkway12383.reparentTo(render)

self.walkway12223 = self.loader.loadModel('assets/environment/arctic/buildings/walkway.bam')
self.walkway12223.setScale(12)
self.walkway12223.setPos(45183.828125, 44537.11328125, -9.174566268920898)
self.walkway12223.setCollideMask(BitMask32.bit(4))
self.walkway12223.setH(90.00000762939453)
self.walkway12223.flattenStrong()
self.walkway12223.reparentTo(render)

self.tree14160 = self.loader.loadModel('assets/environment/arctic/nature/tree.bam')
self.tree14160.setScale(9)
self.tree14160.setPos(45723.828125, 43787.11328125, -9.174566268920898)
self.tree14160.setH(90.00000762939453)
self.tree14160.flattenStrong()
self.tree14160.reparentTo(render)

self.tree14165 = self.loader.loadModel('assets/environment/arctic/nature/tree.bam')
self.tree14165.setScale(9)
self.tree14165.setPos(45723.828125, 43697.11328125, -9.174566268920898)
self.tree14165.setH(90.00000762939453)
self.tree14165.flattenStrong()
self.tree14165.reparentTo(render)

self.tree15679 = self.loader.loadModel('assets/environment/arctic/nature/tree.bam')
self.tree15679.setScale(9)
self.tree15679.setPos(45633.828125, 43742.11328125, -9.174566268920898)
self.tree15679.setH(90.00000762939453)
self.tree15679.flattenStrong()
self.tree15679.reparentTo(render)

I run my program again:

This is just the fundamentals of this project and the point of this is to figure out how I am going to develop this before spending time and effort working on better looking assets, models etc…

Ideas and feedback are more than welcome :slight_smile:

2 Likes

I revamped the entire collision system (and most of the progress this month is purely just working on collisions, collision detection always been a pain) and made a few optimizations so that it performs better, I also had an issue regarding the normal maps of the water after updating to Panda3D 1.10.8, this is now fixed thanks to the wonderful Panda3D community.

My next step is to develop the environment that we currently have, we have a terrain, water, a skybox (which is new this month, looks wonky but we can improve it later on) and a dock. I modeled a building and a tree which will be implemented as test objects into this test environment in addition to my building tool.

Panda3D is solely programming-based in the sense that you must programmatically load in and place all the 3D models in, there is no (official) live visual editor, some (like myself) see that as a plus as it is a challenge, others understandable take it as a disadvantage and might prefer an engine like Unity3D or Unreal, but getting back to the point, I have developed my own in-game building tool in which I can place models directly in-game after activating it and have a direct visualization of how models will look, their scalings etc…

The tool also types up the Python code to load these models in the exact position and rotation, so I can simply load it up from the file after experimenting in-game. Look at my Panda3D forum post about this.

I have also enhanced the player-model; the move-speed is slower, the model is closer to completion (look at the image below), the camera control is rewritten in the sense that the mouse is always hidden and movable by mouse.

so darn cute.

Finally, I have also attempted to fix the character rotation, the player model was supposed to rolling depending on it’s current heading (terminology for ‘direction’) as opposed to the ball changing its heading and rolling on one axis, this has been accomplished using quaternions.

Dev log at itch.io:
February and March 2021 Developer's Log and Update - Voyager by Abdulaziz

1 Like

Hello. It would be very necessary for the engine.

I am not developing this anymore and I have turned my attention into another Panda3D project related that I am aiming to start on soon, I don’t really have much time nowadays as it’s the end of the school year and it’s cluttered with exams.

Feel free to use it if you want, Blender could be a better alternative however.