Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

i need help with scripting

Discussion in 'Scripting' started by MACIEJOCH, May 24, 2022.

  1. MACIEJOCH

    MACIEJOCH

    Joined:
    May 23, 2021
    Posts:
    4
    Hi im new to unity 3D and i don't know how to make that bloom in post processing is getting more intense the closer you get to the object with script. Thanks for your help.
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    36,947
    Steps to success (DO NOT ADVANCE UNTIL ALL PRIOR STEPS WORK!):

    - identify the post processing "thing" that produces the bloom you want. If you cannot, then go back to the post-processing tutorial where you started from

    - once you have the "thing" that does this, identify the property that makes it "more intense", eg, the property you can manipulate by hand in the editor.

    - now that you have the two above things positively and unambiguously identified, make a script that takes a reference to the volume and adjusts the requisite property. Make the script set it to max. Make the script set it to middle. Make the script set it to none. Make sure you ARE unambiguously manipulating what needs to change.

    - finally compute an appropriate value for this intensity based on distance. You may find an
    AnimationCurve
    object useful for this sort of a lookup curve computation.
     
  3. MACIEJOCH

    MACIEJOCH

    Joined:
    May 23, 2021
    Posts:
    4
    it works now, thanks for your help