Home Unreal Engine

odd UDK Material questions

greentooth
Offline / Send Message
fearian greentooth
Hey guys, I've been experimenting with some material tricks and particle effects, and I've run into some questions I can't google my way out of.

#1 - Can I get emissive textures to show up properly on a two sided material? at the moment the 'outside' face has emissive effects, but the 'inside' face does not.

#2 - Is there a way to make random numbers in the material editor? I want to apply a random texture to my model, but I would much rather the material do it than set up a whole bunch (~34 variations) of particle emitters in the same systems. I want to randomly select a colour within a range, and randomly select one of four diffuse textures.

Edit: #2b - Can I have a parameter that allows me to choose which channel of a texture is used in a material?
DoubleEdit: Strike that, Yes you can, use a component mask to filter the channels and make that a parameter!


#3 - Just to be clear on this, I can't have particle effects coming out of my particles right? If I have a particle system spawning random rocks, I couldn't have those rocks be on fire? I'm sure I'm missing something here, but I'm new to cascade.

Thanks for any help! <3

Replies

  • JamesWild
    Offline / Send Message
    JamesWild polycounter lvl 8
    fearian wrote: »
    Hey guys, I've been experimenting with some material tricks and particle effects, and I've run into some questions I can't google my way out of.

    #1 - Can I get emissive textures to show up properly on a two sided material? at the moment the 'outside' face has emissive effects, but the 'inside' face does not.

    #2 - Is there a way to make random numbers in the material editor? I want to apply a random texture to my model, but I would much rather the material do it than set up a whole bunch (~34 variations) of particle emitters in the same systems. I want to randomly select a colour within a range, and randomly select one of four diffuse textures.

    Edit: #2b - Can I have a parameter that allows me to choose which channel of a texture is used in a material?
    DoubleEdit: Strike that, Yes you can, use a component mask to filter the channels and make that a parameter!


    #3 - Just to be clear on this, I can't have particle effects coming out of my particles right? If I have a particle system spawning random rocks, I couldn't have those rocks be on fire? I'm sure I'm missing something here, but I'm new to cascade.

    Thanks for any help! <3

    1) Not sure about this
    2) Use a noise texture for random inside materials. HLSL/GLSL have no inbuilt rand() equivalent.
    You might be able to generate a random material parameter from inside Cascade.
    2b) There's also a tag on the texture sample node for each of the four channels, no need to explicitly filter.
    3)Don't know sorry.
  • ambershee
    Offline / Send Message
    ambershee polycounter lvl 17
    3) No, you have to built it into one particle system.
  • imbueFX
    Offline / Send Message
    imbueFX polycounter lvl 5
    1) Yes this should work without a problem. If you are having issues with something not showing on the reverse side, my first guess is that you're using a fresnel/camera vector/reflection vector that is returning negative angles for the opposite side, thus not displaying. I usually fix this with an ABS expression. Otherwise you need to post your material graph so I can get a better idea of what may be causing this.

    2) To randomly pick between textures, you're best using subUVs and using the random function. Doing it in the material is possible, but you are then overcomplicating things and increasing instruction count for something already built into Cascade.

    2b) As a small tip, at our studio we filter individual channels through a DOT product since it only returns a scalar value. So textrue sample into dot product, and then something like a dynamic parameter or vertex color if you can sacrifice it.

    3) Yes, use the 'emitter initial location' module, then use the name of the emitter you want to follow.
  • fearian
    Offline / Send Message
    fearian greentooth
    Thankyou so much, James, Ambershee, and imbueFX! I'm still working my way through my 'bug list' so it's going to take me a while to try this stuff but I can't wait to get stuck in!

    imbueFX: 1) Yup, spot on it's a Fresnel based emissive. I'll post more if I can't get it working.

    I've just resubscribed to 3dmotive specifically to check out your particle tutorials, so thanks for those too!


    I'll be putting up a PnP thread for this project soon.
Sign In or Register to comment.