Luminosity for Obj model

Started by PG, April 03, 2009, 10:39:00 AM

Previous topic - Next topic

jo

Hi,

I have some information about why some mtl files don't load. Basically it comes down to the fact they have spaces in the names. The OBJ spec doesn't support this. You can use more than one mtl file in a model and spaces are used to separate the filenames on the mtllib line. This means a line in the file which looks like:

mtllib cruise ship.mtl

is strictly speaking referring to two files - one file called "cruise" and another file called "ship.mtl". So basically that's the problem.

It's easy enough to fix yourself. Rename the mtl file so there are no spaces in the name ( i.e. cruise_ship.mtl ). Next open the obj file in a text editor and look for the line which starts with mtllib. It will probably be near the top of the file, but search for it otherwise. Change the mtllib line to refer to the renamed mtl file:

mtllib cruise_ship.mtl

Now everything should work as expected.

There are obviously a lot of obj files which do use spaces in the name of the mtl file. I came across one myself when I was looking for models to test the new texture system with. I'll look into improving the handling of this in TG2's OBJ importer.

Regards,

Jo

PG

Yeah I tried that but I think the mtl file was actually incomplete. I loaded it into poseray and half the materials were missing. I loaded it into 3ds max and did it myself and they were all there and here's the result. Not the most technically challenging scene in the world but I learnt a lot doing it.
Figured out how to do clicky signatures

bobbystahr

That's one awsome summer night fireworx cruise you got going there...having a similar problem but as I don't have Max I'll not be able to go that route.
something borrowed,
something Blue.
Ring out the Old.
Bring in the New
Bobby Stahr, Paracosmologist

PG

Night scenes are a pain in the arse with terragen most of the time because having the sun more than 5 degrees below the horizon has the effect of essentially deleting the sun, so there's no light at all.
Figured out how to do clicky signatures

sjefen

But the "Light exposure" helps a lot on night scenes.

- Terje
ArtStation: https://www.artstation.com/royalt

AMD Ryzen Threadripper 1950X
128 GB RAM
GeForce RTX 3060 12GB

bobbystahr

Also you can position the sun where the moon would be in your scene, preferably off camera, and dial it back to like 1 or even .5 and take care of the darkness of the sky in the atmosphere Tab..just a thought as I ain't done any night scenes yet.. ...
something borrowed,
something Blue.
Ring out the Old.
Bring in the New
Bobby Stahr, Paracosmologist

Oshyan

The lighting in TG2 is pretty realistic. With the sun 5 degrees below the horizon, if you tried to take a photo in real life it would be quite dark. You would have to use a long exposure to get much of anything. In TG2, just increase the exposure (gizmo on the bottom-left of the 3D preview with a +/- ). You'll need to have GI enabled to make this work best, and this is a case where increased GI settings may help.

- Oshyan

bobbystahr

Must try that...keep forgetting bout that handy exposure slider.. ...
something borrowed,
something Blue.
Ring out the Old.
Bring in the New
Bobby Stahr, Paracosmologist