3d-render/README.md

46 lines
1.1 KiB
Markdown
Raw Permalink Normal View History

2025-10-09 09:17:27 +02:00
# 3d-render
2025-10-09 12:28:36 +02:00
## Files
This program use two kind of files to represent a 3D world:
- `obj` which are a list of planes representing an object.
- `map` which are a list of object representing the the world itself.
Only one map file can be use at time and a map can reference other maps.
Anything in a map is relative to the base point of the map, which is (0, 0, 0) for the 'top map' contain everything else. A map point is fix a can't be negative. An object point is relative to the map point and can be negative.
### `.obj` files
0,0,0 is the bottom-left-front point of the object. It is used to translate the object in the 3D map.
2025-10-09 09:34:01 +02:00
Syntaxe
```
OBJECT <- header
Plane definition -> x,y,z <- point ; <- point delimiter x,y,z : <- end point definition FFFFFFFFFF <- RGB + Aplha + luminosity \n
```
Example
```
OBJECT
0,0,0:FF00211230
0.2,0.8,5;21,0.6,3:451A206000
```
2025-10-09 12:28:36 +02:00
### `.map` files
Calling a map file from a map file will change the reference point of the called map from fixed to relative to the current map.
2025-10-09 09:34:01 +02:00
Syntaxe
```
MAP <- header
2025-10-09 12:28:36 +02:00
Call object/map file: x,y,z <- object position : filename
2025-10-09 09:34:01 +02:00
```
Example
```
MAP
2025-10-09 12:28:36 +02:00
1,5,0:cube.map
2.3,2.0,6:light.obj
2025-10-09 09:34:01 +02:00
```