A work around for TG2-TPs not using 100% CPU

Started by DeanoD, December 21, 2006, 04:38:25 AM

Previous topic - Next topic

DeanoD

Hey All!

<tumble weed rolls past>

;)

I am sure you are all enjoying the Tech Preview like I am. Many renders have come out of it already and I have been amazed by every single one.

In its current state TG2 isn't multi-threaded so... It only takes advantage of one of your CPUs.. And for people.. like moi who are running Duel Core systems.. that can be... Frustrating and means your essentialy only rendering at half speed!

Anyway I came up with a work around that seems to work OK on all the images I have tried so far.. On a Windows system.
Its pretty simple but for those of you who have not seen it I figured I would share it so you can try it.

-=Disclaimer=-

The fact this agricultural work-around worked for me does not guarantee it will work for you.
Use at your own risk. If your computer explodes, you loose all your work, You manage to set your cat alight or anything else that might happen while trying this workaround, I cannot be held responsible.

Basicly all I am doing is opening TG2 twice and getting each version of it to render a different half of the image.. using the "Crop Region" settings in the Rendering menu. If you already think "Ah OK! I know how to do that! thanks!" then your probably don't need to read the rest of this post.. If none of this previous paragraph made any sense to you at all.. read on.

Before I go any further a few things I should highlight.

The only Pro of using this workaround is that it renders faster.. Almost 50% faster for me.

There are a few Cons though such as.

Double RAM hit. I have 4GB of fast ram so it doesn't effect me.. But I imagine having to cope with twice the normal amount of RAM usage from TG2 for a really complex scene may be a pain in the A$$.

Also Its not very tweekable.. Because If you change anything in one scene you have to do the exact same thing to the other one.. This is a pain and why I only use it for final renders once I know everything is as it needs to be.. For instance for a render overnight.

Then you have to do a little post production in photoshop combining the images. Anoying but not too bad.. As I PS most of my images anyway.

OK..

Step 1:Get everything set as you want for your render. Save the file and open ANOTHER iteration of TG2. I dont mean close the TG2 you have running. I mean open it twice.. Once the second version of TG2 is running open up the file you just saved.. So you should end up with two windows of TG2 running.. Both having absolutly identicle scenes loaded into them.

Step 2:Ok now click back to your first window of TG2 and click on your rendering tab up at the top and then go to the "Full Render" sub catagory in the box on the left. Now.. down at the bottom you should see a "Crop Region" tab, click it.

You will be presented with a bunch of sliders and a couple of check boxes.. tick the first check box that says "Do Crop Region" and now onto the sliders! Personaly I split the image down the centre virticaly, But if you want to go horizontaly then feel free. What I do next is then drag the "Crop Right" slider left until it reads "0.51" (Type it into the box if you want it to precise) . What we have just done is told TG2 to only render the left hand portion of the image.

Step 3:Now repeat Step:2 with the other window of TG2. The only difference being change the "Crop Left" slider this time.. And change it to "0.49" What that has given us is a 2% overlap of each render.. to make sure they merge together well in photoshop later.

Step 4: Make sure ALL the rendering settings are identicle.. Image size.. Camera exposure.. etc.. has to be identicle in both renders for obvios reasons.. Ok.. Hit render in both windows.. That should bring up two rendering windows.. and they should start rendering away..

Hit CTRL-ALT-DEL to check that 100% CPU is infact being used.. IF it isnt for some reason.. refer to Step 5.

Walk away and come back a few hours later. Hopefully you will have two nicely rendered halfs of images that you can easily put together in photoshop.

Step 5: If both the TG2 are rendering but not using all of your CPU first thing is abort both renders. Hit CTRL-ALT-DEL and click the processes tab.. Click Image name and scroll down till you find both your TGD.EXE listings, one for each version of TG2 you have running.

It will probebly be using more of your memory then everything else if you have a complex scene so you can also sort by memory usage.

OK right click either one of the TGD.EXE listings in the processes tab and hit the 'Set Affinity' button. That should bring up a box listing CPUs from 0 to 31. In all likleyhood you will only have CPU 0 and 1 ticked. Simply Untick one of the CPUs then close that window.. open the 'Set Affinity' window on the OTHER TGD.EXE listing and untick the OTHER CPU.

You should end up with one TGD.EXE with Affinity to CPU 0 and another TGD.EXE with Affinity to CPU 1.

Try re-rendering again and now It should be using up all your CPU.


Sorry for the overly long rambling post.. I hope the Newbs of the future can understand it and hopefully get some use out of it.


To all of the TG devs, Great program guys! I am realy excited about the possabilitys of creating very realistic scenerys for all sorts of Images and animations I have always wanted to do.. But never had the right backdrops. And man.. Those clouds.. How good do they look! <drooooooool> ;D
' Dont Worry.. i crash better than anybody i know '

Mel Gibson
Air America
Anything, Anywhere, Anytime.

Tangled-Universe

That's really cool!
I presume it also works for AMD X2 cpu's :)

In the meantime I was wondering if it's also possible to stitch renders the way you were supposed to make panoramic images in TG 0.9x. Cuz the render size of the TP is limited to 800x600 and thus by stitching renders creating a higher resolution image :)

Martin

DeanoD

Hehe thanks  ;D

It should work fine with your X2s.

It wont be as good as when they get TG2 properly Multi-threaded but its a good compromise till then.

As far as the stitching thing.... It should work if you wanted to get things like panoramic Fish-Eye effect shots.. With a bit of carefull planning and camera manuvering. ;)

Also.. If you buy a TG2 licence you can render larger then 800x600.. Its somthing I will be looking to do very very soon because I am itching for some 8000x4000 pixel poster sized prints for my office walls (its great having a friend who owns a printing company :D)

Oooh.. Clouds!

<runs off>
' Dont Worry.. i crash better than anybody i know '

Mel Gibson
Air America
Anything, Anywhere, Anytime.

Tangled-Universe

8000x4000???
Man, that would take ages! Even with moderate quality settings.
Guess you won't need a heater then in your room  :)

FrankThomas

if he knows a printer then you wouldn't need to render at anything near that size - use the RIP on the printer to upsize it and you are good to go

turx

great tip! thanks so much.
i hope they embed Multi Processor support as soon as possible.

DeanoD

I have quite a 'pokey' system and also a few other dedicated rendering machines available to me so I reguraly render things at insane res. so much sub-pixel sized detail can easily be created with Terragen that rendering huge can give you some very inpressive images. Specialy when printed BIG ;D

Also I have allot of patience ;)
' Dont Worry.. i crash better than anybody i know '

Mel Gibson
Air America
Anything, Anywhere, Anytime.

MeltingIce

Haha thats quite a clever way of doing it, I never would have thought of that.  I have a question about when dual core support is added to TG2.  Will the renderer work like Cinema 4D does on dual core machines, where it assigns half of the image to one core and the other half to the other core, or will both cores just render the entire image straight down?

MeltingIce Network | Wii Number: 3881 9574 8304 0277

Oshyan

It will probably work on adjacent tiles. You'll notice that currently TG2 tends to render the scene in large square sections, so I would think it would use the same system but have each CPU working on a different area. I can't say for sure though.

- Oshyan

MeltingIce

Quote from: JavaJones on December 23, 2006, 06:42:53 PM
It will probably work on adjacent tiles. You'll notice that currently TG2 tends to render the scene in large square sections, so I would think it would use the same system but have each CPU working on a different area. I can't say for sure though.

- Oshyan
Yea that sounds like a pretty efficient method to me.  I noticed while rendering out at 1920x1200 it renders in tiles.  I never noticed that when I used to render at 800x600.

MeltingIce Network | Wii Number: 3881 9574 8304 0277