Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (Quad, VoroneTZ, PeroPero), 841 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
wandaluciaia, Mega_Rod, EternallyCurious, howardR, 11honza11
19049 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Mesh smoothing groups #412023
11/21/12 23:33
11/21/12 23:33
Joined: Mar 2003
Posts: 1,524
Canada
Stansmedia Offline OP
Serious User
Stansmedia  Offline OP
Serious User

Joined: Mar 2003
Posts: 1,524
Canada
Is it possible to disable mesh smoothing of a model? I have a model (a piano key), and I want the edges to be sharp - but the smoothing is making it look blobby. I need the vertexes to be connected for stencil shadows too so I cant just have unconnected faces.


Decessus - 80% done. 100% abandoned.
GET MY ANDROID GAME! https://play.google.com/store/apps/details?id=com.lasertrain.zspinballfree&hl=en
Re: Mesh smoothing groups [Re: Stansmedia] #412029
11/22/12 01:38
11/22/12 01:38
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
I dont KNOW if this will work, but maybe you could give it a try...

In MED, dis-connect the faces as if stencil shadows werent an issue.

Then re-calculate the normals for all faces.
(/Edit/Select_All while in triangle mode then /Object/Recalculate_Normals)

Then re-connect the faces using Vertex_Mode and the "Merge" button.

Then save WITHOUT doing another Recalculate normals.
This MIGHT work... Ive never tried it though.


In theory this same process could be achieved in another application
than MED if you use one... Assuming it works at all...


[EDIT] Ahhh crap! Thanks Uhwerk. I still keep thinking the
normals are stores for FACES, not vertices.
I know this is the case, but I have to remember to remember...



Last edited by EvilSOB; 11/22/12 02:21.

"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: Mesh smoothing groups [Re: EvilSOB] #412032
11/22/12 02:03
11/22/12 02:03
Joined: Jan 2002
Posts: 4,225
Germany / Essen
Uhrwerk Offline
Expert
Uhrwerk  Offline
Expert

Joined: Jan 2002
Posts: 4,225
Germany / Essen
This won't work as the faces still share the vertices' normals.


Always learn from history, to be sure you make the same mistakes again...
Re: Mesh smoothing groups [Re: Uhrwerk] #412571
11/29/12 12:06
11/29/12 12:06
Joined: Oct 2004
Posts: 900
Lgh
rojart Offline
User
rojart  Offline
User

Joined: Oct 2004
Posts: 900
Lgh
Originally Posted By: Stansmedia
Is it possible to disable mesh smoothing of a model? I have a model (a piano key), and I want the edges to be sharp - but the smoothing is making it look blobby. I need the vertexes to be connected for stencil shadows too so I cant just have unconnected faces.

I tested many formats to get different smoothing group on a primitive model, but without success, maybe MED import/export or engine bug.

From the FAQ:
Quote:
Q. I've designed a model in MAX, and imported it in MED. It looks basically correct, but the MAX version seems to have more contrast and the edges are sharper.
A. This is most likely due to the material settings and smoothing groups. Some exporters have problems with that, so you might need to correct this in MED. First look into the skin Material Setup. Some exporters generate a high specular value, which "overshines" the texture details. Also, if smoothing groups are not properly exported, edges look too smooth due to the Gouraud shading. In this case you might need to duplicate the edge vertices in MED.

So, as a workaround you can use a Render State solution, I know it's not perfect.

Code:
MATERIAL* mShadeMode = {effect="technique ShadeMode{pass p0{Shademode = Flat;}}";}
...
ENTITY *cylinder = ent_create("cylinder.mdl",0,0);
cylinder.material = mShadeMode;


Or just Copy&Paste solution that works very well with stencil shadows, but increases your vertices and faces.


Maybe it helps.


Regards, Robert

Quote
Everything should be made as simple as possible, but not one bit simpler.
by Albert Einstein

PhysX Preview of Cloth, Fluid and Soft Body

A8.47.1P
Re: Mesh smoothing groups [Re: rojart] #412572
11/29/12 12:44
11/29/12 12:44
Joined: Mar 2011
Posts: 3,150
Budapest
sivan Offline
Expert
sivan  Offline
Expert

Joined: Mar 2011
Posts: 3,150
Budapest
in case of very simple models, a fairly easy method is to make it in WED, export as mdl7 with checked Faces separation ("Duplicates vertices belonging to different faces on convex blocks. This option prevents Gouraud shading."), and that's it.

Edit: or import complex model as fbx to WED and make the same export.

Last edited by sivan; 11/29/12 12:49.

Free world editor for 3D Gamestudio: MapBuilder Editor
Re: Mesh smoothing groups [Re: sivan] #412574
11/29/12 13:01
11/29/12 13:01
Joined: Mar 2012
Posts: 927
cyberspace
W
Wjbender Offline
User
Wjbender  Offline
User
W

Joined: Mar 2012
Posts: 927
cyberspace
Also if your exporting from max for fbx see the "support normal per polygon vertex"
Option in the exporter.just mentioning because i saw the words max and fbx somewhere here


Compulsive compiler

Moderated by  HeelX, rvL_eXile 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1