Jump to content


Photo

Gmmodelex (fast Functions For Gm Models)


  • Please log in to reply
88 replies to this topic

#1 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • GMC Elder
  • 18181 posts
  • Version:GM:Studio

Posted 06 December 2008 - 06:43 AM

Download GMModelEx.zip
Last Update Dec 15 2011

-Now faster than ever. THANK YOU X-tra Fear and score_under

Includes:
-Merge GMK (Simple example and API definition)
-DLL, of course
-Source File... (Because I won’t always be there) Sorry it's one HUGE c++ file...

Developed for GMModelFix, GMModelEx is a dll that encapsulates quite a few functions related to editing a model, Such as changing model point or facet range, color, alpha, vn, uv x, y, z. Generating vn light map, adding and removing facets, merging models, importing model and exporting them as d3d model files, Save model parts or fragment a model

However, it can be used in your game to mainly import obj or x files without using GMModelFix to fix your model (Though you really should use GMModelFix to make a real d3d model file). But it can also be used for other things...

GMModelEx is useful for
-Import obj and x files
-Save the imported model to d3d model or loop though the model data manually
-Morph the model data (Resize, Stretch, Rotate)
-Light Map generation
-Terrain mapping, e.g. getting the z value of a model at a point
-Morphing a model at run time, like destructible terrain, you need to save and reload using d3d_model_load
You can also loop though the data points to generate the gm_model, if the model is huge, saving and reloading may be faster
-Loading and converting a obj or x model to a d3d model...
Again you can save to a tmp file and d3d_model_load or loop through the point to make the gm model
-Collision checking
You can map the 3d world to the model space and find the facet and facet points, for collision or terrain height map
-Fragment the model using RemovePoints or save passing a range to make model sub part, such as when destroying a model to bits

ALL feature allow for specifying a range of facets, so you can move the head off a body or save the body of a car without the wheels for example...

Remember, modifying the model data itself is only useful if you need to morph the model data; it's not a replacement to d3d_tranforms. you should use GMModelFix to make sure your model is pointing to the right, (+x), standing on the z axis (+z) so you have less d3d transforms in your game. GMModelFix should be the solution for most game that simply load and display a model as it converts obj and x models to d3d which is really all you need. But if you need total control (or make your own model editor), this is it.

UPDATE:
http://gmc.yoyogames...dpost&p=3877279

UPDATE:
http://gmc.yoyogames...&...t&p=3454619

UPDATE:
Fixed the obj bug not including the last face or facet

UPDATE:
NOW SUPER FAST

The dll can now populate a gm d3d model you created with
d3dmodel = d3d_model_create()

using
GMModelEx_ModelToGMModel(GMMODELEXModel, d3dmodel,0 /*or 1*/)

Which means your .obj and .x import is now crazy fast AND you can now basicaly morph your model live!!!

Download GMModelEx.zip
BUGS:
I have found a BUG with .obj exported by Anim8tor (or in my import of obj generated by anim8tor). When you export to a .obj, and import in GMModelFix, a facet will be missing. You can re-add the facet in GMModelFix if it's important... FIXED

GMModelEx_ModelSetPointAll BUG FIX you must change yourself to
//gmexport double GMModelEx_ModelSetPointAll(double model, double index, double x, double y, double z, double nx, double ny, double nz, double u, double v, color, alpha)

//combines SetPoint and SetColorAlpha
return GMModelEx_ModelSetPointColorAlpha(argument0,argument1,argument10,argument11)
and
GMModelEx_ModelSetPoint(argument0,argument1,argument2,argument3,argume
nt4,argument5,argument6,argument7,argument8,argume
n
t9);;
UPDATE
Removed clamping and MSVC

Edited by icuurd12b42, 11 September 2013 - 09:07 PM.

  • 2

gmcbanner.pnggmcbanner_tools.png

ICU Live Tutoring Through Slack or Skype | My Tools Page follow.png

I FRANTICALLY MADE MY 18000 POST TOPIC BEFORE MIKE ANNOUNCED A DELAY...
Now I'm squirming not to hit that reply button


#2 xygthop3

xygthop3

    You may know me from such forums as "Shaders"

  • GMC Member
  • 3367 posts
  • Version:GM:Studio

Posted 06 December 2008 - 10:44 PM

Sounds like a really great DLL, but unfortunetly I get a corrupt zip file when I download it.

Would you mind uploading it somewhere else? Thanks.
  • 0

#3 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • GMC Elder
  • 18181 posts
  • Version:GM:Studio

Posted 06 December 2008 - 11:32 PM

Sounds like a really great DLL, but unfortunetly I get a corrupt zip file when I download it.

Would you mind uploading it somewhere else? Thanks.



I just did a test download. It's fine. You probably had bad luck downloading it.
  • 0

gmcbanner.pnggmcbanner_tools.png

ICU Live Tutoring Through Slack or Skype | My Tools Page follow.png

I FRANTICALLY MADE MY 18000 POST TOPIC BEFORE MIKE ANNOUNCED A DELAY...
Now I'm squirming not to hit that reply button


#4 mrsmes

mrsmes

    GMC Member

  • GMC Member
  • 1506 posts
  • Version:GM:Studio

Posted 07 December 2008 - 09:25 AM

in future it would be nice to load in .tif files neat and handy models made in Zbrush and Maya, both very handy tools.
  • 0

Assuming I helped you out in a questions and answers topic won't you return the favour by helping me with one my coding problems, or recommend some one who can chat to me over pms about helping and how to overcome my obstacles, after all lets just say I did help you or them or many people with similar problems, in that topic.

Here i have a topic for those of you struggling with type writer text and mugshots in your games especially if it is a rpg see the link below for more info

http://gmc.yoyogames...howtopic=619103

almost no code needed, only uses two events.

click here for the l8est version of feed the alien pizza, it has some major polished up features.


#5 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • GMC Elder
  • 18181 posts
  • Version:GM:Studio

Posted 07 December 2008 - 04:48 PM

in future it would be nice to load in .tif files neat and handy models made in Zbrush and Maya, both very handy tools.



I thougth tif file were image files.... When I get my hands on proper specs on other types (they are hard to find and many times not too compatible with a gm model) I may add them... But if the tool used to make the model has an export to obj, I usually don't bother.
  • 0

gmcbanner.pnggmcbanner_tools.png

ICU Live Tutoring Through Slack or Skype | My Tools Page follow.png

I FRANTICALLY MADE MY 18000 POST TOPIC BEFORE MIKE ANNOUNCED A DELAY...
Now I'm squirming not to hit that reply button


#6 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • GMC Elder
  • 18181 posts
  • Version:GM:Studio

Posted 19 December 2008 - 04:38 AM

[BUG FOUND]
I have found a BUG with .obj exported by Anim8tor (or in my import of obj generated by anim8tor). When you export to a .obj, and import in GMModelFix, a facet will be missing. You can re-add the facet in GMModelFix if it's important...
  • 0

gmcbanner.pnggmcbanner_tools.png

ICU Live Tutoring Through Slack or Skype | My Tools Page follow.png

I FRANTICALLY MADE MY 18000 POST TOPIC BEFORE MIKE ANNOUNCED A DELAY...
Now I'm squirming not to hit that reply button


#7 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • GMC Elder
  • 18181 posts
  • Version:GM:Studio

Posted 23 January 2009 - 11:39 AM

Update.

Fixed a bug wich was writing the wrong line count in the d3d header when saving model parts
  • 0

gmcbanner.pnggmcbanner_tools.png

ICU Live Tutoring Through Slack or Skype | My Tools Page follow.png

I FRANTICALLY MADE MY 18000 POST TOPIC BEFORE MIKE ANNOUNCED A DELAY...
Now I'm squirming not to hit that reply button


#8 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • GMC Elder
  • 18181 posts
  • Version:GM:Studio

Posted 05 February 2009 - 04:43 AM

UPDATE:
Fixed the obj bug not including the last face or facet
  • 0

gmcbanner.pnggmcbanner_tools.png

ICU Live Tutoring Through Slack or Skype | My Tools Page follow.png

I FRANTICALLY MADE MY 18000 POST TOPIC BEFORE MIKE ANNOUNCED A DELAY...
Now I'm squirming not to hit that reply button


#9 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • GMC Elder
  • 18181 posts
  • Version:GM:Studio

Posted 28 February 2009 - 04:17 AM

UPDATE:
NOW SUPER FAST

The dll can now populate a gm d3d model you created with
d3dmodel = d3d_model_create()

using
GMModelEx_ModelToGMModel(GMMODELEXModel, d3dmodel,0 /*or 1*/)

Which means your .obj and .x import is now crazy fast AND you can now basicaly morph your model live!!!

Download GMModelEx.zip
  • 0

gmcbanner.pnggmcbanner_tools.png

ICU Live Tutoring Through Slack or Skype | My Tools Page follow.png

I FRANTICALLY MADE MY 18000 POST TOPIC BEFORE MIKE ANNOUNCED A DELAY...
Now I'm squirming not to hit that reply button


#10 brett14

brett14

    GMC Member

  • GMC Member
  • 1151 posts
  • Version:GM8

Posted 22 October 2009 - 05:09 AM

Thank you for the source icuurd12b42; it will really help me with extending my dll. I'm <working> on a 3d collisions dll, and I still need to add model support (currently just make your own in game) and the source will help me alot... thanks.

<Of course credit will be given>

~~Brett14;

Edited by brett14, 22 October 2009 - 05:18 AM.

  • 0

P3DC V6.00 | Editor14 | Large 3D Terrain

GML programmer since 2005, C/C++ programmer since 2009, Java programmer since 2012


#11 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • GMC Elder
  • 18181 posts
  • Version:GM:Studio

Posted 08 March 2010 - 12:29 AM

UPDATE
Added Support to toggle between gm6-7 model and gm8 models (gm8 support up to 32000 vertices, so less spliting)
Added facet sorting function
Dll should work in GM8 (not tested)

Edited by icuurd12b42, 08 March 2010 - 12:30 AM.

  • 0

gmcbanner.pnggmcbanner_tools.png

ICU Live Tutoring Through Slack or Skype | My Tools Page follow.png

I FRANTICALLY MADE MY 18000 POST TOPIC BEFORE MIKE ANNOUNCED A DELAY...
Now I'm squirming not to hit that reply button


#12 johnjoe

johnjoe

    GMC Member

  • New Member
  • 299 posts
  • Version:Unknown

Posted 04 February 2011 - 09:54 PM

hey 'urd, when the example is initiated an error occurs saying "error defining an external function" could it be that it's running it through wine? i've overridden the dll already.
  • 0

#13 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • GMC Elder
  • 18181 posts
  • Version:GM:Studio

Posted 05 February 2011 - 06:19 AM

Could be. wine does not have everything.
I'm stuck doing real world stuff. I need to recompile without them external superfluous dlls. Soon I hope, darn MS.
Try installing this in the dll/gmk/exe folder for now
http://www.microsoft...4d-074b9f2bc1bf
  • 0

gmcbanner.pnggmcbanner_tools.png

ICU Live Tutoring Through Slack or Skype | My Tools Page follow.png

I FRANTICALLY MADE MY 18000 POST TOPIC BEFORE MIKE ANNOUNCED A DELAY...
Now I'm squirming not to hit that reply button


#14 johnjoe

johnjoe

    GMC Member

  • New Member
  • 299 posts
  • Version:Unknown

Posted 05 February 2011 - 07:55 PM

it's working well now. (Y)

a significant improvement to the 3d game, thanks a lot!
  • 0

#15 johnjoe

johnjoe

    GMC Member

  • New Member
  • 299 posts
  • Version:Unknown

Posted 06 February 2011 - 08:24 AM

hey 'urd, i've encountered a problem using the d3d models saved of gmmodelex with p3dc by brett. it seems that the d3d files that's made off gmmodelexe's model_save function isn't compatible with p3dc's model_add function where as a d3d that's been saved of potv would have worked well. i did found differences in the contents of both d3d files made in potv and gmmodelex's... also i have tried importing gmmodelexe's d3d file into potv and had potv to export it again into a d3d file then load the model into p3dc which didn't work.

i have posted here: http://gmc.yoyogames...c=449508&st=180 ... more insight to be found.

please 'urd, your input is most appropriate. it could be discouraging that 1 method significant to creating a 3D game might become impractical.
  • 0

#16 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • GMC Elder
  • 18181 posts
  • Version:GM:Studio

Posted 06 February 2011 - 06:54 PM

It's a shame. I only support triangle models. That may be the reason.

You have the file? And NO RAPID SHARE PLEASE, I tried to get your file off the topic there. Rapid Share will not allow me to download without registering. It even tells me a fake message about having too many download threads to download, to resolve, upgrade to pro.

Try host-a
  • 0

gmcbanner.pnggmcbanner_tools.png

ICU Live Tutoring Through Slack or Skype | My Tools Page follow.png

I FRANTICALLY MADE MY 18000 POST TOPIC BEFORE MIKE ANNOUNCED A DELAY...
Now I'm squirming not to hit that reply button


#17 johnjoe

johnjoe

    GMC Member

  • New Member
  • 299 posts
  • Version:Unknown

Posted 06 February 2011 - 07:05 PM

hello, i've had it uploaded at host-a: http://www.host-a.ne...ohnjoe/Cube.zip

thanks, 'urd.
  • 0

#18 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • GMC Elder
  • 18181 posts
  • Version:GM:Studio

Posted 06 February 2011 - 07:33 PM

hello, i've had it uploaded at host-a: http://www.host-a.ne...ohnjoe/Cube.zip

thanks, 'urd.


They are both fine at first glance (They ar triangle models)...
One has alpha/color, the other has not
But there is an extra 2 lines in the deffective one

Also, make sure the facets are facing the right way. I dont know the source that made the model. but if triangles are facing inward, that become a shape that cannot be handled in collision engines. But it looks fine in gmmodelfix, so that's not the problem.

Me thinks:
The extra 2 lines in your model (file) are an extra facet that should not be there. Invisible/"0 area" facet. In gmmodelfix, you can select the facets (F) + click then use the arrow (right arrow) to navigate though all of them. the last facet selection yeilds a single line. This is probably not acceptable in the collision engine. You can use gmmodelfix to delete the line.

http://www.host-a.ne...gmmodelex.2.zip

You may want to remove the extra last lines in the file (texture reference and extra data ingnored by GM but possibly not by the engine)

Check the code that generated the model. it has a bug in it.

Edited by icuurd12b42, 06 February 2011 - 07:34 PM.

  • 0

gmcbanner.pnggmcbanner_tools.png

ICU Live Tutoring Through Slack or Skype | My Tools Page follow.png

I FRANTICALLY MADE MY 18000 POST TOPIC BEFORE MIKE ANNOUNCED A DELAY...
Now I'm squirming not to hit that reply button


#19 johnjoe

johnjoe

    GMC Member

  • New Member
  • 299 posts
  • Version:Unknown

Posted 07 February 2011 - 07:57 AM

thanks, that's understood.

i don't want to depend on converter tools that had been made in gm, i've had exhausting experience with them; potv is taking so much time converting and exporting the model, yours' has its interactive screens reacting slowly with low fps.

i did succeed loading files with gmmodelex and adding the model with p3dc, but the model had to be exported in .x format and it had to be .x natively (if you import obj in wings3d and export it into .x it still is incompatible with p3dc) which isn't ideal because it would mean that i have to create the model myself whereas otherwise would be if obj files exported into .x is compatible would mean that i could download model files made by someone else and import it ingame. i had done importing obj files and exporting them into .x files in wings3d and blender, and i had no success in integrating the products with p3dc.

i suppose it's essential for you to know what it is i'm trying to achieve. that's simply integrating collision detection for a model, a beach house model exactly. i had downloaded a beach house 3d model from an independent blog webpage providing free architectural 3d models. i wanted to load the .obj beach house model through gmmodelex and integrate it into p3dc ... one significant use is designing a ramp for the player to levitate (to simulate a stairway) when walking onto the stairway on the beach house model becomes unnecessary. and also, besides having an automatic detection of stairways the integrated collision for the interior part of the house would be ideal too.

here is a photo of the beach house model:
Posted Image

Edited by johnjoe, 07 February 2011 - 08:02 AM.

  • 0

#20 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • GMC Elder
  • 18181 posts
  • Version:GM:Studio

Posted 07 February 2011 - 08:42 PM

thanks, that's understood.

i don't want to depend on converter tools that had been made in gm, i've had exhausting experience with them; potv is taking so much time converting and exporting the model, yours' has its interactive screens reacting slowly with low fps.

i did succeed loading files with gmmodelex and adding the model with p3dc, but the model had to be exported in .x format and it had to be .x natively (if you import obj in wings3d and export it into .x it still is incompatible with p3dc) which isn't ideal because it would mean that i have to create the model myself whereas otherwise would be if obj files exported into .x is compatible would mean that i could download model files made by someone else and import it ingame. i had done importing obj files and exporting them into .x files in wings3d and blender, and i had no success in integrating the products with p3dc.


Ubunto>>wine>>GMGames = slow...

You said you used wine? to run gm games under unix/ubuntu? I tried it... pathetic. Even nice 2d gm games were slow. Cheap gm games, not that slow.

Does p3dc not regognise .obj or .d3d (GM's Format)? I think brett and I talk about this and the feature is in there...

If you controll the model for your game, all you need is a easy procedure to make your models...

I use accutrans3d, the link to it is in main post of the gmmodelfix thread...

I grab models of the web, use accutrans3d to convert to obj. Use gmmodelx.dll or gmmodelfix.exe to double check the model for the game. Bad vertices and stuff. Then save as .d3d or .obj to load in your game.

Apply the model to the 3d collision dll and to GM's render system

Tada, you have your 3d scned with collision.

>>models files>>manual check model>>save obj>>load in game>>make exe>>game

Dending on how many models you have, the types of models. You can decide where you want to speed up the process; automate.

If you plan to make an app that user load their models, you may want to check the object as it loads, automaticaly fix problems

>>your game>>user selects model file>>your auto check>>add to game>>use in game


i suppose it's essential for you to know what it is i'm trying to achieve. that's simply integrating collision detection for a model, a beach house model exactly. i had downloaded a beach house 3d model from an independent blog webpage providing free architectural 3d models. i wanted to load the .obj beach house model through gmmodelex and integrate it into p3dc ... one significant use is designing a ramp for the player to levitate (to simulate a stairway) when walking onto the stairway on the beach house model becomes unnecessary. and also, besides having an automatic detection of stairways the integrated collision for the interior part of the house would be ideal too.

here is a photo of the beach house model:
Posted Image


If you want simple ray tracing to figure out your standing, gmmodelex has primitive ray tracing built in. It's documented in the scripts. I'm not sure how I wrote it but I use it in gmmodelfix to select facets and points.

It's not the best method for true 3d physics but enough to control your own physics in the game. I dont know what brett does in his. Probably better 3d ray tracing functions.

...

ps. I fought with my keyboard's broken y button typing this :)

Edited by icuurd12b42, 07 February 2011 - 08:46 PM.

  • 0

gmcbanner.pnggmcbanner_tools.png

ICU Live Tutoring Through Slack or Skype | My Tools Page follow.png

I FRANTICALLY MADE MY 18000 POST TOPIC BEFORE MIKE ANNOUNCED A DELAY...
Now I'm squirming not to hit that reply button


#21 brett14

brett14

    GMC Member

  • GMC Member
  • 1151 posts
  • Version:GM8

Posted 08 February 2011 - 12:42 AM

P3dC does support .d3d models HOWEVER I think that there is either an error with the model or with p3dc because the model does not seem to work. I *think* it's the model though because this is the first complaint I've heard about the feature since it was added and I myself have used it in many times successfully. However I'm not ruling out P3DC error.

Just a question, does this use trianglestrips/fans or lists?

Edited by brett14, 08 February 2011 - 12:50 AM.

  • 0

P3DC V6.00 | Editor14 | Large 3D Terrain

GML programmer since 2005, C/C++ programmer since 2009, Java programmer since 2012


#22 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • GMC Elder
  • 18181 posts
  • Version:GM:Studio

Posted 08 February 2011 - 12:45 AM

Yes, brett, there was a few extra vertices making a 0 volume facet or a partly defined triangle. You can find a fixed model zipped in my earlier post.

edit:
triangle list is the end result

Edited by icuurd12b42, 08 February 2011 - 12:52 AM.

  • 0

gmcbanner.pnggmcbanner_tools.png

ICU Live Tutoring Through Slack or Skype | My Tools Page follow.png

I FRANTICALLY MADE MY 18000 POST TOPIC BEFORE MIKE ANNOUNCED A DELAY...
Now I'm squirming not to hit that reply button


#23 brett14

brett14

    GMC Member

  • GMC Member
  • 1151 posts
  • Version:GM8

Posted 08 February 2011 - 12:52 AM

Then that would be the error. P3DC requires that the model have fully complete triangles or else it will glitch out.
  • 0

P3DC V6.00 | Editor14 | Large 3D Terrain

GML programmer since 2005, C/C++ programmer since 2009, Java programmer since 2012


#24 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • GMC Elder
  • 18181 posts
  • Version:GM:Studio

Posted 08 February 2011 - 12:53 AM

triangle list is the end result.

Yeah, he has to make sure bad facets are not present

Edited by icuurd12b42, 08 February 2011 - 12:54 AM.

  • 0

gmcbanner.pnggmcbanner_tools.png

ICU Live Tutoring Through Slack or Skype | My Tools Page follow.png

I FRANTICALLY MADE MY 18000 POST TOPIC BEFORE MIKE ANNOUNCED A DELAY...
Now I'm squirming not to hit that reply button


#25 johnjoe

johnjoe

    GMC Member

  • New Member
  • 299 posts
  • Version:Unknown

Posted 08 February 2011 - 05:16 AM

. In gmmodelfix, you can select the facets (F) + click then use the arrow (right arrow) to navigate though all of them. the last facet selection yeilds a single line. This is probably not acceptable in the collision engine. You can use gmmodelfix to delete the line.


is it possible to execute this through gmmodelex since gmmodelfix uses the same component?
  • 0

#26 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • GMC Elder
  • 18181 posts
  • Version:GM:Studio

Posted 08 February 2011 - 07:53 PM

You can look at the model data using gmmodelex with gml to fix models programaticaly, yes.

the 2 main problems in your case is facets not complete or area of 0 and to make sure the facets are facing outward possibly

loop though model data
{
if(facet facing inward) flip facets point to facet outward, update model data
}

loop though model data
{
if(triangle area is <=0) remove facet
}
  • 0

gmcbanner.pnggmcbanner_tools.png

ICU Live Tutoring Through Slack or Skype | My Tools Page follow.png

I FRANTICALLY MADE MY 18000 POST TOPIC BEFORE MIKE ANNOUNCED A DELAY...
Now I'm squirming not to hit that reply button


#27 johnjoe

johnjoe

    GMC Member

  • New Member
  • 299 posts
  • Version:Unknown

Posted 18 February 2011 - 06:29 AM

uu, you can't modify points' attributes with this can you? could be useful for skeletal system in 3d models. could be this GMModelEx_ModelSetPointXYZ function to use

Edited by johnjoe, 18 February 2011 - 06:36 AM.

  • 0

#28 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • GMC Elder
  • 18181 posts
  • Version:GM:Studio

Posted 18 February 2011 - 07:58 PM

Yep, or GMModelEx_ModelSetPointAll, see note on first post...
  • 0

gmcbanner.pnggmcbanner_tools.png

ICU Live Tutoring Through Slack or Skype | My Tools Page follow.png

I FRANTICALLY MADE MY 18000 POST TOPIC BEFORE MIKE ANNOUNCED A DELAY...
Now I'm squirming not to hit that reply button


#29 Arial

Arial

    GMC Member

  • Banned Users
  • 580 posts
  • Version:GM8

Posted 03 May 2011 - 04:08 PM

Please help me How can I speed up my models
Download 3d model.rar
The file contains gm6 which can run under gm8.1

GM8.1 is to slow in loading models. So it sucks if you wait a long time.
Screw everyone who puts my quotes in his signature to make fun out of me.

#30 Arial

Arial

    GMC Member

  • Banned Users
  • 580 posts
  • Version:GM8

Posted 04 May 2011 - 09:53 PM

Wow this is fast loading *.OBJ


Nice pherhaps this the perfect speeding up solution for GM 3D

How I add texture?

You are free to use my models. Please make sample of them with your DLL then they will load very fast.
Download 3d model.rar

Edited by Arial, 04 May 2011 - 09:57 PM.

Screw everyone who puts my quotes in his signature to make fun out of me.

#31 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • GMC Elder
  • 18181 posts
  • Version:GM:Studio

Posted 05 May 2011 - 12:21 AM

You add texture yourself with sprite_add or background_add or just add them to your gm project
Be careful, many obj have their texture flipped in gm. You can use gmmodelfix to flip the texture to match. See my youtube video in the gmmodelfix topic

Edited by icuurd12b42, 05 May 2011 - 12:22 AM.

  • 0

gmcbanner.pnggmcbanner_tools.png

ICU Live Tutoring Through Slack or Skype | My Tools Page follow.png

I FRANTICALLY MADE MY 18000 POST TOPIC BEFORE MIKE ANNOUNCED A DELAY...
Now I'm squirming not to hit that reply button


#32 Arial

Arial

    GMC Member

  • Banned Users
  • 580 posts
  • Version:GM8

Posted 03 June 2011 - 06:46 PM

Question: Using modelex.dll...... What will load faster D3D or OBJ format?
Screw everyone who puts my quotes in his signature to make fun out of me.

#33 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • GMC Elder
  • 18181 posts
  • Version:GM:Studio

Posted 03 June 2011 - 08:27 PM

d3d will load faster; it's a straight forward reading with no parsing of the data. Obj reading required hoops and loops to get around all the possible variations.

Generating a GM model after the read is identical in cpu cost (ModexD3d->d3d == ModexObj->d3d) though I suggest you use gm's d3d_model_load if you have a d3d files if you only plan on reading and using the model as is. that is the fastest way.
  • 0

gmcbanner.pnggmcbanner_tools.png

ICU Live Tutoring Through Slack or Skype | My Tools Page follow.png

I FRANTICALLY MADE MY 18000 POST TOPIC BEFORE MIKE ANNOUNCED A DELAY...
Now I'm squirming not to hit that reply button


#34 Arial

Arial

    GMC Member

  • Banned Users
  • 580 posts
  • Version:GM8

Posted 06 June 2011 - 08:20 PM

though I suggest you use gm's d3d_model_load if you have a d3d files if you only plan on reading and using the model as is. that is the fastest way.

SO use it without gmmodelex?
Screw everyone who puts my quotes in his signature to make fun out of me.

#35 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • GMC Elder
  • 18181 posts
  • Version:GM:Studio

Posted 07 June 2011 - 02:56 AM

though I suggest you use gm's d3d_model_load if you have a d3d files if you only plan on reading and using the model as is. that is the fastest way.

SO use it without gmmodelex?


Yeah. basically, gmmodelex is for those who, for some reason, want to use obj in their game and still want fast loading. Where as I would recommend converting in gmmodelfix to d3d instead as loading a d3d with d3d_model_load() is fastest


The second main reason for gmmodelex would be to manipulate vertices in gmmodels. Or simply even just for knowing the data value (vertices) of the model such as to make a height map or a collision system

Lastly, for mass obj->d3d conversion for people who have accumulated a ton of obj and just now realize gm is slow as heck to load them and now have to convert 10s of models.


loading options sorted by load speed
1st) d3d_model_load(d3dfile) (Blinding fast)
2nd) GMModelEx_ModelImport(d3dfile) + GMModelEx_ModelToGMModel(model) (gm7-8 only) (Super Fast)
3rd) GMModelEx_ModelImport(obj,directx file) + GMModelEx_ModelToGMModel(model) (gm7-8 only) (Almost Super Fast)
4th) GMModelEx_ModelImport(d3dfile) + GMModelEx_ModelSave(d3dfile) + d3d_model_load(d3dfile) (gm6 to 8.1) (Fast)
5th) GMModelEx_ModelImport(obj,directx file) + GMModelEx_ModelSave(d3dfile) + d3d_model_load(d3dfile) (gm6 to 8.1) (Almost as fast)
far behind, 6th) any GML coded obj reader (Wake me when it's done (500 times slower than 5th)) Pantheon in gmmodelfix samples loads in a hour or more vs 30-90 seconds in gmmodelex

Edited by icuurd12b42, 07 June 2011 - 03:06 AM.

  • 0

gmcbanner.pnggmcbanner_tools.png

ICU Live Tutoring Through Slack or Skype | My Tools Page follow.png

I FRANTICALLY MADE MY 18000 POST TOPIC BEFORE MIKE ANNOUNCED A DELAY...
Now I'm squirming not to hit that reply button


#36 ledi51

ledi51

    GMC Member

  • New Member
  • 152 posts

Posted 13 June 2011 - 03:14 AM

Hey, great program. Maybe in a future release, batch convert? I have an animation which exported a bunch of .obj models, loading and exporting em each individually was quite tedious. But otherwise, really great, only program that successfully loaded my .obj files WITH their uv maps.
  • 0

#37 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • GMC Elder
  • 18181 posts
  • Version:GM:Studio

Posted 13 June 2011 - 07:12 AM

Hey, great program. Maybe in a future release, batch convert? I have an animation which exported a bunch of .obj models, loading and exporting em each individually was quite tedious. But otherwise, really great, only program that successfully loaded my .obj files WITH their uv maps.

you can write your own using the dll. It's not that hard
  • 0

gmcbanner.pnggmcbanner_tools.png

ICU Live Tutoring Through Slack or Skype | My Tools Page follow.png

I FRANTICALLY MADE MY 18000 POST TOPIC BEFORE MIKE ANNOUNCED A DELAY...
Now I'm squirming not to hit that reply button


#38 The Scorpion

The Scorpion

    GMC Member

  • GMC Member
  • 428 posts
  • Version:GM8

Posted 28 June 2011 - 06:33 PM

Huge Problem! When importing Models, with UV's higher than 1, eg: (1.5,3)
The exported Model get his UV's destroyed! All (0,0) :blink:
No idea why, but that's what happened, And the imported model, is Very well UVmapped! ;)
  • 0
SE3, 3D model, animation and scene maker. link
Blender/3DMAX7 Animations to GM link
3D Animation 3Dmax11 to GameMaker link

#39 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • GMC Elder
  • 18181 posts
  • Version:GM:Studio

Posted 28 June 2011 - 07:07 PM

Yeah. I made a mistake trying to clamp the uvs. I should not have done that; I was too stupid to realize it's allowed in gm models if you call texture_set_repeat(1)

I'm too busy right now but I'll remove the clamping soon.
  • 0

gmcbanner.pnggmcbanner_tools.png

ICU Live Tutoring Through Slack or Skype | My Tools Page follow.png

I FRANTICALLY MADE MY 18000 POST TOPIC BEFORE MIKE ANNOUNCED A DELAY...
Now I'm squirming not to hit that reply button


#40 The Scorpion

The Scorpion

    GMC Member

  • GMC Member
  • 428 posts
  • Version:GM8

Posted 28 June 2011 - 07:14 PM

Will that Be fixed?
  • 0
SE3, 3D model, animation and scene maker. link
Blender/3DMAX7 Animations to GM link
3D Animation 3Dmax11 to GameMaker link

#41 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • GMC Elder
  • 18181 posts
  • Version:GM:Studio

Posted 28 June 2011 - 08:14 PM

yes, in a few days
  • 1

gmcbanner.pnggmcbanner_tools.png

ICU Live Tutoring Through Slack or Skype | My Tools Page follow.png

I FRANTICALLY MADE MY 18000 POST TOPIC BEFORE MIKE ANNOUNCED A DELAY...
Now I'm squirming not to hit that reply button


#42 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • GMC Elder
  • 18181 posts
  • Version:GM:Studio

Posted 02 July 2011 - 12:08 AM

Will that Be fixed?


UPDATE:
removed the uv clamping
in GM, call texture_set_repeat(1) to support models who's uvs are beyond the 0 to 1 range.
Also compiled with code::blocks, removing all msvc external dependencies. The dll is now bigger. sorry
  • 1

gmcbanner.pnggmcbanner_tools.png

ICU Live Tutoring Through Slack or Skype | My Tools Page follow.png

I FRANTICALLY MADE MY 18000 POST TOPIC BEFORE MIKE ANNOUNCED A DELAY...
Now I'm squirming not to hit that reply button


#43 The Scorpion

The Scorpion

    GMC Member

  • GMC Member
  • 428 posts
  • Version:GM8

Posted 09 July 2011 - 08:17 AM

Will that Be fixed?


UPDATE:
removed the uv clamping
in GM, call texture_set_repeat(1) to support models who's uvs are beyond the 0 to 1 range.
Also compiled with code::blocks, removing all msvc external dependencies. The dll is now bigger. sorry



Good, Nice Fix!
WHERE IS THE LINK??

Edited by The Scorpion, 09 July 2011 - 08:29 AM.

  • 0
SE3, 3D model, animation and scene maker. link
Blender/3DMAX7 Animations to GM link
3D Animation 3Dmax11 to GameMaker link

#44 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • GMC Elder
  • 18181 posts
  • Version:GM:Studio

Posted 09 July 2011 - 04:07 PM

Will that Be fixed?


UPDATE:
removed the uv clamping
in GM, call texture_set_repeat(1) to support models who's uvs are beyond the 0 to 1 range.
Also compiled with code::blocks, removing all msvc external dependencies. The dll is now bigger. sorry



Good, Nice Fix!
WHERE IS THE LINK??


Main post, where it's always been :)
  • 1

gmcbanner.pnggmcbanner_tools.png

ICU Live Tutoring Through Slack or Skype | My Tools Page follow.png

I FRANTICALLY MADE MY 18000 POST TOPIC BEFORE MIKE ANNOUNCED A DELAY...
Now I'm squirming not to hit that reply button


#45 Arial

Arial

    GMC Member

  • Banned Users
  • 580 posts
  • Version:GM8

Posted 10 July 2011 - 09:51 PM

thumbs up for icuurd12
Screw everyone who puts my quotes in his signature to make fun out of me.

#46 The Scorpion

The Scorpion

    GMC Member

  • GMC Member
  • 428 posts
  • Version:GM8

Posted 12 July 2011 - 10:40 AM

Will that Be fixed?


UPDATE:
removed the uv clamping
in GM, call texture_set_repeat(1) to support models who's uvs are beyond the 0 to 1 range.
Also compiled with code::blocks, removing all msvc external dependencies. The dll is now bigger. sorry



Good, Nice Fix!
WHERE IS THE LINK??


Main post, where it's always been :)



Ok, I redownloaded, it did not work, Always the same issue :(
WICH LINK? I tested them all! always the same issue <_< :blink: :blink: :blink:

Edited by The Scorpion, 12 July 2011 - 01:35 PM.

  • 0
SE3, 3D model, animation and scene maker. link
Blender/3DMAX7 Animations to GM link
3D Animation 3Dmax11 to GameMaker link

#47 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • GMC Elder
  • 18181 posts
  • Version:GM:Studio

Posted 12 July 2011 - 05:58 PM

OK. show me your models (obj) file (with their textures of course)...
  • 0

gmcbanner.pnggmcbanner_tools.png

ICU Live Tutoring Through Slack or Skype | My Tools Page follow.png

I FRANTICALLY MADE MY 18000 POST TOPIC BEFORE MIKE ANNOUNCED A DELAY...
Now I'm squirming not to hit that reply button


#48 The Scorpion

The Scorpion

    GMC Member

  • GMC Member
  • 428 posts
  • Version:GM8

Posted 13 July 2011 - 09:13 AM

Here is a link : Model
It's a litte bit huge! ;)
No need for a texture, use any image! The point is that UV's get destroyed :(
  • 0
SE3, 3D model, animation and scene maker. link
Blender/3DMAX7 Animations to GM link
3D Animation 3Dmax11 to GameMaker link

#49 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • GMC Elder
  • 18181 posts
  • Version:GM:Studio

Posted 13 July 2011 - 07:01 PM

Here is a link : Model
It's a litte bit huge! ;)
No need for a texture, use any image! The point is that UV's get destroyed :(


Ooops! There was a final place to fix... Looks like I originally only fixed it for .x files

Anyway. it's fixed for obj now. sorry about that.
  • 0

gmcbanner.pnggmcbanner_tools.png

ICU Live Tutoring Through Slack or Skype | My Tools Page follow.png

I FRANTICALLY MADE MY 18000 POST TOPIC BEFORE MIKE ANNOUNCED A DELAY...
Now I'm squirming not to hit that reply button


#50 The Scorpion

The Scorpion

    GMC Member

  • GMC Member
  • 428 posts
  • Version:GM8

Posted 13 July 2011 - 09:38 PM

Here is a link : Model
It's a litte bit huge! ;)
No need for a texture, use any image! The point is that UV's get destroyed :(


Ooops! There was a final place to fix... Looks like I originally only fixed it for .x files

Anyway. it's fixed for obj now. sorry about that.


Ok then, You made me WASTE 2 days of work :P
  • 0
SE3, 3D model, animation and scene maker. link
Blender/3DMAX7 Animations to GM link
3D Animation 3Dmax11 to GameMaker link