*.med (medium) files format?

New to Thea? Feel free to ask anything here and we will help!
User avatar
SarahC
Posts: 73
Joined: Sat Dec 23, 2017 7:13 am
Has thanked: 1 time
Been thanked: 14 times

Sat Jun 22, 2019 8:07 am

The coefficient files, *.med (beer/grape/milk/water) .... I had a look and wondered what the format is?

5 0 0 3
1.53333 18205.2667
4.60000 20382.6000
19.9333 22369.8000

Scattering and absorption for R/G/B are the three lines I think?
But what's the 5, 0, 0, 3 about? (EDIT: the third number is the number of rows that follow in the file, 3 in this case, and 83 for the milk below.)

I opened water.med - and found a LOOOOOONG list!
84 rows including the top one.

4 340 750 83
0.0325 0.0104
0.0264 0.0098
0.0204 0.0092
0.018 0.0097
0.0156 0.0082
0.0135 0.0077
0.0114 0.0073
0.0107 0.0069
0.01 0.0065
.........................

But that's 83 rows without the mystery top row. And 83/3 = 27.666, NOT enough rows for a R/G/B grouping of 3 rows.

Are there any online that have been pre-made, I can't find any!

Many thanks everyone!
User avatar
Rombout
Licensed User v1.5
Licensed User v1.5
Posts: 15254
Joined: Tue May 12, 2009 12:42 am
Location: Curacao, Netherland Antilles
Has thanked: 31 times
Been thanked: 271 times

Tue Jun 25, 2019 3:45 pm

There was a post about this once, cant remember the proper name to the thread. The logic behind is really scientific.

EDIT
I found the post again but i cant share it here. Its basically the scatter data of materials.
From the second line and down, the left numbers are for absorption and the right numbers are for scattering.

I also was wondering what that first line was, its not stated there. But your findings make sense. I thought the first 3 numbers in the first row is perhaps RGB. But that is limited to 0 > 255, so that is not it
User avatar
SarahC
Posts: 73
Joined: Sat Dec 23, 2017 7:13 am
Has thanked: 1 time
Been thanked: 14 times

Wed Jun 26, 2019 9:32 am

Thanks.

I will try some values in that top row when I get a quiet weekend, and see what changes.
User avatar
nigec
Thea Beta Tester
Thea Beta Tester
Posts: 9884
Joined: Wed Jul 01, 2009 9:47 pm
Location: UK
Has thanked: 42 times
Been thanked: 36 times

Wed Jun 26, 2019 12:37 pm

I did a search and landed here:
viewtopic.php?f=54&t=2009&p=73934&hilit ... les#p73934

The link in the thread is dead but I'm assuming this might help:
https://www.google.co.uk/url?sa=t&rct=j ... o5YUH6gfLK

its beyond me but hey ho lol
"Life is what happens to you while you're busy making other plans."
My Gallery
User avatar
SarahC
Posts: 73
Joined: Sat Dec 23, 2017 7:13 am
Has thanked: 1 time
Been thanked: 14 times

Wed Jun 26, 2019 1:08 pm

The PDF is very useful, thanks!

It's even got a chart of some natural liquids too.

I couldn't see the forum one - members only, sadly.
User avatar
nigec
Thea Beta Tester
Thea Beta Tester
Posts: 9884
Joined: Wed Jul 01, 2009 9:47 pm
Location: UK
Has thanked: 42 times
Been thanked: 36 times

Wed Jun 26, 2019 1:21 pm

There was a link to a converted SI units table but the link is broken but this is the instructions if you can find the table anyway
Attachments
medfilecreation.jpg
"Life is what happens to you while you're busy making other plans."
My Gallery
User avatar
SarahC
Posts: 73
Joined: Sat Dec 23, 2017 7:13 am
Has thanked: 1 time
Been thanked: 14 times

Wed Jun 26, 2019 4:02 pm

nigec?

Thank you so much! This is very useful.

I wonder - just for curiosities sake, is it milk.med with the 70 or so lines of data?
Do you know what that's doing with all those figures?
User avatar
nigec
Thea Beta Tester
Thea Beta Tester
Posts: 9884
Joined: Wed Jul 01, 2009 9:47 pm
Location: UK
Has thanked: 42 times
Been thanked: 36 times

Wed Jun 26, 2019 4:30 pm

I have no idea, I just remembered others had tried over the years.
I guess the big issue is these types of subjects are more likely to appear as someone trying to make the realistic liquid or whatever
"Life is what happens to you while you're busy making other plans."
My Gallery
User avatar
Rombout
Licensed User v1.5
Licensed User v1.5
Posts: 15254
Joined: Tue May 12, 2009 12:42 am
Location: Curacao, Netherland Antilles
Has thanked: 31 times
Been thanked: 271 times

Wed Jun 26, 2019 5:56 pm

Im no science guru or whatever. But i think its the data for the scatter data, internal "falloff", each row represents a certain depth i think. I believe Giannis noted this somewhere. But why some are jsut 3/4 lines and others like 80, thats interesting indeed.

Here's a Page with some info, if you understand it :)
http://graphics.ucsd.edu/~henrik/papers/

There are 2 about scattering
http://graphics.ucsd.edu/~henrik/papers ... ie_theory/
http://graphics.ucsd.edu/~henrik/papers ... roperties/

I think this quote says something about the scattering, but again. Not sure why 1 is 3 lines and the other 70... hahah aso back to square 1 :(
Here is the required math to use the provided data:
- compute the dilution factor of the measured liquid: d=23000/volume where volume is the indicated volume in ml, for diluted powder you have to guess, for ocean water it's 1 (if you want the pure liquid property)
- compute the scattering coefficients: sigma_s=beta*10*d where beta is the paper beta color in mm^-1
- compute the absorption coefficients: sigma_a=(sigma-beta)*10*d where sigma is the paper sigma color in mm^-1
- compute the asymmetry coefficients: g=g_paper/d where g_paper is the paper g color, in most cases the result will be almost 0
User avatar
SarahC
Posts: 73
Joined: Sat Dec 23, 2017 7:13 am
Has thanked: 1 time
Been thanked: 14 times

Thu Jun 27, 2019 4:14 am

Rombout, thanks.

The multiple rows being depth at specific distances sounds solid.
I wonder - the top row might then indicate measurement distances perhaps?

So three of the mediums are standard samples - so the top rows first 3 numbers are all the same in those files.....
If you only have three numbers, there's no distance between measurements - so 0 might even mean "Unused", just a placeholder for the file-reader. It's how I'd implement it!

When multiple readings are taken - those numbers must come into play, and as there's two 0's for the simple measurements it's more than just distance between measurements that is held.... hmmmmmm... experiments with this in mind would be helpful.
This weekend I shall try some. Larger values in these positions here would mean lighter absorption and less scatter at similar distances.

Hmmmm...... TEST TANKS! Some cubes with lights behind them, and I'll set each cube to a test medium..... If someone gets there first, help yourself to the research glory!

(This should be in the manual.... I doubt it's in the new manual either, and the file format as far as I can tell is Thea custom, so it's down to us.

Unless someone knows a developer? Does Kirkythea use the same formats I wonder? The original Neo of the renderer would know!)
Post Reply