Giter Site home page Giter Site logo

kotorblender's Introduction

KotorBlender

This add-on is a fork of KotorBlender, upgraded to support newer versions of Blender. KotorBlender is in turn based on NeverBlender, forked from version 1.23a.

Features

  • Import & export MDL models, including walkmeshes
  • Import & export LYT files
  • Import & export PTH files

Installation

  1. Clone GitHub repository or download the latest release
  2. Copy kotorblender folder into Blender addons directory, e.g. "C:/Users/USERNAME/AppData/Roaming/Blender Foundation/Blender/BLENDER_VERSION/scripts/addons"
  3. Enable add-on "Import-Export: KotorBlender" in Blender Preferences via Edit → Preferences → Add-ons

Usage

Modelling

  1. Extract MDL, MDX and, optionally, TPC, WOK, PWK, DWK, and LYT files (Kotor Tool, reone-tools, etc.)
  2. Convert TPC files to TGA/TXI (reone-tools)
  3. Import MDL into Blender via File → Import → KotOR Model (.mdl)
  4. Edit model
  5. Select a MDL root object to be exported
  6. Export MDL via File → Export → KotOR Model (.mdl)

Lightmapping

Most of the time, it will not be possible to use vanilla lighting and UV maps to recreate lightmaps. Depending on the scene, it might be necessary to tweak or replace both.

UV mapping:

  1. Select objects having the same lightmap texture and enter Edit mode
  2. Unwrap faces via UV → Lightmap Pack (increase Margin to avoid overlapping faces)

Baking lightmaps:

  1. Select objects to bake lightmaps for
    1. If no object is selected, all objects from active collection will be used
  2. In Render Properties
    1. Set Render Engine to Cycles
    2. Set Device to GPU Compute, if available
  3. In Render Properties → KotOR Lightmaps
    1. Tweak number of Samples (higher numbers increase quality, but also increase render time)
    2. Tweak Margin
    3. Press the Bake button

Fine-tuning:

  1. In Outliner disable rendering of obstructing geometry, e.g. skyboxes
  2. Enable Ambient Occlusion in World Properties and tweak Factor to increase contrast

Connecting Room Walkmeshes

  1. Select a room walkmesh
  2. Enter Edit mode and select two vertices adjacent to another room
  3. Determine 0-based index of the other room into the LYT file
  4. Enter Vertex Paint mode and set brush color to (0.0, G, 0.0), where G = (200 + room index) / 255
  5. Ensure that brush blending mode is set to Mix, and brush strength is set to 1.0
  6. Paint over the selected vertices

Editing Paths

  1. Extract PTH file from the module's RIM file, e.g. "modules/danm13_s.rim" (Kotor Tool, reone-tools, etc.)
  2. Import PTH into Blender via File → Import → KotOR Path (.pth)
  3. Create/move path points, or modify path connections via Object Properties
  4. Export PTH via File → Export → KotOR Path (.pth)

Compatibility

Known to work with Blender 2.93 and 3.2.

License

GPL-3.0-or-later

kotorblender's People

Contributors

ndixur avatar seedhartha avatar

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.