Exemplo n.º 1
0
    def enableDefaultEarthScattering(self):
        """ Adds a standard scattering model, representing the atmosphere of
        the earth. This is a shortcut for creating a Scattering instance and
        precomputing it """
        earthScattering = Scattering()

        scale = 1000000000
        earthScattering.setSettings({
            "atmosphereOffset": Vec3(0, 0, - (6360.0 + 9.5) * scale),
            "atmosphereScale": Vec3(scale)
        })
        earthScattering.precompute()
        self.setScattering(earthScattering)
Exemplo n.º 2
0
 def _precomputeScattering(self):
     """ Precomputes the scattering model for the default atmosphere if
     specified in the settings """
     if self.settings.enableScattering:
         earthScattering = Scattering(self)
         scale = 150
         earthScattering.setSettings({
             "atmosphereOffset": Vec3(0, 0, - (6360.0 + 0.7) * scale),
             "atmosphereScale": Vec3(scale)
         })
         earthScattering.precompute()
         earthScattering.provideInputs()
         self.scattering = earthScattering
     else:
         self.scattering = None
Exemplo n.º 3
0
 def _precomputeScattering(self):
     """ Precomputes the scattering model for the default atmosphere if
     if specified in the settings """
     if self.settings.enableScattering:
         earthScattering = Scattering(self)
         scale = 100000
         earthScattering.setSettings({
             "atmosphereOffset": Vec3(0, 0, - (6360.0 + 9.5) * scale),
             "atmosphereScale": Vec3(scale)
         })
         earthScattering.precompute()
         earthScattering.provideInputs()
Exemplo n.º 4
0
    def enableDefaultEarthScattering(self):
        """ Adds a standard scattering model, representing the atmosphere of
        the earth. This is a shortcut for creating a Scattering instance and
        precomputing it """
        earthScattering = Scattering()

        scale = 1000000000
        earthScattering.setSettings({
            "atmosphereOffset":
            Vec3(0, 0, -(6360.0 + 9.5) * scale),
            "atmosphereScale":
            Vec3(scale)
        })
        earthScattering.precompute()
        self.setScattering(earthScattering)