Assigning vertex colour channels for use in Unreal

   323   2   1
User Avatar
Member
17 posts
Joined: May 2014
Offline
Hi all! I have some of this working but Im not quite sure where to go next. I have created a top to bottom ramp in vert colours which I want in the red channel. I have ambient occlusion in the green channel and a random colour effect in the blue channel. BUT I cant figure out how to combine the channels. Problem, when I generate random colours it affects all channels where ideally I would like to randomise only the BLUE channel. Same when generating the colour ramp, I only want it to affect the RED channel. Im poking around at VEX and trying an approach with a Vertex VOP but I dont know enough about either to make it happen. All help appreciated, even if its just advice on the approach to take!

Cheers!
User Avatar
Member
395 posts
Joined: April 2017
Offline
The quickest way to do this is probably a bit of VEX. If you generate each of your three color channels as separate float attributes, you can combine them together with a wrangle. The exact code would depend on what your various vertex attributes are named, but it'd look something like this:

@Cd = set(f@ramp, f@occlusion, f@rand);
MOPs (Motion Operators for Houdini): http://www.motionoperators.com [www.motionoperators.com]
User Avatar
Member
17 posts
Joined: May 2014
Offline
Ah yes perfect! Thank you for the direction, Ive got it all working now and learned a bit more VEX in the process.

Thanks!
  • Quick Links