CLOD
by Bradley Newton Haug · in Torque Game Engine · 02/16/2003 (6:25 pm) · 19 replies
Greetings
has anyone delved into the possibility of implementing a CLOD system for the shapes instead of the discreet one being used, I am going through the shape related code and it's interesting/complex/not documented well.
I ask because I am interested in implementing such a system, please refrain from responses like 'why' and 'discreet LOD is fine', I like the current system, but I'm trying to simplify the art path.
also, is anyone working on vertex/pixel shading. It is beyond my ability to implement easily, but I am curious as to the possibility, and it will affect my art path, knowing the status will allow me to plan. There doesn't seem to be a lot of shader resources available for linux. Does anyone know of an example program implementing shaders of any kind in linux.
best regards
-brad
has anyone delved into the possibility of implementing a CLOD system for the shapes instead of the discreet one being used, I am going through the shape related code and it's interesting/complex/not documented well.
I ask because I am interested in implementing such a system, please refrain from responses like 'why' and 'discreet LOD is fine', I like the current system, but I'm trying to simplify the art path.
also, is anyone working on vertex/pixel shading. It is beyond my ability to implement easily, but I am curious as to the possibility, and it will affect my art path, knowing the status will allow me to plan. There doesn't seem to be a lot of shader resources available for linux. Does anyone know of an example program implementing shaders of any kind in linux.
best regards
-brad
About the author
#2
02/17/2003 (10:24 pm)
I believe CLOD is Continuous Level Of Detail.
#3
I don't really know any engine though that doesn't use some kind of LOD technique but with torque you don't have to your just not going to get as much.
If your trying to keep the amount of work your artist does,down you might consider some kind of dynamic LOD, but thats a trick.
Matt
02/18/2003 (3:27 am)
Oh well you can do that now. You just need to keep your detail low and make sure you implement somekind view inhibotor. IE have the player wind through valleys or something. You might even keep your visibility distance down. I don't really know any engine though that doesn't use some kind of LOD technique but with torque you don't have to your just not going to get as much.
If your trying to keep the amount of work your artist does,down you might consider some kind of dynamic LOD, but thats a trick.
Matt
#4
continous level of detail is a geometry pipeline technique that usually takes place after view frustrum culling, usually based on the distance from a mesh.
it serves the same purpose as the discreet LOD, but happens on the fly in the engine. You set a threshold in the art tool (minimum/maximum), and for example a mesh is 4000 faces up close the engine would show it as 300 far away, you would be able to script it up or down linearly, rather than discreetly (threshold).
It accomplishes the same thing as the current engine without the additional art path work and is more flexible. It is also fairly easy to implement due to the large amount of research available.
Please note that I am not asking for this feature, I am trying to figure out if work has been, or is being done, as it is a feature I require and if it is not being implemented, I will do so.
regards
brad
02/18/2003 (3:37 pm)
=/continous level of detail is a geometry pipeline technique that usually takes place after view frustrum culling, usually based on the distance from a mesh.
it serves the same purpose as the discreet LOD, but happens on the fly in the engine. You set a threshold in the art tool (minimum/maximum), and for example a mesh is 4000 faces up close the engine would show it as 300 far away, you would be able to script it up or down linearly, rather than discreetly (threshold).
It accomplishes the same thing as the current engine without the additional art path work and is more flexible. It is also fairly easy to implement due to the large amount of research available.
Please note that I am not asking for this feature, I am trying to figure out if work has been, or is being done, as it is a feature I require and if it is not being implemented, I will do so.
regards
brad
#5
With CLOD, do you have to make seperate meshes for the different LOD's for models like we currently do with Torque games?
02/18/2003 (4:49 pm)
I'm kind of confused here.. I'm new to all of this stuff.With CLOD, do you have to make seperate meshes for the different LOD's for models like we currently do with Torque games?
#6
regards
brad
02/18/2003 (5:01 pm)
james, no you wouldn't have to, but in entails changes to many parts of the engine (renderer, the art path (max2dts) to name a few). It is a lengthy process. I won't be finished for some time as I'm still getting my head around the codebase, it is a system I've coded from example twice and from scratch once now, so I should have a decent go of it.regards
brad
#7
I would suggest focusing instead on the _exporter_ and not the engine. You could set up the exporter to use a CLOD algorithm to pre-generate the discrete LOD levels at export time, which would avoid the worst tradeoffs and still keep the art pipeline simple.
02/18/2003 (5:21 pm)
CLOD is very cool when it works, but it causes some definate problems with modern hardware. It's a very good thing to keep vertexes the same (and in compiled arrays or VAR/VAO, etc) whenever possible. CLOD blows that notion out of the water, because the mesh changes in lots of ways as the distance changes.I would suggest focusing instead on the _exporter_ and not the engine. You could set up the exporter to use a CLOD algorithm to pre-generate the discrete LOD levels at export time, which would avoid the worst tradeoffs and still keep the art pipeline simple.
#8
02/18/2003 (5:28 pm)
Sounds pretty cool. I have no plans to try to implement anything like this is torque, as it is waaay beyond my skill level. But someday, I would like to take a shot at making my own engine... so its good to know what this stuff is :)
#9
mark, thanks for the rundown on Garland and Heckbert[1997], that is the idea, because I was misunderstood I'll clarify that the decision of which mesh to use is done in the engine and the creation itself is in the art path.
the exporter is an absolute wreck btw, is there a file format doc?
thanks
brad.
02/18/2003 (5:58 pm)
I'm not asking opinions on theory or design, I was asking if anyone was working on it. mark, thanks for the rundown on Garland and Heckbert[1997], that is the idea, because I was misunderstood I'll clarify that the decision of which mesh to use is done in the engine and the creation itself is in the art path.
the exporter is an absolute wreck btw, is there a file format doc?
thanks
brad.
#10
The exporter does have code in it for generating LOD levels on export but the code is not fully implemented and I don't beleive it works.
For info on how DTS is wrote your going to need to delve into the exporter code and weed through all the MAX stuff to find the actual code that writes the stuff.
Just my opinion and I am sure it won't count but a good artist who has some understanding of workflow can turn DTS models out as fast as any other model. And adding multi res'd versions of the mesh is real quik especially with MAX5 you don't need to re-adjust anything it carrys UVW coordinates across the levels of detail.
For what you want I believe your going to have a time doing it but it could be done.
Good Luck
Matt
PS the exporter is in great shape and works well. 9outa10 times I find its the person thats trying to export that is a mess. Then again you might be using Milkshape or somthing. Those exporters might be a mess I wouldn't know.
PSS I forgot the newer Head versions have a DTS SDK. I haven't looked through it much but I beleive if your looking for the format requirements that might also have some good for ya.
02/19/2003 (4:06 am)
There is no file format DOC. Just the DTS doc's that talk about how to export. I really don't see how CLOD has an advantage over the current form of LOD. The exporter does have code in it for generating LOD levels on export but the code is not fully implemented and I don't beleive it works.
For info on how DTS is wrote your going to need to delve into the exporter code and weed through all the MAX stuff to find the actual code that writes the stuff.
Just my opinion and I am sure it won't count but a good artist who has some understanding of workflow can turn DTS models out as fast as any other model. And adding multi res'd versions of the mesh is real quik especially with MAX5 you don't need to re-adjust anything it carrys UVW coordinates across the levels of detail.
For what you want I believe your going to have a time doing it but it could be done.
Good Luck
Matt
PS the exporter is in great shape and works well. 9outa10 times I find its the person thats trying to export that is a mess. Then again you might be using Milkshape or somthing. Those exporters might be a mess I wouldn't know.
PSS I forgot the newer Head versions have a DTS SDK. I haven't looked through it much but I beleive if your looking for the format requirements that might also have some good for ya.
#11
02/19/2003 (10:07 am)
I have been working on CLOD implementation for 2 years come March and I will tell you that it is no piece of cake, to implement robustly. There is a lot to think about for an actual game environment that is not covered by simple render tests. But if you are willing to sink some serious time in to CLOD then your engine will be years ahead. We have been using CLOD as a jumping point to implement our new render engine that takes in to account environment effects.
#12
I'll take a better look at the exporter, I'm using max5.1 with the plugin compiled for 5.1 and the newest multires. When it works it works, when it doesn't it offers up almost zero information as to why, that and it crashes, I don't judge a piece of software when it's working I judge it when it encounters an error state.
Ernest,
time is something I have, I didn't mean to make it sound quick.
-regards
brad
02/19/2003 (1:57 pm)
Matt,I'll take a better look at the exporter, I'm using max5.1 with the plugin compiled for 5.1 and the newest multires. When it works it works, when it doesn't it offers up almost zero information as to why, that and it crashes, I don't judge a piece of software when it's working I judge it when it encounters an error state.
Ernest,
time is something I have, I didn't mean to make it sound quick.
-regards
brad
#13
But if you own the source you can add error messages to the realese. There are several reasons why Max2dts would do a fatail assert or just not work.
You gotta remember the exporter was built with several modellers sitting around telling the programmer what they wanted and the programmer telling them what they got and how to use it. So they really didn't need error mesages. And its really not a comercial type plugin.
Are running my version that realesed here lately or did you compile your own. The one I have up for download(still off in the "Whats NEW" side bar) might have a few bugs. Particulalry if you set it up and compile it yourself. I have made several changes the last couple of compiles and was about to add them to the resourse. As far as errors go I don't get any but then not to bragg I got a pretty good handle on the exporter also.
If you think there is a bug ,post in my thread up in Modeling or on the resource and I will take a look at it. explain the situation.
I am sure someone will run accross one, I really didn't make any changes to the code but the way its compiled and linked to the MAX SDK makes a difference in some things.
Matt
02/19/2003 (2:16 pm)
Ya well thats cause your probably running a release version. Thats the one I recently set up for distribution. OR You might be building your own.But if you own the source you can add error messages to the realese. There are several reasons why Max2dts would do a fatail assert or just not work.
You gotta remember the exporter was built with several modellers sitting around telling the programmer what they wanted and the programmer telling them what they got and how to use it. So they really didn't need error mesages. And its really not a comercial type plugin.
Are running my version that realesed here lately or did you compile your own. The one I have up for download(still off in the "Whats NEW" side bar) might have a few bugs. Particulalry if you set it up and compile it yourself. I have made several changes the last couple of compiles and was about to add them to the resourse. As far as errors go I don't get any but then not to bragg I got a pretty good handle on the exporter also.
If you think there is a bug ,post in my thread up in Modeling or on the resource and I will take a look at it. explain the situation.
I am sure someone will run accross one, I really didn't make any changes to the code but the way its compiled and linked to the MAX SDK makes a difference in some things.
Matt
#14
so as I said, 'it's a mess'. No matter the reasons, what happened, how it was made, it fails to produce useful error messages and must be fixed, I was asking for a status of this, not insulting your mother, you don't have to defend it, nor do you have to remind me that I have the source.
if a modeller does something wrong, and the exporter fails to tell them why or what and crashes it's host app, it is 'buggy', no discussion, no excuses, no explanations. If it is up to me to fix it, so be it, that's what I'm asking.
It's becoming more and more clear to me that it's useless to ask questions about the source, everytime I question anything I get responses about how 'everything is fine' or 'you don't need that'.
-brad
02/19/2003 (2:53 pm)
explain the situation? I don't want to have to come here and ask someone everytime someone does something wrong, I want error handling as per the last 40 years or so of computer science as we know it.so as I said, 'it's a mess'. No matter the reasons, what happened, how it was made, it fails to produce useful error messages and must be fixed, I was asking for a status of this, not insulting your mother, you don't have to defend it, nor do you have to remind me that I have the source.
if a modeller does something wrong, and the exporter fails to tell them why or what and crashes it's host app, it is 'buggy', no discussion, no excuses, no explanations. If it is up to me to fix it, so be it, that's what I'm asking.
It's becoming more and more clear to me that it's useless to ask questions about the source, everytime I question anything I get responses about how 'everything is fine' or 'you don't need that'.
-brad
#15
[qoute]has anyone delved into the possibility of implementing a CLOD system for the shapes instead of the discreet one being used, I am going through the shape related code and it's interesting/complex/not documented well. [/qoute]
Not to my knowledge, but if they had, I may not know. Not everyone tells the world what thyre doing.
[qoute]I ask because I am interested in implementing such a system, please refrain from responses like 'why' and 'discreet LOD is fine', I like the current system, but I'm trying to simplify the art path.[/qoute] Again, arent people allowed to question the motives? I dont think Why is such a bad question to ask. You may be under a misapprehension.
[qoute]also, is anyone working on vertex/pixel shading. It is beyond my ability to implement easily, but I am curious as to the possibility, and it will affect my art path, knowing the status will allow me to plan. There doesn't seem to be a lot of shader resources available for linux. Does anyone know of an example program implementing shaders of any kind in linux.[/qoute] Yes, people are implementing shaders, several different people in several different ways. I believe there's a forum body search now, so maybe try that to see who and how.
No idea about the linux Q.
I think if you want more positive responses, try and stay away from the "This sucks, has anyone tried to do X" type of question?
Perhaps people here are over zealous to try and point out that people should concentrate on making GAMES and not messing around with engine crap. But thats the natural bias thats formed over the years and it isnt a personal attack.
Phil.
02/19/2003 (5:14 pm)
Brad, you get responses in such a manner because of the way you phrase the question (I believe).[qoute]has anyone delved into the possibility of implementing a CLOD system for the shapes instead of the discreet one being used, I am going through the shape related code and it's interesting/complex/not documented well. [/qoute]
Not to my knowledge, but if they had, I may not know. Not everyone tells the world what thyre doing.
[qoute]I ask because I am interested in implementing such a system, please refrain from responses like 'why' and 'discreet LOD is fine', I like the current system, but I'm trying to simplify the art path.[/qoute] Again, arent people allowed to question the motives? I dont think Why is such a bad question to ask. You may be under a misapprehension.
[qoute]also, is anyone working on vertex/pixel shading. It is beyond my ability to implement easily, but I am curious as to the possibility, and it will affect my art path, knowing the status will allow me to plan. There doesn't seem to be a lot of shader resources available for linux. Does anyone know of an example program implementing shaders of any kind in linux.[/qoute] Yes, people are implementing shaders, several different people in several different ways. I believe there's a forum body search now, so maybe try that to see who and how.
No idea about the linux Q.
I think if you want more positive responses, try and stay away from the "This sucks, has anyone tried to do X" type of question?
Perhaps people here are over zealous to try and point out that people should concentrate on making GAMES and not messing around with engine crap. But thats the natural bias thats formed over the years and it isnt a personal attack.
Phil.
#16
02/19/2003 (6:16 pm)
sorry, next time I'll draw flowers next to my queries in hopes of recieving a useful answer.
#17
http://www.melax.com/polychop/index.html
I have used it in production code...
-J
02/19/2003 (8:31 pm)
This is a very robust algo, that is suitable for realtime:http://www.melax.com/polychop/index.html
I have used it in production code...
-J
#18
02/19/2003 (8:46 pm)
thanks josh
#19
I'll make sure in future to avoid your posts and not try to give you any imformation good, bad, or ugly.
You've made it very clear that you really don't want to discuss anything you just want a status reports and plain answers.
By the way I believe your right an error setup for the exporter would be a really nice feature to have especially for beginners. But you went off on your little fit so I won't bother asking your opinion on any kind implimentation. If and when Myself or Others happen to get around to adding it I hope it makes it as a resource or code change.
So good luck with your CLOD
Matt
02/19/2003 (8:57 pm)
Well I was just trying to help. I explained the state it was in in case you didn't quite understand. There are a few people who come here and don't have any understanding of the status the engine and its tools are in. Excuse me for assuming incorrectly.I'll make sure in future to avoid your posts and not try to give you any imformation good, bad, or ugly.
You've made it very clear that you really don't want to discuss anything you just want a status reports and plain answers.
By the way I believe your right an error setup for the exporter would be a really nice feature to have especially for beginners. But you went off on your little fit so I won't bother asking your opinion on any kind implimentation. If and when Myself or Others happen to get around to adding it I hope it makes it as a resource or code change.
So good luck with your CLOD
Matt
Torque Owner Matthew Jones
If thats what it is I think that would probably be a big task.
Some teams have implemented shaders but from what I understand thats a big task also that pretty much requires revamping the rendering system. Not impossible but definatly a task.
I still would like to know the definition of CLOD?
Matt