Hi! Here’s a material I made in UDK material editor. The model is a static mesh with proper vertex colors:
Here’s the setup in material editor:
Any C&C is welcome, thanks for looking
Hi! Here’s a material I made in UDK material editor. The model is a static mesh with proper vertex colors:
Here’s the setup in material editor:
Any C&C is welcome, thanks for looking
Pretty interesting - UDK is awesome for this kind of stuff.
My only gripe here is the lack of comments in the material. Whether it’s code or nodes comments help everyone, including yourself. If the intention is to show your work you want to be sure everyone can follow. Especially if you plan to make a tutorial/walk through of some kind out of it. While this isn’t too bad to follow, it’s always good practice IMO.
It would be cool to see if you can’t get it more realistic looking now that you got a good base material. Get some veins and variation of heart-like reds. It seems like a beating candy heart at it’s current state
Good work!
Yeah, I find node networks far more difficult to follow than code because they lack the names of variables/functions/classes. Comments are even more important.
Thanks for pointing that out. I typed some quick comments on the image. I hope it’s more helpful this way
Cleaning up the node network can make it much easier to understand.
Thanks Strobel, my image looks terrible to me now
It may take more space in the material editor window to be more organized, but it’s definitely worth it, especially if someone else has to work on the material or you go back to look at it a couple of months later.
I learned the lesson the hard way with a foliage shader a while back. Took me hours to try to figure out what I had done only a week before.
I know that “was I drunk while I was doing this?” feeling. It happens a lot when reading my notes before exams especially
That’s awesome with what you can do with the UDK material editor! I would have originally done this with a few bones and looped an animation!
I wonder which one would be more efficient on the engine though…
It ends up largely being a memory vs. performance cost. When you apply vertex colors to a static mesh, it will increase the cost of the mesh. However, this will often be offset by the memory cost of the animation that’s been saved. With a smaller mesh with all the other optimizations possible, this will typically end up being cheaper animated mesh.
I haven’t done much testing with a high poly mesh, however, and I know we have some local optimizations that might bias my own testing.
I will add to the original post that if your working with the console platforms, I’d recommend removing the “if” statements if possible. My tests have shown that the PS3 occasionally slows down greatly on “if” statements in materials.
The cost of some vert colors is going to be cheaper than animation memory and CPU cost, without a doubt (assuming you don’t need it on every mesh in your game…). Animation is usually the most expensive way you can do something (CPU and memory). Likewise, fill rate (pixel shader) is likewise as often a bottleneck. Vertex shaders are pretty much never a bottleneck, so they’re generally a safe place to innovate like this
unreal also does not support bone scale animation, so in order to use bones you would a) have to use more of them and b) have to have multiple bones translate in order to get the scale effect. makes vertex shaders all the more appealing =)
And if you had bone animation your verts will need to carry skinning data, so you might as well have the vertexColors =)
That’s me told
Thanks for all the information guys, I’ll try to find a way around using “if” nodes but I have no idea right now
Hint: The LERP node is your friend
thanks again