With regards to using Vertex Colours instead of a Flow Map Texture, I take it that I would simply need to replace the TextureSample node with a VertexColor Node?
In that case, I would be filling the whole mesh in 0.5 Red and 0.5 Green before then painting extra Red to move flow in the direction of the X axis and Green for the Y?
Sorry if I'm being dense, I just want to make sure I have it right in my head, as the benefits of being able to paint flow in realtime using the viewport would be amazing.
Here's a really simple example I've made showing how you can use vertex colour to achieve this kind of thing.
Obviously using both red and green channels the complexity is higher.
From this I can see that there are two downsides to using vertex colour.
1) Even a fairly highly tesselated mesh isn't as detailed as a bitmap. And it causes a roughness to the ripples.
2) in the case of a water surface using vertex colour runs into the problem of not having enough interpolators to have a reflection. This is fixable but still a problem.
However in UDK you could just use the texturepaint feature to do this instead of vertex colour.
That's just a screenshot of all the different features...
Give it a try.
Editing a flow using just the 'Flow Points' tool:
I first loaded up a blank 512x512 image to set my flowmap size. You could use an image of your mesh UVs to guide you if you need something specific. I didn't use it in this example, but the flow brush is pretty useful for adjusting flow vectors. It'd be nice if you could 'comb' the flow points in the future; would be very useful with flow grids.
The output flowmap after being inverting R and G and slightly blurring in PS:
The very -basics- of the flow material in UDK, still needs noise modulation to get rid of pulsing:
Make sure you set your flowmap to a type of normal map compression to get correct vectors (-1,-1 to 1,1 instead of 0,0 to 1,1). The append in the flow map box can also be a component mask.
The result:
Still need to play around with it some more, but seems like a good solution for free.
Yep, it's good indeed, the only issue is that it might go Commercial in the future (so it won't be free in the long run), and from the way the math is done, it seem like a 'comb in direct you move your pointer in' won't come out for a long while too, but the Lines set to Bezier are doing the job just fine, without any lag, vertex limitations, etc.
To add to this already crazy thread, I'm starting to experiment with using Maya fluids to generate a flow map that can simply be rendered out for use in UDK.
I want to explore more on how to utilize flow maps for VFX, as the guys at Naughty Dog have. More to come.
To add to this already crazy thread, I'm starting to experiment with using Maya fluids to generate a flow map that can simply be rendered out for use in UDK.
I want to explore more on how to utilize flow maps for VFX, as the guys at Naughty Dog have. More to come.
I've been adding flow map painting to my Unity vertex painter, and once I'm done with the editor extension stuff, I'm thinking I might put together a standalone (or perhaps web-based, or both) as well, just to paint flowmaps and output to a texture file.
This is what I have so far, but it's all built to work in the editor, so it currently won't work as a standalone.
And @LoTekK, that has to be the most visually impressive way of authoring flow maps I have seen so far!
A standalone version would be infinitely appreciated by everyone!
@Haidda: Originally I was messing with soup, but kept getting stuck. I found a solution that allows me to work easily with the built-in features in Maya.
@Computron: I will eventually make a tutorial regarding this method, yes. For my site, probably not 3dmotive.
So first pass prototyping the standalone version. Managed to [relatively] cleanly port most of the editor code over to runtime code, added a way to bake out the vertex colors from the [pregenerated 64x64 plane] to an arbitrarily-sized texture.
SirCalalot:
That's actually already in the works It'll be quite rudimentary, at least initially. For now you'll just feed it a path/url (Unity doesn't have built in functionality for a file system browser, so I'll have to write/find one eventually), and it'll stick that on top of the flowmap. I'm setting it up so you can adjust its transparency, and it'll also use the texture's alpha if available. I'm also going to let the user point the flowmap shader to your own texture (and adjust tiling/speed), so you can get a better representation of your own assets.
Of course, GhostIt/ImageForegroundReference would work in a pinch as well
As promised, here are some of my initial tests utilizing flow maps for VFX.
While the basic premise is the same, using this on particles has its own advantages. Mainly since particles typically have fixed lifetimes, I don't have to worry about blending various states. Flow increases over time, then the particle dies. We also have the advantage in that since we typically have multiple particles drawing on top of one another (think smoke, fire, water), we get the advantage of multiple flowmaps with random particle rotations working together.
To reiterate from my previous post, I'm rendering these out via Maya Fluids. This could also be painted by hand with Teck's flowmap painter, or with the liquify tool in photoshop. The reason I'm sold with Maya Fluids is that is designed to simulate exactly that: fluid dynamics. This will help provide much more detailed eddys quickly and more realistically.
This was one of my 1st successful flow maps rendered from Maya
I take this flow map and lerp between a regular texture coordinate. I can set a range via a dynamic paramater so that every particle gets a unique amount of "flow" as to avoid repetition and add variety.
I took it further and started to mess with the concept of a Detail Flow Map, much in line with the concept of a detail normal map. Each one can be turned on or off individually through new dynamic parameters, and with new rangers for even more variety!
The end result / a quick breakdown can be seen here:
While not perfect, the results are very convincing. I feel like this is just the tip of the ice berg, I've only played with smoke so far. I can see this being used for fire as well. What's awesome about this is that it's only 1 base texture and 2 flow maps. No flipbooks, and it can be controlled over a very long particle lifetime. Also remember that every particle is picking from 2 random ranges, so the chance of having 2 particles that look alike is slim and helps add to its realism.
Also remember that every particle is picking from 2 random ranges, so the chance of having 2 particles that look alike is slim and helps add to its realism.
Which is exactly the reason I use distortion with particles and fluid materials. I wish more people would use distortion, having 100 particles that look exactly the same doesn't look very good.
That's very interesting, is there a strong extra cost while using these flow maps ?
Yes, the biggest issue to consider is performance. However, it's not "crazy" expensive and also depends on your hardware. In MK9, UV distortion was utilized extensively throughout the game (ps3/360). When it came time for us to port the game to the Vita, we quickly learned that it wasn't viable performance wise. As soon as you started modifying the UVs, it would kill framerate. So use sparingly :poly121:
Yes, the biggest issue to consider is performance. However, it's not "crazy" expensive and also depends on your hardware. In MK9, UV distortion was utilized extensively throughout the game (ps3/360). When it came time for us to port the game to the Vita, we quickly learned that it wasn't viable performance wise. As soon as you started modifying the UVs, it would kill framerate. So use sparingly :poly121:
Then again with this method you don't need as many individual particles to get a convincing look, that's another thing to consider.
Wow...this thread is absolutely incredible! And this is a perfect source of information for my research project...Flow Maps :P
I started a thread on PC a while back now http://www.polycount.com/forum/showthread.php?t=106663 asking about topics that the industry wants to be researched and flow maps came up. I have been researching for a while now and came across some the tutorials in this thread (albeit via google and the PC wiki) and I've only just somehow stumbled upon this thread?!
From reading through this thread (and from what valve have said), they seem pretty complicated :S although this is not going to put me off trying to create them myself.
When I'm carrying out my research should I just reply to this thread or make a new one in technical talk?
Once again - Awesome thread! I've learned lots already and I haven't even started yet lol
Using flow maps is pretty easy - but generating them can be problematic if you need any level of accuracy or realism. Valve have a superb PDF file out there somewhere that goes into detail with how they achieved generating their flow maps for L4D2 using Houdini.
Can't figure out why the movement is slower at the top right, quicker at the bottom left. There should be none at all in the centre. Is this a gamma thing?
I'm about to post this in the general section as well, but I thought everyone here would like to know that I've finally gotten around to releasing my flow map tutorial for particles & VFX. You may remember my posts from a few months back where I showed some techniques of generating flowmaps with Maya Fluids, and the video covers all of that and lots more. Again while this is related to how environment artists use flow maps, we take some different approaches since these will be used with particles.
And a serious thank you to all the great people who contributed to this thread. I was always lurking for months as I developed my techniques in my spare time, and there was always such great inspiration from everyone on here. :poly124:
awesome stuff! i actually just started watching a few of your 3dmotive vids last night and was enjoying them very much. ill definitely check this out after i make my way through the others
awesome stuff! i actually just started watching a few of your 3dmotive vids last night and was enjoying them very much. ill definitely check this out after i make my way through the others
Hey, I been studying imbueFX flowmap lesson, it's really thorough and awsome. I'm not a paid spokesmodel, no, totally non solicited I jsut joined polycount, I don't know what took me so long,! cheers
Replies
Here's a really simple example I've made showing how you can use vertex colour to achieve this kind of thing.
vertexColourDistort090512 by sprunghunt, on Flickr
Obviously using both red and green channels the complexity is higher.
From this I can see that there are two downsides to using vertex colour.
1) Even a fairly highly tesselated mesh isn't as detailed as a bitmap. And it causes a roughness to the ripples.
2) in the case of a water surface using vertex colour runs into the problem of not having enough interpolators to have a reflection. This is fixable but still a problem.
However in UDK you could just use the texturepaint feature to do this instead of vertex colour.
http://udn.epicgames.com/Three/TexturePaintReference.html
As the only image doesn't look too much like a 2-channel or 3-channel coordinate map:
Give it a try.
Editing a flow using just the 'Flow Points' tool:
I first loaded up a blank 512x512 image to set my flowmap size. You could use an image of your mesh UVs to guide you if you need something specific. I didn't use it in this example, but the flow brush is pretty useful for adjusting flow vectors. It'd be nice if you could 'comb' the flow points in the future; would be very useful with flow grids.
The output flowmap after being inverting R and G and slightly blurring in PS:
The very -basics- of the flow material in UDK, still needs noise modulation to get rid of pulsing:
Make sure you set your flowmap to a type of normal map compression to get correct vectors (-1,-1 to 1,1 instead of 0,0 to 1,1). The append in the flow map box can also be a component mask.
The result:
Still need to play around with it some more, but seems like a good solution for free.
I'm all over this like nuns on toast.
I want to explore more on how to utilize flow maps for VFX, as the guys at Naughty Dog have. More to come.
DVD/3d-motive material?
This is what I have so far, but it's all built to work in the editor, so it currently won't work as a standalone.
[ame="http://www.youtube.com/watch?v=U_Nyo_2fDfU"]Flow map painting - YouTube[/ame]
I figure a standalone could potentially come in handy.
Standalone version?
YES PLEASE!!!
And @LoTekK, that has to be the most visually impressive way of authoring flow maps I have seen so far!
A standalone version would be infinitely appreciated by everyone!
Howcome the program looks like this for me...
@Haidda: Originally I was messing with soup, but kept getting stuck. I found a solution that allows me to work easily with the built-in features in Maya.
@Computron: I will eventually make a tutorial regarding this method, yes. For my site, probably not 3dmotive.
Oh, thanks.
What kind of image should I load? Layout of the area I need a flowmap for or something?
[ame="http://www.youtube.com/watch?v=n_ZuZ76gCj0"]Prototyping a standalone flowmap painter - YouTube[/ame]
How easy would it be to overlay an image onto the canvas as reference (perhaps a plan-view of your environment)?
That's actually already in the works It'll be quite rudimentary, at least initially. For now you'll just feed it a path/url (Unity doesn't have built in functionality for a file system browser, so I'll have to write/find one eventually), and it'll stick that on top of the flowmap. I'm setting it up so you can adjust its transparency, and it'll also use the texture's alpha if available. I'm also going to let the user point the flowmap shader to your own texture (and adjust tiling/speed), so you can get a better representation of your own assets.
Of course, GhostIt/ImageForegroundReference would work in a pinch as well
http://teckartist.com/?p=96
and the thread if that floats your boat better.
While the basic premise is the same, using this on particles has its own advantages. Mainly since particles typically have fixed lifetimes, I don't have to worry about blending various states. Flow increases over time, then the particle dies. We also have the advantage in that since we typically have multiple particles drawing on top of one another (think smoke, fire, water), we get the advantage of multiple flowmaps with random particle rotations working together.
To reiterate from my previous post, I'm rendering these out via Maya Fluids. This could also be painted by hand with Teck's flowmap painter, or with the liquify tool in photoshop. The reason I'm sold with Maya Fluids is that is designed to simulate exactly that: fluid dynamics. This will help provide much more detailed eddys quickly and more realistically.
This was one of my 1st successful flow maps rendered from Maya
I take this flow map and lerp between a regular texture coordinate. I can set a range via a dynamic paramater so that every particle gets a unique amount of "flow" as to avoid repetition and add variety.
I took it further and started to mess with the concept of a Detail Flow Map, much in line with the concept of a detail normal map. Each one can be turned on or off individually through new dynamic parameters, and with new rangers for even more variety!
The end result / a quick breakdown can be seen here:
http://youtu.be/SHlwMytl-2g
While not perfect, the results are very convincing. I feel like this is just the tip of the ice berg, I've only played with smoke so far. I can see this being used for fire as well. What's awesome about this is that it's only 1 base texture and 2 flow maps. No flipbooks, and it can be controlled over a very long particle lifetime. Also remember that every particle is picking from 2 random ranges, so the chance of having 2 particles that look alike is slim and helps add to its realism.
Which is exactly the reason I use distortion with particles and fluid materials. I wish more people would use distortion, having 100 particles that look exactly the same doesn't look very good.
Yes, the biggest issue to consider is performance. However, it's not "crazy" expensive and also depends on your hardware. In MK9, UV distortion was utilized extensively throughout the game (ps3/360). When it came time for us to port the game to the Vita, we quickly learned that it wasn't viable performance wise. As soon as you started modifying the UVs, it would kill framerate. So use sparingly :poly121:
Then again with this method you don't need as many individual particles to get a convincing look, that's another thing to consider.
I started a thread on PC a while back now http://www.polycount.com/forum/showthread.php?t=106663 asking about topics that the industry wants to be researched and flow maps came up. I have been researching for a while now and came across some the tutorials in this thread (albeit via google and the PC wiki) and I've only just somehow stumbled upon this thread?!
From reading through this thread (and from what valve have said), they seem pretty complicated :S although this is not going to put me off trying to create them myself.
When I'm carrying out my research should I just reply to this thread or make a new one in technical talk?
Once again - Awesome thread! I've learned lots already and I haven't even started yet lol
Here's my test flowmap. I'd expect no movement in the centre, and movement away from the centre in all other blocks.
Here's the shader tree, based on Phill's tutorial:
Here's the result:
https://www.youtube.com/watch?v=Y8Aukho0crI
Can't figure out why the movement is slower at the top right, quicker at the bottom left. There should be none at all in the centre. Is this a gamma thing?
Any help would be appreciated!
I'm about to post this in the general section as well, but I thought everyone here would like to know that I've finally gotten around to releasing my flow map tutorial for particles & VFX. You may remember my posts from a few months back where I showed some techniques of generating flowmaps with Maya Fluids, and the video covers all of that and lots more. Again while this is related to how environment artists use flow maps, we take some different approaches since these will be used with particles.
Check out the product here
And watch the 1st chapter on Youtube
http://youtu.be/7X45ED6ArJA
And a serious thank you to all the great people who contributed to this thread. I was always lurking for months as I developed my techniques in my spare time, and there was always such great inspiration from everyone on here. :poly124:
Thank you!
http://www.polycount.com/forum/showthread.php?t=97215