rawks Posted December 28, 2015 Share Posted December 28, 2015 Hi all, I have a simulation where my liquid change viscosity based on particle age, everything controlled with a spline ramp. Now my wish is to let the liquid change color based on viscosity. I'm not sure if I'm on the right direction but in viewport I have some results, not in render. Few notes: - material is a mantrasurface material - materials computation has been done in SOP with vopsop, importing viscosity attribute and exporting r g b values as per material values. Please refer to attachments, Any help to show me the way will be really appreciate. Thank you all, E. ViscosityR&D_02.hipnc Quote Link to comment Share on other sites More sharing options...
fathom Posted December 29, 2015 Share Posted December 29, 2015 don't decompose the vector into floats. instead, pass it a vector called "diff_color". the "r/g/b" is appended to the individual components of vectors and are really only useful in channel references. the actual shading parameter is "diff_color" and it's a vector. Quote Link to comment Share on other sites More sharing options...
rawks Posted December 29, 2015 Author Share Posted December 29, 2015 Thank you for your reply, is working in some way but I still have one issue. Viscosity of my fluid is on range from 25 to 5000, so I used a fit range sourceMin 25 sourceMax 5000 with destination 0-1, this cut me all the areas where my viscosity is 25, I don`t understand why. I wish to use a ramp parameter to control colours based on viscosity but as you can see is not happening. Please find screenshots and files attached. Thank you again! E. ViscosityR&D_03.hipnc Quote Link to comment Share on other sites More sharing options...
mawi Posted December 29, 2015 Share Posted December 29, 2015 Your ramps position lookup isn´t connected. all particles will pick the blueish color at beginning of the ramp(position 0). That is later multiplied with the normalized viscosity (0-1), returning black att the lower viscosity value. so. Connect your fit1 node to the position of the ramp and take the output of the ramp into the diff_color node. ViscosityR&D_03.hipnc Quote Link to comment Share on other sites More sharing options...
rawks Posted December 30, 2015 Author Share Posted December 30, 2015 Everything works perfectly, thank you both for your help, I will post renders soon. I would like to keep this occasion to ask you 2 things, 1 - Is possible to export attributes to max/vray? Like viscosity in this case 2 - Is possible to emit fluid of 2 different colours mixed together? Something similar has been done here, https://vimeo.com/132239252 Thank you again E. Quote Link to comment Share on other sites More sharing options...
fathom Posted December 30, 2015 Share Posted December 30, 2015 since flip is a particle-based system, you can easily add color to your source particles and then, when you go to generate your mesh, query the original colors from your particles to color your mesh. you'll get blending based on how many particles you sample and the size of your filter (using attribute transfer or direct point-cloud queries). as for exporting to max/vray... i'm sure there's some means to do that, but i'm not sure what the state-of-the-art is there. i would presume alembic can handle the attributes, but i'm not sure what you can do with them once in max/vray. Quote Link to comment Share on other sites More sharing options...
rawks Posted December 30, 2015 Author Share Posted December 30, 2015 You mean to colour the emitter (which is a sphere) directly with colours for my final simulation or just black and white? E. Quote Link to comment Share on other sites More sharing options...
fathom Posted December 31, 2015 Share Posted December 31, 2015 i'd probably go with colors directly rather than some kind of mapping scheme, if that's what you're asking. a lot easier to handle the mixing that way. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. 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.