PyPRP Release Planning

What needs to be done in the code?

Instructions

If you have any changes to PyPRP that are not in the trunk yet, but you would like to have in the release, please add them to this list, along with a rough estimate of how many weeks it will take you to get it done. Include just the development work in the estimate, not documentation - that will come in a later step. Break independent features down into separate entries as far as possible, and indicate dependencies.

What I imagine to see in this list are finished features from branches that only need to be merged to the trunk, small clean-up work, things that can be brought into beta quality with a small amount of testing, etc. Not big things that haven't even been started yet, that are considered experimental, or that would take a lot of development effort. This is not a wish list, an entry is only made by the person who is willing and able to complete it in the course of a few weeks. I imagine that the list should turn out fairly short, because most things waiting to be released are in the trunk already.

If you are not sure whether your modifications should be integrated into the release or not and would like to discuss this, please indicate so. I personally don't feel qualified to judge the release-worthiness of new features on my own and I hope in such cases a decision can be reached by peer-review from Plasma experts.

Also, if you know about anything that is in the trunk, but should not stay there (because it is unfinished and breaks something, or for whatever reason), please list that here too.

- Christian walther

List - add your entries here

  • Feature: Application of modifiers on export merged in r387
    By: CWalther
    Estimated time: 0 weeks (ready to merge)
    Depends on: nothing
    Needs discussion: no
  • Bugfix: Don't read the whole file into memory when using an hsStream in read mode merged in r388
    By: CWalther
    Estimated time: 0 weeks (ready to merge)
    Depends on: nothing
    Needs discussion: no
  • Bugfix: Revision 380 - QuickScript_SoundRegion: multiplayer sync issue merged in r389
    By: D'Lanor
    Estimated time: 0 weeks (ready to merge)
    Depends on: nothing
    Needs discussion: no
  • Feature: Advanced AlcScript properties for DrawableSpans merged in r392
    By: Paradox
    Estimated time: 0 weeks (ready to merge)
    Depends on: nothing
    Needs discussion: no
  • postponed Feature: plExcludeRegionModifier
    By: GPNMilano
    Estimated time: 0 weeks (ready to merge)
    Depends on: nothing
    Needs discussion: no
  • postponed Feature: plMaintainersMarkerModifier
    By: GPNMilano
    Estimated time: 0 weeks (ready to merge)
    Depends on: nothing
    Needs discussion: no
  • postponed Feature: plResponderEnableMsg
    By: GPNMilano
    Estimated time: 0 weeks (ready to merge)
    Depends on: nothing
    Needs discussion: no
  • postponed Feature: Advanced AlcScript properties for Sound Classes
    By: GPNMilano
    Estimated time: 0 weeks (ready to merge)
    Depends on: nothing
    Needs discussion: no
  • postponed Feature: plEAXListenerMod
    By: GPNMilano
    Estimated time: 2 weeks (but ready to merge)
    Depends on: documentation needed for the individual settings (some documentation is already available at Adding echos to sounds)
    Needs discussion: could be implemented to call from a specific list to set the settings rather than setting it all by alcscript. Must also be attached to the soft volume export code as it needs to be attached to a soft volume scene object to work properly
  • postponed Feature: PRP_MatClasses
    By: GPNMilano
    Estimated time: 0 weeks (ready to merge)
    Depends on: full documentation needed for all the new settings and changes
    Needs discussion: an age whose materials are not changed will export fine, but the materials will be bright and shiny compared to how they were in previous versions, as well as several mapto changes
  • Bugfix: Revision 385 - Dynamic environment map coordinates merged in r390
    By: CWalther
    Estimated time: 0 weeks (ready to merge)
    Depends on: nothing
    Needs discussion: no
  • Feature: Single-package distribution merged in r425
    By: CWalther
    Estimated time: 1 week
    Depends on: nothing
    Needs discussion: yes - here
  • Bugfix: Change behavior of texture ofs and size to match Blender merged in r423
    By: tikibear
    Needs discussion: yes - here
  • Feature: Kickables can have user-defined collision geometry merged in r417
    By: Robert The Rebuilder
    Estimated time: 0 weeks (ready to merge)
    Depends on: nothing
    Needs discussion: no

Compiling a What's New List and Documentation

Instructions

Below is a list of changes in the trunk since the 1.5 release, gathered from Subversion. Please review and flesh out the entries about your changes according to the following guidelines. The main part of this step consists of writing documentation for all the new and changed features. When everything is done, I will transform this into the official "What's New" list to be included in the release (and displayed on its own wiki page).

  • Description: Write a one-line, end-user-readable description that captures the essence of the change here, or confirm the preliminary one that I have cooked up from the SVN log and superficial review of the code change.
  • Category: I have tried to roughly categorize the changes into new features ("Feature"), changes to existing features ("Change"), and bugfixes ("Fix"), in order to group the final list into these categories. Choose one category and if necessary correct the one I have tentatively chosen.
  • Detail/Documentation Link: If your change or new feature needs a more detailed description than provided in the Description column, or documentation on how to use (reference or tutorial style), write that documentation here on the wiki and place a link to it in this column. For short pieces of documentation, you may insert a subsection into this document under Details below (see examples about renormal and modifier application). This section will be moved to its own page in the end. For longer explanations, start a new article. You may also link to an existing article, provided that you make sure it is up to date with respect to the changed feature. If you feel you are unable to adequately document your changes within a few weeks or would like assistance with it, please state so in the release discussion thread on the forum as soon as possible, so that we can find someone else to do it. Of course, being still available to assist the documenter with a basic introduction and answers to questions would be helpful in that case.
  • Changes Existing Age: For changes and new features (there is probably little point to it if the previous behavior was a bug), indicate here whether the change affects how an existing age exports, compared to PyPRP 1.5, and if so describe how. If the age does export differently, but it is possible to restore the way it exported in 1.5 by making changes to the Blender file, indicate so in the How to Convert column. If these modifications are mechanical enough, we might provide scripts that perform them under PyPRP Wizards. In addition to being useful to the end user, the total information collected in these columns will serve as a basis for the decision whether to call the release "1.6" or "2.0".
  • Revision: This column is only here for your reference and will not end up in the released product. The first number is the revision(s) in which the change ended up in the trunk, in parentheses the revision(s) in which it was initially committed to a branch.
  • If you consider any of your changes not newsworthy, you may remove the row from the list. You may also combine multiple rows into one or split single rows into several as you see fit.
  • Once you're done with an entry in the list, including completed documentation, enter "yes" into the Done column. If the list entry is completed, including documentation link, but the documentation article/section itself is not finished yet, you may enter "documenting" into the Done column to indicate that you're working on it, but that is not required.

Hope that is enough explanation to allow us to get this done in an orderly manner. Questions and suggestions are welcome as usual.

- Christian walther

List

Done Revision [trunk (original)] Author Category Description Detail/Documentation Link Changes Existing Age? How? How to Convert?
yes 268 D'Lanor Fix Fixed double export of sound emitters. discussion No
yes 273 Hoikas Fix Fixed Python error when exporting a sprite with no flags specified. (Typo in code) No
yes 294 (284) CWalther Fix Fixed incorrect export of soft volumes that have a rotation or scale.
yes 294 (285, 293) CWalther Fix Fixed a typo to allow use of extended soft volume syntax (!(...) etc.) for visregions.
yes 314 Nadnerb Change Put layers that are flagged as lightmaps using the "Amb" button in the material "Map To" panel into the "piggybacks" list. #Lightmaps Lightmaps appear brighter in moderately-lit areas. This is more correct, but can be undesired if you compensated for the darkening by making the lightmap brighter. Turn off the "Amb" button so that the lightmap is treated as a plain multiplicative layer.
yes 314 (313) RTR Feature Added support for external WAV and OGG files, and support for Cyan/URU OGG files. Modified existing tutorial No N/A
yes 315 Nadnerb Fix Fixed "createnewdefaultcam" camera message AlcScript command (previously not recognized at all).
yes 321 (318) CWalther Feature Alternative way of computing normals for objects with flat faces and rounded edges. #Normal Recomputation No
yes 321 (320) CWalther Fix Fixed repeated texture compression when two materials in Blender use the same texture image.
yes 325 (312, 317) D'Lanor Feature New QuickScript_StateAnimation added. StateAnimation No
yes 325 (312) D'Lanor Feature QuickScript_SDLIntActEnabler: modified to recognize StateAnimation activator. SDL IntActEnabler No
yes 325 (312) D'Lanor Fix QuickScript_SoundRegion: matched volume to emitter. Undocumented: See diff Yes. Sound may be too soft if you lowered the volume of the ogg file as workaround. Set emitter volume to 1
documenting 325 (319) D'Lanor Change QuickScript_SimpleClickable: can play a single animation now, autorun option now consequently affects all actions, start actions either automatically or through Python. Yes. Sound or animation may no longer play when combined with Python. Start through Python (example will be in docs) or add autorun: true to your quickscript
yes 325, 396 Paradox & CWalther Change Visregions are no longer inverted. Soft Volumes#Visregions Visibility of objects with visregions is reversed. For objects with a single visregion, invert the soft volume by using an inverse soft volume, adjusting in- and outstrength, or, if a single plane, flipping the normal. Multiple visregions on an object require a more extensive reorganization, or put the kIsNot flag back using a PRP editor, or wait for a PyPRP version that allows specification of visregion flags.
yes 338 Paradox Fix Fixed incorrect alpha component on exported vertex colors when no "Alpha" vertex color layer is present. Technically, yes. No user changes are required. No noticeable effect in Plasma, but this is much more "correct". Re-export.
yes 343 Nadnerb Fix Footprint and Ripple materials no longer get the MADD blendflag set that removed intermediate transparency levels (forcing pixels to either fully transparent or fully opaque).
yes 343 Nadnerb Change "none" parameters no longer actually write params to pythonfilemods, and instead behave as "spacers" to change the param indexes.
yes 343, 375 Nadnerb Fix Recognize the "Alpha" vertex color layer by its name (case-insensitively) instead of simply checking for a second layer.
yes 344 Nadnerb Feature New message: plEventCallbackMsg, proper support for plMessageWithCallbacks. Callback Messages No
yes 346 Nadnerb Feature Added plOccluder export: objects with type: occluder are exported as occluders. How to use them however is not known yet. No
yes 352, 357 (349, 355) CWalther Fix Fixed MemoryError during checksumming at the end of an export.
Yes 371 (370) RTR Fix Fixed kickables passing thru each other. Remembering the ball's location No N/A
yes 372 (331) D'Lanor Feature QuickScript_StateAnimation: added option to temporarily disable the clickable activator. StateAnimation No
yes 372 (333) D'Lanor Fix QuickScript_StateAnimation: oneshot callback marker must be specified separately now. Previous assumption that <marker name> = <animation name> was wrong. StateAnimation Yes, default callback comes at end of animation now Specify marker
yes 372 (335) D'Lanor Fix QuickScript_SoundRegion fixes: forces object type to logic region, soundemitters list processing works properly now. Controlling your Sound with Regions No
yes 372 (362) D'Lanor Fix QuickScript_SoundRegion: added enter and exit triggers to objectinvolume. (did not have any effect until 389 (380)) No
yes 372 (362) D'Lanor Fix QuickScript_Footstep: multiple footstep sounds were not appended conform "specs". See details No. Didn't work and still doesn't...
yes 372 (363) D'Lanor Feature QuickScript selfanimation: added seekpoint option. SelfAnimation No
yes 373 (362) D'Lanor Fix Fixed Uru crash with ages exported for ABM/UU. No
yes 373 (362, 287) CWalther & D'Lanor Change Shadows are now twice as strong for any given light. Shadows are stronger Impossible (could halve light energy to restore weak shadows, but that obviously changes the rest of the lighting)
yes 382, 383 Nadnerb Feature Allow setting of visual.icicle AlcScript flags by name. Drawable Flags No
yes 387 (283, 341, 342) CWalther Feature Export the modified mesh for objects that have modifiers. #Export with Modifiers Applied Modifiers are applied Remove modifiers (but why would you have modifiers but not want to apply them?)
yes 388 (377) CWalther Fix Fixed potential MemoryError when reading files (e.g. texture cache).
yes 389 (380) D'Lanor Fix QuickScript_SoundRegion: multiplayer sync issue fixed. See problem 2 here. Redundant remark removed.
yes 390 (385) CWalther Fix Fixed dynamic environment map coordinates for objects with parents, ipos, or tracking.
yes 392, 402 (378, 400) Paradox Change Changed AlcScript schema for setting DrawableSpan RenderLevel, Drawable Props and Criteria flags. Drawable Flags and Managing Transparent Objects No N/A
yes 404 Paradox Fix Fixed animation of opacity using the 'Col' material ipo curve. Animating Textures
Yes 417 (401) Robert The Rebuilder Feature Kickables can now have user-defined collision geometry Alternate collision geometry No N/A
Yes 422 CWalther Fix Fixed operation on PowerPC Macs or other big-endian machines.
Yes 423 (408) tikibear Fix Texture offset and scaling (static or animated) now matches what Blender displays (unfortunately only in the Render Preview (Shift-P) or full render, not in the textured real-time display). Y offset is reversed and scaling is applied from the center of the texture, not from a corner. Using sizeZ as an additional scaling factor is no longer supported. Use the conversion script that will be provided.
Yes 423 (408) tikibear Feature Texture scale can now be animated. Animating Textures No
Yes 424 (421) Paradox, GPNMilano, D'Lanor Feature Added support for simple GUI dialogs. GUI Dialog No
Yes 425 (386) CWalther Feature PyPRP is installed as a single folder now. No

Details

Normal Recomputation

Renormal.jpeg

By default, exporting the mesh shown at the bottom of the image results in the look at the top right of the image: the large faces of the cube are shaded as if they were strongly curved. Enabling normal recomputation on an object, on the other hand, results in the look at the top left, much improving the appearance of objects that are supposed to have large flat faces and rounded edges (simulated by narrow bevel faces).

To enable this feature on an object, either add a logic property to the object of type String, named renormal, with value areaweighted, as shown here,

Renormal-logicprop.png

or set the visual.renormal property to areaweighted in AlcScript:

MyObject:
    visual:
        renormal: areaweighted

Background: To compute the vertex normals that are then exported by PyPRP and control the shading in Uru, Blender takes the average of the (real) normals of all adjacent faces of the vertex. This is what is shown at the bottom right of the image. In some situations, choosing different normals, as shown at the bottom left of the image, leads to better results. Unfortunately, Blender doesn't allow the user to modify the vertex normals, it just computes them using its fixed average rule. Therefore, the only way to achieve normals as on the left side is to do it in the export plugin which is free to export different normals than Blender tells it to. This is what PyPRP does when the renormal property is set. When set to areaweighted (the only currently implemented option), it averages the normals of the adjacent faces of a vertex as well, but weighted by the face area. This has the effect that large faces have a strong influence on the vertex normals, pulling them towards their real surface normals and therefore appearing flatter, while small faces have little influence and appear more curved.


Export with Modifiers Applied

In the past, if you had associated modifiers to your Blender meshes, PyPRP would ignore them and still export the unmodified mesh. To have modifiers applied, you needed to save the document, choose Apply on each modifier to bake it into the mesh, export, and revert to the saved state to get the nondestructive modifiers back. Now, PyPRP does that for you – for all objects that have modifiers, the modified mesh is exported.

Examples of useful modifiers are EdgeSplit to get sharp edges and Array for repeated objects. Keep in mind however that many modifiers make the mesh more complex and thereby reduce performance in Uru, just as if you had modeled the more complex mesh by hand. In particular, the Subsurf modifier can generate a very large number of faces, so don't go overboard with it, as tempting as it may seem to smooth your objects.


Multiple footstep sounds not appended conform specs

Supposed to make a single footstep region trigger multiple footstep sounds, although I am not sure why anyone would want that. According to the comment in the code (the "specs" mentioned) this should be done by appending "each command after the first". The old version did not do that. For every surface in the list it wrote: "append: false". The new version writes "append: true" except for the first surface, but this makes no difference. Still only the first footstep sound plays.


Lightmaps

It is possible to flag a layer as being part of a lightmap (in blender, this is done by pressing the "Amb" button in the material "Map To" panel). When Cyan uses lightmaps, these layers are placed in the "piggybacks" list, rather than in the main layers list (see "Material #350_Inwall_LIGHTMAPGEN" in "Ahnonay_District_LinkRoom"). PyPRP now duplicates that behavior. Judging from preliminary research, it seems to have the effect that only the texture of the lightmap layer is multiplied to the texturing and lighting from the lower layers, while for normal multiplicative layers also the lighting contributions (e.g. diffuse + preshade * vertex color) are evaluated again and multiplied to the result. Since PyPRP sets the same layer colors (runtime, preshade, ambient, specular) on all layers, these contributions end up squared in the result, darkening the image compared to the piggyback lightmap case.