Home Unity

Limitations on Unity, need help.

polycounter
Offline / Send Message
Nuclear Angel polycounter
Hi there Polycount! :poly121:

I am about to start a small operation. It is a small game that will deliver a short terrifying experience that will last for only an hour. This game i will create in Unity. I have just been done with the overall concept and i am about to start with the art. But before that i need to be sure on one thing. That is if this project will be possible to accomplish. =/

This game will be a short horror experience that will be focused on making the player feel lost. This will be accomplished with a giant forest were the player will be searching for its dog. And in the forest, stuff will happen, kind off like the game: SCP-087-B

And i did some math on the forest. In order to make a genuine forest that you actually you are able to get lost in, and that takes a while to walk over before you come back to the other end (Kind of like Stephen Kings story were a man walks a cross road and always come back to it, no matter were he goes). It needs to be 2 kilometers across on both sides. This will be equal to 16 000 pine trees :poly122:!

So here is my question, if i use Occlusion Culling, will this be possible to maintain? Because the forest is not supposed to be very graphically exhausting on its own. Quite simple textures and models. It is just that if a computer have to render 16000 pinetrees at once (not including rocks and so forth) it will die!

Thanks in advance for any answers.
Nuclear Angel

Replies

  • MikeF
    Offline / Send Message
    MikeF polycounter lvl 19
    depends on a few things:
    1) whats the destination platform (pc, mac, ios, android?)
    2) how high a polycount on the tree's
    3) Can you use fog?

    i'd prolly go at this in the same sens that older consoles handled large open areas, short render distance, masked by fog
  • commander_keen
    Offline / Send Message
    commander_keen polycounter lvl 18
    Unity now has builtin lod so you should be able to populate the environment freely. If you use the builtin terrain tree system those also have billboard lods. with 2km you should probably be ok with float accuracy. Something like this would only be suitable for desktop platform. I would not suggest trying to do something like this on a mobile device. Having the environment loop around when you get close to the edges will be tricky.
  • gsokol
    Yea this is entirely possible. Like commander_keen said...target platform is important..but I'm just going to assume you are looking to target PC.

    Unitys terrain tools are pretty easy to use..once again, like commander_keen said, the terrain can do a decent job of loding/culling.

    Really...you don't need to be worrying about if Unity can handle it..but moreso..the best way to lay out the level to run smoothly. Of course you wouldn't want to render 16,000 trees at once....but setting up occlusion culling will help.
  • Lamont
    Offline / Send Message
    Lamont polycounter lvl 15
    You will need to design the environment carefully to take advantage of occlusion culling in a forest scene. You can not do batching without Pro version, but on desktop, you will be fine for power. Look into additive loading and unloading of data(Pro version), for instance, terrain in the master level, and sections of the world in different scene files, and load as needed based on distance.
  • Lamont
    Offline / Send Message
    Lamont polycounter lvl 15
    Here is some code that might set you in a direction for loading data based on distance.... this is Unity Java.. I can make a C# version... give me a few minutes.

    Please note, this code is from when I started getting deeper into programming... will update the C# version.
    #pragma strict
    var levelBackground : GameObject[];
    var camMoveSpeed = 50;
    var camMoveDistance = 50;
    var moveingUp = false;
    var nullObject : GameObject;
    
    function Start()
    {
    moveingUp = true;
    }
    
    function Update()
    {
    moveForward();
    moveBackwards();
    MoveTheBlocks();
    }
    
    
    function MoveTheBlocks()
    {
    var NullZ = Mathf.PingPong ((Time.time*camMoveSpeed), camMoveDistance);
    nullObject.transform.position = Vector3(nullObject.transform.position.x, nullObject.transform.position.y, NullZ);
    transform.position = Vector3(transform.position.x, transform.position.y, NullZ);
    
    var sections = transform.position.z;
    
    if(sections >= camMoveDistance - 1)
    {
    moveingUp = false;
    
    }
    else
    if(sections <= (camMoveDistance - camMoveDistance) + 1)
    {
    moveingUp = true;
    
    }
    
    }
    
    function moveForward()
    {
    for(var block in levelBackground)
    {
    
      if (Vector3.Distance(nullObject.transform.position, block.transform.position) > 160 && moveingUp == true)
    	{
    	block.transform.position.z = block.transform.position.z+240;
    	}
    }
    }
    
    function moveBackwards()
    {
    for(var block in levelBackground)
    {
    	  if (Vector3.Distance(nullObject.transform.position, block.transform.position) > 160 && moveingUp == false)
    	{
    	block.transform.position.z = block.transform.position.z - 240;
    	}
    }
    
    }
    
    
    
  • Lamont
    Offline / Send Message
    Lamont polycounter lvl 15
    Sorry, I feel asleep ;) This is C# version. All edits and improvements welcome. The idea is that you can tell the switch what direction you are going in and to add/remove tiles as needed. You can call the next nearest tile to load as well...
    using UnityEngine;
    using System.Collections;
    
    public class LevelScrolling : MonoBehaviour {
    public GameObject[] levelBackground;
    public GameObject nullObject;
    string direction;
    void Start(){
    		direction = "forward";
    		StartCoroutine("MoveDir");
    	}
    	void Update(){
    		if (Input.GetKey("up"))
    		{
    		direction = "forward";	
    		}
    		if (Input.GetKey("down"))
    		{
    		direction = "backward";	
    		}
    		Debug.Log (direction);
                    
    	}
    
    //Not much changed, just cleaned it up a bit... you can apply this to three dimentions.
    void MoveTheBlocks(string dir)
    {
    Vector3 nPos = nullObject.transform.position;
    foreach(GameObject block in levelBackground)
    {
    Vector3 bPos = block.transform.position;
    float mDist = Vector3.Distance(nPos,bPos);
    
    	if(mDist> 160)
    		{
    				if(dir == "forward")
    				{
    					Debug.Log(block.name+"UP");
    					block.transform.position = new Vector3(bPos.x,bPos.y,bPos.z+240);
    				}
    				else if(dir == "backward")
    				{
    					Debug.Log(block.name+"DOWN");
    					block.transform.position = new Vector3(bPos.x,bPos.y,bPos.z-240);
    				}
    				else{
    					block.transform.position =block.transform.position;
    				}
    				return;	
    		}
    			
    }
    
    }
    
    private IEnumerator MoveDir()
    {
        do
        {
    	switch(direction)
    			{
    			case "forward":
    
    			MoveTheBlocks("forward");
    			break;
    			case "backward":
    			MoveTheBlocks("backward");
    			break;
    				
    			}
        yield return null;
        }
    		
    		while (nullObject);
    		{
    			Debug.Log ("Waiting for user Input");
    			
    		}
    		
    		
    }	
    	
    	
    
    }
    
    
    
    
  • Nuclear Angel
    Offline / Send Message
    Nuclear Angel polycounter
    Thank you guys so much for this feedback. I have really been dormant on this, not been on to this forum or anything and just found these replies. (starting to learn to use Polycount more active) So I am for replying now. But the game is no in development.

    @ MikeF : I am aiming for a PC release in early April, and maybe later do a xbox and PS 3 release. But thanks for the feedback.

    @ Gsokol : Thanks for the feedback from you too, and yes PC it is. I have made a custom tree with my own geometry and textures taken from the forest outside my home. And they have 600 polys total and they load 2 materials (one for branches and one for the Bark). Don't know so much about the technical stuff though like what a computer can handle and so forth.

    @ Lamont : I really appreciate that you put down the time in to making an C# version, I will look in to it now when alpha is over. Because I am only a student and i work on this alone. But I made an alpha, and I actually surprised myself with making an good looking playable alpha. So now when I know that I am actually capable of doing this game. I am working like a crazy person on this project now.

    I put down below here some pictures of the Alpha of the game

    alpha01.png

    alpha02.png
Sign In or Register to comment.