Jump to content
Sign in to follow this  
ResidnT

Vertex lighting

Recommended Posts

Hello folks, I have a question for you. Is there any way to do vertex lighting in houdini? I'm trying to do some poly work for game testing and I need to know if I can do this?

Thanks

ResidnT

Share this post


Link to post
Share on other sites

You can use the Bake VEX sop to 'bake' the colours onto the vertices.

You can also use the Point SOP to colour the geometry.

Share this post


Link to post
Share on other sites

There is also the additional option of running mantra with a commandline switch "-u" to unwrap the shader. Once the shader is unwrapped, you can apply the colours from the freshly rendered map to the point using the tex() and texni() functions... alternatively, use a VOP SOP with a Texture VOP and apply the color to Cd.

This will work with all topologies of geometry - (not only meshes and parametric m x n surfaces like the BakeVEX SOP) and will provide more accurate lighting from all directions. i.e. the frontface() call is avoided and all points are shaded correctly regardless of camera position.

Good luck!

J.

Share this post


Link to post
Share on other sites

PS. you won't see the unwrap option in the "+" pop-up dialog for mantra commandline switches because SESI consider the unwrapper/baker to still be in beta. From a command shell you can do a "mantra -h" and you'll see the option in the usage statement.

...

-u object[:attrib] Beta-version of a texture baker

...

remember that the uv's MUST be vertex attributes - not point attributes!!

e.g.

mantra -u geo1 #for default attributes: uv

mantra -u geo2:uv2 #specify for vertex attributes "uv2"

Share this post


Link to post
Share on other sites

Ahhh... in your first post, you stated "-b" which confused me upon seeing "-u" in the mantra help.

Now, everything's crystal clear. B)

Share this post


Link to post
Share on other sites

Oh thanks! I was thinking "bake" instead of "unwrap"... but I edited the post so that people only reading halfway down don't get confused too..

Cheers Steven - sharp eyes!

J

Share this post


Link to post
Share on other sites

I'm just trying to use -u parameter (such as -u model:uv, -u model:uv2, -u model:Cf, -u uv, -u Cf) but nothing see (only black mplay window).

How to render

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×