Code Monkey home page Code Monkey logo

korman's People

Contributors

1codealot avatar deledrius avatar doobesuru avatar dpogue avatar hazado avatar hoikas avatar jrius avatar julyfortoday avatar lunanne avatar tikibear avatar zrax avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

korman's Issues

Journal modifier

Journals are common, so let's have a dedicated journal modifier instead of requiring the artist to hook up Python nodes for this.

Textured geometry not visible

Textures and geometry are being exported, but when I link to an age with a simple textured plane and spawn point, the textured geometry is not visible. The expected data is in the PRP files and generally appears to be correct.

Unit test blends

Korman has gotten to the pointer where it is a large, complex program with many facets that are difficult to naively test. As a first step, we need to begin assembling a library of in-repo packed blend files for the purposes of testing Korman's features.

Object Lists UI

Currently, all modifiers that maintain lists must reimplement the UI code. This is annoying. We should have one list helper class that is smart enough to handle several cases. Plain old data and object lists. Object lists need to do some verification to make sure that the object has the correct modifier, if needed. This will help the user understand if there are problems before the export happens.

ImageLibMods

The journal modifier should be updated to allow the user to list images they would like to be able to use in the journal's PBML. This should automatically export a plImageLibMod so those images will be properly loaded by the engine.

Subworlds

Add support for subworlds to Korman. This should include logic to handle exporting no arbitration volume sensors where available to avoid "falling through the floor" bugs. Also, to be investigated is the relevance of RidingAnimatedPhysicalDetectors for having dynamic avatar controllers.

Sanity Checking Overhaul

Currently, sanity checking and exporting happen in the same step. Due to the arbitary order of the export process, this causes sanity checking to be duplicated in many locations. Perhaps a new step in the exporter that calls each object's (and its modifiers') dedicated sanity check routines should be introduced. Furthermore, modifiers need to have better error reporting facilities, much like the raise_error method on Nodes.

Blender "remapping errors"

As of Blender 2.78, random error messages are spewed into the console during export. They seem to only occur for lightmapgen materials.

Error in remapping process from 'GR_LIGHTMAPGEN_*`: ... wrong user count ... (summing up to -1)

DropDownList Attributes

Apparently, ptAttribDropDownList support was never added to Python nodes, and it is used by some standard Python files, notably xFogSet.py. Some work will need to be done to store the values in attribute nodes. A bare-bones implementation (sans drop-down) can be found in 9b1a6d7

Limit export to objects in scene

Korman currently exports all objects in a blend file marked as Plasma Object. With the introduction of ID Properties, objects removed from the scene might not be removed from the blend due to references from other objects. As part of the export, we need to ensure only objects in valid scenes are exported. We should probably also investigate warning if we try to export a reference to an object that is either not a plasma object or not in a valid scene.

See also https://forum.guildofwriters.org/viewtopic.php?f=10&t=6946

Images upside down

Images are exported upside down due to being rammed through OpenGL. We correct for this by transforming UVs, however, this is not possible for things like linking panels and journal book covers and therefore introduces a gotcha for cases luch as linking panels and journal covers.

Basic physics

Now that we have basic modifier support, the next step on the agenda is to have simple physics modifiers, such as colliders and avatar footstep regions. More advanced options should wait until we have logic nodes ready to go.

This depends on code from @Deledrius to bake convex hulls in libHSPlasma.

Premade Plasma Meshes

With the pending addition of the Plasma... Add menu from #44, we can generate pre-fabricated mesh guides, with pre-configured Plasma modifiers and complicated node trees, all perfectly measured to conform to the existing animation assets and allow artists to spend more time building and less time looking up recipes and reference material.

  • Ladders ( #44 )
  • Journals ( #34 )
  • Linking Books ( #181 )
  • Standard Buttons and Levers
  • Scope Viewers
  • Lamp Flares ( #182 )
  • Imagers

Export lightmaps as PNG

CWE now supports PNG mipmaps. Therefore, it would be a filesize win for us to compress lightmaps as PNGs for export to MOUL.

Projection Lights

Korman detects when lamps should be projection lights, but it does not export the Plasma Layer. This is due to assumptions in the material exporter that all layers are owned by an hsGMaterial.

Nuke os.path

Convert usage of os.path to the absolutely amazing and newfangled pathlib.

Sound Emitter file format ignored in export.

Regardless of whether I select an ogg or wav file, the exporter always uses the .ogg extension for the plSoundBuffer's filename field. Since it does not convert the wav to an ogg, this leaves a non-working plSoundBuffer unless the user manually compresses and installs the sound files.

Support layer specularity

Should be able to set the specular colour/"specular power" on a layer.

Again, Blender handles this at the material level, and it should really be handled at the layer level in Korman.

Poor texture management

The current texture export management is very naïve. We determine the settings for a particular texture image the first time it encounters it by checking the Use Alpha and Calculate Alpha user inputs. If those inputs change, we're out of luck because the texture's already been exported that way. These inputs are also somewhat confusing to the user (there are two "Use Alpha" buttons).

The aspect of the current system that I am happy with is the use of the DDS and BMP extensions to indicate the plMipmap's internal compression format.

Python packing

Investigate the ability to create python packages as part of the age export process. This would possibly entail changing the exporter to take a directory and spewing the exported age data there**. See also #34 -- could possibly bundle some nonstandard scripts for PotS compatibility such as the journal template script.

** Related: could use Uru directories to parse GlobalAnimations to get animation marker points for OneShot and other logic nodes, preventing common errors.

Animating lamp energy generates invalid PotS files

Animating the energy on an omni lamp will create a plOmniSqApplicator, which is correct for MOUL but that class doesn't exist in PotS. The result is that libHSPlasma writes a null creatable (0x8000) for the AGApplicator and the exported files cause other tools to crash.

We should either only generate the OmniSqApplicator for MOUL-compatible exports, or have some step in libHSPlasma to filter out unsupported classes without writing nulls.

Improve logic node verbiage

The verbiage in the logic node system's sockets is somewhat arcane. It needs to be refined into more user friendly terminology. Tangentially related is #36.

Camera support

libHSPlasma Tasks:

  • plCameraBrain1
  • plCameraBrain1_Avatar
  • plCameraBrain1_Circle
  • plCameraBrain1_FirstPerson
  • plCameraBrain1_Fixed
  • plCameraModifier
  • plCameraMsg
  • plCameraRegionDetector
  • plRailCameraMod

Korman Tasks:

  • Requirements Modelled
  • Follow Cameras
  • Fixed Cameras
  • Camera Regions
  • Circle Cameras
  • Rail Cameras
  • Animated Cameras
  • Animated FOVs
  • Camera Message Node
  • Transition Overrides

Support layer ambient/emissive colour

Should be able to set a layer to be pre-lit with ambient/emissive colour. Tricky part is that Blender handles emit at the material level, and in Plasma it should be done at the layer level.

I have some ideas here with the Blender Texture mapping ramps, but it might not be especially intuitive :\

Improved conditional objects

As of right now, the logic nodes only supports the detection of avatars inside conditional objects. This should be expanded to, at bare minimum, moving other arbitrary objects inside of conditional spaces eg as seen in the Teledahn Prison. Some investigation will be required to determine how to work around the collision member group limitations introduced in CWE from ABM/PotS.

Further work would be to implement the boolean AND/OR conditional objects.

Reexporting with textures

Exporting an age with textured objects twice in the same Blender session causes Blender to crash. My limited debugging indicates that it is a result of an Access Violation in PyHSPlasma's pyKeyedObject_getKey on a plMipmap instance.

Use hashtable for find_key

Korman's find_key implementation currently uses libHSPlasma's string search mechanism. Profiling shows this is somewhat slow, therefore, we should either rewrite the libHSPlasma code to use a hashtable or maintain a dict of keys in Korman itself.

Ladder modifier

Implement an avatar ladder modifier using MultiStageBehMod

PotS Physical Transforms

Per @Jrius in #93 and on the forum, Plasma engines that utilize Havok physics expect for most static physicals' data to be in worldspace coordinates while others (specifically pinned and massed physicals) are expected to be in localspaced. Korman currently exports physical data in localspace coordinates only, which works on MOUL.

A work-around for ladders was introduced in #94 to apply the kPinned flag and a mass of 1.0 to the physical. However, this does not address the fact that we are producing physicals that are potentially incorrect for PotS. We should investigate either applying transforms as a post export step on these physicals or applying this workaround to all PotS physicals.

WaveSet Modifier Descriptions

The various Water modifiers that export to a Plasma plWaveSet7 do not have documenting descriptions. These would be useful for improving the usability of these modifiers.

Improve Responder node workflow

Work toward deprecating the Responder State node and move toward implicit responder states built from command linkage. This will ideally make the logic node tree easier to follow. Will also need to build in a framework for detecting deprecated node types on load and upgrading them on-the-fly. But that shouldn't be too hard.

Responder State IDs

Presently, Responder State nodes are linked to a single output node on the Responder. Additionally, they can be linked to one another and theoretically be included in the Responder. While this is sufficient for general use cases, for Responder states to be used in Python via ptAttribResponder, the Responder State's index must be known by the Python script.

I envision this being fixed by removing the States output node and replacing it with a single node socket that only accepts one state. The socket will report the Responder State's index for use in scripts. Additionally, states MUST be connected to the Responder's output in order to be exported. States can still trigger other states, however, this will be done via a different node socket.

ValueError on invalid texture

When a texture image has been erased from the HD and cannot be loaded, the exporter yields a visible Python traceback. It confusingly comes from helpers.ensure_power_of_two deep inside the material exporter.

Automatic stencil at export from VCol layer

Setting up stencil layers with the blend ramp by hand kinda sucks, and you need to make sure to get the flags right.

PlasmaMax has a feature to allow artists to use vertex colour layers to define the blending stencils. Somewhere back in the pyprp days, either Nadnerb or myself (or both?) wrote a script to turn a VCol layer into a UV mapping for a stencil, but it wasn't automatic and could easily get out of sync.

My proposal is that we add a field to the per-layer Plasma panel with a checkbox for "Use vertex colour blending mask" and a select box for which VCol layer to apply as a stencil. At export time, this would automatically create the blending layer with the right texture, right flags, and UV coordinates.
For simplicity, we'd handle the VCol colours the way we do for alpha: a range from white to black.

Korman doesn't support Blender's script reload function

Blender supports reloading scripts by pressing F8, but Korman currently does not work with this feature. It would useful to have this working for quicker iteration during development.

 Exception in module register(): 'Blender\2.78\scripts\addons\korman\__init__.py'
 Traceback (most recent call last):
   File "Blender\2.78\scripts\modules\addon_utils.py", line 350, in enable
     mod.register()
   File "Blender\2.78\scripts\addons\korman\__init__.py", line 38, in register
    bpy.utils.register_module(__name__)
   File "Blender\2.78\scripts\modules\bpy\utils\__init__.py", line 667, in register_module
     raise Exception("register_module(%r): defines no classes" % module)
 Exception: register_module('korman'): defines no classes

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.