Tizzio
|
|
Posted on: September 10, 2013, 06:04:53 am |
|
|
Joined: Sep 2013
Posts: 4
|
Hi guys, i'm italian (so, sorry for my bad english) I just joined the forum, but some of you already knows me from IRC channel I'm working on d3d_model_load to add native support to .obj files so close to release! after that, i have to write some util functions for d3d eg. d3d_model_normals_calculate(id); d3d_model_normals_flip(id); d3d_model_uv_scale(id, xscale, yscale); d3d_model_uv_rotate(id, rotation);
|
|
« Last Edit: September 10, 2013, 06:11:41 am by Tizzio »
|
Logged
|
|
|
|
time-killer-games
|
|
Reply #1 Posted on: September 10, 2013, 06:28:25 am |
|
|
"Guest"
|
OMGosh this is awesome! Will it support multi texture referenced OBJ materials (MTL file which loads several PNGs for drawing)? I desperately need this for my current project and it could save me some serious time. Please, please, when you get this ready to release allow me to be one of the first to know! This is very exciting! If you announce when it's finished in this topic please do let me know in a PM too just in case because that will give me an email notification. Any chance you could not just implement it into an enigma build but also port it to an open source DLL so I can use it in GameMaker:Studio? Also, if you can explain the source code to my briefly I'd love to make a port (with some research) to a JavaScript extent ion for GMS's Html5 module and possible an extension for the android module too. Awesome work, very well done! : Also if multi-texuring isn't and won't be implemented no problem, because it's still very exciting to me to be able to use wavefront models directly without always having to convert back and forth between *.obj and*.d3d|*.mod|*.gmmod|*.g3d|*.gml. So either way this can save me some time and will be a big help. Congrats! TKG
|
|
|
Logged
|
|
|
|
|
Tizzio
|
|
Reply #3 Posted on: September 10, 2013, 11:12:42 am |
|
|
Joined: Sep 2013
Posts: 4
|
Added normals Thank you guys! time killer, i can't add multitexturing with current system, because if you use d3d_model_draw, you have to use single texture. But i can make new functions: //get a list of meshes from my .obj (when you export multitextured .obj, your modelling program subdivide it into some sub-models) my_list = d3d_model_load_list(fname); In this way you get a ds_list and with a for cycle, you can draw the model for (i = 0; i < ds_list_size(my_list); i++) { var model = ds_list_find_value(my_list, i); d3d_model_draw(model, x, y, z, tex[model]); //tex[model] is an array containing all the textures of my model }
|
|
|
Logged
|
|
|
|
Goombert
|
|
Reply #4 Posted on: September 10, 2013, 12:57:03 pm |
|
|
Location: Cappuccino, CA Joined: Jan 2013
Posts: 2993
|
Tits or gtfo! I love you tittio your my man! Dazappa will be excited to hear this. Don't worry about multitexturing just finish up what you have and commit it and I can add the multitexturing to it Tizzio because I have to decide on a final multitexturing implementation, really appreciate the help man!
@TKG I want support for material files, if he don't add it, I definitely will.
The plan here guys is for (*.obj) to be our default internal mesh format, others will come through an extension, but internally our mesh format is officially (*.obj) and this what Josh has agreed to as well.
|
|
« Last Edit: September 10, 2013, 01:00:43 pm by Robert B Colton »
|
Logged
|
I think it was Leonardo da Vinci who once said something along the lines of "If you build the robots, they will make games." or something to that effect.
|
|
|
|
Goombert
|
|
Reply #6 Posted on: September 10, 2013, 01:01:03 pm |
|
|
Location: Cappuccino, CA Joined: Jan 2013
Posts: 2993
|
Yes, I just got up give me a bit and I'll get on.
|
|
|
Logged
|
I think it was Leonardo da Vinci who once said something along the lines of "If you build the robots, they will make games." or something to that effect.
|
|
|
time-killer-games
|
|
Reply #7 Posted on: September 10, 2013, 01:25:24 pm |
|
|
"Guest"
|
This is really impressive keep up the great work guys.
Something to consider though, how will d3d_model_save() work with all this?
|
|
|
Logged
|
|
|
|
Goombert
|
|
Reply #8 Posted on: September 10, 2013, 01:41:30 pm |
|
|
Location: Cappuccino, CA Joined: Jan 2013
Posts: 2993
|
@TKG d3d_model_save_ext(fname, format);
d3d_model_save_ext("mymod.obj", fmt_obj); d3d_model_load_ext("mymod.obj", fmt_obj);
He also added a function that precalculates normals for models for you.
OBJ will be our default model format, FBX and 3Ds and other formats can be added through extensions.
|
|
|
Logged
|
I think it was Leonardo da Vinci who once said something along the lines of "If you build the robots, they will make games." or something to that effect.
|
|
|
Tizzio
|
|
Reply #9 Posted on: September 10, 2013, 07:12:31 pm |
|
|
Joined: Sep 2013
Posts: 4
|
d3d_model_calculate_normals(int model_id, bool smooth, bool outside); with smooth without smooth
|
|
|
Logged
|
|
|
|
|
|
|