View Full Version : Pool of Oil Effect
Artnumeris
October 3rd, 2008, 13:08
Hello everybody, i' am new in shaders.
I've read the documentation and i understood how mental mill works, but i need some help.
I like the soft because I don't know any code line, and because I exported some shaders in Virtools without too much problems.
I would like to make a shader who looks like oil. (you can see he picture).
I know i need some reflection, some bump for the asphalt, but i dont know which nodes and how to use thems for the color effect.
If anybody's got an idea, it would be very helpfull.
Thanks
Ian_
October 6th, 2008, 23:18
Hello, sorry for not posting sooner. This is an interesting but tricky effect to create. In case you didn't know, this type of phenomenon is called dispersion, it can be time-consuming to render if you want it to be physically accurate, but since mental mill is mainly for real-time rendering, its better to fake it. What you need is a multi-colored blending ramp. Now I was going wait until I was done to release a shader pack that I am writing, but I can release one to help you out. Its also better for performance reasons if you have a gray scale fraactal-noise type patterned image to blend the ramp. You also should have some other nodes,like a falloff node to make the effect change with different angles, and nodes to mask off the effect where you don't want any rainbows, such as a color lerp, but to start you off I made an example scene to show you one way this effect can be made. Before opening the scene file, open the zip file, and put the folder IA_Extensions_01 into, (I am using Mental Mill standard, not Artist edition BTW),
C:\Program Files\mental images\mental mill\data\shaders
and put the oil_map and oil_mask images into,
C:\Program Files\mental images\mental mill\data\textures
If you are using artist edition,
put the IA_Extensions_01 folder into,
C:\Program Files\mental images\mental mill Artist Edition\data\shaders
and put the oil_map and oil_mask images into,
C:\Program Files\mental images\mental mill Artist Edition\data\textures
Then open mental mill and in the toolbox, right-click to add a new pallet, call it whatever you want and right click Add Shader and add the IA_Generator_Color_Ramp_08.msl file from the IA_Extensions_01 folder. Then you should be able to open the oil scene file. Hope this helps. :)
Ian_
October 6th, 2008, 23:59
Alternatively, you can use use a 16 color ramp to create other iridescence effects.
http://forum.mentalimages.com/attachment.php?attachmentid=544&stc=1&d=1223330207
ruediger
October 7th, 2008, 21:53
Ian, cool contribution...
I did another example which you can see when you download the package which is attached to this post.
I used a shader that was discussed in another thread (http://forum.mentalimages.com/showthread.php?t=1196). Just follow the instructions of the README.txt. It's a variation of what Ian has - so there are many possibilities to create the desired effect.
If there are any open questions feel free to ask!
Cheers,
Ruediger
Ian_
October 8th, 2008, 04:36
Well, I'm glad you like it :) More shaders are on the way. :) I am also working on a shader that does color blending based on anisotropic highlights, i.e. a CD shader. In case anyone is interested in how I made the iridescent shader, I have it also included. As before, texture goes into the texture folder and msl file goes into the shader folder.Also this shader is similiar to a shader for mental ray found here,
http://maxplugins.de/mentalray.php?search=oily&sort=Author
Also if anyone wants some visual reference for this effect, some photos can be found here,
http://alsacorp.com/products/multichrome/multichrome_show1.htm
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.