lianlab / gamekit

Automatically exported from code.google.com/p/gamekit
0 stars 0 forks source link

Blender25 GameKit Start Adddon Script #78

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I make a simple blender addon scripts for gamekit run.

Ogre3D & Blender is my favorite 3d engine & tools. 
so, I'm very interesting this project. 
Keep up the good work.

---

How to Install Blender2.5 GameKit Start Addon

0. Tested on
Blender 2.52.0 (official Blender2.5 alpha2) & 2.52.5(r29760)
GameKit r452
Windows7 64

1. Copy two files(start_gamekit.py, start_gamekit.cfg) to your Blender2.5 
installed directory(.blender\scripts\addons)

2. Open start_gamekit.cfg by notepad & Change to your GameKit execute 
file(OgreKit.exe) path.

3. Run Blender2.5 & click menu File/User Preferences.
Go to Add-Ons tab & check Game: Start GameKit addon.

4. Change UI layout to Blender Game & save test file before start.

5. Click GameKit Panel's Start button.
Press ESC to quit.

Original issue reported on code.google.com by harkon...@gmail.com on 5 Jul 2010 at 10:57

Attachments:

GoogleCodeExporter commented 9 years ago
Hi, I also made a blender plugin for gamekit. It is available on the thread 
concerning blender integration. I attached the last version here. It uses the 
blender 2.5 render API (copy to scripts/io/ or open in text editor and launch)

You will need to apply this patch to blender sources, 
https://projects.blender.org/tracker/?func=detail&aid=22614&group_id=9&atid=127 
or you can just change the call to save_copy_mainfile by a call to 
save_as_mainfile but if you do so the active file in blender will be the 
temporary one and you may loose further changes because if you save it will be 
saved to the wrong file.

This script is mostly completed (permit to adjust all the gamekit startup 
parameters inculding shadow technique, shadow color, fullscreen, window size, 
...) However some of the usefull parameters are lost in existing blender panel 
among unused parameters (materials, ...) but for testing purposes I think the 
only gamekit feature not supported yet by this script is the optional 
ExternalResources.cfg.

Do not hesitate to post feedback if you test it.

Original comment by xavier.thomas.1980@gmail.com on 6 Jul 2010 at 4:37

Attachments:

GoogleCodeExporter commented 9 years ago
It's awesome.
I tested on gamekit r452, but not worked. (ogrekit was crashed.)
so, I update gamekit to r455, it's working fine.

Thanks for sharing, I will use it for test.

Original comment by harkon...@gmail.com on 6 Jul 2010 at 11:03

GoogleCodeExporter commented 9 years ago
Attached a new version with some code clean up and UI panel for lights. I also 
unroll the loops that add the panels so it is easy to remove unnecessary panels 
with one comment.

Please test it and send feedback, as this is complete feature wise I will 
propose it for inclusion in the blender add-on repository.

Note that I added a "debugfps" option to the .cfg file but It is still not used 
by gamekit, i will send my patch for this later.

Link to the patch you need to apply in blender: 
https://projects.blender.org/tracker/?func=detail&aid=22614&group_id=9&atid=127 
the last version (save_copy_03.diff) is necessary but hopefully soon in blender 
trunk.

Original comment by xavier.thomas.1980@gmail.com on 18 Jul 2010 at 1:45

Attachments:

GoogleCodeExporter commented 9 years ago
You do not need to patch Blender anymore, engine_render_gk_03.py will work with 
any Blender svn revision >=30501.

Original comment by xavier.thomas.1980@gmail.com on 19 Jul 2010 at 5:47

GoogleCodeExporter commented 9 years ago
New version is working fine with Blender r30502. (no need patch).

GameKit runtime path selection is need more careful on windows. 
You must turn off 'Relative Path' checkbox at path selection.

If Gamekit runtime path is relative(../../OgreKit.exe), you can't run Gamekit 
rumtime corretly.

Blender(r30502) set it to relative path by default. 

Original comment by harkon...@gmail.com on 20 Jul 2010 at 5:05

GoogleCodeExporter commented 9 years ago
Is there any way to get relative paths to work correctly?

Also, can some try to zip a binary windows distribution of Blender with 
OgreKit, and some .blend file that works out-of-the-box?

Thanks a lot!
Erwin

Original comment by erwin.coumans on 20 Jul 2010 at 4:16

GoogleCodeExporter commented 9 years ago
Relative paths are working correctly and relative path to resources (textures, 
sound) are remapped correctly when saved to the temporary .blend before 
execution. The issue here is if you use the blender file selector to choose the 
OgreKit executable you must use absolute path because the working directory can 
be different then the original .blend location. But I will look into making the 
path absolute automatically.

The file momo_ogre25.blend in svn is working out of the box and demonstrating 
all the features. I can provide a binary distribution for linux 64 but for 
windows it might get complicated. I have a oem license that I never used but I 
will need to set up a virtual machine or a dual boot and a build environment.

On the other hand blender 2.53 will get released today so we just need to 
distribute an Ogrekit binary and the blender add-on. Regarding the add-on I 
will submit it to the blender trackers so it will have a chance to get included 
in the next release. But you can here in the wiki or svn if you want, I put it 
under the MIT license. 

Not really related but: the gamekit website says it is under MIT but sources 
headers are not MIT. 

Original comment by xavier.thomas.1980@gmail.com on 20 Jul 2010 at 8:02

GoogleCodeExporter commented 9 years ago
Attached version 04 which make sure the executable path is absolute.

Original comment by xavier.thomas.1980@gmail.com on 20 Jul 2010 at 9:02

Attachments:

GoogleCodeExporter commented 9 years ago
I made a new version with better error handling, and I posted it in the blender 
tracker. Hopefully it will be included in blender add-ons pack with time.

Check the blender tracker for download:
https://projects.blender.org/tracker/?func=detail&aid=22933&group_id=153&atid=46
7

Original comment by xavier.thomas.1980@gmail.com on 22 Jul 2010 at 1:10

GoogleCodeExporter commented 9 years ago
Mind putting a copy here Xavier? some of us don't have Blender accounts (needed 
to download from the link you posted)

Original comment by BenT.Sol...@gmail.com on 22 Jul 2010 at 1:24

GoogleCodeExporter commented 9 years ago
Here it is.

But note that creating a account is free and open to anyone, also it would make 
maintainability and bug reporting simpler.

Original comment by xavier.thomas.1980@gmail.com on 22 Jul 2010 at 1:31

Attachments:

GoogleCodeExporter commented 9 years ago
>>the gamekit website says it is under MIT but sources headers are not MIT. 

This is a googlecode limitation, its drop down menu doesn't include the zlib 
license. MIT is very similar to zlib anyway.

Original comment by erwin.coumans on 22 Jul 2010 at 4:10

GoogleCodeExporter commented 9 years ago
This is really cool. You know, it would be cool to have an addon section and a 
forum for announcements like these. If this google site is too limited, there 
are ways to get a forum going for free. What about using a free website hosting 
service that allows something like xml or html editing? I'm not sure about free 
website hosts, but some blog hosting sites offer the option to custom edit your 
account blog page code, and then the blog can be edited to look like anything. 
You can even modify its functionally to emulate a conventional site design.

Original comment by demongit...@gmail.com on 3 Aug 2010 at 8:11

GoogleCodeExporter commented 9 years ago
I am closing this issue as the add-on is now in svn and the info of this issue 
is outdated.

See wiki for more informations: 
http://code.google.com/p/gamekit/wiki/BlenderAddon

Original comment by xavier.thomas.1980@gmail.com on 20 Sep 2010 at 12:31