Home Unreal Engine

Unreal Engine 4

Replies

  • OBlastradiusO
    Offline / Send Message
    OBlastradiusO polycounter lvl 11
    Trying to understand material functions. Does anyone know of any in depth video tutorials on this? I've tried You Tube but only found a couple videos on this.
  • Ramseus
    Offline / Send Message
    Ramseus polycounter lvl 13
    Well, what do you want to know? They're basically just a bunch of nodes compressed into one custom node. The main difference between making/using a material function to doing everything in one material is the use of functioninput nodes for values you want to control (and then plugging parameters into the inputs). Otherwise, they're just an easy (and more efficient!) way of doing things that you want in multiple materials.
  • OBlastradiusO
    Offline / Send Message
    OBlastradiusO polycounter lvl 11
    Thanks for the response! I'm just confused with the inputs like the vectors. scalar, etc and how they work. I know how Break materials and Make Materials work though.
  • OBlastradiusO
    Offline / Send Message
    OBlastradiusO polycounter lvl 11
    Anybody know how to paint in vines with a alpha mask using vertex painting? Been trying all day and can't seem to get it to work. :D

    2cwr69.jpg
  • SirCalalot
    Offline / Send Message
    SirCalalot polycounter lvl 10
    Looks like you are using the default gradient blending between vertices to define which texture is shown where.

    To get variation in your blending at its very base level, you'll need to multiply your Vines Alpha Map with the Vertex Colour node before plugging it into the 'Alpha' slot of your LERP function.

    Check out Chris Albeluhn's Vertex Blend Tutorial for some good explanations of the basics.
    (Granted this is for UDK, but the concepts still apply.)
  • OBlastradiusO
    Offline / Send Message
    OBlastradiusO polycounter lvl 11
    Thanks dude ill try that but I wanted the the black spaces in the vines to be transparent. Any way to do that? One more thing. Does anyone know why I keep getting this error "error X-4510 maxium ps_5_0 sampler register index (16) exceeded". I get it when I use two vertex blending materials at once using a material instance. I use UE4 $.6
  • ZacD
    Offline / Send Message
    ZacD ngon master
    Has anyone else played with the realtime distance field GI in the 4.7 preview? It works, but seems pretty noisy.
  • billymcguffin
    Offline / Send Message
    billymcguffin polycounter lvl 11
    ZacD, I can't find anything about that in the preview release notes. Do you have a link to any documentation on it?
  • ZacD
    Offline / Send Message
    ZacD ngon master
  • JedTheKrampus
    Offline / Send Message
    JedTheKrampus polycounter lvl 8
    I think the distance field GI in 4.7 is supposed to be screenspace only. Probably not worth using just yet. If you want some quick GI so you don't have to wait on Lightmass diffusefromprobes is probably a better bet right now.
  • radiancef0rge
    Offline / Send Message
    radiancef0rge ngon master
    The engineer working on that feature already mentioned it was super experimental
  • dzibarik
    Offline / Send Message
    dzibarik polycounter lvl 10
    Can someone help me with this?

    The material looks right in preview but totally broken in the main window.

    mkgOAGO.jpg
  • Vailias
    Offline / Send Message
    Vailias polycounter lvl 18
    Put something else reflective in the scene, or just assign a different reflective material. See if it reflects similarly. If so, its reflecting correctly, but the environment its sampling from isn't what you're wanting.
    Alternatively, what does your roughness map look like? The post processing and lighting intensity in game tends to be very different than in the material editor preview window. If your roughness is similar to the pattern you're seeing there, perhaps turn it down a bit.

    The preview window is just that, a preview in a very simple light environment, so its best to start there, but build in such a way that you can tweak your settings in game, since that's the end result you'll be seeing.
  • radiancef0rge
    Offline / Send Message
    radiancef0rge ngon master
    do you have a spec probe in your level
  • dzibarik
    Offline / Send Message
    dzibarik polycounter lvl 10
    yeah, the scene did it somehow. Gotta learn Unreal fast!

    plcul78.jpg
  • dzibarik
    Offline / Send Message
    dzibarik polycounter lvl 10
    Ok, so it might be a noob question and I'll start watching tutorials on Unreal tommorow but why my shadows dissapear after building lighting? I did some search and tried to adjust lightmap resolution up to 1024 but still no luck.

    DBFAgrB.jpg
  • S2Engine
    Offline / Send Message
    S2Engine polycounter lvl 10
    Are fog volumes not yet implemented in UE4?
  • Marcus_Aseth
    Offline / Send Message
    Marcus_Aseth polycounter lvl 9
    Hey guys, can someone link me the proper workflow for generating normal maps from 3ds max and xnormal that yeld flawless resoults inside UE4?
    The official documentation I followed didn't yeld good resoults,I think those infos are outdated... :poly141:
  • ZacD
    Offline / Send Message
    ZacD ngon master
    4.7 preview is actually synced with XNormal. Make sure every UV seam is a hard edge before you bake, because UE4 likes to make UV seams hard anyway. And make sure you triangulate your mesh before baking. Then make sure the smoothing groups in UE4 look correct after importing the lowpoly before you even apply a normal map. Obviously make sure that the green channel is flipped either in xNormal settings or after you bake.
  • Marcus_Aseth
    Offline / Send Message
    Marcus_Aseth polycounter lvl 9
    Thank you ZacD :):thumbup:
  • Xendance
    Offline / Send Message
    Xendance polycounter lvl 7
    dzibarik wrote: »
    Ok, so it might be a noob question and I'll start watching tutorials on Unreal tommorow but why my shadows dissapear after building lighting? I did some search and tried to adjust lightmap resolution up to 1024 but still no luck.

    DBFAgrB.jpg

    Lightmap resolution of what? The ground under the table?
  • Marcus_Aseth
    Offline / Send Message
    Marcus_Aseth polycounter lvl 9
    Hi guys,quick question : I made my terrain inside Worldmachine with the size of 14km. When I import the Heightmap into UE4, how can I tell UE4 that I want the landscape to be 14 km?! (which btw should be 1.400.000 engine units I think)

    I'm lost because I don't see a way to specify a precise Landscape size,help pls :(
  • dzibarik
    Offline / Send Message
    dzibarik polycounter lvl 10
    Xendance wrote: »
    Lightmap resolution of what? The ground under the table?

    the table itself. Should the landscape have lightmaps too?
  • dzibarik
    Offline / Send Message
    dzibarik polycounter lvl 10
    well, that was stupid. You should DECREASE lightmap resolution on BSP to have better shadows. I mean, why would you set it up like that?????
  • WarrenM
    Legacy. You're right tho, it's non-intuitive.
  • Quack!
    Offline / Send Message
    Quack! polycounter lvl 17
    Just a heads up, you need to enable "Compute binormal in the pixel shader" in Xnormal to get your normals to synch with Unreal 4.7+. Quick image:

    1GsnL7K
  • gloriousczar
    Offline / Send Message
    gloriousczar polycounter lvl 6
    Hey is there any way I can change the buffer visualization to show smoothness instead of roughness? In my material I have a 1- node right before my map is plugged in so I'm always working with smoothness because I find it more intuitive but when I use the view mode its backwards from what I'm used to and its really annoying.
  • Obscura
    Offline / Send Message
    Obscura grand marshal polycounter
    Quack! wrote: »
    Just a heads up, you need to enable "Compute binormal in the pixel shader" in Xnormal to get your normals to synch with Unreal 4.7+. Quick image:

    1GsnL7K

    Good to know, thanks! :thumbup:
  • JedTheKrampus
    Offline / Send Message
    JedTheKrampus polycounter lvl 8
    ZacD wrote: »
    4.7 preview is actually synced with XNormal. Make sure every UV seam is a hard edge before you bake, because UE4 likes to make UV seams hard anyway. And make sure you triangulate your mesh before baking. Then make sure the smoothing groups in UE4 look correct after importing the lowpoly before you even apply a normal map. Obviously make sure that the green channel is flipped either in xNormal settings or after you bake.

    I'd like to add to this that you should make sure to not export tangents and binormals with your lowpoly, because if you do that Xnormal will read your 3ds Max tangents and then your normal map will be synced to 3ds Max instead of Mikk.

    If you always have the Unreal import settings set to "Import normals and tangents" you basically don't need to worry about it (well, unless you have some regions where the normal map is repeated or mirrored) because both UE4 and Xnormal will read the tangents if they're there and calculate them if they're not there. That said, I think it's better to make sure you don't export tangents from Max.
  • Quack!
    Offline / Send Message
    Quack! polycounter lvl 17
    I'd like to add to this that you should make sure to not export tangents and binormals with your lowpoly, because if you do that Xnormal will read your 3ds Max tangents and then your normal map will be synced to 3ds Max instead of Mikk.

    If you always have the Unreal import settings set to "Import normals and tangents" you basically don't need to worry about it (well, unless you have some regions where the normal map is repeated or mirrored) because both UE4 and Xnormal will read the tangents if they're there and calculate them if they're not there. That said, I think it's better to make sure you don't export tangents from Max.

    Hmm, I know for a fact I did export tangents and binormals from max and imported in UE4 4.7 using "Import Normals" and was able to get the synced image above. So xnormal is overwriting?
  • JedTheKrampus
    Offline / Send Message
    JedTheKrampus polycounter lvl 8
    I dunno, let me test things out. Maybe it's an optional thing these days. That would be nice.
  • JedTheKrampus
    Offline / Send Message
    JedTheKrampus polycounter lvl 8
    OK, here are my results. These are all 128x128 bakes for MAXIMUM SPEED so ignore the ugliness please.

    First up I have a normal map baked in 3ds Max with Render to Texture, applied to a mesh that had tangents included, imported with Import Normals:

    ZUklBni.jpg

    Obviously not synced. Here's the next one. This is the same mesh exported with tangents to Xnormal and baked there.

    ke97amQ.jpg

    Again, obviously not synced. The errors are different, but still present.

    If I put a normal map that was baked in Xnormal against a mesh with no tangents exported from Max into the material I get this. (Of course I have triangulated, checked Calculate Binormal in Pixel Shader, the whole nine yards.)

    QPfPCS8.jpg

    If you look past the resolution there aren't any artifacts that would result from a lack of tangent space synchronization.

    Let's look at the normal maps themselves.

    VXUltH8.png

    On the left we have the normal map from Max. In the middle we have the normal map that Xnormal renders when you export the mesh with tangents. On the right we have the normal map that Xnormal renders when you export the mesh with NO tangents. If you compare the two Xnormal renders, you'll notice that a few of the faces are the same and a few are different. That's 2, 3, 4, and 5 that differ, and 1 and 6 that stay the same. If I look at cube face 1 or 6 in Unreal on the bake that had exported tangents, it actually looks fine, but the bake is incorrect.

    Since tangent space calculation depends on UV layout, I'm willing to hazard a guess that the reason your bake looked correct in Unreal is because you had every face in its own island. This is more likely to give similar results between different tangent bases, but it's also not sufficiently representative of a real mesh to be useful as a test.

    Just for fun let's import the tangents on the lowpoly mesh and see which normal maps look right.

    Here's the Max bake:

    LVIPCSB.jpg

    Here's the Xnormal bake with MikkTSpace-computed tangents

    zR8cvyi.jpg

    Blech. And finally, here's the Xnormal bake with the tangents imported:

    vP1fGuC.jpg

    So to summarize: Always bake in Xnormal. I'm not super experienced at working in Max so maybe there's something that I'm missing, but the normal map didn't seem to be correctly synced to either the mesh with exported tangents or the mesh without exported tangents. You shouldn't export tangents with your FBX because Xnormal will read them and use them to override the calculated tangent basis, giving you a bake that's synchronized to that tangent basis instead of Mikk. If you *do* export tangents with your FBX, be sure to import them into Unreal as well, because then you'll get a normal map that's synced to the tangent basis of the program that exported the tangents. But it's better to *not* export tangents with your FBX and let both Xnormal and Unreal calculate the tangents, because it means that bakes are reproducible regardless of Max/Maya/Modo preference, since you always bake in Xnormal with the tangent space supplied by Xnormal.

    This stuff can be really confusing and really easy to get wrong, so it's important to test your pipeline thoroughly and make sure that stuff is working as expected. This means that it's important to test the normal bakes with various UV layouts that are similar to how you would lay out your UVs in a real situation, and inspect as many sides as possible for correct synchronization, because the tangent space might break subtly and if you don't look carefully for it you're toast.

    TL;DR instructions: Export your low-poly model with FBX from Max with smoothing groups checked, split per-vertex normals checked if you used an edit normals modifier, tangents and binormals unchecked, and triangulate checked. Bake the normals with XNormal. In the XNormal options for the MikkTSpace plugin, make sure that Compute Binormal in Pixel Shader is checked, and make sure that you bake the tangent space normal map with X+Y-Z+ swizzle. When you take your mesh into Unreal Engine you should make sure that "Normal Import Method" in the import options is set to "Import Normals." When you take your normal map into Unreal Engine you should make sure that the texture compression is set to "TC_NormalMap" so that the engine can read the normal maps correctly. Then you should be able to enjoy 100% mathematically correct normal mapping, no sweat (lol).

    If you're exporting your mesh from Blender you should have the FBX options set to Smoothing: Off as this will export custom normals. Unreal will complain at you for not exporting smoothing groups but you can safely ignore it as of 4.7 because the reference MikkTSpace implementation doesn't depend on smoothing group data to compute the tangent basis. It doesn't matter whether you check "Tangent Space" or not because the tangent space Blender exports is the same as Xnormal would calculate. So you may as well leave it unchecked to save some disk space.
  • ZacD
    Offline / Send Message
    ZacD ngon master
    So in general with any application or file format, it should be this?

    - Export as an FBX or OBJ with no tangent information included, but do export normals

    - In Xnormal, make sure the MikkTSpace plugin has Compute Binormal checked, bake in tangent space as X+Y-Z+.

    - Make sure Import Normals is checked when you import the mesh into UE4, and the normal map is set to TC_NormalMap. You may get an error that you didn't include smoothing groups.

    Is that right?
  • JedTheKrampus
    Offline / Send Message
    JedTheKrampus polycounter lvl 8
    Pretty much. Note that while you shouldn't export tangents you should export normals in some form, whether that's smoothing groups, Maya hard edges, or custom normals. Also make sure you've taken care of all the usual suspects--for instance put a triangulation modifier at the end of your Blender modifier stack because Blender doesn't have any options to triangulate on export, and of course you should make sure that all parts of your mesh have UVs, and you should probably bake to 16 bits because it's good. If I'm just putting a bake straight into Unreal I'll usually save the bake from Xnormal as a 16 bit floating-point DDS because Unreal unfortunately can't read tifs.
  • Tzur_H
    Offline / Send Message
    Tzur_H polycounter lvl 9
    What if I use Modo to bake an OS and then Xnormal to convert to TS? Should I follow these instructions as well so in the converter window when Xnormal asks for low poly mesh mine should be without tangents and binormals etc. ?

    Thanks for going in depth JedTheKrampus..really helpful!
  • dzibarik
    Offline / Send Message
    dzibarik polycounter lvl 10
    @Tzur_H: as far as I remember Modo doesn't export tangents at all. But I may be wrong, it's better to ask Farfarer.
  • WarrenM
  • [Deleted User]
    Offline / Send Message
    [Deleted User] insane polycounter
    The user and all related content has been deleted.
  • JedTheKrampus
    Offline / Send Message
    JedTheKrampus polycounter lvl 8
    Yes, that's correct. Modo can't export its tangent basis yet so you don't really need to worry about that particular thing. Remember to triangulate though (Ctrl+T I think, it's been awhile since my Modo demo ran out)
  • dzibarik
    Offline / Send Message
    dzibarik polycounter lvl 10
    Yes, that's correct. Modo can't export its tangent basis yet so you don't really need to worry about that particular thing. Remember to triangulate though (Ctrl+T I think, it's been awhile since my Modo demo ran out)

    Shift - T. Pipeline IO has an option to triangulate on export if I remember right.
  • JedTheKrampus
    Offline / Send Message
    JedTheKrampus polycounter lvl 8
    I guess I was thinking of Blender, it's Ctrl+T in Blender. My modo skills are too rusty :)
  • LaurentiuN
    Offline / Send Message
    LaurentiuN polycounter
    OMG ue4 FREEEEEEEEEEEEEEEE...yeeey i bought it ffs
  • littleclaude
    Offline / Send Message
    littleclaude quad damage
    Couple of nice Unreal 4 shorts, the foliage is really coming on.

    [ame]www.youtube.com/watch?v=0zjPiGVSnfI[/ame]

    [ame]https://m.youtube.com/watch?v=0DG51glKipU[/ame]
  • FemCharles
    Offline / Send Message
    FemCharles greentooth
    Hey!
    I have just started playing around with UE4.

    I am having a problem with my skylight. I have a directional light in my scene with a skylight and BP_sky_sphere. In the view port i can see the skylight but when i drop into game it's just using the directional light. Do i have to do something else to get the skylight to work?
  • JedTheKrampus
    Offline / Send Message
    JedTheKrampus polycounter lvl 8
    What are the lights' mobility settings? Did you build lighting?
  • littleclaude
    Offline / Send Message
    littleclaude quad damage
    GDC 2015: Creating the Open World Kite Real-Time Demo in Unreal Engine 4

    Not sure how to embed Youtube on Polycount?
    www.youtube.com/watch?v=clakekAHQx0&feature=youtu.be&t=14m42s
    Xz8rdfP.jpg
  • ZacD
    Offline / Send Message
    ZacD ngon master
    It has to have http:// + youtube.com/ + watch?v=clakekAHQx0


    Anything else or extra and it won't work.

    [ame]http://youtube.com/watch?v=clakekAHQx0[/ame]
  • [Deleted User]
    Offline / Send Message
    [Deleted User] polycounter lvl 3
    I didn't liked Kite demo, but what they showed in GDC presentation is f*cking impressive.
  • tach
    Has it been mentioned when do they plan to release the open world demo?
  • [Deleted User]
    Offline / Send Message
    [Deleted User] polycounter lvl 3
    tach wrote: »
    Has it been mentioned when do they plan to release the open world demo?

    When things they show in in it will be fully implemented and available for everyone. Somethings will be in U4.8 but I suppose not everything.
Sign In or Register to comment.