Analog film simulation .crf file

Use this forum for general user support and related questions.
Forum rules
Please upload a testscene that allows developers to reproduce the problem, and attach some images.
Post Reply
Fox
Posts: 437
Joined: Sat Mar 31, 2018 11:17 am

Analog film simulation .crf file

Post by Fox »

How do i format the camera response func.file?
Like so:

Code: Select all

static float Advantix_100CDRed_I[] = { value, value };
static float Advantix_100CDRed_B[] = { value, value };
static float Advantix_100CDGreen_I[] = { value, value };
static float Advantix_100CDGreen_B[] = { value, value };
static float Advantix_100CDBlue_I[] = { value, value };
static float Advantix_100CDBlue_B[] = { value, value };
Or like the dorfCurves.txt file is formatted:

Code: Select all

agfacolor-futura-100CDRed
graph-log-log-neg
I =
value   value
B =
value   value
agfacolor-futura-100CDGreen
graph-log-log-neg
I =
value   value
B =
value   value
agfacolor-futura-100CDBlue
graph-log-log-neg
I =
value   value
B =
value   value
I was mixing the agfachrome-rsx2-200CD and agfacolor-vista-100 and i see all the I = values are identical between this 2 films.
Only B = values are different.
Can i then copy from luxcoreblend spi1d files the 1024 values of R, G and B and put them in crf file on B = lines. The I = line i keep original.
I'd like to make the kodak_dscs_3155.spi1d or canon_optura_981114.spi1d for luxcore.
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Analog film simulation .crf file

Post by Dade »

The code for parsing the file is here: https://github.com/LuxCoreRender/LuxCor ... e.cpp#L327

Each "I" input color is mapped in a "B" output color. Values are form 0.0 to 1.0. So, for instance, you can map red 0.1 in red 0.13 by using a I=0.1 and B=0.13 entry.

Mixing two tables (aka colors) may be not trivial but the first step could be just use the average the 2 "B" values for each corresponding "I" entry.
Support LuxCoreRender project with salts and bounties
Fox
Posts: 437
Joined: Sat Mar 31, 2018 11:17 am

Re: Analog film simulation .crf file

Post by Fox »

:) Got the external .crf working.
The dorfCurves.txt type formation works.
Only the blender exporter wont copy the crf file to exported scene 00000 folder.
It links the drive address that you set in luxcoreblend.
Works both ways, with name or address in render.cfg file.
kodak-dscs-3155.zip
(19.19 KiB) Downloaded 197 times
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Analog film simulation .crf file

Post by Dade »

Fox wrote: Sun Dec 09, 2018 6:51 pm :) Got the external .crf working.
The dorfCurves.txt type formation works.
Only the blender exporter wont copy the crf file to exported scene 00000 folder.
It links the drive address that you set in luxcoreblend.
This is somewhat a bug, I'm going to fix it.
Support LuxCoreRender project with salts and bounties
Post Reply