Panda3D Studio!

can this app can be converted to android?thanks

My apologies for the late reply.

This probably depends mostly on how well Panda3D itself supports Android.
However, as I donā€™t have access to any Android devices myself, I cannot do any testing on that platform, or check the results of any changes to my code that might be required to make this project more usable there.
It also depends on how extensive such changes would have to be.

So Iā€™m afraid that I cannot give you a definitive answer at this time.

1 Like

Time for another update!
This could be called a ā€œquality of lifeā€ update I guess, since the new additions and changes are specifically meant to improve the overall user experience.

Letā€™s start with the enhanced toolbar system.
Previously, you could already combine toolbars into a ā€œbundleā€ whose spinner buttons allow you to quickly cycle through all of the toolbars it contains. It was also possible to have several of these bundles side-by-side on the same row, but since the toolbars in a bundle could have very different widths, this could lead to a big waste of space.
The new approach is to pack entire rows of toolbars into a bundle, but no longer having multiple bundles side-by-side. This leads to a better-looking layout without weird, large gaps between toolbars.
Thanks to the new widgets representing toolbar row and bundle ā€œhandlesā€, it is now very easy to move entire rows and bundles, as well as combine (or detach) toolbars/rows/bundles with (from) other toolbars/rows/bundles.

Smaller changes include showing the name of a toolbar when mousing over its grip, and displaying a special ā€œinput commitā€ cursor outside of input fields to indicate that one of them is active. The latter is quite important, as the rest of the GUI is effectively blocked when typing into an input field, something that needed to be made a bit more clear (it seems that Blender does something similar).

The most important part of this upgrade deals with selecting objects.

Until now, it was only possible to select one object at a time and using the Ctrl-key to add or remove objects to/from the selection. While this was acceptable for selecting only a few objects, it was definitely not very practical for selecting large amounts of objects, especially subobjects.
So I have implemented several ways to make creating and editing selections a lot easier.

For starters, you can press Ctrl-A to select all objects, Ctrl-I to invert the current selection or Ctrl-Backspace to select none. You can also do this using the new Select menu.

But now on to the most exciting new feature!
If you worked with 3D modelling software before, then you will most likely have become accustomed to using region-selection. This is something I always wanted to implement in my own project, but never really knew how to do right. But thanks to the invaluable help given to me by @rdb, this dream has now become a reality :slight_smile: ! The part I needed most help with was writing a shader that basically writes to the index of a 1D texture that corresponds to the index of the object that is being rendered. Once this worked, it was not that hard to do rectangular region-selections.
But why stop there? With a few more vital hints from rdb, I managed to get elliptic region-selection working as well. Taking this a step further, I got to fence-selection (point-to-point); this should give users the most control over their selection shapes, with the ability to add and remove any points they want.
A more popular variation of this is lasso-selection, which is now also at your disposal.
But the most fun to be had is probably with paint selection, so that is now available too.
As if all this is not enough, there is even an option to only select those objects that are completely enclosed within the selection shape, which is especially useful for subobject selection. To visually show that this option is active, the selection shape is drawn in a different colour (you can customize the border and fill colours of the selection shape in the skin.txt file).
Single-picking objects remains the default selection method at application startup; you need to press the Alt-key to effect region-selections.
If youā€™d like region-selection to be the default selection method, press Alt-S or click the corresponding button on the new Selection toolbar. In this mode youā€™ll need to press the Alt-key to enable single-picking again. Be warned though, that it is not possible to transform objects in this mode - unless you press the Alt-key.

Okay, so you can now make complex selections quite easily, but wouldnā€™t it be nice if you could actually store them and recall them at some later point? Enter named selection sets! On the aforementioned Selection toolbar you will find a combobox; just enter a name into its input field and presto, you have created a selection set that you can later choose from the dropdown list to immediately reapply.
Need more control? Check out the Sets section of the new Selection control panel, where you can not only create, rename, delete and recall selection sets, but also combine any two sets in several ways: union, intersection, difference and symmetric difference. As a convenience, you can even combine with the current selection instead of a second named set.

And last but not least, the most foolproof way of selecting objects is now also available: selection by name.
This is done using the new Selection dialog box, which can be brought up by pressing N on the keyboard or choosing ā€œSelect by nameā€ from the Select Menu.
This dialog box allows you to quickly choose any objects from a list. There are many options to sort, filter and find names in that list (you can even search within the results of a previous search).
Remember selection sets? These can be used here too.
Whenever a special object-picking mode is active (e.g. when choosing an object to serve as coordinate system or transform center), this dialog is used for the purpose of that mode instead of actually selecting the chosen objects.
Do note that this dialog is not available when working at subobject levels.

Hopefully this upgrade will make working with my project more enjoyable.
Until next time!

ok thanks bro thanks anyaway

Iā€™ve been trying this out and itā€™s great so far. I have one suggestion: you may want to warn users before exporting a bam file with nothing selected. I thought at first that it would export the entire scene and wasted a bunch of time trying to figure out why the exported bam file was invalid. Alternatively, you could have it export the entire scene by default and have an option to only export selected; that would also prevent this kind of mistake.

Very interesting! As mentioned earlier a dedicated studio would be an awesome thing.

To get it running on Linux I installed tkinker and ran it under ā€œpython3 main.pyā€ Made a little block town in about 5 minutes. I have not tried to export and use with panda3d yet as Im just starting. but out of curiosity wanted to see if this worked.

Hi, i had a quick look but it seems you are still using tkinter, which sadly is not so easy to get running on android ( https://www.androwish.org ). Using a pure panda gui everywhere is the way to get app running on android with little effort, at least for the panda part ( python 3.7+ and panda devel ) ā€¦

Happy New Year everyone :slight_smile: !

Thank you for bringing this to my attention!
Not only wasnā€™t this situation handled well, the creation of an empty .bam file was actually a bug.
Just pushed a fix that should solve these issues:

Trying to export an empty scene will now pop up a dialog informing the user that there is nothing to export; in the case where there are objects but none of them are selected, another dialog will give the user the chance to export the whole scene. This seems preferable to simply assuming that the user wants to export the entire scene, as they might not be aware that nothing is selected (e.g. they might have accidentally deselected everything prior to exporting).
At some point I will likely implement a dedicated export dialog where the user can set certain options, and those could include the choice to export everything or just the selection.

Thank you :slight_smile: ! As I read that youā€™re not having an easy time with Blender (itā€™s been said that in some ways itā€™s beyond unintuitive - and I agree) I certainly hope you will find my project useful, as it is my goal to provide a very easy-to-use alternative to existing modelling software (although perhaps not as powerful, as Iā€™m not an experienced, professional programmer).
So if thereā€™s anything you have problems with, or youā€™re looking for a particular feature, let me know and Iā€™ll see what I can do.

If you do, let me know if there are any issues.

And I definitely would like to get rid of it too; the only reason Iā€™m using it is to provide a means to access the operating systemā€™s clipboard, so it is possible to copy and paste values between my project and other desktop programs. On Windows it isnā€™t necessary to install tkinter separately as it is part of the Panda3D distribution for that platform, which was convenient for me as I develop on Windows.
There are some third-party Python packages out there that provide access to the clipboard as well, but I donā€™t have any experience with them. If anyone could offer me some advice on this, it would be very much appreciated!

It would be great of course if Panda3D itself could provide this functionality - the less dependencies, the better - but I donā€™t know if such a request would be appreciated/reasonable.

In the meantime, I might make this functionality optional (depending on whether or not tkinter is installed); it would then only be possible to copy and paste values within the project itself. Would this be a good idea?

1 Like

on a failed import of tk, thatā€™s certainly a good idea
if not using tk and not using threads you could also maybe run in the webgl-port of panda in the browser. Having a internal only clipboard as fallback would certainly ease ports.

Happy new year to you.

Do you have an option to flip scenes that are imported? I brought a scene in and it loaded with the y and z axis flipped. But if I tried to rotate it it rotated all the individual objs in the group rather than the group as a whole. SO on the import button maybe if there was an option to flip the z and y?

Suggestion: Ability to turn off/on the gui when every inch of view is needed.

Did you import the scene from .obj format? These always do end up rotated by -90 degrees around the X-axis.
There was a discussion about this issue with rdb on Github here:

The consensus was that it would be best left up to the user about what to do with this, so I decided against trying to automatically fix the orientation, as the user might have exported the model (e.g. from Blender) in such a way that the imported result is actually orientated as expected.
Keep in mind that if you imported such models directly into your game, they would be oriented that way also.
As such, an automatic ā€œcorrectionā€ on my part would create an inconsistency in this sense.

As to the problem you encountered in my project, that was actually expected behaviour.
If you entered a rotation value into e.g. the X-axis input field (pitch), then that would indeed happen, as this value is interpreted as an ā€œabsoluteā€ angle, so each object would get that pitch angle, relative to the current reference coordinate system (this is set to ā€œWorldā€ by default).
To get the correct result in your case, the entered value should be interpreted as an offset; you can achieve this by right-clicking any of the three transform input fields (make sure theyā€™re not active) and checking ā€œUse relative valuesā€ in the context menu that pops up.
EDIT: FWIW, I have now replaced that context menu with a toolbar toggle-button that makes it a lot easier (and less of a ā€œhidden featureā€) to switch between absolute and relative values.

Another way to do this would be to group all objects together by selecting all of them (press Ctrl-A if there are no objects in the scene you donā€™t want to be affected) and then Ctrl-G. You can then use an absolute angle to rotate this group if you wish. To get the individual objects back, go into the ā€œObject propertiesā€ panel, look for the ā€œGroup propertiesā€ section and click the ā€œDissolveā€ button there. You should now have all of the objects selected again instead of the group object, which has been removed from the scene.

As for being able to hide the GUI, Iā€™ll have to think about that.

Just pushed a fix to handle failed import of tk by falling back on a local clipboard:

In the near(?) future Panda3D itself might provide full support for copying to and pasting from the operating systemā€™s clipboard; one more cool Panda feature to look forward to :slight_smile: .

Hello, @Epihaius. You have done great job making this editor from scratch. Iā€™ve downloaded Panda Studio and it runs flawlessly so far.

Do you mind answering some questions, please?

  1. Do you use Panda 3D Studio to make your own games/multimedia programs with Panda3D?
  2. What do you think about extracting GUI module code from Panda3D Studio and making it a separate GUI framework for Panda 3D?

Thanks

Thank you very much :slight_smile: !

  1. Ironically, of all the people using my project, Iā€™m probably the only one whoā€™s not using it for any specific purpose! Before I started it, I was actually messing around with a prototype for a game, but I got so frustrated with the lack of straightforward, easy-to-use (and preferably free) software to create game assets, that I decided to make my own. Maybe Iā€™m not really the ideal person to undertake such an ambitious project, but Iā€™m doing it because, well, nobody else is. Anyway, I now find myself pouring all of my free time into further developing this project rather than actually using it, but I find it a worthwhile goal to make a game-related tool (which a lot of people could benefit from) instead of working on a game that might just get boring after five minutes :stuck_out_tongue: .

  2. The thought certainly crossed my mind, but from what I read in this topic, most people seem to prefer an external GUI system using HTML or whatever. As a replacement for (or complement to) DirectGUI it might still be useful, but this mostly depends on how the Panda developers themselves feel about this, and it would require their involvement to make this a reality, as some parts should probably be coded in C++ (which I canā€™t help with), like the sizer calculations needed to maintain the layout. Integration into Panda might not be that straightforward as my GUI system makes use of certain subsystems of my project and there might be some caveats trying to make it play nice with a userā€™s application. All that said, yeah, it would be nice to be able to offer this as a built-in GUI framework; if the Panda devs were to consider it, Iā€™d certainly do my part to make it happen.

Thanks for your answers. I think thereā€™s nothing wrong with p. 1, some people make games, some people make tools. Youā€™ll probably get more ideas if you try actually developing a game with the editor.

@Epihaius
Iā€™ve been messing around with the code in your project and right now Iā€™m looking at the way your program exports bam files. I canā€™t seem to find how to create a collision node for any shape. How do you go about doing this?

To export a collision shape, you need to add a model to a group object.
For example, to export a CollisionSphere, create a sphere, select it and press Ctrl+G. In the Object properties control panel, thereā€™s a Member types combobox; choose Collision geometry from its list. The sphere will turn transparent (just like Pandaā€™s built-in visualization for collision shapes) and it will now be exported as a CollisionSphere.
Same goes for box primitives (they become CollisionBox objects), cylinder primitives (these become CollisionCapsules) and plane primitives (CollisionPlanes), while any models whose geometry is unlocked (i.e. with editable subobjects) will be exported as a collection of CollisionPolygons.

If you want a CollisionInvSphere, you can go the Surface properties section of the Object properties panel and check Invert (render inside-out). If you do this with a box primitive, it will be exported as 6 CollisionPlanes forming an inverted box.

When you re-import the resulting .bam files, you will get those primitives back inside a Collision group.

1 Like

Thank you very much for that. I got the first 4 to export, and also the last two, torus and cone. The last two are very slow to create on my machine though even though Iā€™ve got a pretty decent one with i7-4790k and 32 gigs of ram. Anyway, Iā€™m trying to figure out ā€œbasic_geomā€ is for with non-uniformly scaled polygons. So, how do I create what covers ā€œbasic_geomā€ and are there other polyhedrons, I think thatā€™s what theyā€™re called, that are covered beside torus and cone?

Hmmm, torus and cone are interactively created using shaders, and since Iā€™m just a dabbler when it comes to writing shaders theyā€™re probably far from optimal. For example, the cone shader uses ā€œbranchingā€ (if - else statements) in a few places, so this could already be a problem. A thorough inspection of my shaders by an experienced shader programmer is always welcome.
Exporting these two types of models will also result in a collection of CollisionPolygons, which can indeed by quite slow as every single polygon has to be checked whether it is a valid, planar quad or if it should just be exported as a triangular CollisionPolygon.

A ā€œbasic_geomā€ can only be imported, for now. TLDR, its purpose is to be light on resources, at the price of reduced functionality.
In order to have full control over subobjects, instances of dedicated classes need to be created to manage each of these subobjects. For example, a Vertex class exists to keep track of all of the properties of a specific vertex, but also a MergedVertex class, to define which separate vertices are actually duplicate vertices that need to be transformed as one. Apart from that, more geometry nodes need to be created to represent selected and unselected states of subobjects, for each different subobject type.
In short, a lot of bookkeeping and additional geometry is needed to make manipulation of subobjects possible. Obviously this has an important impact on performance and memory usage.
But subobject editing is not always required, so the BasicGeom class was created to deal with geometry in a few basic ways, without all of that overhead.
Currently, you only get such a ā€œbasic geomā€ as a result of importing a model (when you select it, youā€™ll see a light blue bounding box around it instead of a white one). You can convert it to an ā€œeditable geomā€ by unlocking its geometry (which again creates all of the aforementioned overhead), but there is no way (yet) to do the opposite.
There is a bit of an inconsistency right now, in that a primitive does have all of the overhead added as soon as itā€™s created, even though you canā€™t immediately edit its subobjects. Clicking the Unlock geometry button on the control panel is just a formality; nothing really changes except the interface (because you can either edit a model parametrically, or at a subobject level, but not both - that would just be asking for trouble). Thatā€™s just how the project started out, but I am thinking of changing this.
Although having the subobject management system in place for a primitive is convenient for things like snapping to vertices, it would speed up their creation (and things like changing their segmentation) dramatically if initially they were also ā€œbasic geomsā€.
So Iā€™m seriously considering changing a lot in that department; e.g. I might rename BasicGeom to LockedGeom and make the Primitive base class inherit from it, while EditableGeom would be renamed to UnlockedGeom.
Finally, converting unlocked to locked geometry should definitely become a possibility.

No, there arenā€™t any other primitive types available at this time, other than the ones already mentioned.
Having a general polyhedron whose subtype can be changed parametrically would be quite cool, but Iā€™m not sure how/when Iā€™ll be able to add this.

Are a boxā€™s vertices also duplicate vertices since every vertex is, or would be, shared with 3 planar primitives?

And what would a model look like if it is made of non-uniformly scaled polygons? Would it simply be a case of creating an irregular polyhedron in blender?