any way to like bake a complex shader so it renders faster?

Thanks smiley

I'm loving how this granite shader looks.  but it's taking like 15 minutes on one frame.

was wondering if there was any tricks?

scap bake-a-shader so it renders faster.JPG
1115 x 540 - 100K

Comments

  • That Other PersonaThat Other Persona Posts: 381
    edited December 2015

    I don't know about baking, but your screen shot seems to show your tile size is rather large (128?).  I often get better render speeds by lowering the tile size to 64.   Going to 32 can actually increase time, so. . .  Do note that it depends on what I am rendering.  Sometiems 128 is best.  I also have 2 extra computers lying around (heh, heh) that I use as render nodes.  Depending on what I am rendering, I can more than double the speed and thereby half the time.  

    Post edited by That Other Persona on
  • MistaraMistara Posts: 38,675

    an extra render pc averages 25% faster?  

    was wonderifng if the level of effort would be worth it.

     

  • MistaraMistara Posts: 38,675
    edited December 2015

    tile size is hiding. >.<

    thanks !

    scap - tile size.JPG
    1092 x 687 - 133K
    scap - tile size.JPG
    1092 x 687 - 133K
    Post edited by Mistara on
  • Inagoni makes a plugin called Baker that does what you want. 

    http://www.inagoni.com/e107_plugins/content/content.php?content.3

  • HeadwaxHeadwax Posts: 9,987

    Baker by inagoni works well

  • You could also look to see what in that shader is taking so longto render. Is it using blurry reflections for example?
  • DartanbeckDartanbeck Posts: 21,543
    edited December 2015
    You could also look to see what in that shader is taking so longto render. Is it using blurry reflections for example?

    Took the words right out of my mouth ;)

    ...as well as things like how the lighting and render engine is set up. With ALL 3D rendering software, there are so many ways to bring a perfectly good computer right to its knees!

    Post edited by Dartanbeck on
  • MiloMilo Posts: 511

    make sure its the actual shader taking the time, set it to something simple as a test.  As for network rendering and speed its going to depend on the computer.  My wifes I7 is only a 4 core 4 thread I believe mine is a slower machine but its 8 thread.  So if your pc's laying around are slower or faster is going to see how much they help and by what factor.  if you do it alot it can be worth the additional setup, then you get into the size 48, 64, 128 etc.

     

  • That Other PersonaThat Other Persona Posts: 381
    edited December 2015

    As Milo said, the speed boost from adding an extra machine depends on the machine.  I have three very differrent machines: an iMac w/ quad a core i7 3.4 CPU, a MacPro with a 6-core Xeon CPU, and a Mac mini that is quad core i7 at 2.6 I think (it's offline right now).  Each also has a different hard drive configuration, etc, etc.  My primary machines are the Mac Pro and the iMac; the former is a heavy hitter that can run at 100% for hours on end, but it is sometimes slower at certain tasks than the iMac.  It all depend on the software and how it runs on that machine.  

    So, I have the mix that I have and use it daily.  

    A recent test a ran gave the folllowing results:

    Mac Pro by istelf = 6 min 44 sec

    MacPro + mini = 4 min 9 sec

    MacPro + iMac = 4 min 4 sec

    3 machines = 2 min 31 sec (second run) (first run was 2 min 56 sec)

    For anything longer, I tend to leave the Mac mini out of the mix because it can get very hot.

    Interestingly, when I toss a MacBook Pro into the mix and have four machines, it actually made the render take longer.  I also don't know if I changed the primary Carrara machine if it would help or not.  My primary is the Mac Pro and this set up works for me.

    If you have followed the Volcano thread, right now I am playing with the particle emitter.  Last night I quickly tossed together several tests, saved each and then opened  them in the Batch Queue and hit Launch (after changing save settings).  An hour later, all was done and I had had dinnner in the mean time as opposed to sitting in fron of the machines.

    Post edited by That Other Persona on
  • 3DAGE3DAGE Posts: 3,311

    HI Misty :)

    Create a Plane,. then apply your shader to it,. then export the plane as OBJ, making sure you select "Convert procedural shaders to textures" and select an image size eg:2048.

    that will create a square Jpg image of the shader,

    Baker from inagoni will give you much more control over different shader elements such as Bump or notmal maps,. but exporting as OBJ to get a texture from a shader is the simplest method i'm aware of.

    Hope it helps :)

  • MistaraMistara Posts: 38,675

    with the original texture map this takes 1.10 to render.

    with the dp noise ,ox shader, takes 30.25.  blurred reflections isn't checked.  i like it, but isn't feasible.

    possible to cut this down to a few minutes per frame?


    or mebbe geometry haz too many polys. >.<

    121 before shader 1.10sec.JPG
    1099 x 718 - 89K
    121 noise mix.JPG
    1083 x 544 - 109K
    121 after shader.JPG
    1112 x 567 - 87K
  • 3DAGE3DAGE Posts: 3,311

    What's your render settings for antialias and Lighting,. ?

    what lights are in the scene,. 

    try changing the render setting to a draft setting while you work on the texturing and lighting, ...then crank it back up for a final render.

  • The blurred reflections was just an example. Just because I threw that out there as a possibility, don't latch on to just that. There are other shader parameters that can greatly increase render time. Also, as Andy suggests, lighting method and render settings play major roles as well.
  • MistaraMistara Posts: 38,675
    edited December 2015

    light and render settings are cranked. 

    i luv the render estimate eature.  can test different parameters in the shader without having to wait for the render to finish. 

    still trying to balance quality with speed. iz a really nice shader.  sigh

    basically it's noise on a color gradient.
     

    Post edited by Mistara on
  • DartanbeckDartanbeck Posts: 21,543

    As Milo said, the speed boost from adding an extra machine depends on the machine.  I have three very differrent machines: an iMac w/ quad a core i7 3.4 CPU, a MacPro with a 6-core Xeon CPU, and a Mac mini that is quad core i7 at 2.6 I think (it's offline right now).  Each also has a different hard drive configuration, etc, etc.  My primary machines are the Mac Pro and the iMac; the former is a heavy hitter that can run at 100% for hours on end, but it is sometimes slower at certain tasks than the iMac.  It all depend on the software and how it runs on that machine.  

    So, I have the mix that I have and use it daily.  

    A recent test a ran gave the folllowing results:

    Mac Pro by istelf = 6 min 44 sec

    MacPro + mini = 4 min 9 sec

    MacPro + iMac = 4 min 4 sec

    3 machines = 2 min 31 sec (second run) (first run was 2 min 56 sec)

    For anything longer, I tend to leave the Mac mini out of the mix because it can get very hot.

    Interestingly, when I toss a MacBook Pro into the mix and have four machines, it actually made the render take longer.  I also don't know if I changed the primary Carrara machine if it would help or not.  My primary is the Mac Pro and this set up works for me.

    If you have followed the Volcano thread, right now I am playing with the particle emitter.  Last night I quickly tossed together several tests, saved each and then opened  them in the Batch Queue and hit Launch (after changing save settings).  An hour later, all was done and I had had dinnner in the mean time as opposed to sitting in fron of the machines.

    Out of curiosity, would you let me borrow your Mac Pro for a year or two?(LOL) I've always wanted to try one of those! ;)

    Yeah, my home-build PC has a no-longer-available AMD Zambezi 8. They still make a Zambezi, but it's not the same as mine. DAZ_Spooky and I bought ours around the same time. His is the High-end version and mine is the lowest, which still runs each core at over 3GHz... can't remember exactly. We both loved them right from the start! Anyways, mine renders tile size = 16 really, really fast. The hair used on my Rosie character has several layers of conforming hair with some really time-consuming transparency maps, so I switched to 16 to give each tile a smaller size to take more advantage of the core speed as well as having eight of them, and it works really well. For really simplistic scenes or those with more background image that anything else, it might be better to run at a higher tile size. Most of my workflow has major benefits to the smallest tile size available.

  • More than likely it is the render settings that are causing the long renders if the shader is essentially a color gradient with noise driving it. Reflections, even if they aren't blurry could also cause longer renders, but I would be more interested in the render settings. Having them cranked is a bit vague. ;-)

    If this is for an animation, then you may be able to safely dial back some of those render settings. Without knowing what you want out of the render, what the render settings are, or what the shader looks like, it is all a crap shoot.

  • DartanbeckDartanbeck Posts: 21,543

    Global Illumination with Full Indirect Lighting can certainly make for an easy setup for lighting - point and click. Slow renders being the trade-off.

     

    MistyMist said:

    light and render settings are cranked. 

    I'm basically the opposite. I spend a lot of time with my shaders getting them to behave under the speedy light and render settings. Of course, that means that I also have to take the time to design a light scheme... but I love doing that! 

  • DartanbeckDartanbeck Posts: 21,543
    MistyMist said:

     

    still trying to balance quality with speed. iz a really nice shader.  sigh

    I know the feeling. I have some favorite shaders that I just never want to live without - even if they make me wait! :)

  • MistaraMistara Posts: 38,675

    i've been starting with the light, sky, with a few cones strewn about and a plane.  then start adding stuff. angel shaders last.  spent like a month trying out sky sets.

    if i put the spa on a space ship, won't need a sky.  put some stars on a splat outside the window  lol

     

  • MistaraMistara Posts: 38,675

    As Milo said, the speed boost from adding an extra machine depends on the machine.  I have three very differrent machines: an iMac w/ quad a core i7 3.4 CPU, a MacPro with a 6-core Xeon CPU, and a Mac mini that is quad core i7 at 2.6 I think (it's offline right now).  Each also has a different hard drive configuration, etc, etc.  My primary machines are the Mac Pro and the iMac; the former is a heavy hitter that can run at 100% for hours on end, but it is sometimes slower at certain tasks than the iMac.  It all depend on the software and how it runs on that machine.  

    So, I have the mix that I have and use it daily.  

    A recent test a ran gave the folllowing results:

    Mac Pro by istelf = 6 min 44 sec

    MacPro + mini = 4 min 9 sec

    MacPro + iMac = 4 min 4 sec

    3 machines = 2 min 31 sec (second run) (first run was 2 min 56 sec)

    For anything longer, I tend to leave the Mac mini out of the mix because it can get very hot.

    Interestingly, when I toss a MacBook Pro into the mix and have four machines, it actually made the render take longer.  I also don't know if I changed the primary Carrara machine if it would help or not.  My primary is the Mac Pro and this set up works for me.

    If you have followed the Volcano thread, right now I am playing with the particle emitter.  Last night I quickly tossed together several tests, saved each and then opened  them in the Batch Queue and hit Launch (after changing save settings).  An hour later, all was done and I had had dinnner in the mean time as opposed to sitting in fron of the machines.

    Out of curiosity, would you let me borrow your Mac Pro for a year or two?(LOL) I've always wanted to try one of those! ;)

    Yeah, my home-build PC has a no-longer-available AMD Zambezi 8. They still make a Zambezi, but it's not the same as mine. DAZ_Spooky and I bought ours around the same time. His is the High-end version and mine is the lowest, which still runs each core at over 3GHz... can't remember exactly. We both loved them right from the start! Anyways, mine renders tile size = 16 really, really fast. The hair used on my Rosie character has several layers of conforming hair with some really time-consuming transparency maps, so I switched to 16 to give each tile a smaller size to take more advantage of the core speed as well as having eight of them, and it works really well. For really simplistic scenes or those with more background image that anything else, it might be better to run at a higher tile size. Most of my workflow has major benefits to the smallest tile size available.

     

    batch queue?!  need to try that.

  • Works great!

    Need stars? Dart has a product in the DAZ store that you may find useful. Look for Starry Skies!

  • MistaraMistara Posts: 38,675

    yup.  bought that one !

  • MistaraMistara Posts: 38,675

    guess i should test render all these wizard presets for speed?

  • 3DAGE3DAGE Posts: 3,311

    Quote: ...light and render settings are cranked. 

    That's the problem right there.

    you don't need to have global illumination or high quality settings. in fact it'll take longer to render because of the light calculations.

    Load up a default render setting,.. hit go and you'll have a render in a few seconds,

    the complex lighting you're using will take a long time to calculate the light in that scene.and provide no real benefit, ...it won't make the image much better.

     

  • That Other PersonaThat Other Persona Posts: 381
    edited December 2015

    Out of curiosity, would you let me borrow your Mac Pro for a year or two?(LOL) I've always wanted to try one of those! ;

    It is a nice machine.  So quiet for the power; it can be maxed out for several hours and still can only be heard in a completely quiet room.  It does produce a fair amount of heat.  It has AMD FirePro 700 GPUs... two of them.  If Carrara could use them renders would fly!  

     

     

    Misty: you could create a very simple scene using the same shader and run speed tests.  

    Create the scene and SAVE, then SAVE AS another name and then another and another (total 4; I name mine things like SB128, SB64, SB32 and SB16 - the numbers are the tile sizes you will input in a minute).  

    Now go to the Render Room and select the Batch Queue down at the bottom left.  Hit ADD and then select your 128 file.  ADD again and choose the 64.  Repeat for the other two.  

    Now on the right, choose OUTPUT and set the settings you want (I always change video to H264 to save space).  You will need to click on each file you added and then change the setting for each.  

    Now choose RENDERING at the top right and look at the bottom right.  Just below the blue  button that says Manage Rendering Nodes you will see th etile size.  Select your 128 file on the left and the Tile Size will show 128.  Select th 64 and then change the Tile Size to 664.  Same for the next two.  Now you are ready to render; DO NOT CLICK COMMAND R!!  You have to click the LAUNCH button on the bottom left, just above your file queue.

    It should start rendering, each file at the selected tile size.  It will render all of the files and save them with the original source files.  While your computer is working away, you can run have a cup of tea.  IOnce it is all done, in the queue windown, your files will now be greyed, but will show the time taken to complete the render.

    I just did this with a simple rising smoke scene using the particle emitter.  On the Mac Pro, I got the following results:  (128) 5min 24sec; (64) 3min 43sec; (32) 3min 7sec; (16) 3min 21sec.  So the sweet spot for this file is 32.  Other tests I have run suggest 64; so I tend to just go with 64.

     

    Have fun!

    Post edited by That Other Persona on
  • DartanbeckDartanbeck Posts: 21,543
    MistyMist said:

    i've been starting with the light, sky, with a few cones strewn about and a plane.  then start adding stuff. angel shaders last.  spent like a month trying out sky sets.

    if i put the spa on a space ship, won't need a sky.  put some stars on a splat outside the window  lol

    I still use the Realistic Sky and Sun Light, but then I use my own Light Dome setup in place of Global Illumination/Indirect lighting. More times than not, however, I'm using a spherical map in the Background instead of the Realistic Sky, same light dome, accent lighting, etc... but that's because I was always trying to find ways to get my scenes with multiple figures and several model sets for buildings or whatever, to render as quickly as I can get them to render.

    Since my main characters are often seen far enough away, they're usually using texture maps that I've reduced in size down to, say, 1000 x 1000 or even less if I can. I also try to configure my lighting to be able to get away without softening the shadows. Just having a single light set to soft shadows will add a lot of extra time to the render. But it can really be a challenge to create the situation where I don't need it - but I do eventually find that sweet spot.

    In the render room I try to keep Anti-Alaising down to Fast, Object Accuracy at 2, Shadows at 4 and no Sky Light/Indirect Lighting or Caustics, Motion Blur, Depth of Field or any of that stuff. I've also opted for going with the low end of HD: 1280 x 720 (720p) which is a lot faster to render than 1080p. I may switch to 1080p, but if I do that I'll likely have to crank up Object Accuracy to 1. I do set Object Accuracy to 1 or 0.5 in cases where it's needed - like close-ups or highly detailed things that need those high details to show through really nicely, but I find that I don't really need it for intense action. After saying that, though... I should also add that I have done tests between Object = 2 and Object = 1 and Object = 0.5 and the resulting renders show obvious improvements all across the board as the accuracy sixe goes down, but the render times increase a lot.

    MistyMist said:

    batch queue?!  need to try that.

    Absolutely. Doing animation work, this allows me to focus on setting up and saving my animation scenes with several cameras filming the action from different angle for entirely different expressions of the motion. Then, when I'm all done for the day, Add each scene into the Batch Queue as many times as I have cameras I want shots from (and I can even alter render setting for each camera, if I want, because it's an entirely separate output save, even though the input scene is the same!) and then do the same for any other scenes that I have saved, ready to render.

    Start the Queue and go to sleep. Come home from work the next day and, if my queue isn't finished yet I can abort the one it's on and leave that one and any others in the Queue to be rendered later, remove those which are already done, now head back into Carrara and design some more action... it's a great way to live! ;)

  • DartanbeckDartanbeck Posts: 21,543

    Out of curiosity, would you let me borrow your Mac Pro for a year or two?(LOL) I've always wanted to try one of those! ;

    It is a nice machine.  So quiet for the power; it can be maxed out for several hours and still can only be heard in a completely quiet room.  It does produce a fair amount of heat.  It has AMD FirePro 700 GPUs... two of them.  If Carrara could use them renders would fly!  

    I'm astounded to see my Zambezi fly through my frames at one to two minutes per frame. When it's not on Rosie's hair or volumetric clouds, those little 16x16 tiles sail by so quickly they're almost hard to see sometimes. For the first time, I've built this computer with the stock cooling fan. Partly because it doesn't take away my warantee if something should go wrong with the chip (after-market coolers void warantees) but mostly because so many customers were giving the stock fan high praises. I built my case around the idea of using large, low RPM fans - plenty of intake and exhaust fans in a rather large tower with lots of room inside (I channeled all of my wiring into a really nice wiring harness that doesn't block any air movement) which helps a lot. I've had this thing rendering for days and days on end without coming close to overheating it, even though all eight cores crank right up to 100% from start to finish. It's an amazing experience! 

    I have a feeling, though, that my 'optimized for speed' scenes would really show of that six-core Xeon Mac Pro! That thing actually has twelve logical cores via hyperthreading doesn't it? I have no clue how to work a Mac, simply because they won't sell me their OS for a machine that I build myself. It just seems that, every time I go shopping for a new computer, I can't find a single product (even using one of those pick-and-choose customizers online) that has all of the components that I want. Seems strange because it's all good stuff that is all compatible which each other. Oh well. Since I've built my first one I've learned that I truly enjoy picking out the guts, waiting for it to all come home so I can put it all together! What a blast! Immediately upon ordering - often before - I download the manual pdf for the motherboard, so I can read through it and know exactly what I'm doing with the jumpers and components I've bought. I've never had a problem. Quite the opposite. This one was right around a $Grand USD including Windows and Sony Movie HD Platinum Suite! :) That's freakin' awesome!

  • That Other PersonaThat Other Persona Posts: 381
    edited December 2015

    Not being able to find exactly what you want... tell me about it!  If not on the hardware side, then on the software side!  Apps can be made to use the GPUs; several of Apple's apps that I have for video do, and they fly compared to other non-optimized setups. If Carrara 9 would just. . . !!!!!

    Yes, the MacPro has 12 threads, but that doesn't always equal speed.

    In another speed test I did, I discovered the iMac is the best for Carrara.  Solo performance: MacBook Pro 3min16sec <> Mac Mini 3min 15sec <> Mac Pro 3 min 6sec <> iMac 2min 42sec.  In combo: MP+mini 1min 41sec <> MP+iMac 1min 36sec <> MP+ MBP 1min 51sec <> MP+mini+iMac 1min 20sec. The Mac Pro is hooked up to a 4K monitor and is now my primary machine because it is just nice to look at.  Apple does make a 4K iMac that looks great and has i7s in it; the 5K iMac has been said to be a liittle noisy compared to my current crop and I really like my silence.

    Don't forget, all Macs can run Windows natively - they boot as a Windows machine.  Personally, I am Mac all the way.  

    Post edited by That Other Persona on
Sign In or Register to comment.