bmikiwer Posted January 15, 2017 Share Posted January 15, 2017 (edited) I'm trying to make sense of the 'Ns' values I get when exporting a model(.obj) from IronCAD. 11 Cylinders, Highlight spread from 0 - 100 (0, 10, 20, 30, ...) gets me a .mtl file with these 'Ns' values: 5, 21, 69, 149, 261, 405, 581, 789, 1029, 1301, 1605 I've read that the 'Ns' values usually are between 0 and 1000. First I thought these values were exponential but I believe them to be quadratic. Is there a mathematic function that will convert these values to linear values between 0 - 100 or 0 - 1000? Example: If a material get's a 'Ns' value of 681 how would I know how much Highlight Spread that material has? Edited January 16, 2017 by bmikiwer Quote Link to comment Share on other sites More sharing options...
IronKevin Posted January 16, 2017 Share Posted January 16, 2017 We are investigating this. Quote Link to comment Share on other sites More sharing options...
bmikiwer Posted January 19, 2017 Author Share Posted January 19, 2017 We are investigating this. 44588[/snapback] Does it not work like it's supposed to? Thanks for having a look! Quote Link to comment Share on other sites More sharing options...
IronKevin Posted January 23, 2017 Share Posted January 23, 2017 Here's the info I received from the developer: Here is the formula they can use to convert IC Ns to 0 to 100 If( value Ns = 0; Else if (value > 1605 ) Ns = 100; Else { Ns = sqrt(a-5) * 2.5; ] Quote Link to comment Share on other sites More sharing options...
bmikiwer Posted January 24, 2017 Author Share Posted January 24, 2017 (edited) Here's the info I received from the developer: Here is the formula they can use to convert IC Ns to 0 to 100 If( value Ns = 0; Else if (value > 1605 ) Ns = 100; Else { Ns = sqrt(a-5) * 2.5; ] 44622[/snapback] Thank you! Just wanted to point out that in your "Else" statement, it should be: Ns = sqrt(value-5) * 2.5; if I'm not mistaken. But it appears to be working perfectly. I did modify this a bit since I need the values between 0 and 1 and in reverse. This function is written in Python if anyone is wondering. def ironNs(value): ----if value --------ns = 1.0 ----elif value > 1605.0: --------ns = 0.0 ----else: --------ns = 1.0 - (sqrt(value - 5) * 0.025) ----return ns Also, thank the developer! Edited January 24, 2017 by bmikiwer Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.