Using extremely large objects and small objects in the same scene?

I want to make a sci-fi animation, but whenever I make something like a planet to scale relative to a spaceship, I seem to be getting weird floating point inaccuracy errors. How do I handle a situation like this? Can I use false perspective? What about compositing two different scenes together? What is the "correct" way to handle a scene like this?

Here's a screenshot of what's happening(a 6.3 km radius sphere and a 20 m side cube).

There's weird vertex shifting in Cycles too:

• Could you maybe include a screenshot of what is going wrong? Mar 5, 2021 at 18:00
• I added a picture. Mar 5, 2021 at 19:52
• @PGmath do you know how the answer to this? Mar 6, 2021 at 16:48
• It reminds me one very old blender conference presentation (I can not found it) it was exactly about this space galactic animation ... they explaned ho w to trick this with two scenes somehow connected by camera? ... Mar 27, 2021 at 11:10
• Is it possible that you could find this presentation? Mar 27, 2021 at 16:39

As mentioned, another option is to use Forced Perspective. This is where an object's distance appears to be different to its actual distance due to how it appears and/or moves.

By placing an object in the middle-distance and parenting it to the Camera's location, it can move as if it were actually placed "at infinity" - so that it moves in relation to the background.

This can be achieved using the 'Child of' constraint with the settings set to enable Location but to disable rotation (since we want its position to be based on the viewpoint but not to be affected by the rotation of the camera).

Here's the result using the default cube and a default size icosphere placed at a slight distance. Note that I've added some static stars to the background to make it more apparent that the sphere is appearing static in relation to the background and making it appear more ‘planet sized’ since it doesn’t change as the camera moves around the foreground objects :

Blend file included for reference

• Big fan of this approach :). Even in CGI there's still a place for old-school movie tricks. Mar 27, 2021 at 13:51
• How would you get realistic reflections with this approach? Mar 27, 2021 at 16:38
• The “distant” object is in the correct place from line of sight from the camera so there will be some offset for any reflections in other objects. However, the offset will be proportional to the distances between the “distant” object and the relative positions of the camera and object. Provided you ensure the “distant” object is significantly further away than the distance between the camera and the object, the inaccuracies in the reflection should be insignificant and unnoticeable in most cases. Move “planet” further away for more accurate reflection. Mar 27, 2021 at 17:22

I'm not particularly experienced with working to such extremes so there may be a better accepted solution to this but I would probably opt for using the compositor to combine the different elements (very large scale and much smaller scale).

The reasons for the distortion are - as you say - due to floating point innaccuracies. Floating Point representations of numbers are very good to storing both large and small numbers alike. However, there is a limit to the precision of the value that can be held and the precision is essentially in proportion to the value being stored.

So, for example, a vertex only 100m from the origin with a precision of 0.001% would only drift by +/- 0.001m (ie, 1mm) - probably not an issue. However, a vertex at 1000 times the distance from the origin could drift by up to 1000 times the amount - ie, 1m. For the surface of a large planet, 1m innaccuracy of a vertex probably isn't too much of a concern, but for a 20m scale spaceship it would be really significant and noticeable. (Note: Floats are actually far more precise than this so the real effect would be far less than this, but it's a good value in order to demonstrate the cacluation.)

As you proposed, by rendering the large and small scale objects in different scenes - with each appropriately scaled and clipping distances chosen to minimise precision errors - you can avoid the problem and simply composite the results to produce the final render.

• Thank you, I appreciate the answer. I am going to wait a while longer to see if there are any better ones, but if they are not, I will mark this as solved. Mar 6, 2021 at 19:50
• Also I have a question about this method. Is there anyway to get indirect lighting with this method, or would i have to use fake area lights? Mar 7, 2021 at 0:34
• Yes - you’d need to setup the scene to provide the indirect light from the planet - although you could just render out a view of the planet and place it on a plane in the right place and make it invisible to the camera. Mar 7, 2021 at 10:39