New Panda, New samples?


#63

In fact, you can attach any class. For each object, simply apply setTag () You also need to use a callback to run a script that was implemented in the class.

https://www.panda3d.org/manual/ + https://www.panda3d.org/download/noversion/bullet-samples.zip


#64

The tutorial that I’m making is exactly that: a “full (if simple) game”. [edit] As I described above, it has a title menu, gameplay, enemies, and a game-over condition, after which the player may either play again, or quit. [/edit]

[edit]
A quick check: Can directional light be easily given shadows? I know that spot-lights can have shadows out-of-the-box, but I’m not sure that a spot-light looks good in my tutorial.

(I gather that it can be done–but the methods that I’ve seen have all looked more complicated than I’d like for this tutorial.)


#65

Is there an easy way to download just that directory from GitHub? As far as I see, I can either download each file one-by-one, or download the entire repository… :/


#66

Just download the whole repo. Currently there is just the one model, some anims and textures for it and a bunch of empty files.


#67

Fair enough, then, and thanks!


#68

I’ve made a simple little enemy for my tutorial game:


#69

So, I’ve just come to the question of “which way is forwards”, via the old “are my models backwards?” syndrome.

While this issue doesn’t matter overmuch when one is working by oneself–the maths can be adjusted appropriately–when incorporating the work of others it can lead to inconsistencies and awkward code. This is perhaps especially a concern for tutorials, in which we probably want to keep the code simple and uncomplicated. Thus, the issue seems worth addressing.

“NodePath.getQuat().getForward()” seems to return the model’s local positive y-axis, which suggests to me that this is a convenient direction to choose.

In PView this results in the model by default facing “away” from the camera. Similarly, in Blender this results in the model being seen from “behind” when using the “Front” view. Which feels weird–but does kinda make sense in PView: after all, we are presumably looking “forwards”, and so a character that’s facing is is presumably looking “backwards”.

Note that Ralph seems to face “backwards”, which seems as though it may be confirmed by Josh Yelon in this post.

If we do take the positive y-axis to be “forward”, then @wezu, I think that your Panda-chan model is modelled “backwards”.


#70

It is better to make changes in panda3d, to reflect the Y axis of the camera by 180 and make the model turn 180 when loaded. And call it something ModeAxisBlender.


#71

Panda defaults to a right-handed, Z-up coordinate system, which is also what Blender uses. You can change the coordinate system using the coordinate-system PRC variable. In a right-handed, Z-up coordinate system the positive Y-axis is the forward axis. pview and Blender’s “front” view face down the forward axis, so, yes, you will see the backs of models facing down the forward axis.


#72

I’m not sure about this one. I think that making models that face the camera is the natural way for 3d artists and I think it would be better to actually address this in the tutorials, because it’s likely to come up anyway.


#73

I’m confused, I checked the direction of the axes in the blender, and they coincide with panda3d. Obviously, before exporting, you need to rotate 180 degrees or when loading. If my memory serves me, this rule has existed for a long time in some lessons on modding and other engines.


#74

I didn’t say that the coordinate systems were different (I’ll confess that I didn’t think to check). That said, I was interpreting Blender’s term “front view” to mean “the view looking at the front side”, which would imply that the negative y-axis is the “forwards” direction.

However, more to the point, if artists in general prefer to work with the object facing down the negative y-axis, then fair enough, and I’m happy to go with that!

(I can see why artists might prefer to model “backwards”–like wezu, I find that it feels natural to work that way. But I’d like confirmation that this is the case in general.)

As to mentioning this in tutorials, I think that I agree that it’s worth mentioning, at the least, whether we establish a convention or not.

I’m tempted to ask about this on GameDev.net, to get some additional input…


#75

By convention, models point along the positive Y axis in Panda, because “forwards” is to move positively in the Y direction. It’s kind of weird that the “Front” view in Blender doesn’t look at the model from the front, though. I’m not sure if there is a convention for creating models backwards in Blender.


#76

I have always had my characters face down the positive Y-axis in Blender. I believe YoFrankie!, which was made by Blender people using the Blender Game Engine, also used characters modeled this way. I do not know if there is an actual convention, but is seems common enough from my small sampling.


#77

A new question: For the purposes of a beginner’s tutorial, would the “WindowProperties” method make for a good way of setting the window-size?

The “prc file” or “loadPrcFileData” methods are arguably simpler, but the former is a little bit on the arcane side (… I’m still not entirely sure of how they’re properly used), and latter feels a bit more complicated to explain (as a non-vague explanation would presumably involve explaining prc files to some degree).

[edit]
And a simple title menu for my tutorial-game:

I haven’t yet decided quite what I’m going to do for the “game over” dialogue box (aside from using the same button-textures shown above). I’m trying to keep things very simple, so I’m eschewing some of my usual expedients (like using texture-scaling to tile a texture over a DirectFrame).

[edit 2]
Oh, and I decided to use wezu’s Panda-chan model after all: while I was happy with the way that my own version was coming along, I didn’t relish the thought of normal-mapping it, and so decided to just use the model that was already available.


#78

Well, I think that I’ve finished carving up the code into a set of lessons; there are ten at the moment, including the “distribution” step. Now all that remains is to write up the tutorial itself, step-by-step and with images and code-excerpts, I believe.

I take it that a set of HTML pages would be the preferred format? Is there any particular formatting that should be applied? Come to that, what of licencing? What licence information should I provide with the code and assets, for example?

I would like to release my models under Creative Commons Attribution Non-Commercial, I think. @wezu, what licence does Panda-chan fall under?


#79

Panda-Chan is under the Creative Commons Attribution 3.0 Unported (CC BY 3.0) License:
https://creativecommons.org/licenses/by/3.0/


#80

Great, thanks–I’ll update my licence text-file to reflect that then, I intend. :slight_smile:

[edit] Oh, and how should I credit you? Just as “wezu”, or by some other name?


#81

‘wezu’ is fine, there aren’t all that many wezus out there on the web.


#82

Fair enough, “wezu” it is! :slight_smile:

As an update, I’ve begun writing the tutorial itself in HTML. It’ll take some time, I fear, but I’m making progress, I believe.