Пример #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)
Пример #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
Пример #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()
Пример #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)