|
|
Exporting big .x files
About Truespace Archives
These pages are a copy of the official truespace forums prior to their removal somewhere around 2011.
They are retained here for archive purposes only.
Exporting big .x files // New Users
Post by PrimMac // Jun 4, 2007, 4:20pm
|
PrimMac
Total Posts: 78
|
Hello all,
I am trying to use TS to export big terrains. The terrains are created in another app I own, as I don't think TS has a built-in terrain editor. I export the terrains as .obj files from my other app, and import them to TS to convert into .x format. For some strange reason, though, even though I scale my terrain to make it big, the .x file always exports as a small terrain.
The final purpose is to get the terrain into a 3D engine. The 3D engine I'm using supports DirectX 9 format. When I load my TS-exported .x terrain, it loads very small, unusable for terrain purposes (looks like a ruffled handkerchief more than like a terrain). I can programmatically scale it, but then, I get collision detection issues. So, is there a way to export .x files from TS while preserving their original size? Thanks for any info. |
Post by Tiles // Jun 4, 2007, 8:59pm
|
Tiles
Total Posts: 1037
|
Don't have that problem with X. Have you checked your settings for X? Especially "convert resolution to ... " in TS 7.5. When we talk about TS 6.6 it may be that you have ticked "center and normalize", which also shrinks it down.
I think it is more the OBJ format that makes fun here. Does it import in your needed size? LUUV imports it by default with autoscale factor 8. Which means every object has 8 meters for the longest part. Untick autoscale here. But even then it may make trouble. When i import a Roadkill OBJ, the object is shrunk by factor 10, and i need to rescale it then. |
Post by PrimMac // Jun 5, 2007, 2:21am
|
PrimMac
Total Posts: 78
|
Thanks for your reply, Tiles.
It may be the OBJ (I am using LUUV for import, like you said). I will check it out and report what I find. By the way, I thought the resolution part was for the textures only. Does it affect the mesh's geometry as well? |
Post by PrimMac // Jun 6, 2007, 11:07am
|
PrimMac
Total Posts: 78
|
Hi again Tiles, I checked it out...
It turns out that if I turn off autoscale in LUUV, it imports correctly... well, correct size anyway. My textures don't seem to import correctly, though. Could it be a bug in LUUV, or am I missing something else? |
Post by Tiles // Jun 6, 2007, 8:56pm
|
Tiles
Total Posts: 1037
|
Texture should import fine when it is applied. No problem at my side here. When it doesn't import the texture, chances are big that the texture isn't proper applied.
What makes trouble though is the shader settings. Gives you Caligari Phong (Phong + Reflection + Refraction) in the Reflectangle section. With different settings than the original had, being more a mirror now. And so you may need to readjust the Reflectangle shader settings to your needs before you save it as X. |
Post by PrimMac // Jun 9, 2007, 8:31am
|
PrimMac
Total Posts: 78
|
Hi again tiles,
My problems are not yet over. When I bring my .x exported file to my 3D engine, it looks bigger than it used to, after setting re-scale factor to 40 (which, IMO should be big enough). My terrain looks bigger than it used to, but still not the original size. I tried reimporting into TS. Effectively, it was shrunk from the original size (original size was 10,000 x 1,100 x 9999.99). Now it was 1,000 , 1,100 x 1,000 (more or less). Anything else I can check? Thanks for the help. |
Post by Tiles // Jun 9, 2007, 9:05pm
|
Tiles
Total Posts: 1037
|
Reimporting an X file back to trueSpace is no good idea. TS doesn't support it. Try to load a second X file into the same scene, render it, and you know what i mean, texturewise ;)
Size. Have you done a comparison test with a simple cube? There were these two points for exporting X i have mentioned above: "convert resolution to ... " and "center and normalize", which changes the scale factor. Turn them off to keep the original sizing. There is also a settings panel for importing X by the way ...
Besides that, X is more a bundle of formats than a real format. There are this much different X files possible. And not every 3D engine loves the one that TS outputs. There is even a significant difference between the X that is output from TS 6.6 to the one that is output from TS 7 and 7.5. I also remember that the X files turns out to be veery small when imported into the Irrlicht meshviewer. But have a perfect size in 3D Rad 6, which i am playing around with. That's the way it is.
When everything else fails i would suggest to export it from TS as OBJ with the LUUV extension. Then load the OBJ into Blender, and try to save it as X from there. |
|