Planetside Software Forums

General => Terragen Discussion => Topic started by: KlausK on May 10, 2017, 02:53:50 PM

Title: Microexporter using 360 camera - tons of doubled up polygons
Post by: KlausK on May 10, 2017, 02:53:50 PM
hi everyone,

in the attached picture the problem is described.
Did anyone notice this behaviour as well?
I opened the exported *.obj from TG in AD Softimage 2015.
Anything like this in other applications? Any ideas?
Thx for taking a look.
cheers, Klaus
Title: Re: Microexporter using 360 camera - tons of doubled up polygons
Post by: dorianvan on May 10, 2017, 04:35:03 PM
Maybe something in your import settings, or the micro exporter has a bug.
Title: Re: Microexporter using 360 camera - tons of doubled up polygons
Post by: KlausK on May 10, 2017, 09:18:10 PM
I don`t think it has to do with any settings.
I did import the same object to LightWave 2015, 3DSMAX 2016, Houdini 2016 and Softimage 2015.
More or less the same phenomenon of doubled, tripled, even quadrupled or more layers of polygons
occupying the same space. It makes working in a 3D app with those objects quite tedious because
of the cleanup one has to do.
It would be very cool if someone could try to check this with his workflow.
I have no idea what I could be doing wrong or what I might be missing.
The Microexporter workflow from TG itself is straight forward and idiot proof, I think.
Well, investigating further.
cheers, Klaus
Title: Re: Microexporter using 360 camera - tons of doubled up polygons
Post by: KlausK on May 10, 2017, 09:43:40 PM
hey, if anybody wants to give it a try or take a look at the project file.
Simply render with the Camera 360 and Renderer 360.
I have set all outputs to C:\.
cheers, Klaus
Title: Re: Microexporter using 360 camera - tons of doubled up polygons
Post by: Dune on May 11, 2017, 06:13:45 AM
Doesn't the micro exporter need an ortho view (from above) to render that area? Never used it really, so it's a guess.

Something else; I don't understand your merge controller. What purpose do those blues have? I don't see that they would do anything, unless early morning fogs up my brain.
Title: Re: Microexporter using 360 camera - tons of doubled up polygons
Post by: KlausK on May 11, 2017, 07:22:30 AM
hi Ulco
http://www.planetside.co.uk/forums/index.php/topic,22178.0.html
That is the topic which describes the method of exporting a 360 roundshot of the terrain via microexporter.
It works very well for having not only the terrain in view exported. Makes working in a TG in another app more flexible for me.
And the resolution degradation is not a problem because I use the exported landscape only to place objects modeled in another
3D app and bring those back to TG later. It is much easier and faster than doing this is TG.
I have to look up the wiki but I believe to remember that the Microexporter usually exports the field of view from a selected camera in the scene.

The merge is simply my way to add up different masks and the blue nodes help to control the influence of each input.
If you open up the Merge shader 01 Preview and play with the values of the Constant scalar you`ll see what I mean.
The Mix of the Simple Shape Shaders and the Power Fractal by means of the blue nodes is controlled / influenced this way.

Since you are scratching your head about this method I guess that is not the "standard" way of working this, hehe.
I simply don`t know better.
cheers, Klaus
Title: Re: Microexporter using 360 camera - tons of doubled up polygons
Post by: Dune on May 11, 2017, 09:10:15 AM
Apparently Ashleys' methode doesn't work properly, and best obj can be had from a topview. I can imagine something like that.

I'll check out your file again. Out-of-the-box thinking is great and informative. A lot of things I do are not really straightforward either.
Title: Re: Microexporter using 360 camera - tons of doubled up polygons
Post by: Hannes on May 11, 2017, 09:17:30 AM
I haven't tried your file, but I really don't know why you should use a spherical camera. When I want to export a region of the terrain my scene takes place in, I usually create an additional top view (orthographic) camera as Ulco mentioned, more or less above my scene camera, and depending on the FOV, TG exports the desired area without any holes in the terrain. Be aware that the render resolution you use shouldn't be too high. Otherwise you'll have a very large (in terms of MB or even GB) object.
Title: Re: Microexporter using 360 camera - tons of doubled up polygons
Post by: Dune on May 11, 2017, 09:28:35 AM
I also think that a camera on ground would not 'see' some parts of terrain, whereas a topview would, if no lateral have been used that is.

Ah, you use the constant as a replacement for the slider, okay.
Title: Re: Microexporter using 360 camera - tons of doubled up polygons
Post by: KlausK on May 11, 2017, 11:31:42 AM
Seems like we have a slight misunderstanding here. My question is not about the export method itself.
I made a little video to show what I am asking about.
The object is imported, then I use raycast select on the polygons and you can see how many layers of polys are there.
The object you see has about 90k polygons when imported, after cleaning up less than 50k are left. That`s a huge difference.

The 360 method itself works ok.
I just do not understand why the Microexporter produces the stacked polygons.
There are no holes or missing parts in the microexported mesh.

Hannes, to use a spherical camera has the advantage of exporting the whole terrain surrounding my viewpoint.
This allows me to work in any direction of the terrain I have in TG. I am not bound to the field of view of the camera.
Just personal preference.

Now, take the uploaded file for example:
The renderer is set to put out a rather low poly terrain object. Picture size is set to 200x100 pixels, everything else to default.
It is a 35MB *.obj file which renders and exports in 10 seconds. And every 3D program can handle that easily on import.
 
Again, I only need the exported terrain as a proxy object in LightWave, 3DSMax or whatever 3D program.
I can work on my objects while having the (proxy-) terrain object from TG in the background as a positioning or scaling guide.
No need to do the modeling of an object, export it to TG, try to position it correctly, go back to the 3D program, change something and export again...and again.
Final rendering is done in TG anyways with the originally created terrain and the modeled objects from LightWave.

Sorry for my lengthy post. Hope I could make myself clearer now.
I wrote a email to planetside support to take a look at this.

Thanks for trying to help.
cheers, Klaus

ps1: video size is still too big...5MB is not a lot, sigh. Have to re-encode.
ps2: the video is encoded with 12 fps, so you might want to speed it up in your player.
Title: Re: Microexporter using 360 camera - tons of doubled up polygons
Post by: Matt on May 11, 2017, 04:52:49 PM
Overlapping polygons occur at the borders between buckets in the render. You can prevent this by limiting the renderer to only 1 thread. Hopefully that should fix most of them. However, you will still see some duplicates or overlapping polygons along one seam where the left side of the image meets the right.

Exporting micropolygons from a spherical camera is legitimate. The micro exporter was designed to export view-dependent meshes to optimally balance the resolution for whatever the camera sees, including spherical views. So keep using it if it works for you. Sometimes overhead orthographic views are more useful, but it depends on your needs, e.g. whether you want uniform resolution in world space.

Matt
Title: Re: Microexporter using 360 camera - tons of doubled up polygons
Post by: KlausK on May 11, 2017, 05:08:59 PM
Thank you for looking into this so soon, Matt.

I`ll try setting the renderer to one thread.
cheers, Klaus

ps: I can happily report that setting the renderer to 1 thread really did the trick.
The exported object now actually has only very few double polygons at the seem. This is great!
Poly count dropped from nearly 90k to less than 40k in the attached scene. Very lightweight to work with.
Thx again for looking into this.
cheers, Klaus
Title: Re: Microexporter using 360 camera - tons of doubled up polygons
Post by: dorianvan on May 12, 2017, 03:41:26 PM
I had the same problem yesterday Klaus. I kept exporting geometry and when I brought it into 3dMax and turned vray on, I kept getting grids. Vray is very sensitive to object issues, much more than other renderers I think. Turns out (after hours of pulling my hair) there were polygons on polygons, as many as four layers. When I went down to 1 thread, it helped a lot, but I still had a few larger very obvious grids. So when Matt mentioned buckets, I fixed this by increasing my bucket size until it went away. Sure glad you had this thread right when I needed it.
Title: Re: Microexporter using 360 camera - tons of doubled up polygons
Post by: bobbystahr on May 13, 2017, 01:13:57 AM
I had the same problem yesterday Klaus. I kept exporting geometry and when I brought it into 3dMax and turned vray on, I kept getting grids. Vray is very sensitive to object issues, much more than other renderers I think. Turns out (after hours of pulling my hair) there were polygons on polygons, as many as four layers. When I went down to 1 thread, it helped a lot, but I still had a few larger very obvious grids. So when Matt mentioned buckets, I fixed this by increasing my bucket size until it went away. Sure glad you had this thread right when I needed it.

well solved...this has been a very informative thread...Bobby Like...
Title: Re: Microexporter using 360 camera - tons of doubled up polygons
Post by: dorianvan on May 13, 2017, 06:12:06 PM
I think you don't have to go down to 1 thread if you just increase the bucket size big enough (and uncheck "Allow auto reduction"). But I'm not sure the downsides to having a huge bucket size. Anyone know?
Title: Re: Microexporter using 360 camera - tons of doubled up polygons
Post by: digitalguru on November 14, 2017, 11:01:51 AM
A bit of late entry to this thread, but very interesting and coincides with some of my experiments exporting terrains via the micro exporter.

Experimented with single thread render to output an .obj via the micro exporter which does reduce duplicated components to some extent, but not entirely. Can see how the more buckets can produce duplicated faces along the "seams" of each bucket and rendering with a bucket size that encompasses the entire dimensions of you render (i.e a bucket size of 1024 for a 1024 square render) might eliminate that. To answer Dorianvan, in my experience larger buckets mean more memory (in other render apps) - usually reducing the bucket size is something to try when running out of memory for a render - never had to tweak it in Terragen, but larger bucket for a render node solely optimised for micro export shouldn't be a problem.

However I feel all this is moot, as the output mesh will always have duplicate vertices and single thread renders and larger bucket sizes won't fix that. So the mesh will always need some cleanup to behave properly in other 3d apps.  Find an .obj editor that has a remove duplicate vertices and faces function and run that on your mesh and you should be good to go and of course you can then run multi threaded to speed up your output.

I'm currently working on something that should enable to output of very hi-rez terrains (at least for Maya users) via .obj and vector displacement - not ready for release just yet though.  But if a brave soul (and a  Terragen/Maya user) might want to try it out, they can PM me.
Title: Re: Microexporter using 360 camera - tons of doubled up polygons
Post by: bobbystahr on November 14, 2017, 04:01:17 PM
A bit of late entry to this thread, but very interesting and coincides with some of my experiments exporting terrains via the micro exporter.


  Find an .obj editor that has a remove duplicate vertices and faces function and run that on your mesh and you should be good to go and of course you can then run multi threaded to speed up your output.



I've never had to do this but I've seen switches for this in PoseRay and unless you're on a mac this should help.
Title: Re: Microexporter using 360 camera - tons of doubled up polygons
Post by: digitalguru on November 14, 2017, 04:41:30 PM
Haven't tried it, but see it mentioned a lot on the forum - will have a look

Edit: Meshlab is a good free editor for obj and BigBen mentioned CloudCompare also.
Title: Re: Microexporter using 360 camera - tons of doubled up polygons
Post by: bobbystahr on November 14, 2017, 05:18:07 PM
Haven't tried it, but see it mentioned a lot on the forum - will have a look

Edit: Meshlab is a good free editor for obj and BigBen mentioned CloudCompare also.

Cool, be interesting to see if it works. I never have a need to export as I found my true home in Terragen but I get why modelers in stuff like max would need it.