Experimental PyPRP

Announcements and discussion regarding any projects related to Cyan Worlds' Plasma Engine including (but not limited to) CyanWorlds.com Engine, Drizzle, OfflineKI, PyPRP, and libHSPlasma.

Re: Experimental PyPRP

Postby Sirius » Mon May 18, 2015 5:31 am

Latest changes:
  • the export menu is back for now. It also includes the "low memory export" option I posted for DenDwaler's Cathedral (which wasn't included in the official 2.49 PyPRP)
  • delta animations can now be exported directly. Delta location is fine, delta rotation might not be 100% accurate (my knowledge of eulers and quaternions is limited).

Browsing older topics, it seems Plasma simply cannot handle relative animations, unfortunately. So animations are automatically converted on export to absolute coordinates.
If that's not enough, I can have a look at converting D'Lanor's scripts to the new Blender.
Also, something I forgot about animations on Blender 2.7: by default they all start at frame 0 (the same as Plasma), and I updated PyPRP to match it. So when dealing with complex animations made on version 2.49, you might want to go into the Graph Editor, enter edit mode, and grab all your markers one frame to the left.

Concerning the export menu, I'll probably replace it with an interface and the auto-paging stuff, so for now it's temporary.
User avatar
Sirius
 
Posts: 957
Joined: Mon Jul 26, 2010 4:46 am
Location: France

Re: Experimental PyPRP

Postby cskid13 » Mon May 18, 2015 11:41 am

How would I add a book or init file in 2.7? And for that matter, how do I add bounds to objects? This is all very different.
cskid13
 
Posts: 227
Joined: Tue Feb 01, 2011 4:19 pm
Location: Eder Tsogal

Re: Experimental PyPRP

Postby Sirius » Mon May 18, 2015 1:53 pm

Assuming the plugin is correctly activated, you can create the book, alcscript and init files the same way as in the 2.49 version: Shift+A (or Add menu) → PyPRP → Age infos (previously "Book").
If the "PyPRP" menu doesn't appear, it means either the plugin was not activated, or that there was an error when activating it (in which case, choose Window → Toggle System Console, and copy the debug message here).

As for bounds, you have to click the "Rigib Body" button in the Physics panel.
Sirius wrote:- Physics:
now in the physics panels (obviously). Making something collidable requires pressing the "Rigid body" button.
Beware: by default, Blender's setup and how it's hooked to PyPRP makes the object a kickable. The object can be made static by
setting the type to Passive (or simply disable the "Dynamic" checkbox, that's 1 less click).
Don't forget to change the collisions type to "Mesh" for exact collisions.

Most changes between both versions should be listed in my previous post here (under "Short guide to using it"). Hopefully the rest should remain mostly the same as in PyPRP for 2.49 :)
User avatar
Sirius
 
Posts: 957
Joined: Mon Jul 26, 2010 4:46 am
Location: France

Re: Experimental PyPRP

Postby cskid13 » Mon May 18, 2015 1:54 pm

Cool, thanks! Restoration begins tonight.
cskid13
 
Posts: 227
Joined: Tue Feb 01, 2011 4:19 pm
Location: Eder Tsogal

Re: Experimental PyPRP

Postby dendwaler » Wed May 20, 2015 5:01 am

As you can see , I unfortunately get another errormessage during export.

Image
Those wonderfull Worlds are called " Ages" , because that is what it takes to build one.

Image

Watch my latest Video Or even better..... watch the Cathedral's Complete Walkthrough made by Suleika!
User avatar
dendwaler
 
Posts: 863
Joined: Mon Jun 22, 2009 10:49 am
Location: Nederland

Re: Experimental PyPRP

Postby dendwaler » Wed May 20, 2015 9:28 am

A similar but different error appears if i try to export this file.

http://uruexploration.googlepages.com/AnimatedDoor.blend
Can you export it?
Those wonderfull Worlds are called " Ages" , because that is what it takes to build one.

Image

Watch my latest Video Or even better..... watch the Cathedral's Complete Walkthrough made by Suleika!
User avatar
dendwaler
 
Posts: 863
Joined: Mon Jun 22, 2009 10:49 am
Location: Nederland

Re: Experimental PyPRP

Postby Sirius » Wed May 20, 2015 10:47 am

Ok, the latest version should take care of sound export issues ! :) Thanks for pointing it out. (I totally forgot to test sounds before ! Now everything should work fine: sound regions, 3D sounds, fadein, fadeout, etc).

I still can't export the other blend file, though... The reason is Blender loses all custom object properties when opening an older file :x Meaning no more type=region, page_num=6, etc.
Ack ! Now that's definitely going to complicate things. For now, this means you have to re-enter all custom properties :?
A better solution would be writing a 2.49 script to export custom properties to a text file, and import these properties in the newest Blender... Yeah, I think I'm going to do that.

EDIT: Wew, done quicker than I expected ! Okay, re download the latest version from Github again. You'll also need this file:
export_customproperties.zip
(998 Bytes) Downloaded 40 times

Unzip the Python script within, and drop it into: <PATH TO BLENDER 2.49>/.blender/scripts
Now, open your Age in the old 2.49 Blender. Click File → Export → Custom properties. Export the file anywhere on your PC, give it any name you want. This should create a file which stores all custom properties.

Finally, open Blender 2.7, go into File → Import → Custom Properties. Select the txt file that was just created. Done, your properties have been added back ! :D

As a bonus, you won't even have to setup object collisions anymore, the script will do it for you !


Anyway, at some point I should also record all modifications and instructions to using the new PyPRP in a single document, or something. This would be easier to follow than a series of posts...



EDIT 2: with the script to export/import custom properties, I can now export the AnimatedDoor Age. Logic for the door, animations, sounds, and so on work fine once inside the Age. However, the area past the two doors isn't exported :shock:
User avatar
Sirius
 
Posts: 957
Joined: Mon Jul 26, 2010 4:46 am
Location: France

Re: Experimental PyPRP

Postby dendwaler » Thu May 21, 2015 12:34 am

I did not loose the pagenum property as you see in this screenshot.( I use 2.74 )
Image

ps , i just see you edited your post with additions. I did not notice this because the post don't shows up as new in that case.
So i have done nothing with your new script

As a bonus, you won't even have to setup object collisions anymore, the script will do it for you !


I use custom made colliders because they:
1:) have far less faces then the actual object
2:) they can have a different shape then the object,
then there where needed, the collider also forces the camera to follow the path i want, without going through walls.
thats why I don't want automatic colliding.
Those wonderfull Worlds are called " Ages" , because that is what it takes to build one.

Image

Watch my latest Video Or even better..... watch the Cathedral's Complete Walkthrough made by Suleika!
User avatar
dendwaler
 
Posts: 863
Joined: Mon Jun 22, 2009 10:49 am
Location: Nederland

Re: Experimental PyPRP

Postby dendwaler » Thu May 21, 2015 1:59 am

using the import script on "the Cathedral" results in the next error message.
Image
Those wonderfull Worlds are called " Ages" , because that is what it takes to build one.

Image

Watch my latest Video Or even better..... watch the Cathedral's Complete Walkthrough made by Suleika!
User avatar
dendwaler
 
Posts: 863
Joined: Mon Jun 22, 2009 10:49 am
Location: Nederland

Re: Experimental PyPRP

Postby Sirius » Thu May 21, 2015 2:35 am

dendwaler wrote:I did not loose the pagenum property as you see in this screenshot.( I use 2.74 )
Oh, right ! So that's where they went, hmmm... I assumed these properties were now the "Custom Properties" in the Object Panel, while in fact they were in the "Logic Editor" window. Ah, damn :x

The thing is, PyPRP will now expect properties to be in the Object Panel, and will not read them from the Logic Editor.
So I guess we have three options here:
  • make PyPRP read properties from the Logic Editor only. Better for compatibility with Ages from 2.49
  • let PyPRP as it is now, and read custom properties instead. Less backward-compatible, but it means you don't have to keep the logic editor open.
  • make a mix of the two, PyPRP will read both the custom properties and properties in the Logic Editor. This also means choosing which will override the other in case of conflicts. However, having two identical ways to use properties might confuse people
Any builder with a preference for one or the other of these options is welcome to give his/her opinion. Might as well try to please as many people as possible :)


dendwaler wrote:I use custom made colliders because they:
1:) have far less faces then the actual object
2:) they can have a different shape then the object,
then there where needed, the collider also forces the camera to follow the path i want, without going through walls.
thats why I don't want automatic colliding.
The script doesn't enable collisions for all objects, but only those which had collisions in the 2.49 version. For instance, check your custom colliders: they probably don't have the "rigid body" button pressed, which is required if you want them to have collisions. The same applies to kickables, they lose both collisions and dynamics. The script will re-enable that.
And, of course, it will pick the right collision type too (mesh/convex hull/box, etc).



dendwaler wrote:using the import script on "the Cathedral" results in the next error message
That bug again ?... This may happen depending of where the mouse is when you click the import option. I didn't have any problem with it, but I'll have a look at it.

Anyway, depending of where we choose properties to be, I might have to remove parts of the script which will now be useless.
User avatar
Sirius
 
Posts: 957
Joined: Mon Jul 26, 2010 4:46 am
Location: France

PreviousNext

Return to Plasma Development

Who is online

Users browsing this forum: No registered users and 1 guest

cron