Planetside Software Forums

General => Terragen Discussion => Topic started by: otakar on May 02, 2016, 01:46:59 pm

Title: population on object problem
Post by: otakar on May 02, 2016, 01:46:59 pm
I am trying to populate a TGO on an OBJ for the first time. Object is about 2 long. Population of mosses spaced 5cm. Total of 788 instances generated. Here is the result. Clearly, something is not working. I tried checking and unchecking lean to terrain/object normal, no difference. On the bottom is one instance of the object (loaded seperately as a single object) for reference. Any ideas?

Title: Re: population on object problem
Post by: yossam on May 02, 2016, 03:48:01 pm
Is the population at the same coordinates as your object? The population area only needs to be big enough to cover your anchor object, you may need to reduce your spacing of the population. All else fails post the tgd.  :)
Title: Re: population on object problem
Post by: otakar on May 02, 2016, 04:54:51 pm
Yep. Population size is 10x10, same origin. There is something going on, looks like those hundreds of instances are all bunched together on the handful of spots as you can see from the render. But why?
Title: Re: population on object problem
Post by: yossam on May 02, 2016, 05:03:01 pm
Looks like a job for the other Terragen............. :P
Title: Re: population on object problem
Post by: Kadri on May 02, 2016, 06:00:13 pm

Interesting.
Hard to know for sure but if you have a density shader attached to the population i would first disable it and see what it does.
Might be many object sitting in a certain way and many of them very close to each other.
Title: Re: population on object problem
Post by: TheBadger on May 02, 2016, 06:08:54 pm
Quote from: yossam on May 02, 2016, 05:03:01 pm
Looks like a job for the other Terragen............. :P


lol
Feed it to the carp!
Title: Re: population on object problem
Post by: otakar on May 02, 2016, 07:06:57 pm
It must be my object (created in Sculptris), exported through Poseray. I replaced it with a TGO and the populator works on that one just fine. Still not sure why though.

Title: Re: population on object problem
Post by: yossam on May 02, 2016, 07:17:07 pm
Herpes............... ???
Title: Re: population on object problem
Post by: AP on May 02, 2016, 11:56:45 pm
Quote from: yossam on May 02, 2016, 07:17:07 pm
Herpes............... ???


Maybe...

Anyways, good to see the issue resolved.
Title: Re: population on object problem
Post by: Dune on May 03, 2016, 02:24:04 am
So this a different object? I am inclined to think that the Blender tgo wasn't at 0/0/0 as an object. Then you get weird stuff.
Title: Re: population on object problem
Post by: otakar on May 03, 2016, 10:52:47 am
That's not it, Dune. I went back and checked. Must be something with the geometry of the Sculptris exported object.

If someone wants to take a look, I am attaching the model. Not that it's anything of high quality, but it would be nice to have a working Sculptris->TG workflow for this scenario. Thanks again! 
Title: Re: population on object problem
Post by: Kadri on May 03, 2016, 11:52:56 am

The model doesn't have any problem that i could see at least.
But there is something kinda strange thing when you rotate the object itself.
When you populate an object as it is imported to Terragen without any rotation there is no problem.
But when you begin to rotate it the population gets kind of stepped.
0,90 kinda angles are OK i think. But anything between looks not like you would expect mostly.
Even when you use other seeds for the population the objects gets populated nearly all the time at the same places.

I used a basic model to test and that had the same problem.


Title: Re: population on object problem
Post by: Kadri on May 03, 2016, 12:06:21 pm

You can see a test of a basic cube that is rotated 45 degree below.
No matter what you use as object spacing or space variation they are always populated where you see the lines basically in this test.

[attachimg=1]
Title: Re: population on object problem
Post by: Dune on May 03, 2016, 12:22:44 pm
When you open the dead branch in Poseray it says; no vertices... that may be the problem then.
Title: Re: population on object problem
Post by: Dune on May 03, 2016, 12:27:15 pm
Mmmm, when you import in TG it works perfectly.
Title: Re: population on object problem
Post by: otakar on May 03, 2016, 12:46:06 pm
Kadri, you cracked the case it seems! It's the rotation, particularly the Z-axis. I got it rendering now with a smaller degree of rotation, seems to be working just fine.

Original object rotation: xyz: -240, 20, -23
New object rotation: xyz: 0, 40, -2

Is this a bug?
Title: Re: population on object problem
Post by: Kadri on May 03, 2016, 02:23:44 pm

I tried to populate an object a couple weeks ago and had problems.
It was the same problem probably. Good to know at least.
Title: Re: population on object problem
Post by: bobbystahr on May 03, 2016, 07:21:49 pm
Thanks....So that's it, solves a problem I had as well but didn't post as I figgered I just did something dumb...then typically got distracted by something else and forgot about....
Title: Re: population on object problem
Post by: Dune on May 04, 2016, 01:59:42 am
Seems I misunderstood the problem, glad it's solved.
Title: Re: population on object problem
Post by: Kadri on May 04, 2016, 07:37:21 am

I hope Matt and Oshyan have seen this. It looks like a thread that belongs to the support-bug report section.
They aren't much around here lately. Probably are busy with TG4 and-or the VR challange.
Title: Re: population on object problem
Post by: Oshyan on May 05, 2016, 04:20:10 pm
We're both still here. I would still suspect the coordinate origin in the object is the issue. But I haven't taken a look at the object itself. Who was it who verified that the coordinate origin was OK?

- Oshyan
Title: Re: population on object problem
Post by: Kadri on May 05, 2016, 10:58:22 pm

Oshyan even the basic Terrragen objects become problematic for populations when you rotate them.
I just tested the normal and displaceable default Terragen cube object.
With 45 degree rotation for example you will see only rows of populated objects.
I used the default rock object for population just too see that all objects where from Terragen even.
Title: Re: population on object problem
Post by: Dune on May 06, 2016, 02:47:41 am
I don't understand your experiment, Kadri. It works fine, AFAIK, both on the rotated cube or a rotated log.
Title: Re: population on object problem
Post by: Kadri on May 06, 2016, 02:54:04 am

As i said if you use something like 45 it doesn't work. With 90 it should work.
Title: Re: population on object problem
Post by: Dune on May 06, 2016, 03:02:56 am
?
Title: Re: population on object problem
Post by: Kadri on May 06, 2016, 03:09:25 am

OK i will try and post an example. Curious what is happening.
It would be nice to see your file too Ulco.

Untill i can post it can you lower the spacing and scale of the populated object and render again Ulco ?
Maybe the scale and spacing is the reason it doesn't show up in your example.
Title: Re: population on object problem
Post by: Kadri on May 06, 2016, 04:00:00 am

Try this file Ulco:

[attachimg=1]
Title: Re: population on object problem
Post by: ajcgi on May 06, 2016, 05:28:22 am
You might want to check that you've only one set of normals defined.

As an example, Maya has a lovely trick where it creates a User Normals Cluster with its own UV space separate to that read by most other applications. If I model something in Maya then take it to Softimage, the UVs are screwed until I delete that User Normal Cluster.

This is one of a few reasons why I've kept my 10 years old license of Deep Exploration. Being able to import a model then export it with UVs to a ridiculously old format anything can read is a very handy thing indeed.
Title: Re: population on object problem
Post by: Kadri on May 06, 2016, 06:16:43 am
Quote from: ajcgi on May 06, 2016, 05:28:22 am
You might want to check that you've only one set of normals defined.
As an example, Maya has a lovely trick where it creates a User Normals Cluster with its own UV space separate to that read by most other applications. If I model something in Maya then take it to Softimage, the UVs are screwed until I delete that User Normal Cluster.
This is one of a few reasons why I've kept my 10 years old license of Deep Exploration. Being able to import a model then export it with UVs to a ridiculously old format anything can read is a very handy thing indeed.


Have you tried the file above? Those are Terragen objects. Nothing i made myself.

Other then the file above i tried a very basic cube i made in Lightwave.
Then tried many things in Poseray and used that exported object too.
Changed the center of the object, played with many different settings in Terragen related to the object and whatnot...
It is always problematic whatever i tried.

Did you tried it yourself? Really just make a cube change the X rotation only to 45 degree
If you get it working please share the file and object because i can not think right now about any other reason...
Title: Re: population on object problem
Post by: Dune on May 06, 2016, 12:57:37 pm
Very strange indeed. It must be the small sizes and perhaps the way the cube is built. If you enlarge there is less of a problem, and on another rock it works perfectly.
Title: Re: population on object problem
Post by: Kadri on May 06, 2016, 01:19:07 pm

It is strange indeed.
Your file does have the same problem too actually Ulco.
It is just that to see it more easily you have to use 45 degree rotation.
Anything less closer to zero and more closer to 90 makes it harder to see and using different scales for the population hides it too.
But when you hit the sweet(bad) spot it looks like Otakar's image for example.


Title: Re: population on object problem
Post by: Kadri on May 06, 2016, 01:34:53 pm

I tried changing the population angle too but that didn't worked out.
Not in my test at least.

I just tested a basic sphere OBJ file now.
I thought maybe the objects surface features could be attributing to this problem.
But no...Even a sphere population gets rowed up(?) when you rotate it in the X or Z axis.
Only the Y axis is without any problem like in the tests before.
Title: Re: population on object problem
Post by: bobbystahr on May 06, 2016, 01:57:26 pm
Quote from: Kadri on May 06, 2016, 01:34:53 pm

I tried changing the population angle too but that didn't worked out.
Not in my test at least.

I just tested a basic sphere OBJ file now.
I thought maybe the objects surface features could be attributing to this problem.
But no...Even a sphere population gets rowed up(?) when you rotate it in the X or Z axis.
Only the Y axis is without any problem like in the tests before.


after numerous tests  myself find this to be true
Title: Re: population on object problem
Post by: otakar on May 06, 2016, 06:12:49 pm
Thanks for the confirmation, everyone. Oshyan, the coordinates make no difference, both the object and the population origin have the same coords. Population size is sufficient to cover the whole object regardless of rotation. The instances DO get generated, it's their placement that seems to be issue (see my first render) - all bunched together in a few spots. And yes, I did try to match the population plane rotation to the object's rotation without success (this does not make sense anyway). So from my perspective this seems to be a bug.
Title: Re: population on object problem
Post by: bobbystahr on May 06, 2016, 06:49:24 pm
just found this figure lying around and then saw the spam from eon and tickety boo I was playing again...
Title: Re: population on object problem
Post by: Matt on May 10, 2016, 12:23:16 am
There's definitely a bug here. From what I can see so far, it seems to be worse at small scales, perhaps relating to the size of the spacing between instances.

Matt
Title: Re: population on object problem
Post by: KlausK on May 10, 2016, 08:10:45 am
Hi everyone,

curious stuff, here are some test renderings.
Distribution of the population object is set to 0.0 on all random values to see more clearly where on the populated object it gets placed.
What position information does the populator read initially from the populated object? Polygon center? Point on a Polygon?

A few things I found:

- The populator does not seem to update the position values of the object it has to populate correctly - if at all.
It actually looks like it only repopulates objects on the positions which are identical after the populated objects rotation values are manipulated.

- Only changing the rotation values on the populated object influence the populator. That`s what some people already found out.
Maybe it has something to do with local and global values not calculated correctly.

- A pre-rotated object imported from LW for example gets populated correctly although not completely. (see attached picture)
As soon as you start to rotate the object in Terragen the same populaton error occurs.

- Rotating the object in Terragen in steps of 90 degrees works on all axes.
It will be populated more or less correctly.
But again not the whole object gets populated when you rotate by 90 and 270 degrees.
That is in a right angle from the original rotation values. It somehow seems to only see the "upper" half of the body.
Are the values of the objects "lower" half negative values Terragen does not compute?

I tried to figure out a way to read and write the vector / scalar / normal values of the rotated object and feed them to the populator node.
But my skills are veeery limited. And of course I am only guessing what might be the problem here...
Is that at all possible?
Maybe some blue node guru in the forum could give it a try?!

You may all have a good laughand make  fun of me if I completely headed in the wrong direction with this ;)
cheers, Klaus

ps1: the first picture shows an object where I only exported the centerpoints of the polys of the object I created in LW.
It is then populated with a card and a rock (Terragen objects)
ps2: posts will get shorter sooner or later, hopefully
Title: Re: population on object problem
Post by: Dune on May 10, 2016, 09:50:41 am
Interesting experiment. I guess Matt will find the culprit from these.

Regarding Are the values of the objects "lower" half negative values Terragen does not compute?: I would say so; if you want to populate on the 'underside' of an object, you need to add another population and reverse its location (X=180º)
Title: Re: population on object problem
Post by: bobbystahr on May 10, 2016, 09:53:56 am
Quote from: Dune on May 10, 2016, 09:50:41 am
Interesting experiment. I guess Matt will find the culprit from these.

Regarding Are the values of the objects "lower" half negative values Terragen does not compute?: I would say so; if you want to populate on the 'underside' of an object, you need to add another population and reverse its location (X=180º)


I think I recall Matt mentioning that TG *drops* objects onto the target object so no there's other way to do the underside.
Title: Re: population on object problem
Post by: Kadri on May 10, 2016, 11:40:55 am
Quote from: KlausK on May 10, 2016, 08:10:45 am
...
- A pre-rotated object imported from LW for example gets populated correctly although not completely. (see attached picture)
As soon as you start to rotate the object in Terragen the same populaton error occurs.
...


Can you check that ones again please Klaus?
I had tried that earlier and just got curious and tried it again.
I have no problem to populate a pre rotated imported object to populate in Terragen.
Actually it doesn't make any sense that it should have an impact.
Terragen or any other program can't see any difference (if it was rotated or not in another program) in such an object.
But i was just curious if the surface features of the objects do have any impact on populations and tried it anyway.
It populated just as any object without problem until i rotated it in Terragen of course.

Title: Re: population on object problem
Post by: Kadri on May 10, 2016, 11:52:35 am

Klaus just a guess but if you have the "Object spacing in a,b"  value at "1",
you can use much much smaller values actually by entering it manually in those fields.
Title: Re: population on object problem
Post by: KlausK on May 10, 2016, 04:53:42 pm
@Dune & bobbystahr - that makes sense of course. Thanks for the hint.

@Kadri - I think I meant the same thing.
In picture "KlausK_PopulateObject_Problems_1.jpg" the example in the middle is the object I rotated in LW, saved and exported it as lwo.
No surface or UVs on it. Terragen imports it as object with all transform and rotation values at zero.
So you are right. It does not care how it was transformed in the 3D app before.
Due to the fact that the exported objected is pre-rotated before exporting it however, it does not get populated completely all over, mainly
at the "underside" so to speak. I tried it with other objects as well and got the same result.
The other thing...
I know about the object spacing values. I wanted to populate the object with one rock per point or polygon
or whatever point in object space Terragen uses to place the rock on the bellshape. To see more clearly
where the populaters are put. That`s why I took out as much as possible randomness in the placement.

Or am I not getting what you mean?

cheers, Klaus
Title: Re: population on object problem
Post by: Matt on May 10, 2016, 06:53:45 pm
Quote from: bobbystahr on May 10, 2016, 09:53:56 am
I think I recall Matt mentioning that TG *drops* objects onto the target object so no there's other way to do the underside.


You can populate on the underside of an object. You do this by rotating the entire population so that it projects in a different direction, instead of downwards. Oshyan gave a demo of it in this video around 54m52s:

https://www.youtube.com/watch?v=n7Rp4Go8jLs&feature=youtu.be&t=54m52s

Matt
Title: Re: population on object problem
Post by: Kadri on May 10, 2016, 07:21:17 pm

Klaus i think i misunderstood what you said.
If the problem in that image was only about the underside of the object you have to use another population as Matt said for this.

I am happy that Otakar made this thread.
I had problems in the VR challenge with populations. Because of time constrains couldn't look further into this.
Funny that this problem comes up only now.

Title: Re: population on object problem
Post by: bobbystahr on May 11, 2016, 10:57:41 am
Quote from: Matt on May 10, 2016, 06:53:45 pm
Quote from: bobbystahr on May 10, 2016, 09:53:56 am
I think I recall Matt mentioning that TG *drops* objects onto the target object so no there's other way to do the underside.


You can populate on the underside of an object. You do this by rotating the entire population so that it projects in a different direction, instead of downwards. Oshyan gave a demo of it in this video around 54m52s:

https://www.youtube.com/watch?v=n7Rp4Go8jLs&feature=youtu.be&t=54m52s

Matt



Yes I recall that being part of your original long time ago post on that...
Title: Re: population on object problem
Post by: René on September 18, 2017, 08:02:34 am
Quote from: Kadri on May 03, 2016, 12:06:21 pm

You can see a test of a basic cube that is rotated 45 degree below.
No matter what you use as object spacing or space variation they are always populated where you see the lines basically in this test.

[attachimg=1]





Thanks to Kadri. So there is not much I can do about it at the moment I guess. So I have to switch to a texture. That will be more difficult, but it is possible.
Title: Re: population on object problem
Post by: René on September 18, 2017, 08:04:48 am
I tried populating an imported sphere but with the same result; a bird's nest. :'(
Title: Re: population on object problem
Post by: gasbutan on January 10, 2020, 05:25:07 am
Are there are new insights on this topic ?

I currently have the same issue with TG 4.44, seems the problem still exists.
Title: Re: population on object problem
Post by: gasbutan on January 10, 2020, 04:01:08 pm
Here are some test renders.
In this case I just rotated the population area around the x-axis by 90, 80, 10 and 0 degrees.
The distribution is ok only for 90 and 0 degrees.

test026d.jpg