vertex normal export

   8730   8   2
User Avatar
Member
7 posts
Joined: Jan. 2006
Offline
Hi everyone,

I was wondering how one goes about exporting the vertex normals using the ROP output driver to .obj? Also, is there any way to edit them as well?

Thanks.
User Avatar
Member
398 posts
Joined: July 2005
Offline
There is no vertex normals in Houdini. Only point ones. So if you need something that looks like “four different vertex-like normals in one common point” you should make 4 points with the same coordinates. Than you can assign different normals to those points.
f = conserve . diffuse . advect . add

fx td @ the mill
User Avatar
Member
221 posts
Joined: July 2005
Offline
You can also use the attribute promote sop to change your point normals to vertex attributes “called” N.

Getting this to export to .obj is the next trick. I don't know of a way other than writing your own exporter to do this.

Dave
User Avatar
Member
7 posts
Joined: Jan. 2006
Offline
Thanks, I guess there is no easy way to do this. How would I go abouts seeing the point normal then? When I select a point there's no normal information on it. I don't want to have to calculate the normals within my source code.
User Avatar
Member
7 posts
Joined: Jan. 2006
Offline
Thanks davedjohnson,

All I did was this:
attribpromote Normal (N) from point to point and new attrib name is vn and it worked!

Thanks for all the help guys!
User Avatar
Member
398 posts
Joined: July 2005
Offline
I was surprized today when I've tried to promote N and use it for the lighting purposes in the shader. It works! I remember that I've tried to do the same thing several years ago and it didn't work. Probably that was my fault and I've promoted point N to vertex N which is completely useless for Mantra (I mean using the name N for vertex attribute. You can assign/modify point normals and Mantra will use them automatically. If point N doesn't exist Mantra will calculate normals. But if you create vertex type N Mantra will calculate normals automatically without using of your vertex N).
f = conserve . diffuse . advect . add

fx td @ the mill
User Avatar
Member
66 posts
Joined:
Offline
For the record, try promoting point N to vertex N; mantra can now render using the vertex normals.
User Avatar
Member
14 posts
Joined: Dec. 2008
Offline
i am trying to do this in python any hints?
User Avatar
Member
321 posts
Joined: July 2005
Offline
hoknamahn
There is no vertex normals in Houdini. Only point ones.
So as you have discovered, Houdini can indeed use vertex normals. While they aren't advertised too heavily nor is Houdini optimally set up to use them, they will indeed have the intended effect on the shading.

You can, for example, make unique points, calculate normals, promote them to vertex attributes, and then reconsolidate your points. The vertex normals will now create hard edging even though your polys are sharing points. GL will not display this correctly, as it only deals with point normals. However, Mantra will indeed render it correctly.

You can visualize vertex normals by creating a custom attribute vector in the display options ('d' on the geo viewer window, create-attribute-vector, call it vtxN, attribute ‘N’, class vertex).

The process of saving to .obj (which uses the gwavefront standalone) converts point normals and calls them vertex normals inside the .obj. Vertex normals are ignored. It is probably time to refile that RFE for gwavefront to handle vertex normals.
Antoine Durr
Floq FX
antoine@floqfx.com
_________________
  • Quick Links