Dire Need of Help! Need Response in < 3 hours

Blitz3D Forums/Blitz3D Beginners Area/Dire Need of Help! Need Response in < 3 hours

Myersbros(Posted 2007) [#1]
I am on a very tight time schedule at the moment and I need to know some information fast.

My brother and I embarked on a project for school creating a virtual tour of the place. We created the school using Maya 7 and brought it over into 3DS format. With this, we tried to load the file into Blitz3D and we get an error Internal Memory Address Error or something like that.

We believe it is because the file is too large but we do not have a clue how to compress it and perserve the school along with its textures. If this is not the case, please let us know what to do.

Thank you very much for your time and please respond promptly.


Danny(Posted 2007) [#2]
Converting models is always extremely tricky. I haven't got a clue what might be the problem.

Also it sounds like you might be running the program WITHOUT debug turned ON - which might give you a better/clearer error message?! And might possibly not have anything to do with the model itself?!

Cause you're on a deadline, what I can offer though is email me the 3ds file and I'll have a look if I can find something. I've got good conversion software here - maybe it will help but I can't quarantee anything ofcourse.
(your model will be treated private and confidential ofcourse).

[edit]

good luck,
Danny


Danny(Posted 2007) [#3]
Try using this minimal program to load your program and see if it gives you an error. If so, it's probably the model yes, if not it might be your program itself:

graphics3d 800,600,0,2
print loadmesh("C:\Skool.3ds")
waitkey()
end

If you don't get an error it should print the mesh's entity handle to screen. nothing else.

If you can, you can reduce the model size by making sure all double-vertices are welded, polygons unified and things like that. If that ain't enough, you'll have to lose model detail and use special tools for that... :/

Hope this helps,
D.


Beaker(Posted 2007) [#4]
What size are your textures? How many?

What size is your mesh, how many polys/triangles?

Internal Memory Address Error or something like that

Can you be more specific? What is the error exactly? Is debug turned on? Does the model load? Which line does the error happen on?


PowerPC603(Posted 2007) [#5]
You can also try to load the model using LoadAnimMesh, if all stuff inside the school are separate models with separate textures.
Using LoadMesh, everything (all vertices and triangles) will be added to one big mesh and could cause an overload for DirectX, who can handle models up to 65.535 vertices per model.
Anything about that will cause DirectX to crash and give you an "Memory Access Violation" error.

Using LoadAnimMesh, Blitz3D will keep the hierarchy intact, if you have one scene-root (a pivot for example), with all other models as children of that scene-root.
I assume the walls are one model, while chairs, tables, bookshelves and such are all separate models (= entities or meshes) which you have positioned inside the school model.
Then Blitz3D will load the scene-root as one entity with all other models attached to it as children.


Myersbros(Posted 2007) [#6]
Guy so far you have been very helpful with all of your advice. Currently I am sitting out the last 10 minutes of school and my brother and I are headed home to try everyones' suggestions. We will have one hour by the time we get home and I will replicate the problem to post a more accurate error message.

In regards to the size of the file itself, I will also get back to you when I get home. The tour itself is actually just the hallways of the school, none of the rooms are drawn and there are no separate objects. The file is around 2,100 planes that are shaped to look like the school with applied textures. The textures are simply digital pictures that were edited in Photoshop and made into materials to apply to the blank faces.

Currently the best way that we have found to convert the file from Maya to 3dsMax is by converting the .mb file to a .fbx and then ultimately to a .3ds file. We have heard about Okino we weren't having much luck with it.


Myersbros(Posted 2007) [#7]
Okay I'm at home now and it is called an Illegal Memory Address and it occurs on the RenderWorld line. The file itself is 5.03 MB.

Danny, I also tried your simple program you posted and it gave me a number, which was 68461272, if that is any relevance.

Okay I realize I keep editing this post but I keep trying more and more suggestions. The LoadAnimMesh command worked but I now lack the textures that were applied in Maya.

Okay down to 58 minutes left. Keep the help coming guys!


Stevie G(Posted 2007) [#8]
Yes, but where does this error occur? I'm guessing your mesh exceeds dx7 vert or triangle limits and the error appears on Renderworld() as suggested.

After this ...

;Creating building
building=LoadMesh("C:\Documents and Settings\Iceman\Desktop\Virtual Tour_C\srproj.3ds")
EntityType building, type_wall


Try putting this in to check your totals ..
Verts = 0
Tris = 0
for cs = 1 to countsurfaces( building )
  s = getsurface( building, cs )
   Verts = Verts + countvertices(s)
   Tris = Tris + counttriangles(s)
next
debuglog "Verts : "+verts
debuglog "Tris : "+Tris
debuglog "Mesh Loaded : "+building
End


Then report back the values of building, tris and verts in the debuglog.

Stevie


Myersbros(Posted 2007) [#9]
PIVOT: 0.000000,0.000000,0.000000
Verts : 0
Tris : 0
Mesh Loaded : 101704456

The file loads with the LoadAnimMesh command but is completely white.


Stevie G(Posted 2007) [#10]
That would make sense if the main mesh is parented to a central pivot. The fact that the main mesh is white would suggest that your textures are missing or the paths are not correct.

I'll leave this to others who have more experience of converting formats. For the time being the only thing I can suggest is manually applying the textures using paintmesh or entitytexture.

p.s. Keep the 'collisions' commands out of the main loop. They only need to be called once.


Myersbros(Posted 2007) [#11]
Thank you guys very much and wish me luck on my presentation ^_^


Danny(Posted 2007) [#12]
The 3DS format needs their texture-filenames in the old ms-dos format of 8 characters + 3 characters for extension.
Also make sure the 'currentdir()' is set to the folder where the textures are located so blitz can find them.

Good luck and let us know how it went ;)

Danny