More flora?

Started by Syagre, June 25, 2007, 01:03:21 AM

Previous topic - Next topic

Syagre

Hello everyone,

I was intending to extend my "flora library" recently, so I've laid my hands on the Xfrog free .obj files, but the direct use of such objects in TG2 results in the loss of the texture (as it is the case with many other .obj freebies around the web).
Hopefully I caught the threads mentioning that it could be solved with some manips with Wings3D in order to assign the textures correctly. I know basically nothing of Wings 3D and its likes, but the explanations (from helen and Aenea, if I recall) seemed clear enough. However, I had considerable issues with Wings3D itself: the software often crashes and lags (like "not responding" for 10 seconds) for each click, even with a low-polygon item.  :-[   Has anyone else been confronted to such problems with Wings 3D ? (or is it because of I use the free version ? or because I run it on Vista ?)

More pragmatically, some people in these threads, namely old_blaggard, had mentioned about kindly building a library of such objects so that they could be used readily in TG2 (which would be very convenient and got me rid of the Wings 3D issues  ;D ). Has there been any progress with this task so far?

rcallicotte

I've heard about objects collection for TG2 and seem to remember the flora collection, too.  But, I haven't heard anything yet.
So this is Disney World.  Can we live here?

Harvey Birdman

#2
Quote from: Syagre on June 25, 2007, 01:03:21 AM
... but the direct use of such objects in TG2 results in the loss of the texture (as it is the case with many other .obj freebies around the web).

Huh??  ???

I've never had any trouble with properly formatted obj's 'losing textures', and I use obj's extensively. I suspect the reason there isn't a vast repository of tgo's converted from obj's is because for the most part it's unnecessary. It does give the benefit of having only one file (.tgo) instead of two(.mtl and .obj), but there is no problem with using (properly formatted) .obj's.

<edit>
Tgo's tend to be more compact, too. Obj's and mtls are text based and can get pretty big.
</edit>

A few suggestions.

1) Lose Wings3D. Use PoseRay to clean up the obj's. (Obj's can contain polygons that are not triangles; ie, polys with more than three corners. Many obj readers (I think TG2 among them) don't like non-triangular faces. It wants all polygons to have 3 vertices. PoseRay will convert obj's to properly triangulated polys. It also allows you to re-map texture coordinates and view the results.

2) Examine the .mtl files with a text editor (eg Notepad). Look at the texture paths. TG2 doesn't like spaces in the paths. You're best option is to make sure the textures are in the same directory as the obj and mtl, and make sure the texture paths are just the file name, not the entire path. (In other words, use a relative path instead of an absolute one.) Poseray has an option to save just texture file names instead of full paths. Select that option.

3) You may have some issues with transparency (alpha) mapping. Alpha data can either be contained in a separate black and white image, or it may be embedded in the main image. (If the image is 32 bits per pixel, it probably contains alpha data. The 32 bits per pixel are typically arranged with 8 bits each for red, blue and green, and 8 more for the alpha data.) TG2 seems to have trouble correctly extracting alpha data from some image formats. If you have difficulty getting transparency working, your best bet may be to create separate alpha and color images, if they don't already exist, and specify the new alpha image on the shader 'opacity' tab.

Syagre

Thanks for the tips, Harvey, I will explore these possibilities. Even though I know basically nothing of Poseray, I'll try to rack my brain on it to fix the .obj.

However, the "objects losing texture" is a recurrent issue for me. I don't know if I have gotten particularly unlucky with those, but about 80 % of the obj files I've found across the web lose textures if I use them directly. The multi-shader associated with the object in TG2 is empty in these cases. Anyway, I've found many more not-properly formatted objects than properly formatted ones   :-[

Harvey Birdman

I run everything through PoseRay before I try to import it. And like I said, check out the .mtl files after running a couple of them through it to make sure you're getting the texture paths set right.

You shouldn't have too much trouble with PoseRay. It's pretty intuitive, and has a decent help file.

If you're still having trouble, leave me a private message here and I'll give you my email address. I could take a look at the obj you're messing with and see if I can find the trouble.