3D Workspace
Home
Assets
Affiliate Program
Sign up/Log in
?
Upgrade
DCC Bridge
Anonymous1771013253
02-14 01:59
Model Name
3d house model
Tags
architecture
architecture rendering
architecture rendering stylized
architecture stylized
house
import bpy
rendering
rendering stylized
stylized
Prompt
import bpy from mathutils import Vector # ---------------------------- # 1. Scene Setup # ---------------------------- bpy.ops.object.select_all(action='SELECT') bpy.ops.object.delete() # पुरानी चीज़ें हटाओ # Ground bpy.ops.mesh.primitive_plane_add(size=20, location=(0,0,0)) ground = bpy.context.active_object ground.name = "Ground" # House (Simple cube as placeholder) bpy.ops.mesh.primitive_cube_add(size=4, location=(0,0,2)) house = bpy.context.active_object house.name = "House" # ---------------------------- # 2. Camera Setup # ---------------------------- bpy.ops.object.camera_add(location=(-10, -10, 5)) camera = bpy.context.active_object camera.name = "Camera" # Camera track to house track = camera.constraints.new(type='TRACK_TO') track.target = house track.track_axis = 'TRACK_NEGATIVE_Z' track.up_axis = 'UP_Y' # ---------------------------- # 3. Camera Animation # ---------------------------- camera.keyframe_insert(data_path="location", frame=1) camera.location = Vector((10, -10, 6)) # नई position camera.keyframe_insert(data_path="location", frame=120) # Optional: Smooth interpolation for fcurve in camera.animation_data.action.fcurves: for kf in fcurve.keyframe_points: kf.interpolation = 'BEZIER' # ---------------------------- # 4. Lighting (Cloudy/Monsoon feel) # ---------------------------- bpy.ops.object.light_add(type='SUN', location=(0,0,10)) sun = bpy.context.active_object sun.data.energy = 2 # Add cloudy background (HDRI optional) bpy.context.scene.world.use_nodes = True bg = bpy.context.scene.world.node_tree.nodes.new('ShaderNodeTexSky') bg.sky_type = 'HOSEK_WILKIE' bg.sun_direction = (0.5, 0.5, 1) # ---------------------------- # 5. Rain particles # ---------------------------- bpy.ops.mesh.primitive_plane_add(size=20, location=(0,0,10)) rain_emitter = bpy.context.active_object rain_emitter.name = "RainEmitter" bpy.ops.object.particle_system_add() psys = rain_emitter.particle_systems[0] psys.settings.count = 1000 psys.settings.frame_start = 1 psys.settings.frame_end = 120 psys.settings.lifetime = 50 psys.settings.physics_type = 'NEWTON' psys.settings.normal_factor = 0 psys.settings.gravity = -9.8 # Material for raindrops mat = bpy.data.materials.new(name="RainMat") mat.use_nodes = True bsdf = mat.node_tree.nodes["Principled BSDF"] bsdf.inputs['Transmission'].default_value = 1.0 rain_emitter.data.materials.append(mat) # ---------------------------- # 6. Render Settings # ---------------------------- bpy.context.scene.camera = camera bpy.context.scene.render.engine = 'CYCLES' bpy.context.scene.frame_end = 120 print("Setup complete: Play animation to see cinematic monsoon view!")
Detailed Info
Related Models
Enter invite code
Enter invite code to get credits!