Author Topic: Trueform for all?  (Read 3444 times)

0 Members and 1 Guest are viewing this topic.

Offline RandomTiger

  • Senior Member
  • 211
This work has stemmed from Bobs genius idea of using ATI’s trueform technology to improve the smoothness of the 3D models in the game. The problem with this technique is that it is sadly limited to a relatively small number of graphics cards. So I am in the process of making a software equivalent.

I would just like to quickly point out that this does *not* make Bob’s efforts redundant, my solution is almost certainly slower and takes up more memory, this is simply a limitation of having to do it in software unlike Bob’s version, which if I understand correctly is all done in the graphics card. Also my solution is less accurate, mainly because my simple solution seems to do the trick nicely anyway, this could be changed but at the cost of loading time. Those of you able to take advantage of Bob’s true ATI hardware solution will likely get a better result.

OK, so my version is not quite finished yet, I’ve been developing it in a little glut shell to allow me to get it right before I have to figure out how to stuff it into the FS2 loading code. There’s a big problem with seams at the moment, I’m fairly sure I can fix that up, but you’ll just have to ignore that for now. Feel free to have a look.

* exe post delayed until I find somewhere to upload it *

It works by subdividing all polys in the object then using the normals to determine if each new vertex is on a curve or a straight and repositions it accordingly. The old vertices stay as they are so the shape can’t change too dramatically. This does mean more polys, no getting around it. It will run slower. People who cant get good frame rates will want to keep this feature off. It will come with at least two detail levels.

I’d just like to point out that I am also working on other stuff to try and speed stuff up as well as new features to slow it down. My new D3D particle code seems to run a bit faster and I’m going to try to get an old low memory graphics card off ebay and use that to help me pinpoint bottlenecks and ease them if possible. Anyway back to trueform, I guess it should have a different name for my version, falseform perhaps or I could be cheeky and call it rtform. I guess I can worry about that when its finished.

So visually the difference is not huge but I find it worthwhile, I don’t have the hardware to run Bob’s version so I have no idea how they compare. Please remember this is a general solution and only uses the object data that is there already. How it acts with an object depends on how the normals were set when the model was made. Sometimes it may choose to curve bits you that would probably look better straight, however this is matter perception which means I cant code a solution.

I think the key is for model makes to have a play and see how it works and remember what they have learnt when setting normals. Of course the paradox is that if you are making a new model you will probably be using so many polys that using trueform on it isn’t necessary.

This leads to the interesting problem of how to select which models to trueform, if a user has new and old models using the same levels of trueform on all could lead to them being detailed beyond need which would slow the game down for no good reason. Checking by poly count isn’t a great idea since the number of polys in a massive warship is much higher than that of the low poly objects like cargo boxes.

So if anyone has any ideas how the code should decide which objects to trueform and which to not post this thread. A list of object names to check against is an undesirable solution. I don’t suppose there is some magic way to identify volition models from custom ones?
« Last Edit: January 09, 2004, 09:51:49 am by 848 »

 

Offline KARMA

  • Darth Hutt
  • 211
    • http://members.fortunecity.com/aranbanjo
if I correctly understood, this thing (like trueform) will just smooth the curves
a solution could be:
1-apply this thing only to lod0
2-apply this thing only when pcount/size ratio is smaller than XXX (this number should be high enough to include all the vanilla models and all the community models made for vanilla fs2, and low enough to exclude all the models built for HTL)
and maybe:
3-apply this thing only over surfaces with smooth shadings or autofacet angle higher than XX°

about point 3, I know that 99% of the models don't have smoothing groups (I'm not even sure if you can use them...) but it could let us have some kind of control over this trueform, and I suppose could bring to a better effect. You could also use this to decide the trueform level.

  

Offline aldo_14

  • Gunnery Control
  • 213
I think the V models have a different version number in the pof data, due to the different convertor.  Not sure, though - i'm pretty sure there is a field in the pof format for version/ convertor details, so you could get that integrated into a new or exisitng convertor (or maybe just hex edit the thing).

Or just go the simple way and incorporate an indicator into the pof filename itself.... i.e. tF_blah.pof or something.

EDIT:  oh, subobjects.... er, could apply the name thing or alter pof data.  Offhand, I think whatever way would have to be user specified... i.e. I do quite a few deliberately boxy areas on ships, for example.  

EDIT2:  If we had a way to break mapped regions into smoothing groups, could use that as a basis - i.e. subdivide the mesh appropriately instead of using goraud shading.
« Last Edit: January 09, 2004, 09:08:55 am by 181 »

 

Offline Nico

  • Venom
    Parlez-vous Model Magician?
  • 212
Quote
Originally posted by KARMA
if I correctly understood, this thing (like trueform) will just smooth the curves
a solution could be:
1-apply this thing only to lod0
2-apply this thing only when pcount/size ratio is smaller than XXX (this number should be high enough to include all the vanilla models and all the community models made for vanilla fs2, and low enough to exclude all the models built for HTL)
and maybe:
3-apply this thing only over surfaces with smooth shadings or autofacet angle higher than XX°

about point 3, I know that 99% of the models don't have smoothing groups (I'm not even sure if you can use them...) but it could let us have some kind of control over this trueform, and I suppose could bring to a better effect. You could also use this to decide the trueform level.


You've never used meshsmoothing or SubD, I suppose :p
You can't say "there, this poly will be smoothed, those ones won't", coz it'll completly mess up your mesh. It's all or nothing.
and about point 3, actually, about 100% of the pofs have smooth groups, what the hell are you talking about?
SCREW CANON!

 

Offline KARMA

  • Darth Hutt
  • 211
    • http://members.fortunecity.com/aranbanjo
I just never tryed to use different smoothshadings/autofacet angles on different groups of polys on the same mesh, so I'm not sure how pcs and fs2 work with em.
and about the subdivsion tools, well yes I rarely used em, since I don't make renders/uber high poly meshes etc I don't need them, but if I'm not wrong trueform work in a different way than those tools, or not?
I may be wrong as said but I seem to remember bob saying that trueform already has to decide what group of polys to smooth and what not, so I just thought that different levels of shadings could be useful for this purpose.

 

Offline Woolie Wool

  • 211
  • Fire main batteries
Does Trueform work in-mission now? I want to see what my new Radeon 9200 is really capable of.
16:46   Quanto   ****, a mosquito somehow managed to bite the side of my palm
16:46   Quanto   it itches like hell
16:46   Woolie   !8ball does Quanto have malaria
16:46   BotenAnna   Woolie: The outlook is good.
16:47   Quanto   D:

"did they use anesthetic when they removed your sense of humor or did you have to weep and struggle like a tiny baby"
--General Battuta

 

Offline RandomTiger

  • Senior Member
  • 211
Thats Bob's work, if you want to talk in detail about that I would start a new thread or this is going to get very confusing.

Its not in I dont think, we are in a code freeze at the moment, bug fixes only, Bob posted an exe a while back though.

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
yeah I had code working, but it's not in the offical exe (becase were in a code freze) that one were I was getting decals working again should have it active, but you'd need a comand line to activate it
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline Nico

  • Venom
    Parlez-vous Model Magician?
  • 212
Quote
Originally posted by KARMA
I just never tryed to use different smoothshadings/autofacet angles on different groups of polys on the same mesh, so I'm not sure how pcs and fs2 work with em.
and about the subdivsion tools, well yes I rarely used em, since I don't make renders/uber high poly meshes etc I don't need them, but if I'm not wrong trueform work in a different way than those tools, or not?
I may be wrong as said but I seem to remember bob saying that trueform already has to decide what group of polys to smooth and what not, so I just thought that different levels of shadings could be useful for this purpose.


Actually thinking about it now, i'm not sure there's smoothing groups in FS anymore :p
bah, can't be arsed to check.
SCREW CANON!

 

Offline aldo_14

  • Gunnery Control
  • 213
I think there are - the V models appear to support it, or at least varying smoothing angles - but it was never incorporated in the convertors.

 

Offline RandomTiger

  • Senior Member
  • 211
Smoothing groups arent very relevent as far as I can see.
We cant mess about with the existing normals in a general code sence or things will very start to look wrong.

The problem at hand is what should be used to determine if trueform is used on a object and should it be at a high or low factor.

 
What about having trueform applied to everything by default, and anyone whose models are already detailed enough mark their model in some way. That seems easier than doing it the other way round, which would involve 'marking' all the old models. How exactly you would mark them is far beyond me.

 

Offline RandomTiger

  • Senior Member
  • 211
Might work, could specify a value of recommened factor, the ingame usage threshold could be scaled up or down by the user in the launcher or something.

A nice solution asside from the fact its not automated, sounds good. Wont bother coding that till we haev a workig ingame trueform though.

 

Offline Nico

  • Venom
    Parlez-vous Model Magician?
  • 212
Quote
Originally posted by RandomTiger
Smoothing groups arent very relevent as far as I can see.
We cant mess about with the existing normals in a general co


They are. true form, as far as I can see, is like mesh smooth ( or subD in LW ). It makes everything more curved. But you'll get hard edges between two different smooth groups, that way, you can have rounded parts on the Orion ( the radar dish ) while keeping the angular look of the orion. Coz face it, a smoothed orion, that would be crap to the point I would never use the option ( or for exemple on a sathanas, w/o the smooth groups, you'll get half truncated spikes and stuff ) :doubt:

All that if it does work like meshsmooth or subD, of course.
SCREW CANON!

 

Offline KARMA

  • Darth Hutt
  • 211
    • http://members.fortunecity.com/aranbanjo
that's about what I was saying too, nico.
But if I remember correctly Trueform already evaluate the angles, not smoothing when the angle is too high.
This (again, if I remember correctly from the other trueform thread) doesn't work always well, so smoothing groups could be helpful, as you are saying too, to decide if trueform has to be applyed or not and avoid errors (and maybe to define the intensity too?).
But not being a coder and don't having a tech knowledge about how trueform will work, this may be simply useless or not efficent (not to mention that some ships could have to be retextured).

About how to decide if trueform has to be applied on a mesh or not, the idea of "marking" ships that don't need it is nice, and probably the best solution.
if you want an automatic system the polydensity (pcount/size) is the only thing I can think of if you want something model-related, but probably you'll have to use different values for fighters and capships.
Other indexes that may be more or less related to what you are looking for, assuming that is more probable that a model built for fs2 will need trueform than a model built for htl, are the date of file, the coverter used (as aldo was suggesting) if it is possible to distinguish it, the max number of polys x subobject..what else?

 

Offline mikhael

  • Back to skool
  • 211
  • Fnord!
    • http://www.google.com/search?q=404error.com
Quote
Originally posted by Nico


They are. true form, as far as I can see, is like mesh smooth ( or subD in LW ). It makes everything more curved.


That's not even remotely how SubDs work in Lightwave.
[I am not really here. This post is entirely a figment of your imagination.]

 

Offline Nico

  • Venom
    Parlez-vous Model Magician?
  • 212
ah well, it interactively smooths an object creating a  highly devided mesh controled by a low res cage. Don't play with words, we're not on a high poly modelling tutorial :doubt:
and smoothing= smooth= curves, so if it's not even remotly etc, I'm a monkey and knows nothing about 3D :rolleyes:.
SCREW CANON!

 

Offline Flipside

  • əp!sd!l£
  • 212
It depends what level of subdivide you are using, standard or Metaform, I think Nico is referring to the standard one?

Flipside :D

 

Offline mikhael

  • Back to skool
  • 211
  • Fnord!
    • http://www.google.com/search?q=404error.com
Quote
Originally posted by Nico
ah well, it interactively smooths an object creating a  highly devided mesh controled by a low res cage. Don't play with words, we're not on a high poly modelling tutorial :doubt:
and smoothing= smooth= curves, so if it's not even remotly etc, I'm a monkey and knows nothing about 3D :rolleyes:.


ACtually, that's not at all how SubD works in Lightwave. It is neither interactive nor is it controlled by a low res cage. There are spline cages which let you create complex geometry from a low res framework.

SubDivision Surfaces (SubDs) work by taking a previously determined value (I) and created patches of IxI polys (which may or may not be planar) across a curve that is interpolated by automatically generating guide splines from the control points (the existing points of the low poly, non-SubDed mesh). This is not an interactive process: it is a toggle. Nor does it generate a control cage: the splines are not retained.

For the record, Lightwave manages smoothing seperately from SubDs. Smoothing is the 'slackening of tension across an angle by moving the vertex of that angle to the mathematical average position of the defining points. When done to a complex mesh, this results into an overall smoother mesh.

Metaform was a plugin that is no longer needed with the advent of spline patches and SubDivision surfaces.
« Last Edit: January 09, 2004, 04:33:27 pm by 440 »
[I am not really here. This post is entirely a figment of your imagination.]

 

Offline Nico

  • Venom
    Parlez-vous Model Magician?
  • 212
Well I asked Killmenow to tell me how was SubD in LW, I don't think he told me crap, right?
besides, you don't understand what I said. the low res cage is how I call the original low poly mesh ( that's how it's called in max and, surprisingly enough, that's how KMN calls it too ). And you can modify the SubD mesh by modifying the low poly cage. Well, I thought it went w/o saying, but obviously not.
« Last Edit: January 09, 2004, 05:35:47 pm by 83 »
SCREW CANON!