QUESTION Is it possible to make the customized camera screen rotate around?

Discussion in 'Apps' started by kevinlu, Aug 21, 2023.

  1. kevinlu

    kevinlu New Member

    Joined:
    Aug 20, 2023
    Messages:
    8
    Likes Received:
    0

    The video footage is post-production.I would like to know how to realize 3d surround camera effect by modifying the code.
    I am implementing screen mapping with the following code (the code is incomplete, just showing the idea), but I am unable to rotate the screen, and would like to know if I can do it somehow? I am learning to write programs, but am not yet capable of solving this problem.

    [SCRIPTABLE_DISPLAY_...]
    MESHES = zhongkong_3d
    RESOLUTION =2048, 2048
    DISPLAY_POS = 0, 0
    DISPLAY_SIZE =2048,2048
    FORCE_UPDATE_AFTER = RENDERING_CAMERA_6 ; this display is going to be updated each time navigator is drawn
    KEEP_BACKGROUND = 0 ; and without clearing step, so we would draw on top of navigator
    SCRIPT = '
    function update()
    if Input ~= TURNSIGNAL_RIGHT then
    -- If gear is not reverse, activate navigator:
    --ac.setDynamicTextureShift("car::yibiao.dds", 1) ---- this function sets its opacity, it can do more
    --display.image{pos = vec2(0, 0), size = vec2(886, 195), image ="car::yibiao.dds"}
    ac.setRenderingCameraActive("RENDERING_CAMERA_6", false) -- pause rendering camera
    ac.setRenderingCameraActive("RENDERING_CAMERA_3", false) -- pause rendering camera
    return -- and we’re done here, so let’s stop
    end

    ac.setDynamicTextureShift("car::3D arround.dds", 1) ---- this function sets its opacity, it can do more
    display.image{pos = vec2(0, 0), size = vec2(2048, 768), image ="car::3D arround.dds"}
    --*********************************--

    [RENDERING_CAMERA_6]
    DYNAMIC_TEXTURE_ID = camera_rear_6 ; here, we will create “dynamic::camera_rear6” texture
    POSITION = -1.80, 1.5, -3.5
    DIRECTION = 0.023, -0.03, 0.07
    INCLUDE_CAR = 1
    REFRESH_RATE = 60 ; doesn’t need to update too often, those in-car cameras are usually pretty nasty
    INTERIOR_ONLY = 1 ; stop rendering if camera is not interior one
    CLIP_NEAR = 0.001 ; the way it’s positioned, it needs to render things that are very close (bits of car)
    FOV = 65 ; huge FOV to get that authentic look
    RESOLUTION = 1990, 1243 ; and massive resolution too
    ACTIVE_BY_DEFAULT = 0 ; inactive by default, activated by a script
    WITH_LIGHTING = 1
    --*********************************--
     
  2. fughettaboutit

    fughettaboutit aka leBluem

    Joined:
    Jul 21, 2014
    Messages:
    1,125
    Likes Received:
    383
    are you missing the closing ' ?
    upload_2023-8-22_15-43-48.png
     
  3. fughettaboutit

    fughettaboutit aka leBluem

    Joined:
    Jul 21, 2014
    Messages:
    1,125
    Likes Received:
    383
    to make it easier for yourself, use this in config:
    SCRIPT = outside.lua

    and paste script in that second file 'outside.lua':
    upload_2023-8-22_16-32-57.png
     
  4. fughettaboutit

    fughettaboutit aka leBluem

    Joined:
    Jul 21, 2014
    Messages:
    1,125
    Likes Received:
    383
    and maybe check out this
    upload_2023-8-22_17-3-41.png
     
  5. kevinlu

    kevinlu New Member

    Joined:
    Aug 20, 2023
    Messages:
    8
    Likes Received:
    0
    Thank you! From this just refer to the implementation of the button toggle screen.
    I don't see the camera surround though, would this effect be more difficult to achieve?
    My idea to implement this is by driving the camera to rotate around the car in a 5 meter radius at 0.1°/frame, rendering once per frame and not stopping until it is 360° around. But I don't know if I can realize it through code .
    Another feature that needs to be implemented is to click on the screen and drag it so that the camera view inside the screen follows, this is perhaps more difficult?
     
: camera
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice