Maya to Terragen2

Started by TheBadger, February 08, 2013, 06:18:15 PM

Previous topic - Next topic

TheBadger

Hi,

Am seeing something I can't explain when I bring a model made in Maya into TG2. Everything is fine with the geometry. But in the object texture node the diffuse color is always at zero. So the render will show the object as black.
I move the slider to 1 and the object appears to render as it should.

My question is Why does it come in at zero?

I havent seen this before and am just curious about it. I have always had to adjust displacements settings but never diffuse before. My models always came in at something above zero, but to the best of my memory never as high as 1.

So what is normal here? Was I doing something wrong before, or am I doing something wrong now?-with my models.

One other thing I have noted, is that my textures are already correctly assigned to their proper place in my object. Previously I alway had to manually go into the object node and connect to the image with .obj(s). (Very happy about that, by the way!) Did something change in TG2, or is this because I am using good modeling software now?
It has been eaten.

j meyer

There are indeed variations of the .obj format,depending on the software you use.
E.g. some write/read creased edges others don't.And that goes for more than one
feature.
You can learn more about that by opening a small sized .obj and/or .mtl in a text editor.

TheBadger

really did not know that J Meyer. Thought it was one code everyone used in the same way.
Does what you said hold true for .jpeg .tiff and so on too? Could be an explanation why some people find .jpg more useful than other people do?
It has been eaten.

j meyer

Don't know,never heard or read of something similar as of yet anyway.

Kadri

#4

http://www.scantips.com/basics09.html
http://en.wikipedia.org/wiki/Image_file_formats

Sometimes different programs can use a specific file format differently.
It may be a fault , different interpretation
(i remember a thread in the photoshop forum that was quite amusing how one of the coders of Photoshop though different about the use of alpha channel in TGA (?) files) ,
open formats  like EXR that get implemented differently etc.

But mostly it is about lossless+lossy formats , 8 , 24 , 32 bits, layers or not , transparency and how much your preferred program is good in using them.
You will probably end in using one of these TGA, TIF , HDR (openEXR) , PNG. And probably because of Photoshop you will use PSD but will output to one of those probably.
In the past i used TGA and TIFF mostly. Now i use PNG and EXR  . 
No one holds you up from using JPG but it is lossy and with each edit you are destroying more pixels in it ( http://en.wikipedia.org/wiki/Generation_loss ).
And i think any software uses JPG in memory much the same as any other one with the same dimension and bit depth .

When you read the above wiki link for example the TIFF part you will understand it better.
Actually there isn't an 100% standard in the digital world regarding file formats.  3D object formats etc too.
Some times it is bad you get headaches why this or that wont work in your output (black image,black-white lines in the contours in alphas etc)...
Sometimes good because you get better and more ways to use them.

For example i am curious what format Matt will use for the render passes if he will use them in one format.
Maybe EXR again ?
We have EXR output in TG 2 Michael but then there is this too for example : http://www.db-w.com/products/exrtrader/about

It isn't so complicated as it seems first and you end up using what suits your needs and software the best in the end.

jo

Hi Badger,

We've made some enhancements to the OBJ loading over time. I'm not sure what we might have added in recent releases that have helped you specifically but there are further improvements in an upcoming release.

With regard to your specific issue you could send me the files to take a look at. It's hard to say what is happening without seeing them. It may be that you don't have something set up quite right in Maya. It might be something to do with how TG is reading the file. My suspicion is that it's reading what it understands of the OBJ format correctly but there might be some aspect of the export process from Maya which means things are coming out in quite the ideal fashion for TG.

I would say OBJ export from Maya should be pretty good because the OBJ format originated from Maya (or one of its predecessors at least). Of course TG only supports a subset of what OBJ is capable of, which is documented here:

http://www.planetside.co.uk/wiki/index.php?title=Wavefront_OBJ_Import

OBJ is a much abused format and many applications don't use it in accordance with the actual file spec. OBJ is quite an easy format to write import and export code for and many people copy what they've seen other people do without too much reference to the actual file spec. This is what has lead to problems in the past with loading MTLs and or/images and TG2 has had to become more permissive when loading files to deal with that.

Regards,

Jo

Kadri


Jo any hint for the renderpasses file format and time when we will see it ?
At least in "soon" or at a "later time"kinda  format :)

Klas

Quote from: TheBadger on February 08, 2013, 06:18:15 PM
My question is Why does it come in at zero?
Its not the .obj, its the .mtl. There should be a line like Kd 1 1 1 for the diffuse color. Maybe its something like Kd 0 0 0 or the line start with a tab. Can you post the .mtl file here?

Klas

I run some test with a trial version of Maya and it seems that the eporter always writes "Kd 0 0 0" if the material has an image map.

jaf

Not sure if this is relevant to the discussion and don't have Maya, but generally Poseray can "fix" obj files for use in Terragen.  That said, I use Lightwave and Poseray can read .lwo files and can output "good" (TG2) obj files after processing it.

This image shows a purposely bad object made in Lightwave (non-planar and exported as an obj.  Then a direct import to TG2 on the right and on the left, a "run" through Poseray first.

Of course my test corrects bad gemetry, but when comparing the Poseray output to obj output from different modelers, there are usually differences (usually all legal, but different "flavors" in the obj format.

(04Dec20) Ryzen 1800x, 970 EVO 1TB M.2 SSD, Corsair Vengeance 64GB DDR4 3200 Mem,  EVGA GeForce GTX 1080 Ti FTW3 Graphics 457.51 (04Dec20), Win 10 Pro x64, Terragen Pro 4.5.43 Frontier, BenchMark 0:10:02

Matt

Quote from: Kadri on February 10, 2013, 07:11:31 PM

Jo any hint for the renderpasses file format and time when we will see it ?
At least in "soon" or at a "later time"kinda  format :)

Our render elements will be output as individual EXR files, one EXR per element. Possibly we might support multi-layered EXR files at a later date (all elements embedded in a single EXR), but I haven't sensed a great demand for that. Other formats might be added later but there is no plan to do that.

Render Layers and Render Elements turned into quite a big project, with scope beyond what we first imagined, so we decided not to release it with v2.5 and keep that focused on FBX instead. I'm very confident we will release a really solid implementation in a future version, but it's too soon to talk about release dates.

Matt
Just because milk is white doesn't mean that clouds are made of milk.

Kadri


Thanks Matt ! I will eagerly wait for that implementation  :)



gregtee

Open EXR 2.0 support would be great too.  Just another thing to add to the list.
Supervisor, Computer Graphics
D I G I T A L  D O M A I N

TheBadger

Thanks guys!
Like I said, things are way better for me now with getting my models into TG2. The number one improvement for me is not having to reconnect my textures to the object in the node. Also, when I go to add a displacement map, if the BW map is in already in the same object folder, I don't have to go find it in my hard drive. Its right there on the first click. I know making .tgo files is best for TG2, but I usually only do that for objects I will use on more than one project.

@Kadri
Thanks Kadri, you always have good links for us!

@Klass
Thank you that answers the question. So its just the way Maya does it. Its not a terrible thing. I guess I would prefer that the object came in just as it was made to look. But its not a horrible situation or anything. and I am glad to know for sure what the deal is.

@jo
Lots of good info in your post, thanks. You know I just have to piece this 3D stuff together from threads like this.
It sounds like klass proved what is happening. But if you would like to have a maya object to test on, I will happily make something to send you. Just let me know.

@jaff
I have to say from your example of the issue I would not want to deal with lightwave at all. Adding yet another step (pose ray) to my already very time consuming and tedious workflow/pipeline would probably make me quit 3D. By comparison I have not seen the issues you have illustrated with any of my models. Lately I have been using Maya only, for modeling, and the issue I brought up is the only problem I have had, so far.
But the example you gave is very good information to have. Thank you for doing it!

It has been eaten.

jaf

Hi TheBadger,

Actually Lightwave works great with TG2.  I purposely made a non-planar model in Lightwave to show how Poseray can correct bad geometry.  The other point was when Poseray saves an obj, it writes it out in a format that seems more compatible with TG2 than some other obj formats from other modeling programs.

There's a good description of the obj format here:
   http://en.wikipedia.org/wiki/Wavefront_.obj_file

You can easily look at obj files with a simple text editor (notepad works fine.)    You should be able to take a Maya generated obj file and run it through Poseray and save it and then compare the original to the Poseray output and check for differences.
(04Dec20) Ryzen 1800x, 970 EVO 1TB M.2 SSD, Corsair Vengeance 64GB DDR4 3200 Mem,  EVGA GeForce GTX 1080 Ti FTW3 Graphics 457.51 (04Dec20), Win 10 Pro x64, Terragen Pro 4.5.43 Frontier, BenchMark 0:10:02