mtl files

Started by mhaze, January 25, 2007, 12:22:42 PM

Previous topic - Next topic

Aenea

Ahhhhhhhh....that´s the point...so you cannot use the image maps coming with the old obj????

I just posted this in another thread:

QuoteHi there!

I also tried several things with the old xfrog obj. And I also used your tut Helen, but I wasn´t 100% successful. Just let me tell you what I did...

I imported the purple leaved plum (prunus cersifera nigra) obj into wings3d.
Then I followed the instructions in the tutorial.
I selected the trunk, the leaves, and strangely you were able to select two different types of branches too.
I saved them as new material and assigned a color.
Then I saved everything as new obj.

I got the obj and the mtl file and tried to import it into Terragen, what worked without problems.
I figured out that the mtl-file hadn´t the textures included, meaning, the saved images of trunk and leaves. I changed the png and rgb files into jpg files and put them into the same folder as the obj and mtl file. After I added the location of the image-files to the mtl-file, they all loaded in Terragen without problems, I found them all in the multishader.
So far so good.

I got a tree after the first render, but what I got wasn´t much satisfying. Somehow the leaves were green, they should be plum-colored like the image file of the leaves. Well, as well I couldn´t see any leaf-texture on the leaves. They were leave-shaped but had a bright-green colour - and now comes the clou. In the middle of the bright-green shapes leaves, there are smaller, dark-green leaves with texture....  At least there is some texture, but again in the wrong colour...and why do they have this strange bright-green border (also leaf-shaped, but no text). It´a real riddle to me. Whatever I did with the image files, and the alhpa-image files...nothing seem to work.
The trunk as well is very square-cut and there´s also not the right texture on it.

I don´t have any clue where the problem is....maybe someone has some idea what else I can try to get a natural looking tree?
Maybe I did something wrong in the wings3d program? I´m not sure...cause when I added the colour in the program it seemed to keep exact this colour in Terragen...and I wasn´t able to change that (as pointed out above).
Maybe, when I´m home, I can add a picture so you can see more clearly what I was referring to...it´s always difficult to describe such things....a picture often says more than thousand words.

Maybe you have to add the right textures in 3dwings?
And what else wondered me a bit, when I changed the images, first the png: I followed again the instructions and in the end the leaf was white (only the shape remained) and then the background was all black. I saved it as jpg and was done. With the rgb file it was more difficult, because there wasn´t only the leaf, there was some strange texture in the background. I considered that to be the alpha-channel picture, cause when I finally succeeded in changing it the same way like the png, and wanted to save it as jpg, the program said that with saving the alpha-channel will be lost.
I also saved the original pictures as jpg and with the rgb it was again the same: the alpha-channel will be lost.
So I´m not sure if this has something to do with it. Any suggestions about that?

Hell, I hope I´m someday able to get these things right.....
Thanks in advance for ANY help on that...I´m really at a loss at the moment....

So is there any way to make them look more realistic instead of only colouring them new???

Aenea

§ardine

Quote from: mr-miley on February 14, 2007, 03:32:48 PM
Does anyone out there know if there is any set order to load textures in the multishader in relation to what order they are listed in the mtl file  ??? I have tried rearranging items orders in the multishader till I'm blue in the face and always end up with textures on the wrong part of the model.

As far as I know the order of the textures is determined by the obj file -whatever is mentioned first will be the first in Teragen. You can open an obj file in a text editor to determine this (preferably something that can handle very large files like wordpad) however locating your texture instances in the file can be painful :)

I'm just guessing at this so don't quote me  :P

mr-miley

Ta for that §ardine. This is what I had presumed. I'll have to go away and beat som mtl files with a big stick to see if I can get them to work :)
I love the smell of caffine in the morning

Aenea

as I alread pointed out in the tgo plant thread....

I have the order of the mtl files correct now.....but the textures won´t work...
it´s really strange....

Aenea

rcallicotte

Go through the multishader one texture at at time and make sure that the path to each texture is correct.  I bet they aren't.
So this is Disney World.  Can we live here?

Aenea

How do you mean that moodflow?

In the multishader I have the single parts of the tree: leaves, bark
Then I click '...' leaves
In the color tab I put in the leaf.tif (or jpg)
(the real picture), and in opacity the leaf_a.tif (black white alpha channel).
But I never get the right textures.
Oh, use alpha channel is checked.

Aenea


rcallicotte

I'm not moodflow, but I'll try to answer.

In the Default Shader or ImageMap Shader (Default shader is best so you can use displacement maps) inside of the Multishader, make sure the image is selected by browsing for it.  Then, check to see if you have the Projection Type set where you want it, which I think will probably be Through Camera.  On the images I've used, I don't mess with the Alphas (usually), so that should keep you pretty plain and not fancy.  Nevertheless, the key (after ordering the MTL) is to get the textures in the right order in the Multishader as in the MTL and make sure you can see the Multishader's individual textures.

For images in the Default Shader, choose a color image and set your Diffuse to 1.  Do the same in Luminosity (at the bottom of the same page) and start with a 1 value there.  Once this is done, go to the Displacement tab, choose a BUMP image and set the Displacement multiplier for a .05 to begin.  Play with these values until you see them like you want in the preview window and, of course, for your final render.

Hope this helps and is not redundant information for you.

So this is Disney World.  Can we live here?

Aenea

Thanks for all the help - especially to Helen!

The trees work now, just a little color problem, but I think this will be fixed soon too (hope so).

I think I will wirte a tutorial about that.
The info why it hadn´t worked in my case:

my transparency was at 50%, I checked "use alpha channel" in the opacity tab, but I used a jpg and jpg´s don´t have an alpha channel...so if you use jpg - don´t check the "use alpha channel" box!

Be back with a tutorial asap.

Thanks again for your help!

Aenea

Oshyan

Quote from: calico on February 16, 2007, 10:31:20 AM
I'm not moodflow, but I'll try to answer.

In the Default Shader or ImageMap Shader (Default shader is best so you can use displacement maps) inside of the Multishader, make sure the image is selected by browsing for it.  Then, check to see if you have the Projection Type set where you want it, which I think will probably be Through Camera.

Actually "through camera" will cause unexpected results since the texture will literally be projected through the current camera view. What you want is "Object UV (if available)". This will properly respect the UV maps previously created and put the textures into the correct positions.

- Oshyan