PDA

View Full Version : efficiency... shader copies?


Satchie
12-13-2006, 07:41 AM
Hi ppl: I have a medical scene where there are tissues and several objects, many of them simulating chemical particles of identic nature, in terms of -render- efficiency, what is best? to create a single shader for those identic objects and assign it to all of them? or to create copies of that single shader and assign a copy to its related single object, and so on for each object?? thanx i.a.

victor
12-13-2006, 08:44 AM
Don't think about it in terms of render efficiency. Any differences would be minimal.

Think about it in terms of organizational efficiency. If you decide to make a change to the material that you have on most of your objects, will you want to change just one or many shaders?

MaNdRaK18
12-13-2006, 10:54 AM
And think about file size, loading/saving/refreshing performances ;)

LehaS
12-13-2006, 11:33 AM
Its all about the result you want to achieve and if you can predict how much spheres you ll have in the end...Having 1 shader instead of 5 is not a big difference...but if you have like 100 of them then you d better think of automating the process...You can design your shader to pickup different colors based on some random function....

i dont understand the point of having 100 identical shaders with the same color attributes assigned to 100 spheres :argh:

MaNdRaK18
12-13-2006, 11:50 AM
i dont understand the point of having 100 identical shaders with the same color attributes assigned to 100 spheres :argh:

C'mmon, it could be a great starter for some Monty Python sketch :applause:

floze
12-13-2006, 12:18 PM
Don't think about it in terms of render efficiency. Any differences would be minimal.

Think about it in terms of organizational efficiency. If you decide to make a change to the material that you have on most of your objects, will you want to change just one or many shaders?
Agreed. In many cases it's probably better to use the shading switches to assign different textures/attributes instead of assigning whole another shader. Try to use as least knobs as possible to save yourself some time and hassle.

CGTalk Moderation
12-13-2006, 12:18 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.