Search Unity

Question billboard "atlas image" exact position ?

Discussion in 'World Building' started by merfolkjh, Mar 10, 2023.

  1. merfolkjh

    merfolkjh

    Joined:
    Sep 18, 2021
    Posts:
    20
    Hello,

    I try to build a billboard of a tree.

    according to this : https://docs.unity3d.com/ScriptReference/BillboardAsset.html


    ----
    I made "8 screenshots" of my object with 8 cameras at exact position ref this documentation,
    ... to create a sort of texture atlas image ...
    for the "Shader "Universal Render Pipeline/Nature/SpeedTree7 Billboard" shader

    The result seems valid, i have a working rendered billboard, with different faces......face are all changing according to position, but not displayed in the correct order.


    The "screenshot 0" should be at which position in the atlas ?
    The "screenshot 1" should be at which position in the atlas ?
    what should be at the 9th position since there is only 8 images ?
    ...

    upload_2023-3-10_23-47-29.png


    can't find the exact requirement... i tried to guess according to different object shape and color ... but then i create a new one and it's wrong :(


    If anyone can help me ,
    thanks a lot !
     
  2. merfolkjh

    merfolkjh

    Joined:
    Sep 18, 2021
    Posts:
    20
    Ok i think i finally got it :

    in case it may help someone in the future :


    /*
    text coord 0= (0.00, 0.67, 0.33, 0.33)
    text coord 1= (0.33, 0.67, 0.33, 0.33
    text coord 2= (0.67, 0.67, 0.33, 0.33)
    text coord 3= (0.00, 0.33, 0.33, 0.33)
    text coord 4= (0.33, 0.33, 0.33, 0.33)
    text coord 5= (0.67, 0.33, 0.33, 0.33)
    text coord 6= (0.00, 0.00, 0.33, 0.33)
    text coord 7= (0.33, 0.00, 0.33, 0.33)
    */

    last one is unused

    upload_2023-3-11_13-39-32.png
     

    Attached Files:

    mgear likes this.