Issues with Xfrog trees, image map related

Started by mrwho, June 10, 2007, 02:22:53 PM

Previous topic - Next topic

mrwho

I know that tif files don't work correctly with TG2/Xfrog models, so I used Poseray to convert them to jpg files, and everything looked fine, so I re-saved the mtl file with the paths going to the jpg files. When I go to render in TG2, it says it can't find the images, so it renders all black. Any thoughts? I've looked at the mtl file, and I don't see any issues, but I might have missed it. Oh, and something called the OMruler is also a tiff, do I need to change that as well??

#==================================================
#Material list
#This file has been created by PoseRay v3.10.3.412
#3D model to POV-Ray/Moray Converter.
#Author: FlyerX
#Email: flyerx_2000@yahoo.com
#Web: http://mysite.verizon.net/sfg0000/
#==================================================

#==================================================
newmtl Default_trunk
Ns 64
Ka 0.1607843 0.1607843 0.1607843
Kd 1 1 1
Ks 0 0 0
map_Kd C:\Documents and Settings\Ryan\Desktop\TG2 Stuff\XfrogPlants\XFrog Blossoming\Models\BS01_Cercis_siliquastrum_Judas_Tree\BS01brk_c.jpg
d 1
#r 0
#metal
#blend 0
#cell_hi

#==================================================
newmtl Default_CE1c
Ns 64
Ka 0.3921569 0.3921569 0.3921569
Kd 1 1 1
Ks 0 0 0
map_Kd C:\Documents and Settings\Ryan\Desktop\TG2 Stuff\XfrogPlants\XFrog Blossoming\Models\BS01_Cercis_siliquastrum_Judas_Tree\BS01flo1_c.jpg
d 1
#r 0
#metal
#blend 0
#cell_hi

#==================================================
newmtl Default_CE2
Ns 64
Ka 0.3921569 0.3921569 0.3921569
Kd 1 1 1
Ks 0 0 0
map_Kd C:\Documents and Settings\Ryan\Desktop\TG2 Stuff\XfrogPlants\XFrog Blossoming\Models\BS01_Cercis_siliquastrum_Judas_Tree\BS01flo2_c.jpg
d 1
#r 0
#metal
#blend 0
#cell_hi

#==================================================
newmtl Default_leaves
Ns 64
Ka 0.3921569 0.3921569 0.3921569
Kd 1 1 1
Ks 0 0 0
map_Kd C:\Documents and Settings\Ryan\Desktop\TG2 Stuff\XfrogPlants\XFrog Blossoming\Models\BS01_Cercis_siliquastrum_Judas_Tree\BS01lef_c.jpg
d 1
#r 0
#metal
#blend 0
#cell_hi

#==================================================
newmtl Default_CE2b
Ns 64
Ka 0.3921569 0.3921569 0.3921569
Kd 1 1 1
Ks 0 0 0
map_Kd C:\Documents and Settings\Ryan\Desktop\TG2 Stuff\XfrogPlants\XFrog Blossoming\Models\BS01_Cercis_siliquastrum_Judas_Tree\BS01flo2_c.jpg
d 1
#r 0
#metal
#blend 0
#cell_hi

#==================================================
newmtl Default_CE1b
Ns 64
Ka 0.3921569 0.3921569 0.3921569
Kd 1 1 1
Ks 0 0 0
map_Kd C:\Documents and Settings\Ryan\Desktop\TG2 Stuff\XfrogPlants\XFrog Blossoming\Models\BS01_Cercis_siliquastrum_Judas_Tree\BS01flo1_c.jpg
d 1
#r 0
#metal
#blend 0
#cell_hi


Harvey Birdman

#1
It might be the spaces in 'Documents and Settings'. Try moving the image files to a folder whose path doesn't contain any spaces, and modify the .mtl file accordingly.

<edit>
Actually, I think you can use relative paths instead of full paths. Put the images in the same folder as the .mtl and .obj, and modify the paths in the .mtl to remove the path, leaving just the image file name. Then it won't matter whether there are spaces in the path or not. I think.

:)
</edit>

moodflow

As Birdman has said, its likely the paths.

Another way is to do it in TG2 itself by opening the .obj file in TG2, then saving it as a .tgo file.  Then reopen the .tgo, and go to the surface shader for each item in and browse to the path that way.  Once the paths are set (and you also set translucency if applicable), do a final save of the .tgo with all the new settings.

I've probably done about 60+ so far today, as I've been converting all my old .obj files of foliage I've accumulated over the years to .tgo files.  Of course this is all possible due to PoseRay.  Wings3D is just a dog when it comes to models over a few MB in size, and still screws up half the time.
http://www.moodflow.com
mood-inspiring images and music

mrwho

#3
thanks for the help, moving the images to a diff folder worked. Now, another problem has popped up (of course). This is what the tree looks like: (right-click and view image to see it better)


Sigh...

Harvey Birdman

#4
You need to get the alpha channel (transparency) information set up correctly. Bring up the multishader dialog then select the leaf shader (or whatever they're calling this one). Click the 'opacity' tab. Select the image file that contains the transparency data. This may be either the original tiff (which may work, by the way) or a separate black and white image. (The original tiff may (probably does) contain the transparency info in it's alpha plane. If the original image is 32 bits per pixel, it likely has the alpha data embedded.) If the data is in the alpha plane of a 32 bit image, check the 'Use Alpha Channel' checkbox; otherwise leave it cleared.

By default (iirc), white areas in the alpha image denote opaque areas, and black is transparent. You can invert this if need be by checking the 'Invert opacity image' checkbox.

<edit>
If the alpha data is embedded in a 32 bit image and you have a decent image editor, you may do better to create separate files for the color and alpha data. Open the original 32 bit image and split the alpha plane stuff off and save it as a separate image. Next, make a new image file (copy the original leaf image) and save it as 24 bits per pixel, without the alpha data. Specify the new 24 bit image as your color map and the new alpha image as the transparency map.
</edit>

bigben

#5
Tiff files don't work with TG2???  I only use TIFF files (LZW compressed) for object textures and image maps and haven't had any problems. 

In PoseRay's export options before saving, I have "Copy all maps to the same directory" and "Fix map names" checked and I then save to a different folder. The resulting MTL file should have no path names in it all and should load correctly into TG2.

Otherwise you cold always remove the path names manually and make sure the images are in the same folder as the object.

bigben

PS. Clicked on the link in your MTL and found that PoseRay 3.11 is out. Had a quick play and there are some useful improvements (although not related to this problem)

moodflow

Quote from: bigben on June 12, 2007, 10:31:31 PM
Tiff files don't work with TG2???  I only use TIFF files (LZW compressed) for object textures and image maps and haven't had any problems. 

In PoseRay's export options before saving, I have "Copy all maps to the same directory" and "Fix map names" checked and I then save to a different folder. The resulting MTL file should have no path names in it all and should load correctly into TG2.

Otherwise you cold always remove the path names manually and make sure the images are in the same folder as the object.

I agree, I also use the LZW compressed tiff files.  The PNG files don't work well in TG2 it seems.  JPG's and BMP's are fine, but require an extra "alpha" file for transparency.
http://www.moodflow.com
mood-inspiring images and music

mrwho


Harvey Birdman

Thanks for the heads up on the PoseRay update, BB.