3D Objects in Game Editor
Posted: Thu Jan 12, 2012 9:26 pm
this GE file reads a wireframe from an .obj file (obj file was created in blender).
it just reads the vector and faces definition and ignores all other lines.
but i think the function displaywire() which tries to project 3D into 2D can be improved (right now it's just hacked i just tried different values and see what looks acceptable, but when i do a regular cube it looks wrong, anyone who knows can improve on it).
to read a different model just change the file name inside wirefromfile() function to a different name
(ie. "monkey.obj" - a monkey head default object in blender,
"ico.obj" - icosphere,
"frame.obj" - a cube
or your own .obj model)
also rotate z-axis portion of rotatewire() function is buggy, when i try doing it it just flattens the model and i am not sure why
If anyone can help fix displaywire() function or figure out why the model flattens when z-axis rotation portion of rotatewire(), that would be awesome.
it just reads the vector and faces definition and ignores all other lines.
but i think the function displaywire() which tries to project 3D into 2D can be improved (right now it's just hacked i just tried different values and see what looks acceptable, but when i do a regular cube it looks wrong, anyone who knows can improve on it).
to read a different model just change the file name inside wirefromfile() function to a different name
(ie. "monkey.obj" - a monkey head default object in blender,
"ico.obj" - icosphere,
"frame.obj" - a cube
or your own .obj model)
also rotate z-axis portion of rotatewire() function is buggy, when i try doing it it just flattens the model and i am not sure why
If anyone can help fix displaywire() function or figure out why the model flattens when z-axis rotation portion of rotatewire(), that would be awesome.