diff --git a/monte_charge/monte_charge-5.blend b/monte_charge/monte_charge-5.blend index 7ad14b6..250692d 100644 Binary files a/monte_charge/monte_charge-5.blend and b/monte_charge/monte_charge-5.blend differ diff --git a/poppy_ergo_jr/ergo_jr-1.blend b/poppy_ergo_jr/ergo_jr-1.blend index 59295ba..8a659ed 100644 Binary files a/poppy_ergo_jr/ergo_jr-1.blend and b/poppy_ergo_jr/ergo_jr-1.blend differ diff --git a/portail_coulissant/portail_coulissant-18.blend b/portail_coulissant/portail_coulissant-18.blend index 83357a7..7c1c2bf 100644 Binary files a/portail_coulissant/portail_coulissant-18.blend and b/portail_coulissant/portail_coulissant-18.blend differ diff --git a/robot_haptique/robot_haptique-1.blend b/robot_haptique/robot_haptique-1.blend index 2f30bc7..c1f13c6 100644 Binary files a/robot_haptique/robot_haptique-1.blend and b/robot_haptique/robot_haptique-1.blend differ diff --git a/twin.py b/twin.py index f1a454c..e7f686e 100644 --- a/twin.py +++ b/twin.py @@ -130,14 +130,8 @@ def cmd_init(): # Configuration de l'écran bge.render.setWindowSize(int(twin_config[0][0].text),int(twin_config[0][1].text)) - quality_eevee=('NOSMAA', 'LOW', 'MEDIUM','HIGH','ULTRA') scene.objects['About']['quality'] = int(twin_config[0][2].text) - if quality_eevee[scene.objects['About']['quality']] == 'NOSMAA': - eevee.smaa_quality= 'LOW' - eevee.use_eevee_smaa = False - else: - eevee.use_eevee_smaa = True - eevee.smaa_quality= quality_eevee[scene.objects['About']['quality']] + twin_about.quality_apply(scene.objects['About']['quality'], True) # Ajout du Hud # scene.active_camera = scene.objects["Camera"] diff --git a/twin_about.py b/twin_about.py index 138b85b..86749dc 100644 --- a/twin_about.py +++ b/twin_about.py @@ -89,7 +89,6 @@ def open(): # Liens scene.objects['About_link-git'].color= color_link - scene.objects['About_link-git']['Text'] = "Dépôt des sources" # Pas de ô dans Blender scene.objects['About_link-gpl'].color= color_link scene.objects['About_link-upbge'].color= color_link scene.objects['About'].setVisible(True,True) @@ -294,18 +293,8 @@ def screen_down(cont): def quality_up(cont): if cont.sensors['Click'].status == JUST_ACTIVATED and cont.sensors['MO'].positive : - quality_txt=("Inconvenant", "Basse", "Moyenne", "Haute", "Épique") - quality_eevee=('NOSMAA', 'LOW', 'MEDIUM','HIGH','ULTRA') scene.objects['About']['quality'] +=1 - scene.objects['About_quality']['Text']= "Qualité : "+quality_txt[scene.objects['About']['quality']] - if quality_eevee[scene.objects['About']['quality']] == 'NOSMAA': - eevee.smaa_quality= 'LOW' - eevee.use_eevee_smaa = False - else: - eevee.use_eevee_smaa = True - # print (sys.platform) - if sys.platform=="linux": # Plantage sur Windows - eevee.smaa_quality= quality_eevee[scene.objects['About']['quality']] + quality_apply(scene.objects['About']['quality']) # Boutons < et > if scene.objects['About']['quality']==4: @@ -317,17 +306,8 @@ def quality_up(cont): def quality_down(cont): if cont.sensors['Click'].status == JUST_ACTIVATED and cont.sensors['MO'].positive : - quality_txt=("Inconvenant", "Basse", "Moyenne", "Haute", "Épique") - quality_eevee=('NOSMAA', 'LOW', 'MEDIUM','HIGH','ULTRA') scene.objects['About']['quality'] -=1 - scene.objects['About_quality']['Text']= "Qualité : "+quality_txt[scene.objects['About']['quality']] - if quality_eevee[scene.objects['About']['quality']] == 'NOSMAA': - eevee.smaa_quality= 'LOW' - eevee.use_eevee_smaa = False - else: - eevee.use_eevee_smaa = True - if sys.platform=="Linux": # Plantage sur Windows - eevee.smaa_quality= quality_eevee[scene.objects['About']['quality']] + quality_apply(scene.objects['About']['quality']) # Boutons < et > if scene.objects['About']['quality']==0: @@ -336,3 +316,93 @@ def quality_down(cont): if scene.objects['About']['quality']==3: scene.objects['About_quality-up'].setVisible(True,True) scene.objects['About_quality-up-colbox'].restorePhysics() + +## +# Qualité du rendu EEVEE de 0 à 4 +## + +def quality_apply(quality, start_flag=False): + + # Texte du About + quality_txt=("Inconvenant", "Basse", "Moyenne", "Haute", "Épique") + scene.objects['About_quality']['Text']= "Qualité : "+quality_txt[quality] + if start_flag== False and sys.platform!="linux": # Plantage sur Windows -> redémarrage après changement + return + + # Inconvenant + if quality== 0: + # eevee.use_eevee_smaa = False # Option obsolète depuis la version UPBGE 0.36 + eevee.use_taa_reprojection = False + eevee.use_ssr = False # Screen space reflection + eevee.use_gtao = False # Ambient occlusion + eevee.taa_render_samples = 1 + eevee.taa_samples = 1 + eevee.use_volumetric_lights = False + eevee.use_volumetric_shadows = False + eevee.shadow_cascade_size='64' + eevee.shadow_cube_size='64' + + # Basse + if quality== 1: + # eevee.use_eevee_smaa = True # Option obsolète depuis la version UPBGE 0.36 + eevee.use_taa_reprojection = True + # eevee.smaa_quality= 'LOW' # Option obsolète depuis la version UPBGE 0.36 + eevee.use_ssr = True # Screen space reflection + eevee.use_ssr_refraction = False # Screen space refractions + eevee.use_ssr_halfres = True + eevee.use_gtao = False + eevee.taa_render_samples = 32 + eevee.taa_samples = 8 + eevee.use_volumetric_lights = True + eevee.use_volumetric_shadows = False + eevee.shadow_cascade_size='1024' + eevee.shadow_cube_size='512' + + # Moyenne + if quality== 2: + # eevee.use_eevee_smaa = True # Option obsolète depuis la version UPBGE 0.36 + eevee.use_taa_reprojection = True + # eevee.smaa_quality= 'MEDIUM' # Option obsolète depuis la version UPBGE 0.36 + eevee.use_ssr = True # Screen space reflection + eevee.use_ssr_refraction = True # Screen space refractions + eevee.use_ssr_halfres = True + eevee.use_gtao = False + eevee.taa_render_samples = 64 + eevee.taa_samples = 16 + eevee.use_volumetric_lights = True + eevee.use_volumetric_shadows = False + eevee.shadow_cascade_size='1024' + eevee.shadow_cube_size='512' + + # Haute + if quality== 3: + # eevee.use_eevee_smaa = True # Option obsolète depuis la version UPBGE 0.36 + eevee.use_taa_reprojection = True + # eevee.smaa_quality= 'HIGH' # Option obsolète depuis la version UPBGE 0.36 + eevee.use_ssr = True + eevee.use_ssr_refraction = True + eevee.use_ssr_halfres = False + eevee.use_gtao = False + eevee.taa_render_samples = 64 + eevee.taa_samples = 16 + eevee.use_volumetric_lights = True + eevee.use_volumetric_shadows = False + eevee.shadow_cascade_size='1024' + eevee.shadow_cube_size='512' + + # Épique + if quality== 4: + # eevee.use_eevee_smaa = True # Option obsolète depuis la version UPBGE 0.36 + eevee.use_taa_reprojection = True + # eevee.smaa_quality= 'ULTRA' # Option obsolète depuis la version UPBGE 0.36 + eevee.use_ssr = True + eevee.use_ssr_refraction = True + eevee.use_ssr_halfres = False + eevee.use_gtao = True + eevee.taa_render_samples = 64 + eevee.taa_samples = 16 + eevee.use_volumetric_lights = True + eevee.use_volumetric_shadows = True + eevee.shadow_cascade_size='4096' + eevee.shadow_cube_size='4096' + diff --git a/twin_config.xml b/twin_config.xml index 0930431..5c10196 100644 --- a/twin_config.xml +++ b/twin_config.xml @@ -1,8 +1,8 @@ - 1071 - 602 - 1 + 1568 + 882 + 4 True diff --git a/volet_roulant/volet_roulant-18.blend b/volet_roulant/volet_roulant-18.blend index 6d4c09d..0855377 100644 Binary files a/volet_roulant/volet_roulant-18.blend and b/volet_roulant/volet_roulant-18.blend differ