You question is not a complete specification of what you want or not 100 percent clear to me. So I'll do an example for you to work with. I'll assume you want a render of one object from each of several Collections per render file, and that you want all combinations. I'll try to give pointers to a variation where you select an object at random from a Collection.
I would use a python script that first disables all objects from rendering and then varies what objects are render-enabled.
This may not be the simplest script, but is a variation on an existing script I have:
import bpy
import random
# constants
nCollections = len(bpy.data.collections)
frameCnt=0
filepathBase="//render/frame"
startFrameIdx=0
frameRenderCnt=999999
# set up a function to recurse through each collection
def renderCollection( collectionIdx, frameIdx: int, frameName ) -> int:
if collectionIdx == (len(bpy.data.collections)): # frame ready to render
bpy.context.scene.render.filepath = frameName
print('rendering', frameName)
bpy.ops.render.render( write_still=True )
frameIdx += 1
else:
# if you only want one random from each collection, replace 'for' loop with
#obj = random.choice(bpy.data.collections[collectionIdx].objects)
for obj in bpy.data.collections[collectionIdx].objects:
obj.hide_render = False # allow object to render
tempFrameName = frameName + "_" + obj.name
frameIdx:int = renderCollection( collectionIdx + 1, frameIdx, tempFrameName ) # march onward until rendered
obj.hide_render = True # prevent object render
if ( frameIdx >= frameRenderCnt):
return;
return frameIdx
# INITIALIZE: prevent all objects from rendering
for coll in bpy.data.collections:
for obj in coll.objects:
obj.hide_render = True
# for each collection
total = renderCollection( 0, 0, filepathBase )
print( total, ' frames rendered' )
And a proof of concept: (I'm getting the 'All uploaded files must be in the blend file format' 3.0 bug again from the upload site so...) here a link to my Public DropBox example blend file.