Unity Community


Page 42 of 146 FirstFirst ... 3240414243445292142 ... LastLast
Results 821 to 840 of 2920

  1. Posts
    328
    HI there how can i convert/make my shaders work for both PC/mac and iPhone.

    When i tries to generate my app for iPhone all my materials appear black.

    thanks in advance
    rahul


  2. Location
    32.71° N, 117.15° W
    Posts
    5,419
    @stramit - That fixed it, awesome! Thanks!

    Ok, now I'm trying to do two more things:

    First, I'd like to modify the shader so that the "Fallback" works properly. Currently the shader is supposed to fallback to a "Diffuse" shader. But if I test this in the editor by setting SM 2.0 emulation, it doesn't work (the object disappears). How do I fix this? (Dooh! :P I just re-read your release notes and see that this is coming later.) Edit: I just double checked the shader docs and apparently it should work but doesn't. Any idea why?

    Second, I still want to add a slider to the cloud's alpha so I can control the cloud density from script. I tried a couple things but didn't get the result I was looking for. How do I do this?

    Many thanks again!
    Last edited by bigkahuna; 01-10-2011 at 02:55 AM.


  3. Location
    Boston, Ma
    Posts
    2,440
    Quote Originally Posted by stramit View Post
    I made a mistake, forgot to check in a fix to a bug and it slipped though to release....
    It's cool... you could just download my original sgraph and you will see what i am talking about...


  4. Location
    Boston, Ma
    Posts
    2,440
    Quote Originally Posted by stramit View Post
    Hrmm, try playing with the 'cull' value. Turn it to back, see if this fixes the issue, then turn it back to off. (Could you PM me the .sgraph file and I will have a look).

    This is cool... it's fixed ... i will release the next version of my shader soon... with gloss mask support...

  5. Code Maker

    Location
    Canberra
    Posts
    849
    Quote Originally Posted by bigkahuna View Post
    @stramit - That fixed it, awesome! Thanks!

    Ok, now I'm trying to do two more things:

    First, I'd like to modify the shader so that the "Fallback" works properly. Currently the shader is supposed to fallback to a "Diffuse" shader. But if I test this in the editor by setting SM 2.0 emulation, it doesn't work (the object disappears). How do I fix this? (Dooh! :P I just re-read your release notes and see that this is coming later.) Edit: I just double checked the shader docs and apparently it should work but doesn't. Any idea why?
    For fallback to work properly you need to make sure that the inputs to your shader have the same names as in the fallback shader. For example the diffuse shader (from memory) has an input called _Color. You need to make sure that your shader has matching inputs. Because when it falls back it needs to know the names of the inputs to use.

    Second, I still want to add a slider to the cloud's alpha so I can control the cloud density from script. I tried a couple things but didn't get the result I was looking for. How do I do this?

    Many thanks again!
    I'm not at home at the moment so I can't do up a screenshot now. If anyone else wants to feel free. Otherwise... I'll have a look tonight for you!
    Have you tried the Strumpy Shader Editor?


  6. Location
    South Korea
    Posts
    2
    Fastest Bug Fix!! Thank you^^. Very Nice Tool!!


  7. Location
    Boston, Ma
    Posts
    2,440
    Hey everyone, for those using Unity (Free), you can see your shader details if you just hit the export button... it is updating for me in real time when i hit the button... i am working on a second version of my shaders for me to share... enjoy...


  8. Location
    Boston, Ma
    Posts
    2,440
    Hey everyone, this is the shader that I am putting together for all of my models... I am still trying to tweak it so i can just use this shader just for everything... i don't know how it will run so I hope you will will test it and let me know what you think. I will also do a video of it in action (using Unity free)

    Here are some quick notes:

    Diffuse Map: Plug in your Colour Map here

    Normal Map: Plug in your Normal Map here (Must be a tangent space)

    Emission: Plug in your emission texture (I have it set to use the Alpha in my shader, but I may change it so that you can make an alpha channel in your diffuse texture to save on performance)

    Emission Colour: Allows you to set the colour of the glow.

    Emission Strength: I don't have Unity Pro but this will set the strength of the emission based on it's texture. I think it will glow if you overdrive the value. This is a float value.

    Specular Map: Plug in your spec map here (this is not the spec map we are used to). This is used to tighten the highlights on the model.

    Highlight Tightness: This is used to shrink or widen the highlight on your model.

    Gloss Map: This is your main specular texture. This will work together with the "Specular Map" and create an interesting effect on your models. IMPORTANT: I would recommend using this and your spec map together. Removing the Gloss Map will disable the specular map!

    Gloss Strength: This will drive the strength of your Gloss Map. Useful for making things nice and shiny. Use above .2 for any effect. 0 will disable it.

    Gloss Masking: This is useful if you only want to affect certain parts of your model... I have it set to alpha so you will have to make an alpha channel in your Gloss map to save on performance

    Masking Strength: This will allow you to change the value of the masking on your surface... 0 will enable masking, and any above will start to dim the masking effect.

    Enjoy!
    Attached Files


  9. Location
    COSTA MESA, CA. USA
    Posts
    1,277
    hey ! This looks awesome ! i'll download this and have a look. I don't know shader coding but maybe you could use the alpha channel of the main texture or the specular one too so that it optimize the rendering. thanks for sharing.


  10. Location
    Bellevue, WA
    Posts
    14
    Quote Originally Posted by rahuxx View Post
    HI there how can i convert/make my shaders work for both PC/mac and iPhone.

    When i tries to generate my app for iPhone all my materials appear black.

    thanks in advance
    rahul
    We had this issue as well, and setting render settings in Unity to OpenGL 2.0 fixed it. Hope that helps.


  11. Location
    Boston, Ma
    Posts
    2,440
    Quote Originally Posted by rosor View Post
    hey ! This looks awesome ! i'll download this and have a look. I don't know shader coding but maybe you could use the alpha channel of the main texture or the specular one too so that it optimize the rendering. thanks for sharing.
    Thanks dude, glad you like it... I am still trying to optimise the shader for performance but I made the specular and other things separate considering that i like to use coloured specular maps... and i wanted full control... I will continue to develop this shader... I'm also making one for the eyes as well...


  12. Posts
    1,042
    Hey looks great! congrats on getting more comments then any sticky threads in the showcase section
    "Go outside, the graphics are amazing!"

    Check out these FX packs on the Asset Store!
    Fire Pack
    Explosion Pack
    Water Pack
    Weather Pack
    Northern Lights


    Any reviews/ratings would be appreciated. It help me out a lot!


  13. Location
    Columbia, SC
    Posts
    420
    Quote Originally Posted by Tinfoilfez View Post
    We had this issue as well, and setting render settings in Unity to OpenGL 2.0 fixed it. Hope that helps.
    You mean graphics emulation? Because even when you compile for iPhone, everything is black, I have tried all manner of configurations for build settings to no avail.


  14. Location
    Bay Area
    Posts
    360
    @Neptune_Imaging awesome shader, I'm inspired to make my own now.
    Last edited by TheLlama; 01-12-2011 at 10:26 PM.


  15. Location
    Boston, Ma
    Posts
    2,440
    Thanks man... I need to create some examples and share the new graph... i also made one specifically for eyes


  16. Location
    32.71° N, 117.15° W
    Posts
    5,419
    Anyone make a good transparent glass yet?


  17. Location
    Zürich, Switzerland
    Posts
    26,572
    Quote Originally Posted by noradninja View Post
    You mean graphics emulation? Because even when you compile for iPhone, everything is black, I have tried all manner of configurations for build settings to no avail.
    What you need is:
    1. A 3GS generation or later device. iPhone 3G or 2nd gen itouch won't work
    2. set the build settings to armv7 and not modify the AppController (ie don't set the define for OPENGLES 20 to 0!)
    3. ensure that you only use nodes that work at all (this should commonly show up in the editor with an error already)
    4. ensure that you don't overdo it as you are rather limited on the instruction number but even more registers and interpolators


  18. Location
    Columbia, SC
    Posts
    420
    Quote Originally Posted by dreamora View Post
    What you need is:
    1. A 3GS generation or later device. iPhone 3G or 2nd gen itouch won't work
    2. set the build settings to armv7 and not modify the AppController (ie don't set the define for OPENGLES 20 to 0!)
    3. ensure that you only use nodes that work at all (this should commonly show up in the editor with an error already)
    4. ensure that you don't overdo it as you are rather limited on the instruction number but even more registers and interpolators
    Allright:

    1. Device is a 4th Generation iPod Touch 8GB (with the Facetime cameras). I can build using the built in Unity shaders (example- BumpSpecLightmap) and as long as I set the Target Platform to Universal (ARM6 and ARM7) in the Player Settings, I am good. If, however, I try to use a shader generated with SSE, everything is rendered black (like it is in the Editor if you dont turn on OpenGLES 2.0 emulation).
    2. I dont alter the output from Unity except to explicitly define arm7 as the build target; we dont bother with anything older as our stuff requires the pixel shader hardware.
    3. I am pretty sure what I am using is fine, maybe you could look it over real quick:



    I mean, the worst node in there is the fresnel calculation; everything else is simple math.

    Should result in this, its how things look in the Editor (with OpenGLES 2 emulation on of course):



    4. Shader only has 24 ALU's and 3 Textures; it is based on the Rim Light sgraph that came with SSE. Not sure where the failure point is here, but I will say that nothing I have compiled out of SSE displays correctly on my 4G iPT, which indicates to me more work to be done on SSE's side of things to properly support iOS (which has been talked to death earlier in the thread). If I am making a mistake somewhere or anyone here has gotten things to work properly on iPT4/iPhone4/iPad, please let me know.


  19. Location
    Boston, Ma
    Posts
    2,440
    Quote Originally Posted by bigkahuna View Post
    Anyone make a good transparent glass yet?
    I want to take a crack at that but I don't think Unity 3 (non pro) can do refractions without certain buffers... it begs the question, if i could create refraction using SSE, I've already finished the cornea shader for character eyes (no refraction for performance reasons)... and one i can get a pro license, I would love to added a reflection buffer to my shader to get real time reflections.


  20. Location
    PA, USA
    Posts
    1,088
    Refraction would require renter to texture functionality so that's pro only.
    "To go on an adventure, one must discard the comforts and safety of the known and trusted." - Vert

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •