Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - raffaele.tortora88

Pages: [1]
1
i've resolved the problem changing creation of bmp using method MultipassBitmap:
# Ottieni le impostazioni di rendering correnti
    rd = doc.GetActiveRenderData()
    # Crea un nuovo bitmap
    # bmp = bitmaps.BaseBitmap()
    bmp = bitmaps.MultipassBitmap(int(rd[c4d.RDATA_XRES]), int(rd[c4d.RDATA_YRES]), c4d.COLORMODE_RGB)
    bmp.AddChannel(True,True)
    if bmp is None:
        return
    # Imposta la risoluzione del bitmap
    #bmp.Init(x=int(rd[c4d.RDATA_XRES]), y=int(rd[c4d.RDATA_YRES]), depth=32)
    # Esegui il rendering
    result = c4d.documents.RenderDocument(doc, rd.GetData(), bmp, c4d.RENDERFLAGS_EXTERNAL)
    if result == c4d.RENDERRESULT_OK:
        bmp.Save(output_file, c4d.FILTER_PNG)
        print("Rendering completed successfully.")
    else:
        print("Error during rendering.")

Thanks you all for your suggestions

2
Hi,
thank you very much for your reply.
My project regard rendering automation. I've developped a python script which elaborate a JSON with some operations (import object in scene, change material, move object...) and at the end make render.

John_Do, i've tried to execute gamma correction on saved image but with not good results. Can you please suggest me which kind of correction have you made on the example picture you have posted?

Thank you very much.

3
Goodmorning everyone,
i've the following problem. I have a c4d file which render well with right illumination when i render it from Cinema4D manually. Instead, when i run mi python script all is dark, illumination doesn't work.
I use following code:

    # Crea un nuovo bitmap
    bmp = bitmaps.BaseBitmap()
    if bmp is None:
        return

    # Ottieni le impostazioni di rendering correnti
    rd = doc.GetActiveRenderData()
    # Imposta la risoluzione del bitmap
    bmp.Init(int(rd[c4d.RDATA_XRES]), int(rd[c4d.RDATA_YRES]))

    # Esegui il rendering
    result = c4d.documents.RenderDocument(doc, rd.GetData(), bmp, c4d.RENDERFLAGS_EXTERNAL)
    if result == c4d.RENDERRESULT_OK:
        bmp.Save(output_file, c4d.FILTER_PNG)
        print("Rendering completed successfully.")
    else:
        print("Error during rendering.")

Seems there are some settings (like Global Illumination) which are not used when i run render from script.

Can you give me some support?

Thanks in advance

Pages: [1]