Planetside Software Forums

General => Terragen Discussion => Topic started by: midnight.mangler on March 19, 2019, 03:21:11 PM

Title: Obj issues
Post by: midnight.mangler on March 19, 2019, 03:21:11 PM
Hello All

After having a Terragen license for many years and not diving in, I brought my maintenance current and have been tinkering. So far, really loving the realism and "the look" possible in Terragen with my limited skills and excited at the possibilities :)

I am having a bit of trouble importing an obj. It's a mesh I built (not the greatest I admit). It displays perfectly in Modo (which I use as my exporter) and imports perfectly into blender.

In Terragen though at boundaries of the mesh it shows some polys as either missing or transparent. Any tips on why this could be happening? I see some suggest poseray as an option to export obj's that Terragen likes - I have not been able to test that yet but wanted to see if there is anything else I should be aware of. Thanks for any tips.
Title: Re: Obj issues
Post by: archonforest on March 19, 2019, 03:35:55 PM
Perhaps u can upload the obj file so it can be tested.
Title: Re: Obj issues
Post by: digitalguru on March 19, 2019, 08:42:31 PM
it sounds like some of your faces have flipped normals, I don't use Blender but it might display the faces correctly regardless if the faces are flipped or not.

Maya has a command called "conform" where the flipped normals are reversed to the same direction as the majority of faces so they all point the right way.

Actually just looked it up and Blender has a function called Recalculate - https://blender.stackexchange.com/questions/12165/how-to-make-all-faces-flip-to-the-right-consistent-direction

Run that and re-export to Terragen.
Title: Re: Obj issues
Post by: midnight.mangler on March 20, 2019, 04:16:28 PM
Thanks - I think the flipped normals is the problem. When I use the analogue of modo's "conform" command the mesh then shows the characteristic holes of flipped polys - which is strange.

So something is screwy with the mesh. I'll keep tinkering.
Title: Re: Obj issues
Post by: Oshyan on March 25, 2019, 03:23:09 PM
Also avoid use of Quads.

Edit: nevermind, I was incorrect.

- Oshyan
Title: Re: Obj issues
Post by: midnight.mangler on March 26, 2019, 08:09:34 AM
Thank you Oshyan! You rock! That fixed the issue immediately.

Soooo happy!!
Title: Re: Obj issues
Post by: digitalguru on March 26, 2019, 08:51:20 AM
QuoteAlso avoid use of Quads.

Really? Why is that?
Title: Re: Obj issues
Post by: masonspappy on March 26, 2019, 01:23:42 PM
Quote from: digitalguru on March 26, 2019, 08:51:20 AM
QuoteAlso avoid use of Quads.

Really? Why is that?

Wondering the same thing.
Title: Re: Obj issues
Post by: Oshyan on March 26, 2019, 01:50:50 PM
Sorry, I was mistaken, quads shouldn't be an issue. But apparently it fixed things anyway? :D

- Oshyan
Title: Re: Obj issues
Post by: digitalguru on March 26, 2019, 02:01:40 PM
Never had a problem with quads in any of my imported objs - though I always check for face conformity etc before I export them

Just seen your post Oshyan - maybe the triangulation command re-oriented the normals automatically
Title: Re: Obj issues
Post by: Asterlil on March 26, 2019, 06:39:00 PM
By coincidence, I have just tried to import an obj file from Blender to Terragen, and have run into this same problem.

Two attachments: first the Blender file, a screen grab that shows that all the normals are as they should be. There are no texture images and the model is consolidated into a single mesh. Second is what it looks like after being dropped onto the terrain (the purple thing is my marker object cube).

Eh. The first attachment didn't stick. I'll post a second reply.





Title: Re: Obj issues
Post by: Asterlil on March 26, 2019, 06:40:46 PM
The original Blend file.
Title: Re: Obj issues
Post by: bobbystahr on March 26, 2019, 06:52:56 PM
Have you tried running it(th .obj file) through PoseRay to correct the parts shaders configuration?
Title: Re: Obj issues
Post by: midnight.mangler on March 27, 2019, 05:54:12 AM
Quote from: Oshyan on March 26, 2019, 01:50:50 PM
Sorry, I was mistaken, quads shouldn't be an issue. But apparently it fixed things anyway? :D

- Oshyan

Yes it did. It's a complex mesh. On Modo it was displaying fine - until I used the modo command to align all the normals. Then I started to see holes ;-) which is curious. It could be as somebody speculated that triangulating it somehow introduced a consistency check that aligned the normals correctly. I am not sure other than - it worked ;-) I was completely stumped as to how to fix it.
Title: Re: Obj issues
Post by: Hannes on March 27, 2019, 09:46:28 AM
Asterlil, what Bobby said. I run almost each and every object, I want to use in TG, through Poseray, go to "Groups" and recalculate normals. Most of the time this fixes such normals problems.
Title: Re: Obj issues
Post by: bobbystahr on March 27, 2019, 11:58:14 AM
Quote from: Hannes on March 27, 2019, 09:46:28 AM
Asterlil, what Bobby said. I run almost each and every object, I want to use in TG, through Poseray, go to "Groups" and recalculate normals. Most of the time this fixes such normals problems.

exactly
Title: Re: Obj issues
Post by: Asterlil on March 27, 2019, 06:20:00 PM
Yeah! That's what fixed the problem. Thanks to all you entities for helping solve this problem. Now on to the next!  :D

(http://www.lilatladera.com/Terragen/obj_fixed.jpg)
Title: Re: Obj issues
Post by: bobbystahr on March 27, 2019, 11:37:01 PM
Quote from: Asterlil on March 27, 2019, 06:20:00 PM
Yeah! That's what fixed the problem. Thanks to all you entities for helping solve this problem. Now on to the next!  :D

(http://www.lilatladera.com/Terragen/obj_fixed.jpg)

Exactly what this forum does best...solve thru teaching...happy it's worked out. It's a very nice building...was it a freebie?
Title: Re: Obj issues
Post by: Asterlil on March 28, 2019, 02:34:17 PM
I created it in Blender. It's a dojo, or the shell of one for .obj purposes. A dream dojo.  :) But I'd be willing to share it after I reinstate the interior finish -- I stripped it down rather ruthlessly while I was headbutting this normals problem.

Interior views, one of the school room and one of the lobby with an xfrog azalea bonsai and my Poser guy, Manny:

(http://www.lilatladera.com/Terragen/schooltoriiFinal.png)

(http://www.lilatladera.com/Terragen/atriumFinal.png)

The portraits on the wall are Hironori Ohtsuka, the founder of Wado-Ryu Karate-Do and his student Tatsuo Suzuki 10th Dan Hanshi, who propagated the art to the West. I had the privilege of being taught by him on a number of occasions.
Title: Re: Obj issues
Post by: bobbystahr on March 28, 2019, 02:59:48 PM
Even better! It's a beautiful model and woo hoo if you do share it. I'm having a hard time with oriental stuff I find as it's often badly converted max stuff.
Title: Re: Obj issues
Post by: archonforest on March 28, 2019, 03:13:45 PM
Love the dojo.  8)