Rendering a scene

Hi I am setting up my first big scene, lots of trees and grass. I know little. The game engine crashed after a day rendering. Can I remove objects, let the scene render and add them back later? So it renders in stages? Or is there just too much stuff? What if I could install more ram? Windows said I ran out of memory. Ran the profiler, looks like I have a lot of geometry. what about optimisation? I have assets I could use to reduce draw calls.

Offtopic:

Exception in thread "readingforum" com.unity3d.forum.TooManyGenericQuestionsException
           at com.unity3d.forum.graphics.generalgraphics.482055

But seriously. First it’s good to specify what you are trying to do. You’re probably not just rendering, but you are baking GI. (Which makes this a GI forum topic and not a general graphics topic.) Memory can indeed help. How much do you have now? Optimization can of course also work.

It won’t render in stages. Every change you make requires a full rebake. You can set some objects to not bake, but get lighted using a probe. Things like trees and bushes are prime candidates for that because of their irregular shape. So don’t set them to static and add LightProbes. Start out by just including the main/large geometry for the bake and refine from there.

2 Likes

I would suggest starting with a 2D game or much simpler thing and working your way up. You know so very little about the subject that you’re making it borderline impossible for anyone to help you.

Like jvo3dc implies, you basically need to understand what is happening when you click stuff, you’re not mentally separating editor tasks, baking, rendering or anything really. It’s all lumped together in one confused ramble.

So why not keep things simple and build up step by step?

1 Like

Thanks for your replies jvo3dc and hippocoder.

As I said I know little. What I said/asked is a confused ramble and I do not have much understanding of separate editor tasks. I am just baking GI.

I had read that objects that where not to move in the game should be set as static and yes, I set all the trees and bushes to static, unchecking them and adding LightProbes has taken a huge strain off my PC. I have 18 Gb of memory installed.

You have both been helpful and I appreciate it.

PS In the time it has taken to write this reply it finished baking :slight_smile:

Baking takes a long time. It takes longer for everything you mark as static for baking.

3136152--237784--upload_2017-7-7_14-2-56.png

This is a fairly in depth subject all by itself and is done at editor time. Typically it’s incorrect to bake grass or small objects, and these should be lit by probes instead.

If you want to get ahead in game development it’s a good idea to start working out where things belong, then you can really accelerate your progress because you’ll know what to google for and what questions to ask. Asking the right question is often the best thing any game developer can work out.

1 Like

Hi hippocoder. I guess I have a fair bit of reading to do.

I found this in the section ‘Using precomputed lighting’ of the Manual:

From the Inspector panel, the Static checkbox can be selected (Inspector > Static). This will set all of the GameObject’s ‘static options’, or ‘flags’, including navigation and batching, to be static, which may not be desirable. For Precomputed Realtime GI, only ‘Lightmap Static’ needs to be checked.

So I probably need only ‘Lightmap Static’ selected for my static GameObjects for now?