Jump to content


Photo

obj 3d models does not show up


  • Please log in to reply
3 replies to this topic

#1 Xbowman

Xbowman

    GMC Member

  • GMC Member
  • 45 posts
  • Version:GM8

Posted 14 September 2012 - 03:39 PM

I'm trying 2 load a model but it doesn't show up even if the depth is less then the cam depth, i'll explain what i tried 2 do: i made the obj file with blender 2.63, i extracted the texture from the obj file with uv mapper, i loaded the obj file by doing this:i included the file by going 2 include file in resources, then i set the file 2 be put in the same folder as the game, then i loaded the texture from the obj file into the backgrounds folder then i put the following code in the create event:
table=d3d_model_create()
d3d_model_load(table,"table.obj")
and in the draw event:
d3d_transform_set_identity()
d3d_transform_add_rotation_x(-90)
d3d_transform_add_translation(x,y,0)
d3d_model_draw(table,x,y,1,background_get_texture(tex_table))
d3d_transform_set_identity()
then i put the object in the room, then when i run the game, the game runs just fine without any errors, however, the model won't show up, what am i doing wrong?
  • 0

#2 ShubhamBansod

ShubhamBansod

    Pokemon Master

  • GMC Member
  • 255 posts
  • Version:GM8

Posted 14 September 2012 - 06:11 PM

You have to convert your model in *.gmmod,*.mod,*.d3d
Gamemaker is unable to load .obj models so convrt it by the help of MODEL CREATOR v5 or Gm alter ego...both will convert your model in gamemaker model format...
\Edit/
also their are some scripts avilable to load .obj models without converting them...you will find them in script forum...
shubham

Edited by Mr.creator, 14 September 2012 - 06:14 PM.

  • 1

#3 Xbowman

Xbowman

    GMC Member

  • GMC Member
  • 45 posts
  • Version:GM8

Posted 14 September 2012 - 07:30 PM

You have to convert your model in *.gmmod,*.mod,*.d3d
Gamemaker is unable to load .obj models so convrt it by the help of MODEL CREATOR v5 or Gm alter ego...both will convert your model in gamemaker model format...
\Edit/
also their are some scripts avilable to load .obj models without converting them...you will find them in script forum...
shubham

ok, so i converted the obj to d3d and switched from table.obj 2 table.d3d in gm just like u said but it still doesn't show up.
  • 0

#4 fluoriioni

fluoriioni

    GMC Member

  • GMC Member
  • 95 posts

Posted 14 September 2012 - 09:20 PM

draw the model in the coordinates of 0,0,0 as you already added the place in d3d_transform_add_translation(x,y,0)
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users