Search Unity

Amplify Impostors - Next Generation Billboards

Discussion in 'Assets and Asset Store' started by Amplify_Ricardo, Jul 10, 2018.

  1. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,389
    Cool!

    Same results with a Spherical Impostor? Wondering if part of the problem is the parallax effect of the octahedron at close distances. (this is expected, octahedrons give you smooth blending but breakdown at close distances)
     
  2. Squize

    Squize

    Joined:
    Jul 17, 2015
    Posts:
    18
    Hey Ricardo,

    Hopefully a simple question.

    I'm using imposters for a quite large forest (Wow, I seldom use the forums, but to embed an image it's got to be via a URL? Anyway I've attached a grab instead for reference) using the Use SpeedTree Hue / Hue Variation, I'm setting the Hue via a MaterialPropertyBlock, but it's breaking instancing.

    I had a delve into AmplifyImpostorsConfig.cginc and made an amend, as the speed tree hue wasn't giving the effect I wanted:

    Code (CSharp):
    1.     #ifdef EFFECT_HUE_VARIATION
    2. //        float hueVariationAmount = 1frac( ai_ObjectToWorld[0].w + ai_ObjectToWorld[1].w + ai_ObjectToWorld[2].w);
    3. //        viewPos.w = saturate(hueVariationAmount * _HueVariation.a);
    4.         viewPos.w = saturate(1 * _HueVariation.a);
    5.     #endif
    Which isn't ideal.
    So to get to the point, does using the Hue settings break instancing, and is there an easy way to drop in a "Tint" colour into the shader. If I have to do a custom shader via ASE then I wouldn't need to do a custom bake one too would I, as I just literally want to multiply the albedo value by an instanced colour value.

    Thanks for you time.
     

    Attached Files:

  3. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,389

    Hello there,

    I'll have to pass this on to our devs as I'm unsure if this is expected or if there's something we can recommend.

    I'll be in touch soon.
     
    Squize likes this.
  4. FiveFingerStudios

    FiveFingerStudios

    Joined:
    Apr 22, 2016
    Posts:
    510
    Is it possible to limit the view angle of an imposter so that the textures it uses can be higher resolution?

    For example, I want to make some background houses as imposters, but even at 4K, they look too blurry. I know this house will never be seen from the back or sides, so having those in the textures, wont help with the visuals. I would rather limit the angle and make each sample larger in the texture.
     
    Last edited: May 31, 2021
  5. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,389
    Not at the moment, the bakes are all spherical; perhaps in the future as we expand our bake options.

    For now, I'd recommend using Spherical impostors which allow you to set individual values for X and Y frames; decreasing this increases individual frame resolution. You may also adjust the actual texture resolution. Note that the parent transform controls the baking orientation(the object that contains the Impostors component), you could also try adjusting it.

    upload_2021-5-31_9-57-12.png
     
    FiveFingerStudios likes this.
  6. JediNizar

    JediNizar

    Joined:
    Nov 13, 2016
    Posts:
    111
    Hi, I know that Oculus Quest, and other Mobile-based VR devices are not officially supported,
    but what about PC VR does it work with?
     
  7. SecretItemGames

    SecretItemGames

    Joined:
    Apr 13, 2012
    Posts:
    32
    Hi,
    We are using Unity 2020.2.7f1 and Universal Render Pipeline.
    Amplify Impostors, Amplify Shader Editor and all URP plugins are installed.

    Unfortunately we have a problem with Impostors and our custom shader, so we tried to make a very basic shader just like thecali a few posts above. The Color node is set as property.
    AmplifyTestShader.png


    Then we created a new Bake Preset and inserted the shader TestAmplifyBake and TestAmplifyRuntime.
    The yellow cube uses the shader TestAmplify
    PresetResults.png

    As you can see if we use our Bake and Runtime Shader in preset the impostor cube is invisible.
    If we use the default BakingURP shader the cube will be white.

    We read the documentation about Custom Baking multiple times
    (http://wiki.amplify.pt/index.php?title=Unity_Products:Amplify_Impostors/Custom_Baking)
    but we can't even get a basic yellow cube impostor.

    Would be very helpful if someone could tell us what we are doing wrong here so we can fix our other, more complex shaders.

    Thanks.
     

    Attached Files:

  8. SizemoreMFVR

    SizemoreMFVR

    Joined:
    Jun 2, 2021
    Posts:
    1
    I saw that there is no official support for Oculus Quest - are there any plans to support that platform eventually?
     
  9. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,389
    Impostors work with desktop VR; just keep in mind that they breakdown at close distances, this might not be ideal for your project as it's more noticeable in VR, always best to test it.

    Hey, there could be a couple of things happening here.

    1. Please note that if you're baking a color only from the PBR original material, you're not going to get the same exact result. Ideally, you'll want to bake the necessary data to render the impostor. Your base color Alpha could also be set to 0/Black.

    2.It's critical that your property names match between your Impostor and original shader used on the model you're trying to bake; tap the padlock to ensure that the name is set, keep an eye on our editor console on the lower right for any warnings of auto-renamed properties.

    upload_2021-6-3_12-29-32.png

    3. Consider using and alternative, the default bake already takes in the Albedo color of your Standard Universal Lit shader, you can just use your own Runtime shader without the need to use a custom bake; just create a Runtime shader with a Color Tint, for example, and adjust it as required.

    upload_2021-6-3_12-36-46.png


    To be clear, there's no single color/unlit impostor runtime template at the moment.


    Quest 1 is unlikely, possibly Quest 2 and future versions; this is something that we're exploring later on but we don't have an ETA at the moment.
     

    Attached Files:

  10. moltke

    moltke

    Joined:
    Apr 28, 2019
    Posts:
    109
    im having trouble with some of my amplify imposters reflecting the base of the object at the top when i get close; take for instance these trees it is showing the stump at the top of the tree when i get close. How can i fix this?

    upload_2021-6-3_20-23-50.png upload_2021-6-3_20-24-12.png
     
  11. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,389
    Hey,

    There's a couple of things that could be happening, which impostor type are you using? Octahedrons will break down at close distances, you can try adjusting Parallax and Clip on the material but that's expected; HemiOctahedrons on the other hand are not meant to be rendered from below.

    I recommend either using Spherical Impostors, adjusting the impostor mesh(Impostor Component), or attempting the edge artifact fix as mentioned in our wiki: http://wiki.amplify.pt/index.php?title=Unity_Products:Amplify_Impostors/Manual#FAQ

    In any case, this could also be specific to your Asset, we'd be happy to test it on our end.

    Hope it helps!
     
  12. marcrem

    marcrem

    Joined:
    Oct 13, 2016
    Posts:
    340
    Hi,

    I was wondering if you had any ETA on batch baking? (multiple objects)

    Thanks!
     
  13. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,389
    Hello!

    Sorry, not at the moment.
     
  14. julienc

    julienc

    Joined:
    Nov 26, 2012
    Posts:
    5
    I am considering buying amplify impostor to replace my own simplistic code (which is combining trees and generating simplified billboards).

    When looking at an asset like imp it seems to be more focused on a drawmeshinstance approach (independent mesh/material). Still, in my code i am generating a combined mesh by merging identical meshes with identical materials. This also decreases draw calls.

    More precisely i plan to:
    - bake an impostor to reuse its mesh/material (browsing the forum it seems I will need to do that in the editor and not in runtime)
    - generate a combined mesh by copying uvs/normals/other required properties and also adjust vertex positions (centered on pivot) to new positions

    But I need to know if you think possible to edit the shader to handle such a combined mesh (all of the same impostor tree). I have some skills to edit the shader code but do not want to rewrite everything.
     
  15. marcrem

    marcrem

    Joined:
    Oct 13, 2016
    Posts:
    340
    Thanks. Alternatively, it would be great to create an impostor from script and save it in a folder. I would be able to implement a batch task system that would do it for all my objects. But I suppose that's exactly what you plan on doing internally when you manage to support batch baking.
     
  16. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,389
    Hey there, thank you for your interest.

    I'm afraid our shader does not support that type of behaviour, nor are we able to guide you in building something like that at this time.

    Thank you for understanding! Yes, something along those lines that would eliminate the need to create individual impostors.
     
  17. buc

    buc

    Joined:
    Apr 22, 2015
    Posts:
    123
    Seems like Amplify Impostors are not compatible with Instanced Indirect mode.
    Impostors are drawn on top of the camera-position and disappear from time to time, depending on the camera-angle with Instanced Indirect mode and Vegetation Studio Pro.


    How can you add support for Instanced Indirect?
    Unity Version 2020.3.7f1
    Amplify Impostors 0.9.7.007
    VSpro 1.3.4

    Since Impostors work (using only them, but not in instanced indirect mode) and Vegetation Studio Pro works with all the other shaders too, I'm pretty clueless and would need some help.
     
    Last edited: Jun 15, 2021
  18. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,389
    Hello,

    Have you contacted the VS Pro developer? Since it's using a 3rd-party asset, we're not sure if this is entirely specific to our package. In any case, we will create a ticket for further testing on our end whenever possible.

    We did fix a few issues since AI 0.9.7.007, including a specific URP shadow related problem. Are you using URP?

    I recommend picking up the latest version from our site, this is not on the Asset Store just yet.
    http://amplify.pt/download/
     
  19. buc

    buc

    Joined:
    Apr 22, 2015
    Posts:
    123
    Yes, I have contacted the VS Pro developer. He says, that Instanced Indirect needs to be done in the shader first, after that there are 3 lines of code to be added in order to integrate it into VS pro and since it works with other shaders in Instanced Indirect, he means, that this has to be resolved on the shader side.

    Since you have been pretty fast, you missed my editing-changes in the post. After some additional tests it came out that it is not only a shadow problem, just that sometimes the whole tree is drawn on top of the camera position and sometimes the shadow only.
     
  20. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,389

    No problem. But just to be clear, have you attempted to edit the shader code? This is not something we currently provide.
     
  21. buc

    buc

    Joined:
    Apr 22, 2015
    Posts:
    123
    After I've tested if it works out of the box and failed I've tried to add the 3 lines of code, as adviced by the developer of VS pro.
    What do you mean with "This is not something we currently provide.". Is Instanced Indirect not supported?
     
  22. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,389
    Sorry, just to be absolutely clear, you tried to add the 3 lines of code and it still does not work, that is what you mean?

    I meant specifically regarding the VS Pro requirements; we've had some users successfully use it in the past but these changes were made a while back, it's not something I can share here. What I can do is create a ticket for further examination by one of our developers that will attempt to use AI with the version you mentioned above.

    Which renderer are you using?
     
  23. buc

    buc

    Joined:
    Apr 22, 2015
    Posts:
    123
    I'm using Standard/Builtin. It is still not working, also tried with the new version from amplify website.

    The asset GPU Instancer is converting the shader automatically and makes it work with Instanced Indirect within their own asset. But I'm using GPUI Instancer only for GameObjects and using VS pro for trees, because of the better (more naturally) distribution of the trees compared to the default terrain placement.
     
  24. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,389
    Thanks for the details, we'll keep you posted.

    I'm a bit confused now, are you using this adjusted shader on your trees as well? Seems like we now have 2 other packages involved, this needs to be tested and confirmed on our end exactly as you have it.
     
  25. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,389
    Any chance of sample directly to support@amplify.pt? This could save time.
     
  26. buc

    buc

    Joined:
    Apr 22, 2015
    Posts:
    123
    So GPU Instancer get's it somehow solved to take the Octahedron shader and convert it automatically for using it with Instanced Indirect. I've just mentioned this, because this indicates that it somehow is possible.
    Now, VSpro unfortunatly doesn't offer an automatic converter, but instead assumes that the shader itself supports Instanced Indirect and if this is the case, it can be integrated with additional 3 lines of code, except the shader developer adds VSpro support out of the box. These are the magic 3 lines, from VSpro support forum:

    // compile directives
    #include "VSPro_HDIndirect.cginc"
    #pragma instancing_options procedural:setupVSPro
    #pragma multi_compile GPU_FRUSTUM_ON __
     
  27. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,389
    It is possible, provided that the changes are made. We can't know for sure what exactly is not working there without testing.
     
  28. SnaiperoG

    SnaiperoG

    Joined:
    Apr 6, 2015
    Posts:
    66
    Hello. Is amplify impostors good for mobile? How impostors works? Does it make transparent texture or not? I just did a search of this topic by mobile keyword and cant find, is it good for mobile or not. I see that its not officially supported but some ppl use it for mobile anyway.
     
  29. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,389
    Fine on mobile(OpenGL 3.x and higher), makes cutouts. What we don't support is Mobile VR.
     
  30. SnaiperoG

    SnaiperoG

    Joined:
    Apr 6, 2015
    Posts:
    66
    Got it thanks
     
    Amplify_Ricardo likes this.
  31. BruceLeeLiXiaoLong

    BruceLeeLiXiaoLong

    Joined:
    Apr 23, 2017
    Posts:
    7
    Hi, man, I've been using this tools to bake our speed trees for LOD2, but the Ambiant Occlution map and Speculator map are totally black. we are using unity 2019.4.17f1, seamly like this tools only support 2019.2 ???? we should buy it or not? thanks! Please contanct me by my email: lixiaolong@ztgame.com
    or my phone: +86 189 1757 8636
    Please soon.. thx
     
  32. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,389
    Hello,

    Please don't duplicate questions, we received you're email. If you prefer we can continue here. I'm a bit confused by your question, you're using it but you're asking if you should buy it?

    Anyway, AI, supports a broad range of Unity versions. We need to know exactly which shader your original asset uses and which AI version you're using. (About > Amplify Impostors > About).

    An example would be great, thanks!
     
  33. BruceLeeLiXiaoLong

    BruceLeeLiXiaoLong

    Joined:
    Apr 23, 2017
    Posts:
    7
    upload_2021-6-21_17-51-10.png
     

    Attached Files:

  34. BruceLeeLiXiaoLong

    BruceLeeLiXiaoLong

    Joined:
    Apr 23, 2017
    Posts:
    7
    I mean. I should buy or not, I think company already bought it. why Emission & Occlusion is black? I emailed to you
     
  35. BruceLeeLiXiaoLong

    BruceLeeLiXiaoLong

    Joined:
    Apr 23, 2017
    Posts:
    7
    upload_2021-6-21_18-10-5.png

    we need the right one LOD2 is like Left said one which has AO effect.
     
  36. BruceLeeLiXiaoLong

    BruceLeeLiXiaoLong

    Joined:
    Apr 23, 2017
    Posts:
    7
  37. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,389
    Next time, please try to condense all information into a single post.
    Do you want to proceed here or via email?

    About the issue: Is this a speedtree tree? Which shader is is the original model using, and what's your current Unity version?

    If you're using a custom shader on the original asset this is likely the cause of the problem, please elaborate.
     
    Last edited: Jun 21, 2021
  38. BruceLeeLiXiaoLong

    BruceLeeLiXiaoLong

    Joined:
    Apr 23, 2017
    Posts:
    7
    please answer me by email. thx. when U are online? I need reatime support。
     
  39. BruceLeeLiXiaoLong

    BruceLeeLiXiaoLong

    Joined:
    Apr 23, 2017
    Posts:
    7
    Hi, which one U are going to reply quick? email or here? I'm waiting.... or pay money for extra vertion????
     
  40. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,389
    We're clearly on different time zones, real time communication is not going to work. We need you stop sending the same information via email and here, please stop contacting us via the forum.

    Since you have not chosen a single method of communication, we will now only respond via email, thank you. Check your inbox, we re-sent our questions.
     
    Last edited: Jun 22, 2021
  41. marcrem

    marcrem

    Joined:
    Oct 13, 2016
    Posts:
    340
    Excuse me for the extra pollution, but now I know why I'm not in the assets business <3
     
    Acissathar and Amplify_Ricardo like this.
  42. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,389
    It's hard to get to the actual problem at times but we're here to help.
     
  43. Wawwaa

    Wawwaa

    Joined:
    Sep 30, 2017
    Posts:
    165
    Hi. Whenever I try to bake with octahedron + 32 axis frames Unity crashes without success. Both on mac and PC. Using HDRP v10. Resolution does not affect the result. Any settings other than 16 axis frames causes crash. Happens on any kind of topology. MY PC has 32 GB Ram, even there I confirmed this behavior. Using latest version of Amplify Impostors. It seems like an editor script bug related to axis frames field, maybe indicating that suspicion helps... How can I bake with 32 axis frames?
     
    Last edited: Jun 28, 2021
  44. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,389
    Hey there!
    What texture size are you using?
    Please share the exact bake parameters so that we may check it out on our side. (screenshot)
     
  45. Clamibot

    Clamibot

    Joined:
    Jun 28, 2021
    Posts:
    6
    I want to start out with this: great job on making this asset! It's pretty amazing.

    I am running into one small problem though. I skimmed through this thread and found other occurrences of people having problems baking impostors (impostors came out white), but those problems were due to them using unsupported shaders.

    I'm having a problem where when I try and bake an impostor for speedtree objects, it comes out white. However, impostors come out fine if I bake one for an object that uses a standard URP material.

    The Amplify Impostors wiki explicitly says that the asset supports speedtrees. Am I doing something wrong?

    I'm using the Universal Render Pipeline if that makes a difference. Thanks in advance for your help!
     
  46. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,389
    Hey there, thanks!

    Yes, it does support Speedtree, it could be specific to your URP version. What are you currently using?
     
  47. Clamibot

    Clamibot

    Joined:
    Jun 28, 2021
    Posts:
    6
    Thanks for responding quickly.

    I am using URP version 7.3.1. Should I update to version 7.4.3?

    Also, I'm using Unity version 2019.4.1f1.

    Edit: I think I may have found what's causing the issue. I opened up the URP Speedtree 7 shader and found that the main texture property is named _MainTex instead of _BaseMap. Renaming this property to _BaseMap allowed the impostor to receive the proper color data.

    Unfortunately this causes the actual speedtree object to turn gray. It's a temporary workaround for forcing color data into the impostor, but I'll have to rename the main texture property back to _MainTex after baking the impostor so the speedtree has its colors.

    There has to be a better way to do this.
     
    Last edited: Jun 29, 2021
  48. Wawwaa

    Wawwaa

    Joined:
    Sep 30, 2017
    Posts:
    165
    Hi, texture size does not matter. I experienced the problem in all sizes from 2048 to 8196. The thing I found out is that if you move the axis slider, unity crashes while baking. If you do not move the slider (or enter a different number in the input field) bake is successful. Tried by altering pixel padding, it has no affect on this behavior. And, using octahedron baking... And, on Unity 2021.1.7, HDRP 11...
     
  49. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,389
    Hey, thanks for the additional details, this is definitely a problem on our end. The Speedtree shader should bake out of the box, I will pass this on to our developers for further examination.


    Hey there!

    Interesting issue, while I was not able to replicate the crash I'm getting some strange behavior in 2021.x resulting in incorrect bakes. Seems to be inconsistent, works some of the times, very odd.

    Would it be possible to test the specific asset you're trying to bake on our end? (support@amplify.pt)

    One of our developer is going to examine this further.

    Just to confirm, are you using the latest AI version? (Window > Amplify Impostors > About)
     
  50. Wawwaa

    Wawwaa

    Joined:
    Sep 30, 2017
    Posts:
    165
    [QUOTE="
    Hey there!

    Interesting issue, while I was not able to replicate the crash I'm getting some strange behavior in 2021.x resulting in incorrect bakes. Seems to be inconsistent, works some of the times, very odd.

    Would it be possible to test the specific asset you're trying to bake on our end? (support@amplify.pt)

    One of our developer is going to examine this further.

    Just to confirm, are you using the latest AI version? (Window > Amplify Impostors > About)[/QUOTE]

    Hi. Yes it is the latest version. How can I send you an example asset? By the way, just now, in another similar project in Unity 2020.3.7, I added a missing definition of PUNCTUAL_SHADOW_FILTER_ALGORITHM for SHADOW_CUSTOM (if i remember right) to some hlsl file and now it does not crash but it bakes empty. Maybe this gives some idea about what might be the problem. However, I will do additional testing. There were some shader errors caused by upgrading to HDRP 10 that i fixed myself, i am not sure it is me breaking the functionality. Will try on a new project.