NVil Forum

General Category => Feature Requests => Topic started by: steve on February 27, 2014, 02:30:49 pm

Title: Smooth Groups
Post by: steve on February 27, 2014, 02:30:49 pm
Hi IStonia,

If you could find time, would it be possible for:-

A new P_Function:- P_AutoSmooth_{Angle}

A "Smooth All" command for binding to an hotkey/user button.

Both could save time when dealing with smooth groups.
Title: Re: Smooth Groups
Post by: polyxo on February 27, 2014, 03:49:08 pm
It was wished before but couldn't one additionally introduce a setting which doesn't assign different smoothing values to entities ever? I never need Low res geometry and simply have no requirement to fake different edge weights through means of shading. Couldn't one opt to turn everything connected with Smoothing Groups off altogether, in all areas of the program or is that function so deeply nested in the code that this is unrealistic?
Title: Re: Smooth Groups
Post by: steve on February 27, 2014, 04:51:47 pm
Couldn't one opt to turn everything connected with Smoothing Groups off altogether, in all areas of the program or is that function so deeply nested in the code that this is unrealistic?

From what I see of the behavior in Nvil, is that some geometry is given a smooth group, and other geometry is left unassigned.
I did think about asking if possible for all geometry to be assign to the same (a default) smooth group, but am not sure as to how much work that would entail. So thought to ask for the added commands, so a single hotkey (be it from a composite) could be used for either placing all geometry on an object into a single smooth group(as you are looking for), and/or the ability to quickly remove all smooth_groups and replaced with custom.

Title: Re: Smooth Groups
Post by: polyxo on February 27, 2014, 05:27:47 pm
Thanks for your answer Steve! I see that your requests are quite pragmatic but and try to deal with what's given. What however, if for certain user-groups a given, automatically assigned property is of no value whatsoever but instead merely is a source of errors? Should one then really pester the user with turning off what he never wanted turned on in the first place?
Title: Re: Smooth Groups
Post by: Passerby on February 28, 2014, 02:36:07 am
think you just thinking of it wrong.

Smoothing groups is really just the method max uses to deal with split normals, internally nvil prolly handles the data more similar to how Maya does, which is by using hard and soft edges.

If you wanted to simply smooth a whole mesh, just select all edges, and run "Soften", it;s in the geometry menu when edges are selected, than you can harden selected edges by going to "Harden Selected" which is in the same menue.

i got these both on marking menus
Title: Re: Smooth Groups
Post by: Vaquero on February 28, 2014, 04:33:22 am
FYI, here's a very informative video on smoothing splits and vertex count, and what it means for uv mapping, especially for game assets:
http://youtu.be/ciXTyOOnBZQ (http://youtu.be/ciXTyOOnBZQ)
Title: Re: Smooth Groups
Post by: steve on February 28, 2014, 07:56:00 am
think you just thinking of it wrong.

Smoothing groups is really just the method max uses to deal with split normals, internally nvil prolly handles the data more similar to how Maya does, which is by using hard and soft edges.
You should read the help file and check how Nvil actually works with smooth groups.
From the help file:-
Quote
Smooth Groups
"Polygons can be grouped into smooth groups by either assigning smooth group flags on polygons or by vertex/edge based smooth group control operations which is smooth group flag independent.

This tool uses smooth group flag method."

So no, it is not like Maya.
If I remember correctly, Maya does not work with smooth groups, so those will be ignored on import.

Quote
If you wanted to simply smooth a whole mesh, just select all edges, and run "Soften", it;s in the geometry menu when edges are selected, than you can harden selected edges by going to "Harden Selected" which is in the same menue.
You will not remove smooth groups.

Create a box primitive, select all edges and "Soften" edges. In polygon mode, open "Smooth Groups" and check. You will see the smooth groups are still there.
From my own point of view, having both Smooth groups and Hard_edges leads to much confusion as to the actual implementation. If it really needs to have both smooth groups and Hard_edges, then it should deal with them better, and not be automatically adding smooth groups or hard_edges at any time at all, and let the user add those when actually wanted/needed.

I have just been looking at Nvil export- .dae
That appears to be either corrupting the exported smooth groups, or corrupting the smooth groups on import. (save box as .dae with export smooth groups enabled, import that file back into Nvil, and smooth groups corrupted/incorrect)



Title: Re: Smooth Groups
Post by: polyxo on February 28, 2014, 08:03:14 am
Thanks Passerby and Vaquero. I'm not saying that having the option to assign individual shading properties for edges and vertices sucks. What I dislike is that Nvil works under the assumption that hard/smooth edges/smoothing groops concept is useful for all its users, at least in one context or another. Therefore an Nvil user inevitably needs to start keeping in mind that the program does something to the geometry on needs to deal with, latest before exporting to other apps: Otherwise one might see the phenomen that Nvil geo subdivides without smoothing elsewhere.

Again: I don't need manipulation of smoothing angles ever, what this handplane video shows has no relevance for my work. I use Nvil for conceptual modelling in Product Design, there's no point in dealing with Low Poly assets and classical polygon modelling (without SubD) here.
Therefore I rather compare to Silo - here one got left alone altogether with this smoothing trickery. But again: I of course don't ask to remove these features which are so useful for you guys, I only wished for a program preference which gives users the choice to turn the use of these industry specific shading helpers off entirely.
Title: Re: Smooth Groups
Post by: steve on February 28, 2014, 08:05:19 am
Should one then really pester the user with turning off what he never wanted turned on in the first place?

No.
I do not want or use smooth_groups or hard_edges, and in Nvil they are a complete pain to have to keep removing what Nvil keeps automatically adding.
Another user posted 2 or 3 times about Nvil keep creating hard_edges and wanted it to stop, but nothing was done(at least nothing noticeable). I have not seen that user on forum since then.

Title: Re: Smooth Groups
Post by: JTenebrous on February 28, 2014, 09:23:32 am
Should one then really pester the user with turning off what he never wanted turned on in the first place?

No.
I do not want or use smooth_groups or hard_edges, and in Nvil they are a complete pain to have to keep removing what Nvil keeps automatically adding.
Another user posted 2 or 3 times about Nvil keep creating hard_edges and wanted it to stop, but nothing was done(at least nothing noticeable). I have not seen that user on forum since then.

Here, here.  Similar to Polyxo, I work in product design, and my work is for rapid prototype.  So smooth groups and any other visual window dressing for low res models is more hindrance than help to me, because the *actual underlying geometry*, whether that means split normals or what-have-you, is going to become visible and facetted on the printed model unless I increase the actual geometry, usually through subdivision.  To that end - I rarely have need or reason to maintain low poly counts at all (aside from viewport performance).  So it's important for me to always be able to see the geometry in its most literal way, warts and all.  Presently, I do find it a pain to constantly remove auto-assigned smoothing groups, plus I don't always know what adds them and what doesn't.  I understand why smoothing groups are important to some users, but I personally wish I could globally toggle them off and add them manually if I feel like it.  Same with hard edges.
Title: Re: Smooth Groups
Post by: Passerby on February 28, 2014, 11:20:36 am
I think smoothing groups should be dumped and removed completely, than have hard edges become the only system for managing spilt normals. Than in the application preferences there should be a setting to set at what angle a edge automatically becomes hard.

So in the case of people that don't want spilt normals set it to 180.

Also iirc when you subdivided it uses avaraged normals anyways, so normal splits won't effect your subdivided result.
Title: Re: Smooth Groups
Post by: polyxo on February 28, 2014, 11:52:24 am
Also iirc when you subdivided it uses avaraged normals anyways, so normal splits won't effect your subdivided result.
This may be true for subdividing inside Nvil. But if you export a low res cage out to subdivide it inside other applications one may run into problems - see here (http://3d-coat.com/forum/index.php?showtopic=7325&p=105570)

I wonder how Maya handles this mattter. It has no smoothing groups but how does it deal with hard/soft edges? Are these automatically added by Maya? I seriously doubt this. What I would expect is vanilla smoothing for every item added to the scene. People with low res, game specific interests can then take manual steps to introduce additional, non standard shading properties. If the user does nothing, common smoothing attributes are used for everything.
Title: Re: Smooth Groups
Post by: Passerby on February 28, 2014, 01:04:56 pm
polyxo your mis understanding a key concept, smoothing groups are simply a way of managing vertex normal splits, a method for the most part is only used by 3ds max and a few others, maya uses edges that are tagged soft or hard.

Also if the right options are set maya also just uses averaged normals not split normals when meshs are subdivided.

Than Maya has a global var for normal angle where you can set a angle between 1 and 180 degrees for what gets automatically set to hard. If you explicity set something soft or hard it isnt effected by this angle.

But say i don't want there to ever be split normals in maya, i would simply just set this to 180 degrees, and never tag anything as hard.
Title: Re: Smooth Groups
Post by: polyxo on February 28, 2014, 01:29:36 pm
I'm perfectly sure that I miss a lot of the details of what one can do with Normal-editing on low res geometry :) That said - you basically agreed that Maya doesn't mess with your mesh-smoothing until the user explicitly assigns overrides of global properties. And that's what I think made sense in Nvil too.
Title: Re: Smooth Groups
Post by: Passerby on February 28, 2014, 01:43:34 pm
ya the preferences just need a user setable angle for what gets turned into a hard edge.
Title: Re: Smooth Groups
Post by: steve on February 28, 2014, 01:46:00 pm
I think smoothing groups should be dumped and removed completely,......

I do not agree.
It may well be a case that Maya does not use smooth groups, but other application do, including some game engines.
If I remember correctly, the Unreal game engine uses smooth groups, if models are imported with split vertex, they are welded.
Title: Re: Smooth Groups
Post by: Passerby on February 28, 2014, 06:12:21 pm
there is no game engine in existence that handles split normals with smoothing groups, in fact game engines cant even render verts with multiple normals, and just split the vertex to get the same effect.

The fbx importer of unreal can read smoothing group data, or it can just explicitly read the vertex normal list from the file. I do it all the time since i work in maya and develop for UE3 and UE4

Like i said multiple times in this thread smoothing groups are just a method to control split normals, and have little to nothing to do with the data underlying it all.

Having both systems, the max like smoothing groups, and the maya like hard and soft edges is just going to lead to confusion.
Title: Re: Smooth Groups
Post by: steve on February 28, 2014, 07:36:40 pm
there is no game engine in existence that handles split normals with smoothing groups, in fact game engines cant even render verts with multiple normals, and just split the vertex to get the same effect.
Who mentioned "split normals with smoothing groups", well apart from you.

Quote
The fbx importer of unreal can read smoothing group data, or it can just explicitly read the vertex normal list from the file. I do it all the time since i work in maya and develop for UE3 and UE4
Nvil does not export to fbx, so why is that relevant to this thread.

Quote
Like i said multiple times in this thread smoothing groups are just a method to control split normals, and have little to nothing to do with the data underlying it all.
The underlying data is different, one is polygon data(smooth groups), the other is edge/vertex data(Hard_edges).

Quote
Having both systems, the max like smoothing groups, and the maya like hard and soft edges is just going to lead to confusion.
As you are a Maya user, you will want hard_edges, but what about Max users, they would want smooth_groups.

From my own point of view/workflow, I could say "hard_edges should be dumped, removed completely" they are of no use. Would you agree?

Title: Re: Smooth Groups
Post by: polyxo on February 28, 2014, 07:45:35 pm
Hey guys,
please relax. It's great that IStonia has such experts at disposal. Let's rather think of a proper solution than spend energy on conflicts.
Title: Re: Smooth Groups
Post by: IStonia on February 28, 2014, 08:54:13 pm
I have made the tools as requested
http://www.digitalfossils.com/Download/NVil-Feb-28-14.rar
  * Geometry > Common Commands n Tools > Smooth All.
  * Edit > Comstomize > Tools > Polygon Shortcut Tools > P_AutoSmooth.

I will try to stop NVil from creating unnecessary hard edges. Lots work. I have to scan though lots codes.

The data is actually on each individual vertex. Max style polygon base smoothing groups and Maya style hard edge method are the tools to create those data. I will keep both methods so you can use which ever is more comfortable with.

Edit: There is an option setting, Edit > Preference > General > Hard edge threshold angle.
Title: Re: Smooth Groups
Post by: steve on February 28, 2014, 09:21:04 pm
I have made the tools as requested
Many thanks,

Quote
The data is actually on each individual vertex.
So you only flag the polygon smoothing groups on export?
I am curious as to how Nvil could distinguish between overlapping smooth groups and hard edges if only one method of internal data is stored for both. That will no doubt have me experimenting.

Title: Re: Smooth Groups
Post by: IStonia on February 28, 2014, 10:42:23 pm
The related data is not bound to the smoothing groups or hard edges settings, in fact there is no hard edge settings in data. When you use any of the tools, you are setting the smooth data in each affected vertex and the vertex smooth data does not remember which tool has been used. When you try to select hard edges through a tool, the program will check the smooth data of the two vertices of an edge to determine whether the edge is hard or not.

If people want to export smoothing groups and the smoothing group settings are not conform to the vertex smooth data setting, they can use the new P_ tool to generate new smoothing groups base on the existing hard edges(of course they are extracted from vertex smooth data).
Title: Re: Smooth Groups
Post by: steve on February 28, 2014, 10:58:12 pm
The related data is not bound to the smoothing groups or hard edges settings, in fact there is no hard edge settings in data. When you use any of the tools, you are setting the smooth data in each affected vertex and the vertex smooth data does not remember which tool has been used. When you try to select hard edges through a tool, the program will check the smooth data of the two vertices of an edge to determine whether the edge is hard or not.
Thanks for the info.
So how is a determination made of which polygon belongs to which smooth_group?


Title: Re: Smooth Groups
Post by: IStonia on February 28, 2014, 11:20:00 pm
There are 32 smoothing flags. A polygon can hold none or any number of these flags. In a vertex, if two polygons has one or more flags in common, they are considered to be in the same smooth group. So polygons connected to a vertex can be grouped into different smooth groups. When rendering, the vertex may be split into a few vertices depending on the smoothing grouping and the uv grouping.

In my opinion, if you don't have to, don't use polygon for smoothing control. It is very confusing and tedious.
Title: Re: Smooth Groups
Post by: steve on February 28, 2014, 11:35:53 pm
There are 32 smoothing flags. A polygon can hold none or any number of these flags.
So hard_edges are controlled by vertex data, and smooth_groups are controlled by polygon data(flags).
Thanks,

Quote
In my opinion, if you don't have to, don't use polygon for smoothing control. It is very confusing and tedious.
As I put forward earlier, I do not use smooth_groups or hard_edges on my models. My request was for trying to get an easy way to control smooth_groups for those who need/use them(or for those who want to remove them without having to open the smooth_group panel).

I still think there will be some concern with smooth+groups, as Nvil will still place new polygons as unassigned(not smoothed), so hard_edges will be produced if exporting to an application that uses smooth_groups. But as I only requested 2 additional commands to be opened for bindings, I will leave the thread for now.

Title: Re: Smooth Groups
Post by: Passerby on March 01, 2014, 02:38:29 am
@steve can't test right now since not at home, but it might not even export the smoothing groups to OBJ and simply just explicitly define the vertex normals.

Which would mean on import Max would just rebuild the groups based on the explicit normal data, so the visual result would be the same but the numbering would change.

OBJ supports both, it can store normals as a list of normal vectors, or it can just store groups of faces, and let the importing 3d package sort it out based on the groups.

Like both istonia and i said, smoothing groups are just 1 of multiple methods for working with splits in vertex normals, there not really important in the rendering and are not the only way to store the underlying data.
Title: Re: Smooth Groups
Post by: steve on March 01, 2014, 08:02:54 am
@steve can't test right now since not at home, but it might not even export the smoothing groups to OBJ and simply just explicitly define the vertex normals.

There is no way in Nvil to stop the export of smooth_groups to .obj format (they are defined as face groups; S 1, S 2 etc). Vertex normals control the hard_edges, which can be disabled on export to .obj.

Maybe IStonia could change the .obj export so that smooth_groups can be disabled on export(all faces placed in one default smooth group), which may be easier for IStonia than dealing with smooth_group creation/non-creation during modeling.
Title: Re: Smooth Groups
Post by: steve on March 01, 2014, 08:14:22 am
Like both istonia and i said, smoothing groups are just 1 of multiple methods for working with splits in vertex normals, there not really important in the rendering and are not the only way to store the underlying data.

They are important in applications that use smooth_groups. As you use Maya which does not support smooth_groups, then that data is discarded.

The next time you create a model, before you export it, bring up the smooth_groups, and press- "Refresh smooth groups", you will get lots of hard_edges, which is what happens if you export/import (.obj)to applications that support smooth_groups, which includes Nvil.