Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
3 registered members (NewbieZorro, TipmyPip, AndrewAMD), 14,749 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rating: 5
Page 2 of 3 1 2 3
Re: please add hard edges to model improvements II [Re: ventilator] #49013
06/03/06 10:42
06/03/06 10:42
Joined: Jan 2003
Posts: 4,615
Cambridge
Joey Offline
Expert
Joey  Offline
Expert

Joined: Jan 2003
Posts: 4,615
Cambridge
Quote:

provide a threshold angle for smoothing in materials. not as flexible as arbitrary hard edges or smoothing groups but good enough for most cases.

but there has to be some solution for this!




there is, but since i don't know much about shaders, i'm not sure wether it is possible with 3dgs or not. anyway, here's the article:

http://simland.planetquake.gamespy.com/pages/articles/phongshading1.htm

looks as if phong shading has some kind of parameter that you can change (or is it engine-specific?).
then the shading will only apply for angles greater than the one you set.

greetings, joey.

Re: please add hard edges to model improvements II [Re: Joey] #49014
06/03/06 17:48
06/03/06 17:48
Joined: May 2002
Posts: 7,441
ventilator Offline OP
Senior Expert
ventilator  Offline OP
Senior Expert

Joined: May 2002
Posts: 7,441
i think you can't solve that with vertex shaders since you know nothing about the neighboring geometry there.

this article seems to describe some quake3 specific stuff (i only took a quick glance).

Re: please add hard edges to model improvements II [Re: ventilator] #49015
06/03/06 21:02
06/03/06 21:02
Joined: Oct 2003
Posts: 4,131
M
Matt_Aufderheide Offline
Expert
Matt_Aufderheide  Offline
Expert
M

Joined: Oct 2003
Posts: 4,131
You kbow, i dont think this probem is currenty solvable. The way D3D works precludes smoothing groups or hard edges, unless the vertices are not welded. So basically, its an art thing, not a code or model format thing.

Basically, every shading method uses vertices, not faces, so everything has to be interpolated. Thats why flat shade mode doesnt really work, because it still does shading per-vertex, not per-face.

if you changed the vertex format to include some things, who knows, maybe there is some hack that could work, but frankly ive never seen anything like that. It's a hardware limitation. Maybe with DirectX 10 there will some possiblity.

It could be done in software, but so what, so can anything..

Re: please add hard edges to model improvements II [Re: Matt_Aufderheide] #49016
06/03/06 21:36
06/03/06 21:36
Joined: May 2002
Posts: 7,441
ventilator Offline OP
Senior Expert
ventilator  Offline OP
Senior Expert

Joined: May 2002
Posts: 7,441
yes, i know that.

but the mesh you work with and the data that gets drawn by direct3d shouldn't and doesn't have to be the same.

i think internally the engine would need a second data structure with a welded closed mesh for calculating stencil shadows (but the a6 stencil shadows are useless anyway ) even if some vertices of the mesh that gets drawn are split to achieve hard edges.

there has to be some solution for this in 3dgs! most other engines have solutions for this.

and the mdl7 format isn't a direct representation of the direct3d mesh. it's an artist format which doesn't only get loaded and displayed by the engine but is also meant to be worked with in med so i don't see a problem with adding some kind of smoothing information to it.

Re: please add hard edges to model improvements II [Re: ventilator] #49017
06/04/06 10:39
06/04/06 10:39
Joined: Jun 2003
Posts: 1,017
Germany
T
Thomas_Nitschke Offline
Senior Developer
Thomas_Nitschke  Offline
Senior Developer
T

Joined: Jun 2003
Posts: 1,017
Germany
I second that, ventilator.
I have to admit I am no expert in d3d or anything but, seeing that MED can do flat shading while, at the same time, using a directX render library, there certainly has to be a solution to do this same effect in the engine.
Plus, as ventilator stated, other engines -many other engines- support this as well...

I'd really like to hear a word or two from Conitec on this issue.

Last edited by The Matrix; 06/04/06 10:39.

Formerly known as The Matrix - ICQ 170408644 I've been here for much longer than most people think. So where's my "Expert" status?
Re: please add hard edges to model improvements II [Re: Thomas_Nitschke] #49018
06/04/06 11:37
06/04/06 11:37
Joined: Aug 2005
Posts: 343
Germany
HPW Offline
Senior Member
HPW  Offline
Senior Member

Joined: Aug 2005
Posts: 343
Germany
In the *.X format are smoothing groups available.
If this feature of implementing the *.X format to 3GS is released, than I think it's possible to use smoothing groups with 3DGS.
The Quest3D Engine (www.quest3d.com) can use smoothing groups from *.X format models.


Evil Blood (v. 0.52) RPG
Commport.de (Social Network Community)
Re: please add hard edges to model improvements II [Re: HPW] #49019
06/04/06 15:34
06/04/06 15:34
Joined: Oct 2003
Posts: 4,131
M
Matt_Aufderheide Offline
Expert
Matt_Aufderheide  Offline
Expert
M

Joined: Oct 2003
Posts: 4,131
I dont see any way on a API/hardware level that you can have a feature like this. Vertices are either welded in a mesh or not, and I dont believe any modern 3D engine has this kind of feature. With vertex and pixel shaders there is no way to get information from other vertices or to turn off interpolation..


Sphere Engine--the premier A6 graphics plugin.
Re: please add hard edges to model improvements II [Re: Matt_Aufderheide] #49020
06/04/06 15:43
06/04/06 15:43
Joined: Feb 2003
Posts: 6,818
Minot, North Dakota, USA
ulillillia Offline
Senior Expert
ulillillia  Offline
Senior Expert

Joined: Feb 2003
Posts: 6,818
Minot, North Dakota, USA
The only method in which this could work is if some sort of light-mapping system was developed specifically for models. Each triangle in MED would get a flag. If the flag is off (default setting), a smooth gradient is used, like that of gouraud shaded mode. If the flag is on, no smoothing is done and is otherwise flat. Smoothing is decent for curved surfaces and flat is decent for flat surfaces that aren't part of a curve. These flags are only used for lightmap calculations for the model. They are ignored in the engine.


"You level up the fastest and easiest if you do things at your own level and no higher or lower" - useful tip My 2D game - release on Jun 13th; My tutorials
Re: please add hard edges to model improvements II [Re: ulillillia] #49021
06/04/06 19:43
06/04/06 19:43
Joined: Jun 2003
Posts: 1,017
Germany
T
Thomas_Nitschke Offline
Senior Developer
Thomas_Nitschke  Offline
Senior Developer
T

Joined: Jun 2003
Posts: 1,017
Germany
I'd still be interested how in heavens MED can do it -with DX, it seems- whereas the engine can't?
That doesn't really make sense to me


Formerly known as The Matrix - ICQ 170408644 I've been here for much longer than most people think. So where's my "Expert" status?
Re: please add hard edges to model improvements II [Re: Matt_Aufderheide] #49022
06/04/06 23:02
06/04/06 23:02
Joined: May 2002
Posts: 7,441
ventilator Offline OP
Senior Expert
ventilator  Offline OP
Senior Expert

Joined: May 2002
Posts: 7,441
Quote:

I dont see any way on a API/hardware level that you can have a feature like this. Vertices are either welded in a mesh or not, and I dont believe any modern 3D engine has this kind of feature. With vertex and pixel shaders there is no way to get information from other vertices or to turn off interpolation..




in my opinion the mdl7 format should contain some kind of smoothing information and when the engine loads it it generates the direct3d mesh with taking the smoothing information into account (it splits vertices where necessary). for calculating stencil shadows (and i think other things like some collision detection algorithms work better with closed continuous meshes too) the closed mesh data like in the mdl7 file has to be used.

i don't know the details of how other engines do this but for example with ogre3d it's no problem to have hard edges in models and use stencil shadows with them.

and having split vertices in a model format which isn't only meant for being loaded by an engine but also for editing in a model editor is a kind of ugly solution.

Page 2 of 3 1 2 3

Moderated by  aztec, Spirit 

Gamestudio download | 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