Feature request: camera dropdown for populations

Started by sboerner, April 14, 2025, 09:52:45 AM

Previous topic - Next topic

sboerner

I wonder if it might be possible to add a drop-down camera selector (such as the one used in the Distance shader) after the "Camera" option on the Pop parameters panel. See attached. I often use a second "roaming" camera in a scene to check alignments and render small test images. But it would be nice to be able to specify the main rendering camera for all the populations. That way they won't regenerate when switching cameras, and any test renderings will accurately reflect the full scene.

Dune

I can imagine pops regenerate when you set 'clip to camera'. I never use that setting, and another camera just renders without repopping. It would nevertheless be handy to have perhaps. But, thinking of this, I wonder if it takes more memory if you let the pop use all space instead of just the clipped camera area. It doesn't reduce instancing time, I think, so I wonder what the benefit of the setting is.

sboerner

Ticking that box is a habit that I developed early on. Just on the assumption that any geometry (or instances) outside the frame is a waste of resources. I would guess it saves memory, and with 20-30 vegetation populations that would add up. But I've never tested it. An easy way to do so might be to compare the sizes of population caches saved with and without it ticked.

Dune

But I assume you locate the 'pop box' such that waste is minimal. I sometimes rotate it 45ยบ so one corner is near the camera. That way you can use almost all instances.

sboerner

Yes, the pop box is set at a relative angle to the camera in the scene I'm working on. The camera uses a 135mm lens, so a narrow field of view. One of the grass pops generates 12.8 million instances without clip to camera set, and 6.4 million with it set, so about half. Saved out cache sizes are about 920Mb vs. 465Mb. Not an insignificant difference. When I have a chance I'll see if it's possible to compare actual memory consumption in Task Manager.

I know that the pop box could be shaped and angled to more closely match the camera's frustum. But then it would have to be adjusted whenever the camera gets moved or when I select a different camera. I typically place many cameras in a scene at different angles so I can render tests as the scene is developed, so a narrowly defined pop box would be a real pain. Especially when it has to be defined for 20-30 populations.

So, yeah, I'd like to have this feature.

Dune

Good that you tried this, interesting. In your scenario you're absolutely right. 12.8 million grass instances is huge, and that's just one. It would be good for animations too.

Btw. another thing I often do to avoid such huge numbers of instances, is use different grass objects for different distances. Only using the hi-res, single ones for really close up, lo-res patches for bigger distances, and the grass clump or procedural 'fake grass' for very distant (if at all needed).

sboerner

Yes, it's a bird's-eye view, so lots of grass! I usually use lower camera angles so the populations are much smaller.

Thanks for the suggestions for using different grass objects depending on the distance. Sort of like a manual LOD, but not too hard to set up.

After my last post I realized there is an obvious flaw in my suggestion to add a camera selection list to the population panel: If you switch cameras you would have to manually update the selection for each population. This might be done fairly quickly in the node window by dragging out new connection lines, but still. It's probably best to leave it as-is, using the current camera.

This is what happens when I post suggestions before my second cup of coffee. ::)

Dune

;D  You know that exactly your 'flaw' passed my mind but didn't quite settle. Not enough coffee too, perhaps.

If you make the internal grass smaller (XZ of the object to 50%), the 10m diameter is reduced to 5m. Then it will most likely be quite reasonable on steeper/bumpier terrain too, if you set rotate with terrain and anchor them on the appropriate (last) node. For closer areas and really bumpy terrain, I sometimes reduce even more, to a diameter of 1m or so, with less and longer blades, and sink it a bit. So even on steeper areas the 'feet' will 'root'.