GithubHelp home page GithubHelp logo

filippocastelli / blender_io_export_psx_mesh Goto Github PK

View Code? Open in Web Editor NEW

This project forked from abelliqueux/blender_io_export_psx_mesh

2.0 0.0 0.0 58.33 MB

Fork of Schnappy's Blender plugin to export a scene to a level for the 3dcam PSX engine.

Python 100.00%

blender_io_export_psx_mesh's Introduction

Pic or it didn't happen

[Afire101's Fork of Schnappy's] Blender 3dcam PSX engine Level exporter

This Blender plugin is to be used in conjunction with the 3dcam PSX engine.
It allows exporting a gouraud shaded, UV textured Blender scene to a format compatible with the aforementionned engine.

3d scene

The goal is to make it compatible with newer Blender versions (3.2.0)

Documentation

Check the Wiki for in-depth informations.

Features

Be warned this is WIP !

Plugin

  • Export UV textured models
  • Export vertex painted models
  • Export camera positions for in game use
  • Export vertex animations
  • Export up to 3 light sources
  • Export pre-rendered backgrounds for in-game use (8bpp and 4bpp)
  • VRam auto layout for TIMs
  • Export sound/music as VAG/XA files

comparison
Real-time 3D / 8bpp background / 4bpp background

Planned

  • Fix and improve all the things !

Install the plugin

This plugin is not compatible with Blender > 2.79.

  1. Download and install Blender 2.79b.

http://download.blender.org/release/Blender2.79/

  1. Clone this repository in the addons folder of blender 2.79 :
git clone https://github.com/ABelliqueux/blender_io_export_psx_mesh.git
  1. Dependencies

These utilities should be in your $PATH :

Linux users, these utilities are trivial to build using gcc -o output source.c.
Only psxavenc and img2tim are a bit more involved as you should install the ffmpeg and freeimage dev packages from your distro before compiling.

On Debian,

sudo apt install libavformat-dev libfreeimage-dev

should set you up. Arch users, dev files are already on your system as long as the package is installed.

sudo pacman -S ffmpeg freeimage

Building img2tim :

# In img2tim's sources directory :
gcc -o img2tim main.cpp

Building psxavenc and xainterleave :

# Use the Makefile that's in candyk-psx's sources directory :
make tools
# bins will appear in 'candyk-psx/bin'

For users with Imagemagick installed, there is an option when exporting to use that instead of pngquant.

  1. Enable the add-on in Blender by going to user preferences, Add-ons tab, and enable Import-Export: PSX TMesh exporter.

On Linux : ~/.config/blender/2.79/scripts/addons
On macOS : ./Blender.app/Contents/Resources/2.79/addons
On Windows : %USERPROFILE%\AppData\Roaming\Blender Foundation\Blender\2.93\

Install the 3D engine

Head over to the 3dcam repo and follow the setup instructions there.

Export your scene !

Open a working copy of your scene, add the needed flags and export your level in the 3dcam-headers folder. Following those steps, you should now see your scene running on PSX !

Custom properties helper add-on

3dcam-helper

A small blender addon is provided that facilitates setting and copying flags between several objects in your scene.

Setting an object's flags

See the documentation for usage instruction.

The script only does the job of creating/updating the object's custom properties, so it is not mandatory to use it.

Credits

Based on the code provided by TheDukeOfZill, 04-2014, on http://www.psxdev.net/forum/viewtopic.php?f=64&t=537#p4088
pngquant : https://github.com/kornelski/pngquant
img2tim : https://github.com/Lameguy64/img2tim
Freeimage : https://freeimage.sourceforge.io/

blender_io_export_psx_mesh's People

Contributors

abelliqueux avatar filippocastelli avatar

Stargazers

 avatar  avatar

blender_io_export_psx_mesh's Issues

port to blender 3.2.0

Blender 2.79 is too old, the tool needs to be ported to something more usable. Currently working on it.

remove cursed code

the code is full of globals, nested function definitions, nested class definitions and lots of very cursed code. This needs to change.

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.