ive been trying to create a metalic plastic shader.
i noticed by observing the material that it has a few layers of gliters that react in different ways to light.
ok i went to recreate the material and having extreme close up shots i started off using different types of fractal noise nodes mixed and matched ,to achive the desired effect. i ended up with noise remaped 3000 times at least and my render was too slow. i couldnt use the shader because of that and had to recreate it out of noise texture maps tiled.bummer it doesnt look as good.
people always say use procedural it looks better and renders faster.
i found xsi very slow.especialy when remapping and mixing in a comlex tree.
is there a way to make remapping render fast ???
are there do's and dont's concernig how many materials could be mixed there is abselutely no documantation talking about those problams.
and every project with complex textures i wander now if ill just create my raw materials and texture them insted of using the texture nodes.
"people always say use procedural it looks better and renders faster. "
I think you heard wrong. Since the beginning of time I've always heard: "use procedural textures it has more detail and uses less ram, but the downside is that it renders slower"
Well Ed, I'm certainly not as a veteran as you are, but I always heard the exact contrary: put 3D texture anywhere you can, rely on 2D textures only if you're forced to. 3D texture are supposedly rendering faster in any renderer.
Can anyone shed light on this?
Anyway, the more complex your render tree is, the more time it takes to mental ray to process the scene.
firstly :a metalic plastic is my name for materials that are plastics but have metal look with particals of chrome floating around (same as metalic car paint but plastic) a lot of mobile phones have that kind of material. since im not a native english speaking person there could be other names for the material.
this was not the point.
with every project i lern how to optimise my shader tree so its faster. but stll the moment i put something on lets say specular map it jams the render i suppose ill have to learn how to live with this cause once you start pushing the tree thats when MR starts to show incredible results. any way something i realised is that i could render the procdurals through (render map) which in future projects will help a lot (an option not existing in 1.5) ill might post the shader for people to look and maybe optimise it so its usable.
I'm with you ed. plus it makes sence, a procedural texture is going to take say 24kb to define, vs 600 - 10000kb for the an image.
but when rendering the procedural shader asks Q:what colour is the tea pot here. A:well, let see, based upon the hypotinuse of the tangent between these two quadratic.... blah blah blah (eg large calculation)
and the image map says: Q:what colour is the tea pot here. A:let see, .03 U and .8 V
sounds logical to me. Te Anau
fineprint. This is an over simplification, views expressed above are the personal views of Te Anau and may not be shared by bill gates.
The speed of a procedural shader is dependent on the algorithm used (ie: what does the shader do).
If it's a simple gradient, then the procedural will be quicker as it's faster to do a multiplication between two cached colors than to look them up in another source and pull the data across the bus. When you use bitmaps or other cached data, mental ray has to allocate memory to hold the data and that can be a slow process. As storage requirements increase, efficiency decreases. Allocating 1000 bytes of memory will not be 10x slower than allocating 100 bytes of memory, if anything it'll be around 12x or more (exaggerated example) because mental ray has to search more of the RAM/harddrive for available space. Since memory isn't used linearly, mental ray will have to size up each free chunk it finds before it decides whether it's usuable or not - that takes a lot of time, especially if your memory/harddrive is fragmented or near capacity. mental ray (or any software for that matter) also has to free the memory when everything is done - another big hit, but not as big as allocating and initializing.
If the effect being computed is fairly complex involving many recursive computations such as fractals, reflections, refractions, anti-aliasing, or situations where intermediate data needs to be generated before final results can be computed, then the bitmap approach can be faster as bitmaps usually are used for providing pre-computed data (assuming the bitmap doesn't overly consume memory).
To summarize: The answer is very arbitrary and varies from case to case. Just because a bitmap shader runs fast in a simple scene doesn't mean it will run fast in a complex scene (same for procedurals). When you find something that works to your liking, besides saving presets, make sure you take notes as to the conditions in which the shader is run (eg: big scene vs. small scene, available memory, scene contents - lots of models, how much animation data, etc...). Over time, if your disciplined, you'll have a nice log of data to cross reference for when you start moving into unfamiliar territory in future projects.
If you want the nitty-gritty as to which is faster and why - then start reading the mental ray manuals. They're very explicit.
Matt
Matt Lind Animator / Technical Director Softimage certified instructor: Softimage|3D Softimage|XSI speye_21@hotmail.com