Population cache.

Started by james adamson, August 30, 2020, 02:06:16 pm

Previous topic - Next topic

james adamson

Hi all.
I have come across a problem with population caching. It seems to keep rendering the source object at its origin scale and position.
The density shader I am using is derived from an image map that I am projecting onto the scene. I mention that because this is the first time I have used this method for population density and it's the first time i have seen this problem. Any ideas anyone.
I hope so my scene is taking 50 mins to generate instances!
Thanks.
James.

cyphyr

Confirmed.
I just made a population in a default scene with the poly sphere.

Without writing/reading a population cache there is no sphere at the origin in the render. 

With writing/reading a population cache there is a sphere at the origin in the render.

In both cases the object marker sphere is NOT visible in the preview (standard and RTP).
www.richardfraser.co.uk
https://www.facebook.com/RichardFraserVFX/
/|\

Ryzen 9 3900X @3.79Ghz, 64Gb (TG4 benchmark 6:20)
i7 5930K @3.5Ghz, 32Gb (TG4 benchmark 13.44)

james adamson

Yep. Thats exactly same as me, preview looks fine.
Oh dear what to do? :o
 I really hope there is a work around when render is done I guess I will have to look at it again.
I am surprised this does not seem to be recognised as a major bug as populations and scenes with enormous amounts of assets are Terragens' thing.
It blows me away how well it copes with millions and millions of instances so surely the caching instances function is pretty important.

cyphyr

One solution would be to re-position your entire scene and camera so the origin is behind the camera.
Annoying but not that much work really.
www.richardfraser.co.uk
https://www.facebook.com/RichardFraserVFX/
/|\

Ryzen 9 3900X @3.79Ghz, 64Gb (TG4 benchmark 6:20)
i7 5930K @3.5Ghz, 32Gb (TG4 benchmark 13.44)

james adamson

Great idea.
 Just worried about all my populations about 40 of them. They are derived from a procedural grid I made in TG of my scene
which then went into Nuke to be subdivided by fractals to make variations form that grid which then project back onto tg scene to create populations.
I basically made about 40 different population maps in Nuke all derived from that base Terragen grid.
Do you think the whole thing will break if I try what you suggest?

cyphyr

Quote from: james adamson on August 30, 2020, 04:48:29 pm...
Do you think the whole thing will break if I try what you suggest?
Err, quite possibly ...

That said if everything is moved to say 100m north including the nuke population masks is *should* be ok. Try it with one pop and if that works you should be ok.
No guarantees though.
www.richardfraser.co.uk
https://www.facebook.com/RichardFraserVFX/
/|\

Ryzen 9 3900X @3.79Ghz, 64Gb (TG4 benchmark 6:20)
i7 5930K @3.5Ghz, 32Gb (TG4 benchmark 13.44)

james adamson

OH. There is also an imported camera move.

cyphyr

You can adjust the camera (+100m) on import (import offset).
www.richardfraser.co.uk
https://www.facebook.com/RichardFraserVFX/
/|\

Ryzen 9 3900X @3.79Ghz, 64Gb (TG4 benchmark 6:20)
i7 5930K @3.5Ghz, 32Gb (TG4 benchmark 13.44)

james adamson

Yeah. I guess it's the only solution right now.
Cheers.
I knew something would go wrong with this setup but I assumed it would be ram running out or something to do with the amount of instances, but no all thats fine. Pretty incredible really. Just counted 46 populations 24 from complex buildings with multiple parts and shaders and rendering 1 minute per frame at half HD 0.5 micro 4 aa.
If it was not for advice on this site I would never even have attempted to do this all in Terragen. All I did in Modo now was the camera move and some geometry prep. I am amazed. But this caching thing would really help me out right now.
thanks for your suggestion.

Dune

You could try to make the center object invisible. An opacity mask doesn't work in populations (which is too bad), but I lately had to vary a population of people wearing helmets, where some shouldn't wear one, so I merged a glass shader with the normal shaders, and had it controlled by simple shapes. So where the simple shapes were, helmets would be transparent/invisible.
So in all pops you should merge thus by a simple shape at 0/0/0, and see what shows.