Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: KARMA on February 12, 2004, 05:24:58 pm

Title: weird old bug?
Post by: KARMA on February 12, 2004, 05:24:58 pm
aldo noticed it and I can confirm that there's something wrong with shadings.
I've seen it in modelview, but aldo reports that it's happening in game too, and with the new specular effect it is weird.
Since it happens in modelview, it looks like a converter problems more than a game problem.
It happen on all the subobjects except the main one. If you change hierachy, you change the result.
I checked some of my very old models, and it happened in 3 years ago models too, but since it was on the lower lods I never cared too much about it.
I checked the original :v: models  in modelview, and the same is happening on all the original :v: models, and sometimes even on the main objects (which is much worse).
Aldo noticed it since he has a rounded model splitted in two big subobjects: as result one of the subobjects is perfect, the other one is screwed.
Also, increasing the pcount makes it more evident, for obvious reasons
more details here: http://www.hard-light.net/forums/index.php/topic,20704.msg409416.html#msg409416
Title: weird old bug?
Post by: aldo_14 on February 12, 2004, 05:38:20 pm
NB:  any SCP blokes can PM / ICQ me for a model copy - I can't put it publicly on the forum because it's for Reci.
Title: weird old bug?
Post by: aldo_14 on February 12, 2004, 06:16:50 pm
see
http://www.hard-light.net/forums/index.php/topic,20704.0.html
Title: weird old bug?
Post by: Bobboau on February 13, 2004, 06:51:45 am
are you useing HTL?
Title: weird old bug?
Post by: KARMA on February 13, 2004, 08:06:45 am
bob, check the :v: models in modelview w/o textures, and test the aldo's model which makes everything more evident.
Aldo's model has two giant circle elements on lod0.
You can see half of lod0 perfect, but the other half with the shadings screwed.
If you change the hierachy, you invert the effect: the main object is always perfect, the subobject is always screwed.
I checked my old models (in untextured mode in modelview) and I have all the subobjects screwed, even on very old pofs.
The weird thing is that this is happening with the original :v: ships, and in their case even on lod0 sometimes, when other times they are perfect. Check the orion for example, or any of the other models I named in the other post.
The point is that being those ships lowpoly, you don't notice it, and until it affect only minor subobjects or lower lods, it isn't much a problem, but in aldo's case he has half of model screwed, and this is not good.
Also, he's reporting that he' having those problems in game, and they affect the lightning and the spec effect. I haven't tested this and I also can't since spec doesn't work for me.
Since his model is relatively high poly (2 subobjects x 1.5k polys) I can only suppose he tested the pof with HTL
Title: weird old bug?
Post by: aldo_14 on February 13, 2004, 12:49:36 pm
Quote
Originally posted by Bobboau
are you useing HTL?


Yep
Title: weird old bug?
Post by: Goober5000 on February 13, 2004, 02:16:08 pm
Um, I read through both threads and can't figure out what's going on.  Can someone concisely state the problem?
Title: weird old bug?
Post by: aldo_14 on February 13, 2004, 02:26:40 pm
Quote
Originally posted by Goober5000
Um, I read through both threads and can't figure out what's going on.  Can someone concisely state the problem?


It appears to be either a problem with conversion (very unlikely, as it happens with multiple convertors), or the pof format.

Basically, whilst a main object will smooth correctly (i.e. smooth or faceted, properly lit), a subobject has extremely strange smoothing properties - as if each face is lit without regards to those around it.  This also occurs in LODs - in fact, anything except the main hull object.

The best current example is the Ganymede (look at it with no textures).... it becomes very apparent with high poly subobjects (as in my  case), and completely screws up the visual appearance of the model when there is no ambient light and specular maps are implemented.

This effect is also visible - to varying degrees on other V ships.  the lack of polys on turrets, etc, on these ships makes it hard to spot, however.

If you want I can PM you (the location of) a model, etc, file with an example.  It's very hard to describe, but easy to recognise visually.
Title: weird old bug?
Post by: KARMA on February 13, 2004, 02:49:37 pm
it like if all the graduations of light are present on each single polys. Each single polys has a shading that goes from full bright to full dark (not exactly but almost).
In the "normal" situation the shading of a poly depend by the neighbor polys and the degree of the angle between them, in this situation the polys are shaded regardless the other polys.

some pics:
lod0, correctly shaded:
(http://www.3dap.com/hlp/hosted/swfs2/wips/snap187.jpg)
lod1, weird shadings
(http://www.3dap.com/hlp/hosted/swfs2/wips/snap188.jpg)
lod1 converted with an old version of pcs, weird but different shadings
(http://www.3dap.com/hlp/hosted/swfs2/wips/snap189.jpg)
iceni inside the asteroid
(http://www.3dap.com/hlp/hosted/swfs2/wips/snap190.jpg)
same pof of above, only the ship (main object), correctly shaded
(http://www.3dap.com/hlp/hosted/swfs2/wips/snap191.jpg)

edit: sorry for high jpg compression
Title: weird old bug?
Post by: aldo_14 on February 13, 2004, 03:00:34 pm
NB:  This probably wasn't an issue with retail FS2, as it used full ambient - i.e. it's unlikely you'd notice the gradient changes on faces.  

As we now have no-ambient and specular maps, it rapidly becomes very obvious for mods....

can someone take a look at the pof (parsing / display?) code to try and identify if the smoothing data is used for the entire pof or just the main object?
Title: weird old bug?
Post by: aldo_14 on February 13, 2004, 03:13:20 pm
NB:  Just checked - this also happens with cob2pof..... although I  didn't even expect the model to convert in this case, as it's high poly(ish).
Title: weird old bug?
Post by: KARMA on February 14, 2004, 02:31:08 pm
I was thinking...this could be accounted for the shadings problems Omniscaper reported to have with the high poly ST ships like the sovereign: afaik Omni is converting the submodels as subobjects, and since the subobjects are screwed this explain why the shadings were odd
Title: weird old bug?
Post by: aldo_14 on February 15, 2004, 10:00:09 am
Quote
Originally posted by KARMA
I was thinking...this could be accounted for the shadings problems Omniscaper reported to have with the high poly ST ships like the sovereign: afaik Omni is converting the submodels as subobjects, and since the subobjects are screwed this explain why the shadings were odd


Also his planet map problems.... I've seen a few occasions where the dodgy faceting has actually lightened or darkened the appearance of the maps on a few of my ships.