Updated Workflow (markdown)

Schnappy 2021-06-22 20:00:59 +02:00
parent 03f4b7d3ff
commit 03bc3302ea
1 changed files with 15 additions and 20 deletions

@ -1,32 +1,27 @@
# A few tips
# Caution
Be sure to keep copies of your scene before exporting, in case some thing bad happens ! (Shouldn't be the case but you never know)
# Minimum setup
1. You need to save your blender file before using the exporter.
2. Your blender scene should at the minimum contain :
2. Your blender scene should at the absolute minimum contain :
* A camera with the `isDefault` flag set
* An object with the `isActor` flag set
* An object with the `isRigidBody` flag set
* An object with the `isLevel` flag set, preferably residing under your actor on the Up axis.
It should export fine if you forget one of those but it will default to the first object found and might lead to unexpected results !
It should export fine if you forget one of those but remember that if the needed flags are not set, they will default to the first object found and might lead to unexpected results !
**Warning : These instructions are obsolete.**
![The Blender cube starting file on PSX.](https://wiki.arthus.net/assets/startcube.jpg)
The Blender cube starting file on PSX.
# Steps to convert your mesh
# Vertex Painting
1. You must first triangulate your mesh (manually or via the modifier).
2. When your model is ready, you can then vertex paint it. If you don't, the vertices colors will default to white.
* If you modify your geometry *after* vertex painting, the plugin will faile to export the mesh. This is because the vertex color data is set to 0 each time you modify your geometry.
The meshes color will default to white unless you color them in Blender's Vertex paint mode.
Keep in mind that editing your geometry will reset the vertex color.
3. You can UV unwrap your model and apply a texture. The provided code will look for a tim file corresponding to the name of the image file you use in blender in the 'TIM' folder.
E.g : You use a 'cube.png' file in blender, the psx code will look for a 'cube.tim' file in ./TIM
# Default working tree
* If needed, edit the `primdraw.c` file , lines 29 and 30, to reflect the number of tris you want to be able to draw ( Max seems to be ~750 in NTSC, ~910 in PAL )
```c
#define OT_LENGTH 2048 // Maximum number of OT entries
#define MAX_PRIMS 1024 // Maximum number of POLY_GT3 primitives
```
seem to be safe values.
If you're using the 3dcam engine, you should export your scene in the engine's folder. If you want to change the default working tree, you'll have to edit the relevant paths in `define.h` and `main.c`.