Arne 0 Posted December 31, 2005 Hello altogether, I've been working on a Win32 Application written in Delphi that could (hopefully) be of use for Oxygen2 modelers. The idea behind that tool is that correct LOD-Values (like the BIS ones: 0.5 , 1.5, 3.0, 5.0 ...) for a given number of vertices have always been a mystery for me. My tool is able to analyze MLOD models and extract the following values for each LOD: - LOD Value number - number of vertices and - number of polys in that LOD. Right now I'm computing another value that may be of use: a bounding box. That means a six sided box where the model fits exactly inside. Given that bounding box (a simple "convex hull") I calculate a 'Vertices per cubic meter' value. All the models you analyze can be saved in a proprietary database for future use. Now let's say you want a function for the number of vertices per LOD-Value. Example: Take the BIS Resistance Bus: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> LOD Value Vertices Polygons ========================= 0.5 3279 3264 1.5 2665 2133 3.0 1334 1078 5.0 779 602 7.0 491 306 9.0 195 99 Your model has 2800 vertices in a LOD and it has a similar shape/outline as the BIS Bus. Now what LOD Value would you give that LOD? If you look at the table it should be something between 0.5 and 1.5. But what exactly? So I tell my tool to analyze the BIS Bus and compute a function: LOD-Value = f(Vertices) I'm approximating right now through the use of splines. Disadvantage is that the function is not defined for higher / lower Vertice/Polycount than in the reference model (e.g. BIS Bus) because it just interpolates and cannot extrapolate. The first Beta of my App is almost finished, just needs some text at the axises of the drawn function and some testing. What do you think? Can it be a help? Any idea how to extrapolate? Anybody with knowledge in numerical computations here? Wish you a happy new year, Arne Share this post Link to post Share on other sites
Student Pilot 0 Posted December 31, 2005 Well, you've just about lost me with the math, so I can't help there, but that tool sounds nice! I have always wondered how many faces should be in each lod. This would be a nice tool to have. -Pilot Share this post Link to post Share on other sites
blackjack-VS- 0 Posted January 1, 2006 hello arne. i usually calculate that by hand(calculator), so i guess a tool is always welcome. what i dont understand is why ur using spline interpolation here. this is not the kind of function with harmonic behavior or even not linear. so when i'm planning the lod's value versus number of faces/vertices, i always start by the main lod(higher poly),then the lowest poly version. so to the midle lods i need to calculate the number of vertices/faces. a simple usage of line equation (y=mx+b) will do it. so why dont u build a tool that ask this (i'll use bus values): "what's the value for highest lod?" - (0.5) "number of faces/vertices of highest lod?" - (3264) (polys) "what the value for lowest lod?" - (9.0) "number of faces of lowest lod?" - (99) (polys) "how many lod's u want?" - (6) "insert lod's values u want to use" - (1.5 , 3.0 , 5.0 , 7.0 , 9.0) the output will be: lod1.5=(2133) lod3.0=(1078) lod5.0=(602) lod7.0=(306) that's what i did for my addon (by hand) and worked ok. with output data i could have a nice maximum of polys to use for the midle lod's. u wont be able to get the exact number of polys calculated, but what u want is a smooth transition between lod0's. for what i could understand so far the value of the lod is related to a distance. so the 0.5 for the 1st lod is visibility at 5m or 50m (never figured out). another thing i dont figured yet is the faces count or polycount. i posted about that few days ago. nobody so far gave me an precise answer. u named it polys for the bus example. in o2 it says faces. but from the experiences i recently made, i think if u model something in editable poly, then go to o2 and make a squarize, it just detects planar faces and transforms them in 1 face. (this is the old story about what is a polygon and what's a face). anyway, plz go ahead with the tool and count with me for some feedback. i'll wait for a sample. ps: i think what i described can be called linear interpolation...not sure...math books from college are full of dust, so i dont want to revive my alergies... Share this post Link to post Share on other sites
Arne 0 Posted January 5, 2006 People wanting to participate in Beta testing can contact me vie eMail, ICQ or MSN. NOT vie PM here as I don't check them frequently. Thanx, Arne Share this post Link to post Share on other sites
Student Pilot 0 Posted January 5, 2006 @Blackjack Interesting, I never thought of using a linear equation for this. It does make sense, though, and its something I can understand Can't comment on splines, because I have no idea what they are. -Pilot Share this post Link to post Share on other sites
Arne 0 Posted January 5, 2006 IMHO linear interpolation is not the way to go. Have a look at the BIS Bus example in my first post: it's a non linear equation! I'll try to find a better way of interploation - e.g. Lagrange polynoms. Share this post Link to post Share on other sites
blackjack-VS- 0 Posted January 5, 2006 hey arne i got your email, but i'm so dam busy lately that i hadnt any free time to test it properly.as soon as i test it i'll post here or email u. about the lagrange polynoms...i had that so deeped in my mind, that i just gota grab my old numerical analysis book to remember the concept. but like i told before, i still dont get why u want such methode. i still think that lod's numbers versus number of polys is something roughly APROXIMATED. the goal is get a smooth transition between lods. but i'll keep a look on your thread and post as soon as i can. Blackjack Share this post Link to post Share on other sites
Footmunch 0 Posted January 12, 2006 The simplest function for the LOD number would be a logarithmic function of vertex count. Using the example given, we get the formula - LOD Number = 25 - 3 x ln(Vertex Count) For the BIS Bus: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> Vertices BIS LOD Value Fit LOD Value ============================== 3279 0.5 0.71 2665 1.5 2.0 1334 3 3.4 779 5 5.0 491 7 6.4 195 9 9.2 Not perfect, but it's a fairly good fit. Of course, you can turn this equation around to give: Vertex Count = 4000 x e^(LOD Number / 3) Share this post Link to post Share on other sites