PDA

View Full Version : Do you need vertex normals?


DIMO
05-15-2003, 12:37 PM
Hi,
i'm just curious if we are the only ones who need vertex normals. We are having a very hard time everytime we have to visualize models that were generated with a CAD-Tool and were exported after Tesselation. For example as VRML.
The vrml-files contain the perfect normals and if you load them into a freeware vrmlviewer (e.g. Cosmoplayer) you'll get good smoothing.

But if you import them into 3dsmax, max ignores the normals and computes new ones. The result is always bad.

In max5 there is however an edit normal modifier, but it's only for the viewport! You can't render them.

It seems nobody else is complaining about this.

Marcel
05-15-2003, 01:50 PM
The re-smoothing of imported CAD models is really evil, but it is not a problem of Max lacking vertex normals.
Max does have vertex normals, but you never notice them as such. (when you do stuff with Maxscript you have to adress normals by vertices, that's when I first learned that it's the vertices having normals, and not the faces as I thought)

Seems like the CAD import utility comes from the stoneage anyway. I remember having to wait hours for the darn thing to import the whole drawing :)

DIMO
05-16-2003, 08:03 AM
Hi,

It's right that you can adress the vertex normals with maxscript, but try the following: Make a box, collapse it, set a normal with setnormal() , save the file, reload it -> Your changes are gone!

The reason for this is, that the editmesh class does not save the data of the vertexnormals. It is always recomputed. You can find the relevant SDK function under BuildNormals() in the SDK. Almost every modifier will call it, so your changes with maxscript wouldn't even survive a uvwmap.
This means that the RVertex and RNormal classes that can be found in the SDK are not saved with the mesh. I'm currently digging in the SDK very deep to find a workaround and I have talked to various developers. It seems the only solution is to write a new meshclass that prevents the recomputing of the normals.

Writing an importer that sets the normals right would be easy, but there's nothing that you could set, because the normals are always recomputed.

LFShade
05-16-2003, 04:38 PM
That being the case, one has to wonder why they would expose vertex normals as read/write in Maxscript. Strange:shrug:

RH

JHN
05-17-2003, 11:57 AM
Hi,
maybe this plugin is what you need: Mesh Army Knife;
http://www.phoenixgrafik.de/coding/meshak.htm

bottom page says:
# Norm by pivot:
This sets the type of normal. If switched off, the real vertex/face/poly normal is used. This has the problem, that the normals constantly change, if they are not locked (see below). If switched on, not the real normal is used, but a line from the pivot point through the vertex/face/poly. This has the advantage, that these "normals" doesn't change, when you paint on the mesh. Additionally, you can influence the direction by moving the pivot.
# Lock Normals:
Locks the normals in their current state. The normals are frozen in its current state - no matter how much you paint, they stay the same.
# Save/Load Normals:
I have to confess, that this option is not very useful. You may save and load the normals of the current mesh, but loading the normals is only possible into the same mesh, without any vertex or face changes (adding/deleting verts and faces).

Don't think it's exactly what you need, but maybe this helps,
Grtz JHN

fenix
05-17-2003, 03:09 PM
Mesh Army Knife can't be a solution for this. The normals stated in the quoted part of the manual are just temporarily normals, used as a direction vector for deform paint on a mesh. They haven't got anything to do with render normals, sorry.
bye
phoenix

JHN
05-17-2003, 04:00 PM
Yeah I thought so, but maybe it could give some pointers of what to do next.

JHN

DIMO
05-19-2003, 02:02 PM
I was already in contact with Phoenix (the authorof Mesh AK), and he also has no "easy" solution for this.

DIMO
05-20-2003, 10:44 AM
Just a sidenote:

If you wonder what we do with CAD data look at this:

http://www.cgtalk.com/showthread.php?s=&threadid=63514&perpage=15&pagenumber=1

CGTalk Moderation
01-15-2006, 03:00 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.