Planetside Software Forums

Support => Terragen Support => Topic started by: Kevin F on December 21, 2008, 04:51:28 PM

Title: Problem with density shader.
Post by: Kevin F on December 21, 2008, 04:51:28 PM
I've noticed that when I used a distribution shader with specific hight and slope settings as the density shader of a population that it's not transferable between TGD's. i.e. if I save a population of TGO's with the above shaders as a TGC and then import the TGC in a new scene, then the population renders zero instances for the population with the density shader checked on. Yet populates O.K. with the shader unchecked.
I had to repopulate the TGO in the new file and assign a new density shader (with same values) and everything worked as expected.  Is this combination of shaders terrain/file specific or is this a bug?
Title: Re: Problem with density shader.
Post by: Tangled-Universe on December 22, 2008, 05:36:12 AM
I can't say for sure, but as far as I know and from my experience, when you copy/paste or import a clipfile of populations the "sit on terrain" and "planet" are resetted to blank fields.
Is that also the case with you?
Title: Re: Problem with density shader.
Post by: Kevin F on December 22, 2008, 12:32:45 PM
Quote from: Tangled-Universe on December 22, 2008, 05:36:12 AM
I can't say for sure, but as far as I know and from my experience, when you copy/paste or import a clipfile of populations the "sit on terrain" and "planet" are resetted to blank fields.
Is that also the case with you?

That's true, but even with both reset the population is not generated. The counter starts off as if its generating but reports "0 of xxxxx",
interestingly if you invert the shader it works! but of course the settings i.e placement of objects is the reverse of what you want.
Sounds like a bug to me.
Title: Re: Problem with density shader.
Post by: Kevin F on January 05, 2009, 01:49:30 PM
Could a member of the planetside team please reply to this ?

i.e.
..........Is this combination of shaders terrain/file specific or is this a bug?
Title: Re: Problem with density shader.
Post by: FrankB on January 05, 2009, 01:58:53 PM
could you upload the tgd in question?
Title: Re: Problem with density shader.
Post by: Kevin F on January 07, 2009, 05:22:41 AM
Frank, here's a file showing the problem (not the original but that don't matter).

Interestingly, I've noticed that the populator only fails to populate when the min slope box is checked in the distribution shader , reporting 0 of xxx instances. This is at any min value. Inverting the density shader seems to work, but what is it the inverse of?

I made this scene very quickly by first creating a TGD with a working population that uses a distribution shader as it's density shader.
I then saved the object pop as a clip file, started a new project and inserted the clip file from the first scene.
Not really a problem for me, just thought it should be reported as a bug, but no response from PS.
Thanks for your interest.
Title: Re: Problem with density shader.
Post by: jo on January 07, 2009, 06:48:57 AM
Hi Kevin,

I'll check this out in the next day or two. Thanks for the file and information.

Regards,

Jo
Title: Re: Problem with density shader.
Post by: jo on January 08, 2009, 08:26:34 PM
Hi Kevin,

When I tried your example file it worked if I reset populator so the "Sit on terrain" param is set to "Compute terrain" and the Planet param is set to "Planet 01". Does it work for you if you try that, using exactly those settings?

Regards,

Jo
Title: Re: Problem with density shader.
Post by: Kevin F on January 09, 2009, 03:20:02 AM
Quote from: jo on January 08, 2009, 08:26:34 PM
Hi Kevin,

When I tried your example file it worked if I reset populator so the "Sit on terrain" param is set to "Compute terrain" and the Planet param is set to "Planet 01". Does it work for you if you try that, using exactly those settings?

Regards,

Jo

Hi Jo,
No joy, still the same. Only when the invert box is ticked can I get it to populate.
Regards
Kevin
Title: Re: Problem with density shader.
Post by: jo on January 11, 2009, 08:06:02 PM
Hi Kevin,

That's very strange. It works fine for me on both the Mac and Windows versions. Follow these steps:

- Open the file you uploaded for us.
- Double click on the population node in the network view.
- Go to the "Terrain" tab.
- Click on the "..." button for the "Planet" param and choose "/Planet 01" from the "Assign planet" submenu.
- Click on the "..." button for the "Sit on terrain" param and choose "/Compute terrain" from the "Assign shader" submenu.
- Click the "Populate Now" button.

This works for me. The main difference between our two setups is that you have the model and I don't. I'll download it and see if that makes a difference.

Regards,

Jo
Title: Re: Problem with density shader.
Post by: jo on January 11, 2009, 08:36:45 PM
Hi again,

I've downloaded the model, set it up and following the steps I outline above it still works. The only change I made was to point the object node at the model on my machine.

What version of TG2 are you using?

Regards,

Jo
Title: Re: Problem with density shader.
Post by: jo on January 11, 2009, 08:48:34 PM
Hi once again,

I should also add that the behaviour you're describing with using clips is expected to the extent that clips don't maintain links to any nodes not included in the clip. In this case that would be the two nodes in the Terrain settings of the population ( i.e. Compute terrain, Planet 01 ). You would always need to reset these two parameters after inserting the clip. Obviously this is all working as expected for me on Mac and Windows, so it's a little odd why it isn't doing the same for you.

I think the reason that this "works" if you check the Invert density param is down to the slope settings in the Distribution shader. Without the Terrain params reset in the population the Distribution shader is possibly seeing the "planet" as being flat i.e. having no slope. That means that no part of the terrain is above the minimum slope setting and therefore no instances get created. However when you invert it the flat terrain is all below the minimum slope setting and that means the instances can be created. When you reset the Terrain params in the population the terrain has slope and so the non-inverted settings make sense and instances are created.

Regards,

Jo
Title: Re: Problem with density shader.
Post by: Kevin F on January 12, 2009, 06:56:11 AM
Quote from: jo on January 11, 2009, 08:06:02 PM
Hi Kevin,

That's very strange. It works fine for me on both the Mac and Windows versions. Follow these steps:

- Open the file you uploaded for us.
- Double click on the population node in the network view.
- Go to the "Terrain" tab.
- Click on the "..." button for the "Planet" param and choose "/Planet 01" from the "Assign planet" submenu.
- Click on the "..." button for the "Sit on terrain" param and choose "/Compute terrain" from the "Assign shader" submenu.
- Click the "Populate Now" button.

This works for me. The main difference between our two setups is that you have the model and I don't. I'll download it and see if that makes a difference.

Regards,

Jo

Hi Jo, this is exactly what I've done and it still doesn't populate. I'm using version TG2 beta (build 1.10.23.1)

I've just noticed that if I set the min slope value in Distribution shader v4 01 to any value other that zero, it doesn't populate. If I set it to zero it does. This is regardless of any other "valid" values for other parameters.
Thanks for your help
Regards
Kevin