How can I avoid Object Intersection

Started by cyphyr, October 07, 2007, 07:31:55 PM

Previous topic - Next topic

cyphyr

Hi gang
So to start a new project, I'm gona' work on a huge scifi city, basically a revisit of one of the first TG2 images I did at the beginninghttp://forums.planetside.co.uk/index.php?topic=658.msg5187#msg5187 of the year, but with some more of the stops pulled out. The UV issues has been solved and the rendering is oh so much faster but I'm stumped as how to get around object populations overlapping each other. Is there a conceivable way to stop objects intersecting, possibly using one population as a blend for the next (although I have tried exactly this and its a no go, maybe a more advanced interpretation), or possibly some sort of accurate population placement via image masks. It would be really useful to be able have more control populations over populations rather than just relying on the luck of random seeds.
Thanks in advance
Richard
www.richardfraservfx.com
https://www.facebook.com/RichardFraserVFX/
/|\

Ryzen 9 5950X OC@4Ghz, 64Gb (TG4 benchmark 4:13)

dhavalmistry

well you can try using the fake stones technique...if you remember, this technique shows how not to make stones on top of stones.....there is a thread on this forum with similar title....
"His blood-terragen level is 99.99%...he is definitely drunk on Terragen!"

cyphyr

#2
Thanks but I tried that one and its a non-starter, the initial object isn't even available as an "Assign Shader" option, only its Multi Shader branches and manually typing it in gives no pop at all. I also noticed that the object spacing nudges the populations left and up (this is with the object & pop at 0,0,0) so the population extends beyond its initial boundaries. Hmm, maybe this level of control just isn't available yet (he said wistfully ;) ) I'll try a few more ideas but I think this is a gonna :(
Richard
ps I have tried plugging the output of the opject population into everything I can think of, red all the way apart from the render "Crop to Object", ironic since that doesn't do anything ??? ::)
www.richardfraservfx.com
https://www.facebook.com/RichardFraserVFX/
/|\

Ryzen 9 5950X OC@4Ghz, 64Gb (TG4 benchmark 4:13)

bigben

#3
Create a BW distribution shader for one of the populations, and use it's inverse for the distribution shader of the other population. If you have more than 2 populations then you need to get a little trickier.

Attaching a TGD that has multiple masks for creating non-overlapping regions within a global mask. The demo uses surface layers but it should hopefully make sense. (and as always there are other ways of doing it... this is just one of them)

... and from memory I think crop to object only works for spheres.
[edit] here 'tis  http://forums.planetside.co.uk/index.php?topic=1472.msg15858#msg15858[/edit]

cyphyr

#4
Thanks Ben, this looks promising, however it dose not solve the issue of objects within the same population intersecting each other. I'll take a look at your distribution tgd tomorrow when I'm more awake (zzz) although at the moment I don't see how it would help. The distribution seems to be related to the scale of the imported object (I'm probably partially wrong but changing the scale dose seem to change the frequency of overlap). I think the solution may be down to getting exactly the right scale of the object in the first place, unfortunately all my buildings are to scale, some large, some smaller, so it may involve some serious tweaking and not provide a universal solution. If I can get things to work in the foreground then the background will be fine as it stands now (err not the image above, thats was just a test:) ). Thanks again
Richard
www.richardfraservfx.com
https://www.facebook.com/RichardFraserVFX/
/|\

Ryzen 9 5950X OC@4Ghz, 64Gb (TG4 benchmark 4:13)

bigben

#5
No it won't help ... my tgd was to stop different populations from overlapping... and even then you may still get some overlappiog at the edges of the masked regions. At least trees look OK overlapped  ;).

Within a population your spacing should at least be greater than the width of your object or you run the risk of overlap.

cyphyr

:) if only ... it seems to make sense, logical and all :) but ...
my object is 40m x 40m (actually a little smaller) and the object spacing is 80 .. :( They don't all overlay by any means but its too severe (and unpredictable to me ) to use :(
Thanks for your help though
Richard
www.richardfraservfx.com
https://www.facebook.com/RichardFraserVFX/
/|\

Ryzen 9 5950X OC@4Ghz, 64Gb (TG4 benchmark 4:13)

bigben

The randomness of the distribution was built in to stop distributions looking too fake, although in this case you actually want them to be more regular. Maybe this could be optional in a future version?  You might try different seed values to see if you can find a more uniform distribution (stabs wildly into the dark)

reck

It would be nice if populations could support more then 1 object. Than you could give the population 2 or 3 different trees (or buildings) and it would use all the different objects when drawing the populations. Right now if you want 2 or more objects to occupy the same area it gets messy.

cyphyr

Hi Reck
Yes this is a request I made back in March,
Quote from: cyphyr on March 05, 2007, 06:19:15 PM

It would be very usefull to be able to make a single population from a number of differant sources, so for instance you could have one population instance containing say 3 or 4 differant tree sources all conforming to the same scale and distribution settings. At the moment if I want to create a forrest I need to add many populations in the same place and mess with the seed values to get realistic distribution. This would not be necessary if multiple population sources could controled through a single population controler.

Richard
Hopefully something on this lines will make it into the final release but this has neither been confirmed or denied. ;)

BigBen
Thanks for your help last night. This is something that has been a worry to me for some time now, I guess this is just the first time I made an attempt to do something that would push TG's current limitations. There are a multitude of situations where populations are not necessarily completely randomly distributed, crops, vineyards, certain natural formations and of course nearly everything man made. I would love a new "Deviation from Grid" slider in the population node.
Ah well back to the drawing board.::)
Richard
www.richardfraservfx.com
https://www.facebook.com/RichardFraserVFX/
/|\

Ryzen 9 5950X OC@4Ghz, 64Gb (TG4 benchmark 4:13)

bigben

Quote from: reck on October 08, 2007, 02:54:56 AM
It would be nice if populations could support more then 1 object. Than you could give the population 2 or 3 different trees (or buildings) and it would use all the different objects when drawing the populations. Right now if you want 2 or more objects to occupy the same area it gets messy.

I still use separate populations for trees anyway with masks for each derived from a "global" distribution.. eg. using the 3 age groups of an Xfrog set of models... increased density of younger trees towards the edges of the forest... or increased density of younger trees near the upper altitude limit ... or blending of species distributions.

While there may be situations where having a mix of models within a population would be handy, you would still have the problem of it looking too fake with an even mix of objects, and providing extra controls to vary the distributions may be too complex to be practical.

reck

Bigben I can see what your saying when talking about completely different tree models in one population and how it may look artificial with the distribution. One area where it would help though is if you have 3 or 4 different versions of the same tree. So instead of having 1 model that's just rotated and resized, you could have a random mix of 3 or 4 different versions of the same tree in one population. This would make it more realistic especially in close up shots. I'm not sure how easy it is in say Arbaro to create a tree and then modify it so the branches change for instance but if it's fairly easy then this would be quite a nice feature.

j meyer

Hi,
have you already tried to group/combine 2 or 3 models in a
modeling application?That should do it,but maybe you end
up with a huge model.

bigben

Quote from: reck on October 08, 2007, 03:09:27 PM
Bigben I can see what your saying when talking about completely different tree models in one population and how it may look artificial with the distribution. One area where it would help though is if you have 3 or 4 different versions of the same tree. So instead of having 1 model that's just rotated and resized, you could have a random mix of 3 or 4 different versions of the same tree in one population. This would make it more realistic especially in close up shots. I'm not sure how easy it is in say Arbaro to create a tree and then modify it so the branches change for instance but if it's fairly easy then this would be quite a nice feature.

Definitely a good example  :)   Combining models would provide a workaround in some cases but there would still be an amount of uniformity and you would run into problems on steeper terrain with floating trees