Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Liebranca134310hima rant a lot ok
in C, i'd want a binary format so i can parse it with structs and minimal logic, rather than parsing text which is way more annoying. inspecting/editing files in a more human-readable form would then be done in some utility program maybe
also no spatial partition means floating point precision is gonna fuck you in the ass. i'd say break the scene into cells and plot them in a graph or whatever, then arrange the nodes within each cell hierarchically
yes, you *could* use doubles for coordinates instead to push the problem into the heat death of the universe. but your future self will thank you if you do some form of partition anyway to make annoying-to-code bits like pathfinding and culling less stupid. algorithms that rely on "spatial awareness" so to speak can become a big fucking problem if the data isn't sorted for it
also 3dgoodes Y U NO QUATERNIONS
forgot question but still giving answer uuh mystery of universe -
@3dgoosee
You can not reliably store rotations with just three values (I'm assuming you are using Euler angles) because they suffer from gimbal lock, essentially losing one degree of freedom.
Rotations should be represented by unit quaternions, which don't suffer gimbal locks, and are just as easy to compose. -
@3dgoosee dude its *literally* in the bible
{And when he had apprehended him, he put him in prison, and delivered him to four QUATERNIONS of soldiers to keep him; intending after Easter to bring him forth to the people.} -
@CoreFusionX I think as long as you don't compose multiple euler angle rotations you shouldn't have a problem with gimbal lock. I.e. you can always decompose any rotation into a sane set of euler angles in a given coordinate system
But you're right, just use quaternions :P They're faster anyways because of less trigonometric operations -
Quaternions is freaking black magic! No one has an idea how it works but it works wonders.
Related Rants
-
NuflowX34Seriously, why? WHHHYYYY? US-date-format sucks, every FUCKING TIME! The only time I really notice is when th...
-
Chrzanek7
When you're preparing for a hard disk format: -
antoni404018
My first try at 3D printing. Currently selling it on Shapeways, good thing they were celebrating and didn't ha...

Hi y'all! I got question, for my engine map format (the map editor will be blender/blockbench) should I just use a GLTF that contains every node and extras for light and custom properties or code a blender plugin that exports a TOML like:
# === MAP ===
name = "E1M1"
description = "At Doom's gate"
# --- Objets ---
[[objects]]
path = "assets/models/tree01.obj"
position = [10.5, 0.0, -3.2]
rotation = [0.0, 90.0, 0.0] # pitch, yaw, roll in degrees
scale = [1.0, 1.0, 1.0]
[[objects]]
path = "assets/models/coin_gold.obj"
position = [5.0, 1.0, 2.5]
rotation = [0.0, 0.0, 0.0]
scale = [1.0, 1.0, 1.0]
[[objects]]
path = "assets/models/rock_large.obj"
position = [-2.3, 0.0, 4.8]
rotation = [0.0, 0.0, 0.0]
scale = [1.0, 1.0, 1.0]
# --- Static lights ---
[[lights]]
type = "point" # "point", "directional", "spot"
position = [0.0, 5.0, 0.0] # spot or point
direction = [0.0, -1.0, 0.0] # spot or directional
color = [1.0, 0.9, 0.7] # RGB, 0.0 to 1.0
intensity = 1.0
radius = 10.0 # influence radius
angle = 45.0 # angle for spot
[[lights]]
type = "directional"
direction = [1.0, -1.0, 0.0]
color = [0.8, 0.8, 1.0]
intensity = 0.6
# --- Spawn points (user-added triggers) ---
[[spawn_points]]
name = "PlayerStart"
position = [0.0, 0.0, 5.0]
rotation = [0.0, 0.0, 0.0]
[[spawn_points]]
name = "EnemySpawn01"
position = [15.0, 0.0, -3.0]
rotation = [0.0, 180.0, 0.0]
question
format
engine
3d
gltf