Moderators: Despellanion, Dr. Best

U3D model texture question

williac
Advanced Member
williac
Advanced Member
Joined: April 12th, 2005, 10:25 pm

February 28th, 2016, 6:07 am #1

Its been a long time so I am probably rusty but Im struggling. I am making a game for my kids and am making the level editor. I am needing to export a generated mesh to a U3D file and then load it later. When I load the U3D model the texture isnt displayed properly. It texture is displayed much smaller and upside down compared to the model the U3D file is exported from. Just to be sure it wasnt how I was creating the mesh I loaded a model made in anim8tor Exported a U3D file and then loaded it. I will attempt to attach a pic showing what I am talking about. Its probably something simple I have overlooked.
problem.png
problem.png
Quote
Like
Share

Dr. Best
Forum God
Dr. Best
Forum God
Joined: March 16th, 2005, 8:47 pm

March 1st, 2016, 6:30 pm #2

Not sure what might be causing this. Maybe missing unlock calls? Some code snippets would help.
Quote
Like
Share

williac
Advanced Member
williac
Advanced Member
Joined: April 12th, 2005, 10:25 pm

March 2nd, 2016, 4:52 pm #3

I downloaded the latest SDK (2.1)
opened the BasicGM5.gmd
set the model objects file variable to 'blox.x' a mesh I created in DeledCE.
Placed the model in the room editor ran the game and the mesh appeared textured correctly.
I copied the model object and named the copy model2. I then changed object model2 file variable to 'blox.u3d'.
I added a press<Space> event to the model object and added an execute code action with the following code in it.


ExportToU3DFile('blox.u3d','',true)
instance_create(x,y,model2)
instance_destroy()

I saved the game and ran it. My model objects blox.x mesh appeared fine and then I pressed the
spacebar and my blox.x mesh disappeared and the blox.u3d was created in its place like I expected but the texture is displayed tiny and repeated hundreds of times across the mesh. I will attempt to attach a pic of what it looks like
directx_mesh.gif
Quote
Like
Share

williac
Advanced Member
williac
Advanced Member
Joined: April 12th, 2005, 10:25 pm

March 2nd, 2016, 4:54 pm #4

I am attaching the pic of the u3d mesh as it appears.
u3d_mesh.gif
Quote
Like
Share

Dr. Best
Forum God
Dr. Best
Forum God
Joined: March 16th, 2005, 8:47 pm

March 3rd, 2016, 5:03 am #5

I cannot see anything wrong with that so you might have run into a bug. Might want to look for workarounds because I probably won't get around to fix it. After all, U3D for Game Maker has been discontinued for almost eight years. Sounds odd, but it's true...
Quote
Like
Share

williac
Advanced Member
williac
Advanced Member
Joined: April 12th, 2005, 10:25 pm

March 3rd, 2016, 1:01 pm #6

ok, I will. Thanks for your answer and for all of the work you put in to making U3D. I have done a few small things in C++ since 2007 and cant imagine the time and lines of code it must have taken to make U3D what it is.
Quote
Like
Share