Jump to content

Generate texture files based on point information?


Recommended Posts

Hi all,

As an experiment I'd like to export an animated black-to-white texture from Houdini, based on the point velocities of a surface (so as the points move, they turn white), then import the geo into 3DS Max and use the generated texture to drive particle emissions (in FumeFX).

It's like a want to make a wetmap, but I presume those are only generated through collisions and such.

I presume I'd have to lay out UVs on the geometry, as well as find a way to specify the dimensions of the texture (512x512, say).

I know one can import textures, but is it possible to export an animated texture?

As always, thanks for any suggestions/pointers!

Edited by etudenc
Link to comment
Share on other sites

if your geometry has uvs, you can use the 'uv object' parameter on the mantra rop to render to the uv space. you can run the mantra process for each frame to get an animated texture baked.

Thank you, Brian, I'll give that a try!

Link to comment
Share on other sites

This is a question to the forum that might help the OP with getting his velocities in the texture, but I haven't been able to figure out how to use it. In the VOP SOP I noticed that there is a parameter on the input for "Point Velocities" and "Point Accelerations", but I have as of yet been able to figure out how to get a value other than 0 out of them, even when I have the object animated. That would be something that would be awesome for me as I have some effects I want to try with the Acceleration of a point. Do I need to put in an attribute for it or something?

Link to comment
Share on other sites

yes, for that you need to have "v" and "accel" attributes on your geometry which contain correct numbers

those attributes comes from POPs so each particle already has correct "v" and "accel"

and you can get "v" for deforming geometry for example by using Trail SOP/Compute Velocity

or through CHOPs, also if you need "accel" for your deforming geometry you can compute that in CHOPs

or SOP solver DOP, or POPs

EDIT: or even in SOPs since there is TimeShift SOP

also geometry coming from RBDs can have correct "v" attribute

it really depends on what are you dealing with

Edited by anim
Link to comment
Share on other sites

I have been trying to make an example file for this for a couple of days now. I got it to work rather beautifully using CHOPS. I am having just a couple pieces of trouble. For one, when I vectorize the point motions, I end up with an absolute value for the magnitude. This is OK for an object that isn't rotating, but the rotation should make the bottom of the object (relative to the rotation vector) negative or 0 and the top moving faster. For some reason, I am not seeing that in the calculations. Also, I am having trouble getting the rotation of the wheel to be relative to the position properly. I have been racking my brain on the math and it just isn't working out. I am attaching the .hip file so everyone can see at least how I got the color changes to work.

Wheel_Color_Velocity.hipnc

Link to comment
Share on other sites

I am not sure if you have that example working but you have dependency cycle in the xform2/rz where in expression you are using data from math1 chop which depends on result of xform2 sop and so on

secondly use rather Channel SOP to get data from CHOPs to SOPs instead of Point SOP it's easier and way faster

here is the correct CHOP way of computing per point velocity and acceleration for deforming geometry

but if you just need plain velocity, Trail SOP is the easiest way

compute_v_accel_in CHOPs.hipnc

Link to comment
Share on other sites

I tried that and it didnt seem to work. When I put the chop expression for my slope calculation (by definition velocity) the rotation doesn't come out right. I am trying to mimic a wheel rolling. Also, if I were to put in a motion along more than one axis, I would need the vector velocity rather than just one dimension.

Link to comment
Share on other sites

and do you need it to base that on SOP (geometry) velocity?

it really doesn't matter if you just want to learn how, but the most proper way is to do that on object level

the easiest is to rotate wheel according to Object Path and it's diameter

but if you are using it on deforming geometry you need to be sure that your object is cylindrical or spherical and you should know/find out it's center and diameter, which is not a problem

then average velocity will give you vector you are looking for, but you need to compute velocity per frame not as default per second

but I think we have deviated from original question way too far, so you maybe want to star thread dedicated to your problem or better find some old one which is not adequately answered but contain this topic, I remember some of them were asked and maybe the answer is even there

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...