Header image for blender test

blender test

ability to build a blender script

Prompt

Act as a Senior Blender Technical Artist and Python (bpy) Developer. I need a complete, standalone, production-ready Blender Python script that creates a scientific visualization of "Earth's Magnetosphere Deflecting the Solar Wind" from a blank file. ### SCENE REQUIREMENTS & COMPOSITION: 1. Spatial Layout: - Sun positioned in the upper-right area. - Earth positioned in the lower-left area. - Both celestial bodies must be visible and properly proportioned within a cinematic 16:9 camera framing. 2. Celestial Bodies: - Sun: High-emission glowing sphere, accompanied by an intense warm Point Light that is explicitly parented to the Sun object. Add an outer semi-transparent corona mesh. - Earth: A UV sphere with a procedural shader (blue oceans, landmasses, and polar caps using noise/color ramp) plus a slightly larger outer sphere with a Fresnel/Layer-Weight glowing atmosphere rim. 3. The Magnetosphere (Magnetic Field): - Dipole Field Lines: 4 to 6 smooth curved Bezier spline loops arching from Earth's North to South poles, glowing with a soft cyan/blue emission. - Bow Shock Shield: A mathematically smooth parabolic dish/dome (DO NOT use boolean or raw vertex deletion cuts that leave jagged/sawtooth polygon edges) placed in front of Earth facing the Sun, using a semi-transparent golden/orange Fresnel emission shader. 4. Solar Wind & Deflection Physics: - An emitter hidden inside the Sun that streams glowing golden/yellow particles toward Earth. - Zero gravity in space (effector_weights.gravity = 0). - Deflection Mechanism: Do NOT rely solely on hard particle collision (which causes an erratic shrapnel bounce). Combine the smooth bow shock surface with a repulsive Force Field and a directional Wind Field so particles smoothly decelerate, bend along equipotential field lines, and sweep aerodynamically around Earth into a long magnetotail. 5. Rendering, Camera & Technical Constraints: - Background: Pure pitch-black space. - Camera: Aligned to frame the entire trajectory of the particles from Sun to Earth. - Compositor: Add a glare/bloom node for lens flares on the Sun. - Output settings: Safely configure video output (try FFMPEG/MPEG-4 first, but use a try/except fallback to PNG in case the user's Blender build was compiled without FFmpeg codecs). - Collision properties: Use safe hasattr checks for 'damping_factor' and 'friction_factor' to ensure version compatibility across Blender 3.x, 4.x, and beyond. Provide only clean, executable Python code with clear comments explaining each section.

Response not available

Drag to resize
Drag to resize

Response not available

Drag to resize