Planetside Software Forums

General => File Sharing => Topic started by: bobbystahr on February 27, 2007, 10:45:21 pm

Title: OBJ Convertor
Post by: bobbystahr on February 27, 2007, 10:45:21 pm
Apologies for double posting this but it seems appropriate here as well as in the thread I posted it in originaklly
As a further exploration on getting .obj into TG2 with textures I found this in the Vue Forum at Renderosity. It's very good at converting .obj but re pathing the textures needs to be done if they're in any folde except the one the final .tgo will live in. I have been importing the .obj and saving as .tgo straight away and then re pathing the textures on the .tgo and re saving it over itself. Here's a render of a model found online. The app is called PoseRay and can be found at:
http://mysite.verizon.net/sfg0000/  It says there that you need POVray installed but others have found that not to be the case. I installed POVray anyway to be certain as ther was a link to it on the same page.
Title: Re: OBJ Convertor
Post by: bigben on February 27, 2007, 11:35:18 pm
The installation of POV-Ray is probably just for the POV-Ray output.

It's certainly easy to use for just conversion. I've only tried one model which worked nicely apart from being rotated -90° about the X-axis but this was easily fixed in the TG object properties... and I'd had this happen with other models from the same source.

Thanks for the link.
Title: Re: OBJ Convertor
Post by: bobbystahr on February 28, 2007, 01:36:57 am
"apart from being rotated -90° about the X-axis " ...that could be due to where the model [which app] originally came from as the ones I've tried all came in rotated away from the camera[around the Y], heh heh heh, and you're most welcome. If you are creating your own .obj's that don't import, and can keep the shaders under 16, this is the answer
Title: Re: OBJ Convertor
Post by: bigben on February 28, 2007, 04:53:29 pm
They're all from different sources, and having played more object now, this tool is providing the most robust versions of these objects that I've used in TG yet. Now I'll just have to read some more docs to sort out some sizing issues (miniature trees and giant grass).

While it's easy enough to scale them in TG it is a bit of a pain.  My saved TGOs retained their corrected rotation but not their scale... although I will try again later to make sure.
Title: Re: OBJ Convertor
Post by: bobbystahr on February 28, 2007, 06:16:58 pm
In my limited experience nothing in TG2 retains it's scale,all load in at 1,1,1 and need resizing upon loading, even the XFROG freebies in a population. Just part of the load in I guess and in a way it's good as you can scale stuff to what ever scale your scene is in. Relatively minor and doesn't take much time compared to the render times...LOL
Title: Re: OBJ Convertor
Post by: joshbakr on February 28, 2007, 07:09:29 pm
Thanks for the lead on the software bobbystahr. I just tried it out and exported an .obj, it exported mtl file and all paths to the mats. I loaded it into TG started a render and of course , POOF! LOL  I restarted TG loaded the obj again, checked the mtl file and everything looked good so I thought I would export it as a TG tgo, which I did. Started another TG scene loaded the tgo that I just exported then went to look at the mtl file and no image maps? Help! What am I doing wrong?
Title: Re: OBJ Convertor
Post by: bobbystahr on February 28, 2007, 07:18:30 pm
I've found, using PoseRay for correcting the .obj still doesn't correct the map path in TG2. I always, upon loading the .tgo, go into it's multishader and re-path all the maps and then re- save the .tgo, delete it and re-load it. So far all I've done that way load fine.. ...
Title: Re: OBJ Convertor
Post by: joshbakr on February 28, 2007, 07:25:29 pm
Quote from: bobbystahr on February 28, 2007, 07:18:30 pm
I've found, using PoseRay for correcting the .obj still doesn't correct the map path in TG2. I always, upon loading the .tgo, go into it's multishader and re-path all the maps and then re- save the .tgo, delete it and re-load it. So far all I've done that way load fine.. ...


OK thanks,  I'll give that a try.
Title: Re: OBJ Convertor
Post by: bobbystahr on February 28, 2007, 07:28:59 pm
     I'd just like to say her a thankful "Tip Of The Hat"  to alexcoppo at the Vue Forum at Renderosity for bringing this app to light. I don't know a lot of POV Ray users and may never have tumbled onto it without his posting  about it there.. ...
Title: Re: OBJ Convertor
Post by: Mandrake on February 28, 2007, 08:55:44 pm
I don't know Bobby, Some objects are scalable and others imports are not.
For me anyway..
Title: Re: OBJ Convertor
Post by: MooseDog on February 28, 2007, 09:42:45 pm
Quote from: bobbystahr on February 28, 2007, 07:18:30 pm
I've found, using PoseRay for correcting the .obj still doesn't correct the map path in TG2. I always, upon loading the .tgo, go into it's multishader and re-path all the maps and then re- save the .tgo, delete it and re-load it. So far all I've done that way load fine.. ...


did you know that the .mtl file is editable with any text editor?  if i understand what you're saying, just do it in there beforehand.

example .mtl:

newmtl apple_leaf
Kd 0.784314 0.784314 0.784314
Ka 0
Ks 0
Ns 40
d 0
Ni 1
Tf 0
sharpness 0

map_Kd G:\Lightwave9Content\Images\tgo_test_tree\all_leaves_color.tif
map_d -imfchan l G:\Lightwave9Content\Images\tgo_test_tree\apple-leaf_clip.tga

newmtl apple_wood
Kd 0.784314 0.784314 0.784314
Ka 0
Ks 0
Ns 40
d 1
Ni 1
Tf 0
sharpness 0

map_Kd G:\Lightwave9Content\Images\tgo_test_tree\UV_apple_wood_color.tga


note that i then simply changed the map paths to C:\Program Files\TG2\Objects\....tga
Title: Re: OBJ Convertor
Post by: bobbystahr on February 28, 2007, 10:10:08 pm

did you know that the .mtl file is editable with any text editor?  if i understand what you're saying, just do it in there beforehand.




No I hadn't thought of that really. Unfamiliar with the .obj format as I am it's the last thing I'd think of. Not really a dab hand at that sorta thing but if it'll save time, guess I'll learn. Just open the .tgo in NotePad or whatever and bash away I guess is the path for me to work on now. Could one just copy and past paths from the .mtl to the .tgo.... that would speed things up as well as it's the .tgo where they don't load properly.. ...
Title: Re: OBJ Convertor
Post by: MooseDog on March 01, 2007, 10:58:53 am
Quote....Just open the .tgo in NotePad or whatever and bash away ...


i'm always happy to be proven wrong, but afaik and would presume (with it's attendant dangers ;D ) that the .tgo format is not editable.

proposed workflow (if it helps anyone :D) :

1.)  model and/or whatnot in app xyz as you wish, save both .obj and .mtl

2.)  move/copy both files to appropriate tg2 folder.

3.)  open .mtl and type in appropriate path info for those materials that need it.

4.) NOW open tg2 and do .obj import and .tgo convert thing (for render stability atm).  since tg2 is reading the .mtl file associated with the object, material assignments and paths to images should be all set, having done so before tg2 was opened!

5.) render amazing photo-real landscapes  ;D

Title: Re: OBJ Convertor
Post by: bobbystahr on March 01, 2007, 11:27:59 am
As a general rule I've found that as long as I don't attempt a render the .obj can be edited via the multishader as well and then saved as a .tgo, but I've found that even with this you still have to repath the maps once you load the .tgo so no matter if you pre edit the .mtl you're still going to have to re-path the .tgo...I could be wrong but won't know till I've actually done a virgin .mtl file....will post on this when I've done that but toooooo busy for fun today...off to reherse now...see y'all later
Title: Re: OBJ Convertor
Post by: SeerBlue on March 06, 2007, 08:25:09 pm
Poseray does agreat job of converting 3ds files to obj, which open and render without crashes, BUT, you have to make 2 changes in Poseray's groups tab, under the faces,vertices and normals tab, first click Drop y = 0, and then to the right of that under scale and rotation reference point click origin, then all that needs to be done is click the green check mark to update the file before exporting as an object.
If you don't do this all the objects, or at least the ones I have experimented with, will be about half submerged in the surface. SeerBlue
Title: Re: OBJ Convertor
Post by: bobbystahr on March 06, 2007, 09:13:30 pm
Quote from: SeerBlue on March 06, 2007, 08:25:09 pm
Poseray does agreat job of converting 3ds files to obj, which open and render without crashes, BUT, you have to make 2 changes in Poseray's groups tab, under the faces,vertices and normals tab, first click Drop y = 0, and then to the right of that under scale and rotation reference point click origin, then all that needs to be done is click the green check mark to update the file before exporting as an object.
If you don't do this all the objects, or at least the ones I have experimented with, will be about half submerged in the surface. SeerBlue

Thanks for those 2 tips....was wondering how to fix that.. ...
Title: Re: OBJ Convertor
Post by: bobbystahr on March 12, 2007, 07:46:02 pm
Well the upshot of this thread for me so far is this image. It uses plants that are free at:
http://3dp2.0catch.com/weeds1.html
I have converted the whole weeds section and would post the .tgo files but am unsure if that would be legal. If an Admin sees this please advise...thanx
Title: Re: OBJ Convertor
Post by: Oshyan on March 12, 2007, 07:54:12 pm
Nice work Bobby.

In regards to posting the converted objects, I would suggesting contacting the 3DPlant content author(s) to ask for permission. Drew, who I have spoken to in the past, is a very good fellow and I'm sure you can work something out with him, either to post the new format to his own site, or allow you to mirror them elsewhere in TGO format. You can find the contact info here: http://3dplants.0catch.com/contact.html

- Oshyan
Title: Re: OBJ Convertor
Post by: bobbystahr on March 12, 2007, 11:07:37 pm
Quote from: Oshyan on March 12, 2007, 07:54:12 pm
Nice work Bobby.

In regards to posting the converted objects, I would suggesting contacting the 3DPlant content author(s) to ask for permission. Drew, who I have spoken to in the past, is a very good fellow and I'm sure you can work something out with him, either to post the new format to his own site, or allow you to mirror them elsewhere in TGO format. You can find the contact info here: http://3dplants.0catch.com/contact.html

- Oshyan


Thanks man...just fired off  a rather verbose missive to him, LOL, dunno what's gotten into me lately....
I should hear from him soon. Gave him a link to this page to see the image and also my Renderosity Gallery where I've posted the same thing cuz I wasn't sure if he could see this without registering and didn't want to make him 'jump thru hoops'. Here's another version with Fake Stones as well.. ...
Title: Re: OBJ Convertor
Post by: Oshyan on March 12, 2007, 11:09:57 pm
He'll be able to read the posts here but won't see the images unless he registers.

- Oshyan
Title: Re: OBJ Convertor
Post by: latego on March 13, 2007, 02:41:26 pm
Quote from: bobbystahr on February 28, 2007, 07:28:59 pm
     I'd just like to say her a thankful "Tip Of The Hat"  to alexcoppo at the Vue Forum at Renderosity for bringing this app to light. I don't know a lot of POV Ray users and may never have tumbled onto it without his posting  about it there.. ...


All right, I will write a tutorial about OBJ files, the meaning of their content, how they behave in different apps and how to handle them. Armed with this information, you will be able to model using a text editor  ;)

(B.T.W. Renderosity alexcoppo corresponds to Planetside latego)

Bye!!!!!
Title: Re: OBJ Convertor
Post by: bobbystahr on March 13, 2007, 04:51:53 pm
All right, I will write a tutorial about OBJ files, the meaning of their content, how they behave in different apps and how to handle them. Armed with this information, you will be able to model using a text editor  ;)

(B.T.W. Renderosity alexcoppo corresponds to Planetside latego)

Bye!!!!!


jeepers, don't know if I want to go that far into verbosity, LOL, but will absorb it anyhow. Nice to meet you here latego and thanx in person sort of...this app has been a true blessing for a person with no app to create .obj files, bobbystahr stays the same everywhere...it's the only way I can keep it straight, heh heh heh, I'm a 58 yr old freezer, that's a freek-geezer.. ...
Title: Re: OBJ Convertor
Post by: Mandrake on March 13, 2007, 05:24:43 pm
Has anyone else noticed that after running Drews 3ds models through blender and creating a tgo that your tests leave the plants a few inches deeper in the default terrain then you'd like them?
Maybe you've covered this, and I missed it. If you make an altitude adjustment before saving as tgo will that be be reflected in the tgo?
Title: Re: OBJ Convertor
Post by: bobbystahr on March 13, 2007, 05:35:31 pm
Quote from: Mandrake on March 13, 2007, 05:24:43 pm
Has anyone else noticed that after running Drews 3ds models through blender and creating a tgo that your tests leave the plants a few inches deeper in the default terrain then you'd like them?
Maybe you've covered this, and I missed it. If you make an altitude adjustment before saving as tgo will that be be reflected in the tgo?



Try this from SeerBlue's post a few down, PoseRay is free by the way:
quote:
Poseray does agreat job of converting 3ds files to obj, which open and render without crashes, BUT, you have to make 2 changes in Poseray's groups tab, under the faces,vertices and normals tab, first click Drop y = 0, and then to the right of that under scale and rotation reference point click origin, then all that needs to be done is click the green check mark to update the file before exporting as an object.
If you don't do this all the objects, or at least the ones I have experimented with, will be about half submerged in the surface. SeerBlue
Title: Re: OBJ Convertor
Post by: Mandrake on March 13, 2007, 05:40:27 pm
Bobby, with blender no adjustments are necessary, import export done. I rather stay away from yet another modeling program if at all possible. Were the two adjustment due to altitude?
Title: Re: OBJ Convertor
Post by: bobbystahr on March 13, 2007, 06:05:56 pm
I think they [those 2 operations] conspire to put the axis at the bottom of the object. Adjusting the .tgo's altitude before saving does nada as it always seems to save at 0,0,0. This is likely due to TG2's method of populating as it needs the populating objects in the same place at the start. Just what I figure anyhow, don't know for sure. PoseRay is a small app and very useful with zero to learn, I use it only as a convertor,with the previous instructions all I know about it, LOL, I hope that's not dis-respectful to the creators but that's all I need it for.. ...
Title: Re: OBJ Convertor
Post by: bigben on March 14, 2007, 06:29:41 pm
I tend to agree on this one. I've had models exported from both Blender and/or Wings that have crashed TG, but exporting the same models from PoseRay gave no problems at all... and correctly setting the object base is a big help.
Title: Re: OBJ Convertor
Post by: Mandrake on March 14, 2007, 10:41:05 pm
Well I caved in and tried poseray and it was an easy process! Thanks :)
Title: Re: OBJ Convertor
Post by: DeathTwister on March 16, 2007, 12:43:13 pm
Hay all,

OK, I have not only got all your ideas to get things worked out in this post and the other one I posted on, but I also found another way to get them in if anyone is using XSI 6 softimage?

What I did was export out from 3ds Max using the exporter dotXSI file to SoftImage. I had been working on a Dragon as I am moving most my Dev from 3ds max to XSI and  I saw that it had a .obj exporter itself so curiosity got the better of me and I exported out the mesh and then low and behold it dropped into Terragen 2 so slick it was scary.
I just needed to do the fix that Seerblue shared and Monks then resave the scene file and repoint the texture file.  Which I am not sure is needed after you resave the scene but I did it anyway just to make sure. /smiles.
So what I ended up with was this scene I did and now I am starting to have some real fun with this software. /winks...I added more ram to get up to 2 gigs anyway and just downloaded the update version of TG2, I hope to have a killer weekend with TG2 and some Guild Wars I think this weekend. /chuckles.

The Dragon Necropolis deep in the Eskarp Mountains
(http://www.theatomizer.com/postedImages/DragonNecropolis.jpg)

anyway I thank all of you guys for the help and now I am jamma jammaing so I good. /smiles.......
DeathTwister
Title: Re: OBJ Convertor
Post by: Mandrake on March 16, 2007, 12:47:28 pm
Nice DT, looking forward to viewing your renders!!  :o
Title: Re: OBJ Convertor
Post by: Dark Fire on March 16, 2007, 01:49:37 pm
Wow. That's an interesting picture...
Title: Re: OBJ Convertor
Post by: reck on March 16, 2007, 03:57:25 pm
Maybe bobbystahr can answer this or anyone else who has had success with these weed objects.

First problem.

When I render the objects it appears with half the object under the ground.

[attachthumb=1]

I've tried the posRay trick by clicking the two buttons but it makes no difference. The boundary box in TG2 seems to bear no resemblance to the object rendered position in regard to it's height. The box in the preview window looks like it's in the right position but when I render it's half buried. Move the box up in the preview window and it looks like the weed is floating, but render and it's positioned fine on the ground. How can I fix this?

Second problem.

In the example images that they provide for all the weeds, it shows at least two different colour used, with say a green covering most of the weed and then changing to a yellow at the top. I only have the option to use one colour, how can I use more then 1 colour like in the example pics?

[attachthumb=2]

[attachthumb=3]
Title: Re: OBJ Convertor
Post by: Mandrake on March 16, 2007, 04:06:30 pm
Quote from: reck on March 16, 2007, 03:57:25 pm
Maybe bobbystahr can answer this or anyone else who has had success with these weed objects.

First problem.

When I render the objects it appears with half the object under the ground.


I've tried the posRay trick by clicking the two buttons but it makes no difference. The boundary



That should be 3 buttons.
Title: Re: OBJ Convertor
Post by: reck on March 16, 2007, 04:17:25 pm
Quote from: Mandrake on March 16, 2007, 04:06:30 pm

That should be 3 buttons.


ohhh the green tick! that's done the trick, now it appears above ground, thanks Mandrake. Although looking at it now I think it looks better if it's just slightly lowered into the ground. Can I specifiy this in PoseRay somewhere? Also any idea on my second question regarding the multicolours?
Title: Re: OBJ Convertor
Post by: bobbystahr on March 19, 2007, 02:29:50 am
Quote from: reck on March 16, 2007, 04:17:25 pm
Quote from: Mandrake on March 16, 2007, 04:06:30 pm

That should be 3 buttons.


Can I specifiy this in PoseRay somewhere? Also any idea on my second question regarding the multicolours?


Well, when you make the first tick a number appears....maybe try adjusting that number. RE: colours, unless you have an app like blender or Wings3D that you're familiar with, well any app that exports .obj really, there doesn't seem to be any way to access un named groups of faces in TG2. I've been mainly sticking to the grasses as they suit green. You could, and I do, use a map of mottled greens to give grass clumps variation, and there is one of those aforementioned weeds that has parts listed in it's Multishader(it's a clover or alphalfa I think) which textures up nicely. I have converted all of them and Drew has given permission to post them so as soon as I get the assembly time I'm going to do just that at one of the TG2 resources, don't know where yet but I'll post here about that.
Title: Re: OBJ Convertor
Post by: Mandrake on March 19, 2007, 11:32:34 am
Good work Bobby, now if I can just find a tree to work with that
Ivy generator and that pcrock fagetaboutit, It won't import as ascii or that other one 3df or 3rf forget now but it's not working for me either.
Title: Re: OBJ Convertor
Post by: bobbystahr on March 22, 2007, 02:22:06 am
More free flowers available at this link. They're all .3ds but convert perfectly to .obj in PoseRay and thence to .tgo in TG2. Doing a render that looks to be an over-niter with some of them as I type.. ...
http://toucan.web.infoseek.co.jp/3DCG/3ds/FlowerModelsE.html
Title: Re: OBJ Convertor
Post by: Mandrake on March 22, 2007, 08:04:09 am
Quote from: bobbystahr on March 22, 2007, 02:22:06 am
More free flowers available at this link. They're all .3ds but convert perfectly to .obj in PoseRay and thence to .tgo in TG2. Doing a render that looks to be an over-niter with some of them as I type.. ...
http://toucan.web.infoseek.co.jp/3DCG/3ds/FlowerModelsE.html



Bobby that looks like the same page that was quoted before, by Drew I think was the author.
Are you still working on the full tgo set Bobby, buddy ol'e pal a mine? ;)
Title: Re: OBJ Convertor
Post by: bobbystahr on March 22, 2007, 10:06:35 am


Bobby that looks like the same page that was quoted before, by Drew I think was the author.
Are you still working on the full tgo set Bobby, buddy ol'e pal a mine? ;)
[/quote]

Not really Mandrake, that site is, http://3dplants.0catch.com/download.html  and this one is  http://toucan.web.infoseek.co.jp/3DCG/3ds/FlowerModelsE.html    quite a different URL with totally different content, heh heh heh. I'm still working on it but have been plagued by horrendous tooth problems and as such have limited focus but am working on it. I have at least finished writing the Readme  to go in them. Thinking of doing it in 2 massed zips with all the grasses in one and the weeds in another. Still havingig a bit of a hard time reconsiling the axis placement on a couple of flowers from there tho. This author on the new page, just as a head's up, is a Japanese person whose name I haven't looked into yet.. ...
Title: Re: OBJ Convertor
Post by: Matt on March 22, 2007, 10:55:38 am
Quote from: bigben on February 27, 2007, 11:35:18 pm
It's certainly easy to use for just conversion. I've only tried one model which worked nicely apart from being rotated -90° about the X-axis but this was easily fixed in the TG object properties... and I'd had this happen with other models from the same source.


There is an option to handle this situation in the "OBJ options" tab of the OBJ Reader. Check (or uncheck) "Source Z up".

Matt
Title: Re: OBJ Convertor
Post by: bobbystahr on March 22, 2007, 02:46:48 pm
Hey Matt,
     I managed to convert all those weeds I've been posting about but one. I'm attaching the original .zip to this post in the hopes that you might be able to figure it out. I'm on pain meds for tooth problems at present and don't seem to be able to think my way out of an open box and it's makin' me nuts, LOL...thanks in advance, ooops, cancel that request, somehow I made it work but in the haze I'm in I know not how...LOL, sorry for the kerfuffle man.. ...
Title: Re: OBJ Convertor
Post by: bigben on March 22, 2007, 05:49:42 pm
The source Z-up is certainly an easier option. I tried flipping the axes in PoseRay but they always come out on their side.

As for multiple colours for grass: 1. You can just add  a surface and child layer to the object. Playing around with the scaling of the fractal breakup will give you differet variations in colour.... or 2: Create you own grass objects in Bantam 3D. You can set multiple colours for the grass blades which get transferred to TG (via PoseRay)

Apart from this, the main advantages I find to using Bantam 3D are:


Making use of these, you can create grass tiles with broadleaf weeds (for example) without requiring multiple populations in TG

Title: Re: OBJ Convertor
Post by: bobbystahr on March 22, 2007, 06:10:12 pm
Ahhh..Bantam Grass, I knew there was a grass maker around, also makes rocks IIRC...thanks for the memory tweak bigben...dl'd that program years ago now but had little need for the smallish patches my old[at that time] computer would handle. Well I now have an app and a computer that can handle it so I guess it's to dig it out.. ...
Title: Re: OBJ Convertor
Post by: bigben on March 22, 2007, 10:30:18 pm
Yes, the memory stilll works even through the haze ;)  Bantam does do rocks. I haven't tried them but they look a liitle crude. They may be OK from a distance, or you could use them for mushrooms or distant trees :)