Flow map generator

hi everyone,

I've been working on a water shader that has custom flows in it, and it seems that I am stuck at the flow maps. The thing is, I would like not to have to paint them in photoshop, but I would rather have something like Valve has; a plugin for your 3D software (in my case 3ds max) that allows you to sculpt normals to generate the flow map.

The thing is, generating the normal map once you have the vectors is easy, but you need to have the vectors first.
Max has this modifier called "edit normals", that seems to fix that problem, but moving the normals around one by one is just not acceptable.

I want to have my script/rollout/plugin to be brush-based, using the ThePainterInferface in MaxScript or something, but that is precisely where I am stuck.

for one, I have never worked with this "ThePainterInterface" before, and from what I've been reading about it, it is only usable for things like bitmap painting, and general data getting and setting. I have no idea how to make it into the 3ds max equivalent of the move brush in zbrush though.

can anyone provide any help for me on this? it would be greatly appreciated

oh, and once this is done I will put it on here so everyone can download it.

ps: for those of you having trouble picturing what I want to do: I attached two images, one with a screencap of the brush interface of the hair and fur modifier, and the other with the wanted (approximate result) of my script, but with the edit Normals Modifier.
basically I just want a brush that can be used on the handles of the edit normals modifier.

brushinterface.jpg159.55 KB
editnormals.jpg40.9 KB


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
TsveTan's picture


I dont know, if the next idea will work when talking for normals. So, what do you think about ...
creating a copy of the mesh object ...
Then apply a push modifier and specify a push value. Sometimes the push shares error messeges in my max 2009 ( I dont know why it happens too for simple objects), but in max 7 it works fine.
Make sure , if you preffer another method to expand the mesh each vertices are corresponding in the parent - child mesh.
Then use the soft selection methods and sculpt the child vertices. Imagine each vertex is the top of the normal.
After that you should extract from twoo corresponding vertices the point3 value that comes with the setnormal method and apply it to the corresponding normal of the base (parent) mesh. Of course you might set the some soft selection parameters.
Is it possible?

TsveTan's picture


Hi I Know , I am not comming with a solution, I only want to make a comment.
You can set and get normals state on a mesh with the set/getFaceNormal method. If I can recall exactly when working with normals is better to use an editable mesh source object.
I'v not tried it before but maybe it is possible to create a brush_gizmo with the mouse tools. You want to change only the normal rotation ,didn't you?

MaVCArt's picture

yes, basically i just want to

yes, basically i just want to create a brush that can "comb" normals :)

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.