Panda3D Samples Dojo WX [less early stage@2009-11-03]

Return to Showcase

Panda3D Samples Dojo WX [less early stage@2009-11-03]

Postby astelix » Wed Feb 25, 2009 7:31 pm

What Is It
This is a little framework where it is possible to browse with ease a collection of panda3D programs, either sample snippets or whole videogames, see and modifiy the script code and see each sample at work in the same environment, and with the power of WxWindows widgets library:

Image

As you can see in the image above, there is a searching box where you can reap just the applications you want, to the upper left a selector to switch between sample and game rooms, a Camera menu where to switch antialiasing and fps meter on and off.

Here some screenshots of the P3DDojo in action:

Image ImageImage


The application is actually at an early stage so it is not at his full potential and there should be issues here and there, in fact if you got Panda3D 1.5.4 for Windows installed with the official installer, it is quite possible that the Dojo won't work very well, but it works quite nice with my Ubuntu machine.
So, the environment sure to work with is:
Panda3d 1.6.2 on Ubuntu 9.10 and wxPython 2.8.10

Let me know if you just tried a different setup succesfully so I'll put it here for reference.

The Files
== Main package @ 2009-11-03
The main application files. It needs to be fed with a data pack (see below) to be really useful.

> p3ddojo.zip
Create a folder and unpack into it the whole zip (e.g. using the 'extract here' command) and start the application issuing from console:
Code: Select all
python p3ddojo.py


== The Rooms @ 2009-11-03
The dojo content is organized in rooms - actually there are just two and with little things into but is probably going to grow in the future.

> rooms.zip
Unpack it into the same folder you have unpacked the main application (e.g. using the 'extract here' command)

It would be nice to have some feedback especially from ppl having tried it on systems other than ubuntu linux or different configurations just to see how it works out there and of course suggestions on how to improve or make it better are welcome as well, so feel free to drop a line below here to talk about it.
Last edited by astelix on Thu Dec 03, 2009 5:27 am, edited 18 times in total.
My Rig:
P3D 1.7.0@WinXP & Kubuntu 10.04- Athlon 64 5200 X2 ~ Radeon 3200HD (integrated)
User avatar
astelix
 
Posts: 866
Joined: Mon Mar 27, 2006 4:36 pm
Location: Milano, ITA

Postby treeform » Wed Feb 25, 2009 10:01 pm

Interesting i always found that WX thing cool and now it hosts panda3d stuff yey!
User avatar
treeform
 
Posts: 2106
Joined: Sat May 05, 2007 5:15 pm
Location: SF, CA

Postby clcheung » Wed Feb 25, 2009 10:27 pm

Very interesting ! I am new to panda and I am just starting to build a generic wx framework which can plug to a panda application for customizing the objects in panda (say fog, light, position, ...). Your showcase shall help me on some integration issues.

I try to run your application on my PC, Windows XP, panda 1.5.4, wx 2.8.4. It is not able to start:

:display: Unable to set window properties: !undecorated parent:8324026
Traceback (most recent call last):
File "p3ddojo.py", line 512, in <module>
_app = demoApp(False)
File "C:\Python25\Lib\site-packages\wx-2.8-msw-unicode\wx\_core.py", line 7757
, in __init__
self._BootstrapApp()
File "C:\Python25\Lib\site-packages\wx-2.8-msw-unicode\wx\_core.py", line 7354
, in _BootstrapApp
return _core_.PyApp__BootstrapApp(*args, **kwargs)
File "D:\temp\Panda\download\sample dojo\p3ddojo\p3dwxpod.py", line 140, in On
Init
self._startP3D()
File "D:\temp\Panda\download\sample dojo\p3ddojo\p3dwxpod.py", line 289, in _s
tartP3D
self.onStartP3D()
File "p3ddojo.py", line 256, in onStartP3D
self.reload_tree()
File "p3ddojo.py", line 401, in reload_tree
tcroot=self.build_treelist(treeList, self.win.tree, None)
File "p3ddojo.py", line 451, in build_treelist
treectrl.SetItemImage(treenode, 0)
File "C:\Python25\Lib\site-packages\wx-2.8-msw-unicode\wx\_controls.py", line
5288, in SetItemImage
return _controls_.TreeCtrl_SetItemImage(*args, **kwargs)
ValueError: invalid null reference in method 'TreeCtrl_SetItemImage', expected a
rgument 2 of type 'wxTreeItemId const &'
:display: Closing wglGraphicsWindow
User avatar
clcheung
 
Posts: 574
Joined: Wed Jan 21, 2009 7:23 am

Postby ynjh_jo » Wed Feb 25, 2009 11:16 pm

Nice !
But, why does it need samples pack ? Can't it just load any source files ?
http://ynjh.panda3dprojects.com | http://ynjh.p3dp.com
Intel P4Prescott 2.8GHz HT | ATI Radeon HD4670 1GB GDDR3
User avatar
ynjh_jo
 
Posts: 1795
Joined: Tue Apr 18, 2006 12:41 am
Location: Malang, Indonesia

Postby astelix » Thu Feb 26, 2009 5:02 am

thankyou all for the feedback!
@clcheung
ach! first issue found - apparently is a nonsense: the error you posted say that
Code: Select all
ValueError: invalid null reference in method 'TreeCtrl_SetItemImage', expected a
rgument 2 of type 'wxTreeItemId const &'
but is not true also for your newer WXwidgets version - the second argument must be an imagelist index. Looks like I got to install Panda3D on my dusted PC with widowsXP to see what's going on then, unless other windowers say it works nice for them and is just a your local issue. I'll report you back asap.

@ynjh_jo
heh, you're right, it's just a flexible infrastructure that I used for that purpose - but that app can (and will) do more than I wrote above: I hinted that the app could be localized and indeed if you press CTRL+E in a selected item of the tree, it will pop an editor to modify the summary showed in the summary tab - you just got to save that file with your country extension (.id in your case) and translate the values to the right of the = sign. Pressing F11 will open another one to localize the main application strings as well.
In my todo-list then I mean to expand the dojo adding two more rooms other than samples, one for games and one for models and also to open the application to a web repository where to update the data pool dynamically.
My Rig:
P3D 1.7.0@WinXP & Kubuntu 10.04- Athlon 64 5200 X2 ~ Radeon 3200HD (integrated)
User avatar
astelix
 
Posts: 866
Joined: Mon Mar 27, 2006 4:36 pm
Location: Milano, ITA

Postby clcheung » Thu Feb 26, 2009 8:45 am

astelix wrote:thankyou all for the feedback!
@clcheung
ach! first issue found - apparently is a nonsense: the error you posted say that
Code: Select all
ValueError: invalid null reference in method 'TreeCtrl_SetItemImage', expected a
rgument 2 of type 'wxTreeItemId const &'
but is not true also for your newer WXwidgets version - the second argument must be an imagelist index. Looks like I got to install Panda3D on my dusted PC with widowsXP to see what's going on then, unless other windowers say it works nice for them and is just a your local issue. I'll report you back asap.

@ynjh_jo
heh, you're right, it's just a flexible infrastructure that I used for that purpose - but that app can (and will) do more than I wrote above: I hinted that the app could be localized and indeed if you press CTRL+E in a selected item of the tree, it will pop an editor to modify the summary showed in the summary tab - you just got to save that file with your country extension (.id in your case) and translate the values to the right of the = sign. Pressing F11 will open another one to localize the main application strings as well.
In my todo-list then I mean to expand the dojo adding two more rooms other than samples, one for games and one for models and also to open the application to a web repository where to update the data pool dynamically.


I have not noticed that !
I tried to debug the problem. The function
def get_folder_list(starting_point, patterns='*', extfilter=[])
seems assuming the UNIX style file separator:
for node in x.split('/'):

May be you shall change it to something platform independent.

After I fix it, it seems work except the source editor.
User avatar
clcheung
 
Posts: 574
Joined: Wed Jan 21, 2009 7:23 am

Postby ynjh_jo » Thu Feb 26, 2009 9:59 am

It's os.sep
http://ynjh.panda3dprojects.com | http://ynjh.p3dp.com
Intel P4Prescott 2.8GHz HT | ATI Radeon HD4670 1GB GDDR3
User avatar
ynjh_jo
 
Posts: 1795
Joined: Tue Apr 18, 2006 12:41 am
Location: Malang, Indonesia

Postby astelix » Thu Feb 26, 2009 4:18 pm

spot on guys - that was indeed an oversight due to my long windows inactivity. So I settled up a windowsXP machine and tested the app there and with a big :shock: I found in windows a completely different and sloppy behaviour, therefore I have to consider it verboten for SOs different from linux and under huge revision.
Hope soon to return with good news.
My Rig:
P3D 1.7.0@WinXP & Kubuntu 10.04- Athlon 64 5200 X2 ~ Radeon 3200HD (integrated)
User avatar
astelix
 
Posts: 866
Joined: Mon Mar 27, 2006 4:36 pm
Location: Milano, ITA

Postby clcheung » Sun Mar 01, 2009 5:49 am

Hi

Just find that you need to add evt.Skip() at
def OnNbtabClick(self, evt):
....
evt.Skip()

Otherwise win32 wx will not show your other tab pages.
User avatar
clcheung
 
Posts: 574
Joined: Wed Jan 21, 2009 7:23 am

Postby astelix » Wed Mar 04, 2009 4:41 pm

I'm back
sorry for the long delay clcheung - your finds was good but nothing comparing with the further work I did to make things work in Windows. I'd simply revised the whole app from top to bottom because the issues I'd found but now I got something that runs, even if there's lot to do more to be satisfied. Grab the zips and let me know.
My Rig:
P3D 1.7.0@WinXP & Kubuntu 10.04- Athlon 64 5200 X2 ~ Radeon 3200HD (integrated)
User avatar
astelix
 
Posts: 866
Joined: Mon Mar 27, 2006 4:36 pm
Location: Milano, ITA

Postby clcheung » Wed Mar 04, 2009 9:26 pm

...
I have found quite a lot of problems. It might be only my configuration causing it so I remove the original post here. Get back to you if I can confirm more.
Last edited by clcheung on Wed Mar 04, 2009 10:04 pm, edited 3 times in total.
User avatar
clcheung
 
Posts: 574
Joined: Wed Jan 21, 2009 7:23 am

Postby clcheung » Wed Mar 04, 2009 9:39 pm

Just start to read your implementation:
if wx.Platform == "__WXMSW__": loadPrcFileData("", "load-display pandadx8")
else: loadPrcFileData("", "load-display pandagl")
#

Is it forcing to use directX on Windows ? I have a NVIDIA 9500GL, it has problems in Panda3D's directX implementation. I usually use OpenGL driver.
User avatar
clcheung
 
Posts: 574
Joined: Wed Jan 21, 2009 7:23 am

Postby astelix » Thu Mar 05, 2009 4:24 am

clcheung wrote:Is it forcing to use directX on Windows ? I have a NVIDIA 9500GL, it has problems in Panda3D's directX implementation. I usually use OpenGL driver.

yepp - in my XP machine (athlon 5200+ dual with radeon rv610 chip) opengl gotta half speed and much more issues and I saw directx as an obvious choice on a windows machine but looks like I was too naive to think like that.
I'm starting to feel a bit frustrated with all of this, and I simply can't waste all my already thin spare time fixing Windows issues, given that that clunky OS is not anymore (and will) on my sight, therefore I'm sorry clcheung, but I definitely gotta mark this project as *linux only * compatible and just hope that it will works out-of-the-box with the upcoming Panda3D 1.6 on Windows either.
Last edited by astelix on Fri Mar 06, 2009 3:54 am, edited 1 time in total.
My Rig:
P3D 1.7.0@WinXP & Kubuntu 10.04- Athlon 64 5200 X2 ~ Radeon 3200HD (integrated)
User avatar
astelix
 
Posts: 866
Joined: Mon Mar 27, 2006 4:36 pm
Location: Milano, ITA

Postby ynjh_jo » Thu Mar 05, 2009 7:51 am

I haven't tried the new version, so these are about the first release :

1. there're 2 flags used in the samples, _P3DPOD_ and _SAMPLEDOJO_. Sounds like inconsistency to me.
2. The N00B/actor sample simply doesn't run outside the dojo. It's lacking of DirectionalLight, VBase4, and DirectStart. I guess you missed it simply because you mix the sample's namespace with the pod's, you execute the sample in the pod's namespace. Why don't you use independent namespace for the sample ?
3. In all samples, you forbid DirectStart import. It's not necessary, since once it's imported, it won't be loaded from disk and ran again, so no matter how many times you import it, ShowBase is instantiated only once, unless you intentionally kick it out of sys.modules.
4. Why do you use Shader.load in the shader sample ? That way, you have to pass the absolute path. The natural way to do it is by loader.loadShader. Then it's your pod's responsibility to append the sample's path to getModelPath() before executing it.
http://ynjh.panda3dprojects.com | http://ynjh.p3dp.com
Intel P4Prescott 2.8GHz HT | ATI Radeon HD4670 1GB GDDR3
User avatar
ynjh_jo
 
Posts: 1795
Joined: Tue Apr 18, 2006 12:41 am
Location: Malang, Indonesia

Postby astelix » Thu Mar 05, 2009 9:20 am

thankyou for your post ynjh_jo

all the samples provided so far came mainly off the official p3d package 1.5.4 with some others found in this very forum, slightly touched by myself, but all of those without a serious overhaul, just the directstart disable you saw and other minor touches to make it work on my app, but they're there just to have some cheap meat to roast and no more. The next step, already started, is indeed to provide a serious, real and polished bunch of samples for what will be the first release of the app that, actually, is still too young and need more polish and to add the features I told you before (repository and two more rooms). After that, I'll mark the app as pre-release and I guess will starts to be pretty useful.
My Rig:
P3D 1.7.0@WinXP & Kubuntu 10.04- Athlon 64 5200 X2 ~ Radeon 3200HD (integrated)
User avatar
astelix
 
Posts: 866
Joined: Mon Mar 27, 2006 4:36 pm
Location: Milano, ITA

Postby clcheung » Thu Mar 05, 2009 8:52 pm

astelix wrote:
clcheung wrote:Is it forcing to use directX on Windows ? I have a NVIDIA 9500GL, it has problems in Panda3D's directX implementation. I usually use OpenGL driver.

yepp - in my XP machine (athlon 5200+ dual with radeon rv610 chip) opengl gotta half speed and much more issues and I saw directx as an obvious choice on a windows machine but looks like I was too naive to think like that.
I'm starting to feel a bit frustrated with all of this, and I simply can't waste all my already thin spare time fixing Windows issues, given that that clunky SO is not anymore (and will) on my sight, therefore I'm sorry clcheung, but I definitely gotta mark this project as *linux only * compatible and just hope that it will works out-of-the-box with the upcoming Panda3D 1.6 on Windows either.


That's fine. But I am quite surprised that it seems quite a lot of users in this forum is on linux. I thought that most games (commercial especially) are developed with a target of Windows platform.

Are you able to run this demo on your Windows XP platform with directx and opengl ? I tried both but meet a lot of crashs, unable to open source file for the ode car, and various minor problem found.
User avatar
clcheung
 
Posts: 574
Joined: Wed Jan 21, 2009 7:23 am

Postby ynjh_jo » Thu Mar 05, 2009 10:52 pm

clcheung wrote:... but meet a lot of crashs, unable to open source file for the ode car, and various minor problem found.

Try my IDE.
http://ynjh.panda3dprojects.com | http://ynjh.p3dp.com
Intel P4Prescott 2.8GHz HT | ATI Radeon HD4670 1GB GDDR3
User avatar
ynjh_jo
 
Posts: 1795
Joined: Tue Apr 18, 2006 12:41 am
Location: Malang, Indonesia

Postby astelix » Fri Mar 06, 2009 3:53 am

clcheung wrote:That's fine. But I am quite surprised that it seems quite a lot of users in this forum is on linux. I thought that most games (commercial especially) are developed with a target of Windows platform.

yeah it's obviously true that if you want to make big money you gotta spend your time targetting Windows but that's not my concern cos' I'm a hobbyist and got a small free-time window during the week to play with the panda. But don't be so surprised about linux cos' the community is today very large, especially thanks to the several graphic OS that runs above his kernel and i suggest you to give it a try.

clcheung wrote:Are you able to run this demo on your Windows XP platform with directx and opengl ? I tried both but meet a lot of crashs, unable to open source file for the ode car, and various minor problem found.

yes I did but actually I backed-off all the windows skews and the last update I guess it won't work anymore, sorry.
My Rig:
P3D 1.7.0@WinXP & Kubuntu 10.04- Athlon 64 5200 X2 ~ Radeon 3200HD (integrated)
User avatar
astelix
 
Posts: 866
Joined: Mon Mar 27, 2006 4:36 pm
Location: Milano, ITA

Postby astelix » Thu Mar 12, 2009 12:47 pm

Today I finished another step: I added a room switcher where to switch from samples and games branches. Grab the files from the first post of the thread and enjoy.
Last edited by astelix on Mon Mar 16, 2009 7:31 am, edited 1 time in total.
My Rig:
P3D 1.7.0@WinXP & Kubuntu 10.04- Athlon 64 5200 X2 ~ Radeon 3200HD (integrated)
User avatar
astelix
 
Posts: 866
Joined: Mon Mar 27, 2006 4:36 pm
Location: Milano, ITA

Postby astelix » Mon Mar 16, 2009 7:29 am

Another step beyond toward the alpha:
fixed and improved some stuff and added a couple more of nice samples: the famous pandasteer, soft shadows and LOD.
Grab'em as always from the first post of this thread and enjoy.
The next and last step shall be the repository and after that I'll mark this project as definitely "alpha stage: towards windows compatibility".
Sorta.
My Rig:
P3D 1.7.0@WinXP & Kubuntu 10.04- Athlon 64 5200 X2 ~ Radeon 3200HD (integrated)
User avatar
astelix
 
Posts: 866
Joined: Mon Mar 27, 2006 4:36 pm
Location: Milano, ITA

Postby Braveheart » Sat Mar 21, 2009 8:23 pm

The "games.zip" is the same links as the "samples.zip"!
Braveheart
 
Posts: 26
Joined: Thu Mar 15, 2007 2:22 pm
Location: Scotland

Postby astelix » Sat Mar 21, 2009 8:46 pm

darn cut & paste
seen and fixed, thankyou!
My Rig:
P3D 1.7.0@WinXP & Kubuntu 10.04- Athlon 64 5200 X2 ~ Radeon 3200HD (integrated)
User avatar
astelix
 
Posts: 866
Joined: Mon Mar 27, 2006 4:36 pm
Location: Milano, ITA

Postby martburg » Wed Dec 02, 2009 3:52 pm

Hi Astelix,

verry nice work.

on the windows side there are some bugs still. Are you working in this direction still or is it as you said a linux only project?

cheers Martin
martburg
 
Posts: 56
Joined: Fri Dec 05, 2008 12:35 pm

Postby astelix » Thu Dec 03, 2009 3:38 am

*DELETED*
Last edited by astelix on Mon Dec 07, 2009 9:13 am, edited 1 time in total.
My Rig:
P3D 1.7.0@WinXP & Kubuntu 10.04- Athlon 64 5200 X2 ~ Radeon 3200HD (integrated)
User avatar
astelix
 
Posts: 866
Joined: Mon Mar 27, 2006 4:36 pm
Location: Milano, ITA

Postby astelix » Thu Dec 03, 2009 5:40 am

ok I repacked the last version and still works on last ubuntu and p3d - not tested on windows though so download and check it out martburg and please post me back eventual issues
My Rig:
P3D 1.7.0@WinXP & Kubuntu 10.04- Athlon 64 5200 X2 ~ Radeon 3200HD (integrated)
User avatar
astelix
 
Posts: 866
Joined: Mon Mar 27, 2006 4:36 pm
Location: Milano, ITA


Return to Showcase

Who is online

Users browsing this forum: No registered users and 0 guests