Problems with loading 3DS manually
Blitz3D Forums/Blitz3D Programming/Problems with loading 3DS manually
| ||
I´m trying to import a 3DS into Blitz the hard way. So my routine parses the file and finds the chunks it needs and creates a mesh, creates a surface, adds vertices, adds polygons and then setting UV-coordinates. Everything is fine until I add the UV-coordinates. The object is about 90% correct in Blitz, whereas the built in routine has no problems at all. Has anyone tried something like this? The 3DS file has some UV-coordinates that are negative values. But I correct those just as Blitz does. The errors are difficult to explain but some polygons display mirrored textures in the wrong places. This could perhaps look a bit overkill to do, and not an easy question, but I really need this to work. |
| ||
have a look in here, see if you can find anything to help: http://blitzbasic.com/codearcs/codearcs.php?cat=12 |
| ||
Thanks, but I have already looked there. Lots of useful debugging routines which I will try. The strange thing is that I have listed the UVs for every vertex(281) for the object using Blitz loader and with my own. And there is no difference at all, except that Blitz apparently moves the vertex numbers around sometimes. So that vertex 0 gets to be 1 or any other number. |
| ||
Does anyone know which 3ds chunks Blitz LoadMesh() function uses to create an entity? And if it calculates them in a specific way? Or is there a way to find this out? Perhaps this question is a bit off-topic here but I thought I´d give it a go. ;) |
| ||
Sorry m8...i created a 3ds importer for my opengl projects, but i couldnt sort out all the problems..uv flipping, and some subObject/clone object flipping..im guessing there must be some additional data within the 3ds file that allows you to correct these problems..but the docs i found didnt really say much..very sketchy.. I would recommend using another format..save yourself some major stress ;) |
| ||
I have no problem importing 3DS files..... |
| ||
Defoc8: Sounds like the type of problem I have. Very strange UV-coordinates, that seems to be flipped(or something wierd ;)), and also that Blitz seems to use the transform matrix in a strange way. Yeah, probably should give up on this....but that´s harder! ;) Digital Fortress: No problems? How do you do it? Have you tried more complex models? And with textures? Please explain more. |