I need it in layman's terms

Started by Que, March 03, 2007, 07:10:39 PM

Previous topic - Next topic

Que

Maybe i need some sleep and maybe it'll sink in but im completly lost with all this obj stuff.
Ive learnt that when ive got an obj file if i stick it in terragen n save it as a tgo file it wont crash when i go to render.Ive had a few files from some sites around the net ..but im totally thick and cant work out how to get the textures(colours) onto any of the files...basically they come out grey.
Now ive seen other ppl with simular problems on the forums and read the threats and ..well ppl seemed to of grasped it but ive got bob hope lol...ive read em a few times an cant work out what i need to do or what i need to use to do it.
Ive downloaded wings3d ...but what to do with it ive no idea and basically need agood obj file.
Sooooooooooooooooooooooooooooo
Can anyone explain in dummy terms where i can get maybe a boat or anything for that matter thats a decent obj file ...tell me how to add it to tg and then how to give it some colour ..n preferably as simple as possible my heads already aching lol
Thanks
Q.

king_tiger_666

if you open a obj in terragen 2 and save it as a tgo it will strip the textures off of it, and when you open the tgo you will have to assign the textures to the multishader under the open settings..

you can also try importing the obj in wings3d and export it again as a new obj file and see if that works.

<a href="www.hobbies.nzaus.co.nz/">My  Terragen Downloads & Gallery</a>

neon22

#2
some free decent obj files at turbosquid. but you have to be a member.
do a search for obj format and zero dollars.
Of course free may mean not the best Quality :-)

Here you can find three obj files: http://www.zenstar.com/dxfobj.htm
The bolt (lightning) will load in and render but you will have to do one thing first.
(I have not tried the trees.)

Go to "Objects" - add obbject - object - obj reader
then choose the unzipped bolt model - do not choose the xfrog compat option (it appears to just rotate and scale the model and uses xfrog's idea of unit length)
It will load in - you will have to move it up 500 so its above the ground.
  (other models will probably need scaling if they are small.)

Now if you try to render - it will crash :-)

So first open up the internal network of the bolt object (rclick on the node in the node network)
inside you will see a multishader - but it has no shaders assigned to its inputs.
this is why it crashes (well the main reason)
You need to assign something to its inputs to avoid crashing.

This particular object only needs one. (You always need at least one.)
Examining the obj file in a text editor and looking for usemtl strings. Count them - you need that many.
(This file doesn't have any which means it needs one)
Its OK to add more than you need. it just won't use them.
The easy shader to make here is a power fractal colour shader. (You could use a default shader too.)
Attach it to the first shader node in the multishader - (the first node is actually an input node - so its the second node from the left)

Now go up a level to Objects again and rclick on the Bolt and save Object - save it as a tgo.
now we have a tgo file that will render. Most of the time the obj file will render too but this one has every triangle as a sep entity and isn't that good a model actually. So throwing it out and using the TGO will work much better and is safer.

So now delete the bolt object.
Load it in again but this time load your new tgo file not the obj file.
Translate and scale again :-)

Render it.

if you use wings3d and resave the object as an obj file - it might be better behaved. This is a good idea for all found obj files as the format is old and variable and implemented in many different ways over the last 25 years.

The Geostation

#3
You're not alone.   I'm also still having trouble shading object files in TG2TP with the multishader.   It will either shade the whole tree with the bark, or the whole tree with the leaves  >:( - depending on which way around they are in the multishader inputs.

I'm considering trying out a fudge - populating an area with two IDENTICAL populations (position etc) - with the exception that one is shaded with bark (with a default shader displacement setting of 0) and the other is shaded wtih alpha-channeled leaf (possibly with a default shader displacement setting of 0.01).

As you gather I've been tying myself up in knots over this.

Best regards,

Andrew Randle
The Geostation
Andrew Randle
The Geostation

neon22

#4
i made another post about this somewhere but lost it now :-(

But do this:
- look through the obj file looking for usemtl entries.
- see how many unique ones there are.
      this is how many indivdual material shaders you really need to create
- see how many times the usemtl's show up and in what order.
       this is the number of multishader inputs you will use. (equal or more than the number of materials)

So - say you have an object with a metal and a wood material.
usemtl wood and usemtl metal wil appear in the file. so you need two material shaders - say default ones or powerfractals.

However the file may be organised into several non-contiguous sections of faces.
Say usemtl metal appears first - then wood - then metal - then wood again
   (not uncommon as back sde of model may be tessellated differently by modelling program)

This means you will need four entries to the multishader.
  The first and third wil be metal and the second and fourth will be wood.

Hope this helps

Oshyan

If anyone has any links to objects of reasonable quality that are freely available and are giving you problems in TG2, please post them. We are working on improving OBJ compatibility for the upcoming patch and need examples of problem files. We have already worked out a number of issues but it sounds like there may be more problems. The more examples we have the better.

Keep in mind of course that, as Neon said, the OBJ format is very old and has gone through many variations. So it's extremely difficult to support all permutations. That's why using a 3rd party converter such as Wings3D or Blender can often provide better results as it "normalizes" the OBJ format and makes it easier for TG2 to deal with.

- Oshyan

The Geostation

Hi Oshyan,

I may sound silly, but the multishader problems (covering the whole tree with bark or alpha-leaf textures depending upon the ordering - as described in my above post) have been occuring with the free .obj models I've tried at http://web.inf.tu-dresden.de/ST2/cg/downloads/publicplants/

Best regards,

Andrew Randle
The Geostation
Andrew Randle
The Geostation

mr-miley

I have a problem with ALL OBJs exported out of XFrog. I can get the bark to apply OK but no matter what file formats I use for the leaves I either get big grey splodges or no leaves at all  :(

I have been through Helens tutorial letter for letter. I apply the image file for the leaves (tried BMP, TIFF, JPEG, PNG, CSE, TSB (its the bank for me)) and still have grey splodges, as soon as I try to use an alph mapped TIFF or PNG for the opacity image, all the leaves disappear.

Other plants that use bitmaps with alphas for leaves work fine, its just the ones from Xfrog. Its driving me mad  >:(
I love the smell of caffine in the morning

Oshyan

I can tell you categorically that the Xfrog public plants are known to be problematic. Even Greenworks recommends against using them as they're a  much older version of their plant models and textures. That being said they *can* be made to work, it just takes a lot of manual work, which does involve reformatting some of the images.

The same may be true of some other older Xfrog objects. Separate alpha may be required in some cases, although embedded alpha should work as well. I will test a range of Xfrog objects against the latest internal builds and make sure that at least the latest Xfrog objects are loading correctly. Without examples of other problem objects (other than the free Xfrog objects, which we're aware of), we can't really address other remaining problems. But we're covering as much as we can, of course.

- Oshyan

RedSquare

Ooo, I've got a problem object but until I get back home at the weekend I can't access it.  :(

rcallicotte

Has this been addressed by anyone at Planetside?  I'm finding that I can't get the xFrog objects to work in TG2 due to blocks that should be transparent but aren't.  This is after running it through PoseRay...perhaps without enough understanding.  This tree is from the Basic xFrog package.

So this is Disney World.  Can we live here?

Tangled-Universe

This seems to be due to a lack of masking.
The .tif files provided with the model contain an alpha channel with the mask.
You should manually save this mask as a b&w images and then load them manually in the opacity image input under the opacity tab of the leaf's default shader.
I usually make .bmp images of the leaves and b&w .bmp images of the mask and load them all seperately. Almost works every time for me.
When I have everything up and running I save the object as a tgo.
Hope this will help.

Martin

rcallicotte

TA, this is what worked after I asked, though I didn't use a B&W mask.  Just used the TIF and it worked okay.  I'll try the B&W to see the difference.  Thank you.
So this is Disney World.  Can we live here?