m2v_img2video
input
URL
https://s22-def.ap4r.com/bs2/upload-ylab-stunt-sgp/ai_portal/1726860545/8yvcGDdO6r/alena_51502_a_metal_construction_with_raindrops_on_it._there_ar_af9191d8-6469-437c-93ac-11582da0427a.png
prompt
// Initialize the scene
scene init {
    width: 800,
    height: 600,
    background: "rain_background.png"
}

// Define characters
character Person1 {
    position: [100, 400],
    sprite: "person1.png",
    animations: {
        blink: ["blink_frame1.png", "blink_frame2.png"],
        mouth_open: ["mouth_open.png", "mouth_close.png"]
    }
    physics: true  // Enable physics for the character
}

character Person2 {
    position: [300, 400],
    sprite: "person2.png",
    animations: {
        blink: ["blink_frame1.png", "blink_frame2.png"],
        mouth_open: ["mouth_open.png", "mouth_close.png"]
    }
    physics: true
}

// Blinking animation
animation blink(person) {
    loop every 3-5 seconds {
        person.set_animation("blink")
    }
}

// Body movement
animation body_movement(person) {
    loop {
        person.position.y += random(-2, 2)  // Slight vertical movement for natural body motion
        wait(0.1)  // Short pause for a more natural movement effect
    }
}

// Catching raindrops with the mouth
animation catch_raindrops(person, raindrop) {
    if raindrop.intersects(person.mouth) {
        person.set_animation("mouth_open")
        raindrop.destroy()  // Remove the raindrop once it's caught
    }
}

// Generate raindrops
object Raindrop {
    sprite: "raindrop.png",
    position: [random(0, 800), 0],
    physics: {
        gravity: 9.8,  // Apply gravity to the raindrop
        bounce: 0.2    // Slight bounce when hitting the ground
    }
}

// Continuous rain function
function rain() {
    loop {
        create Raindrop()
        wait(random(0.2, 0.5))  // Create raindrops at random intervals
    }
}

// Main function to control animations
function main() {
    start rain()
    
    // Start blinking animation for each character
    start blink(Person1)
    start blink(Person2)
    
    // Start body movement for each character
    start body_movement(Person1)
    start body_movement(Person2)
    
    // Check if raindrops are caught by the characters
    loop {
        for each raindrop in Raindrops {
            catch_raindrops(Person1, raindrop)
            catch_raindrops(Person2, raindrop)
        }
        wait(0.1)  // Short pause to allow proper interaction checks
    }
}

// Start the scene
scene start main()

negative_prompt
cfg
0.6
duration
5
imageCount
1
kling_version
1.0
tail_image_enabled
false
camera_json
{"type":"empty","horizontal":0,"vertical":0,"zoom":0,"tilt":0,"pan":0,"roll":0}
camera_control_enabled
false
biz
klingai