2.5 instance feature at 50%

Hi all!

I seen on blender page the feature about the current aloha 0 and there is the new instance support with an example about 1.25bilion face rendered in 20 minutes with 200mb of memory usage.

BUT, if I try to reproduce it the problems are 2.

  1. for example with an array or a particle system, blender crash if I have too many obejcts in the scene though I use Box visualisation. But in the blender page the author seems doesnt have the same problem.

  2. In render time Blender take a LOT of time to calculate how many instance are in the scene, for example if I have 2000 instances of a simple sphere, Blender takes 2 minutes for calculate JUST how many instances are there. And if I have 50000 instances, Blender takes almost 35 minutes! just for calculate this factor…

I mean, meabe I’m doing something wrong, or meabe this feature is not so optimized .

What do you think about?

I’m on a i7 with 12gb ram and quadro FX. (vista64)

thankyou!

Have you tried using a tree type that is not ‘Auto’ or ‘Octree’ and are you making sure that ‘instances’ is checked?

This may sound stupid but you want to make sure you have the basics of using instances down first.

of course…

did you tried to do some experiments? the proof of the pudding !

Im using this file (just remember to setup the render panel for instance :wink: )

The problem is there is a bug in the official alpha release. If you check JesterKings blog, he has fixed it in the 25133 release on graphicall. I am currently using the BLI BVH with instances on for my asteroid field and it certainly makes a difference in render time, compared to the old OctTree method.

thnakyou for reply!

Okay guys here it is teleportation “WITHOUT SCRIPTS”

2 things you need to know.

How to make a collision in the game engine for 3 objects and

How to switch cameras using logic blocks.

Teleportation has been an issue with Blender.
In reality, instancing is just the use of Camera switching between scenes. And fortunately, it can be easily done with the logic blocks.

And unfortunately for all of you 2.4x folks, this tutorial is in Blender 2.5 !

First set up 4 scenes.

Make sure each scene is in “Blender game” mode -which is set in the menu beside the scene selection menu. ( If you don’t do this for EACH SCENE, you will not be able to instance your scenes, nor will you be able to add game physics)

Label each scene as something you can remember because you will be switching back and fourth a lot.

  1. Scene (default)
    2 Scene2 2boy
  2. Scene3 3boy
    4 Scene 4 4boy

Or you can use any names you wish for your 4 scenes.

In each scene have a plane(mesh) and a sphere (mesh) and a camera.
So you will be creating 4 cameras 4 planes and 4 Spheres.

Position the sphere about 4 blender units above the sphere so that when you trigger a collision you can see it clearly.
Be sure to position your camera so that you can clearly see the collision happen from the camera’s point of view when ever you push “P”!

Now IN EACH SCENE-- parent the camera of that scene to the sphere of that scene.
You must do this because you want the camera to sense the collision of the sphere (mesh) and not necessarily of the Camera itself.

Next set your collision for the sphere and the plane in each sphere.

Just go to the physics tab with your sphere selected and set it to rigid body.
Then check the collision bounds box(leave it as the default settings)
Next select your parented camera an set it to rigid body as well in the physics tabs.
Then check its collisions bounds and leave it as the default bounds settings.

Do this for each and every scene.

Then select your plane and set it to static. be sure to check the collision bounds box and leave it as the default setting.

Do this for each and every scene. So you will be doing this 4x for 4 separate scenes.

The result will be the sphere dropping(and bouncing) onto the plane when you press “P” In all 4 scenes…

THE MAGIC of TELEPORTATION aka Instancing:
In scene 1 ( your first scene)
1 Select your camera(only) open 2 sensor blocks name each of them as “COLLISION”

2Open 2 Controller blocks and leave them as “AND”

3 Open 2 Actuator Blocks and set the first one to “CAMERA” then set the OB: to "Camera.001 ( this should be the camera ID of your second scene) Leave everything else in this block alone.
Set the second Actuator block to “Scene” then choose ‘Set Scene’ in the menu.
then type in the “Scene ID” of your second scene. Leave everything else alone.

  1. repeat steps 1-3 for your sphere mesh in this scene.

  2. Go to your second scene. Apply simple collisions to your sphere, plane and camera as you did in your first scene. ( again if you aren’t in “Blender game” this will not be possible)

In scene 2 ( your second scene)
1 Select your camera(only) open 2 sensor blocks name each of them as “COLLISION”

2Open 2 Controller blocks and leave them as “AND”

3 Open 2 Actuator Blocks and set the first one to “CAMERA” then set the OB: to "Camera.002 ( this should be the camera ID of your third scene) Leave everything else in this block alone.
Set the second Actuator block to “Scene” then choose ‘Set Scene’ in the menu.
then type in the “Scene ID” of your third scene. Leave everything else alone.

  1. repeat steps 1-3 for your sphere mesh in this scene.

  2. Go to your third scene. Apply simple collisions to your sphere, plane and camera as you did in your second scene. ( again if you aren’t in “Blender game” this will not be possible)

At this point you should go back to your first scene and push “P” to test it out.

If you teleport to the next scene then you got it right.
Also experiment with moving once you get into the next scene. This is done of course by additional basic logical block x,y,z, assigning to the sphere mesh.

If you want, you can repeat this process forever with more and more scenes. Thus we now have instancing . You can also loop this method by setting the fourth seen to instance back to the first scene (theoretically).

Now I will test this theory out further; and depending on the capacity of a single scene, we will know how far we can actually push the BGE. If it continues to work well, then that means the BGE won’t get cluttered with high res meshes. Thus, we can have better game graphics by strategically and wisely using this instance method, and we don’t need Scripts.

Happy Blending.