Hey all I was wondering if anybody knows how to create different levels of detail from separate .dae files? I have made a city in Sketchup and surprise surprise its a bit of a lag monster when you are right in the center of it. I guess that if I knew Blender it could generate the differing LOD values and make it into one file for me, but i don't. So from reading the T3D documentation it seems like its possible to make separate models for each LOD and combine them in the T3D shape editor. So i was playing around with the shape editor and all i managed to do was make my model vanish. A few things i don't understand are: There is a number for each LOD, but i don't know what it relates to. Is level 2 high detail and level 0 low detail? When adding a LOD to a model do i start with the high detail model and import the lower detail ones into it? or start with the low detail and add the higher ones to it? This is from the T3D manual So is "truck_lod400.dts" the high detail or low detail model? What does lod400 mean? Is that what it would look like at 400 meters away (low detail)? Or is does 400 mean its the high detail version and the smaller the number the lower the detail? sorry for being a noob. I hope somebody can help Cheers
There is no draw distance, it is measured by pixel size of the object. Just open a model for Torque3D and you will notice empty nodes called with a number and the models also have a number after the name, some kind of default is 300 for the highest LOD, then 200 and then 100. This means when your model is smaller than 300 pixels on your screen it switches to the 200- model and so on. I've had issues working with the shape editor and adding lods. The easiest way is to create your model (and LODs) in the same "scene" in max/blender, select them all and export when done. The shape editor is handy for manually changing LODs (on models that already have LOD) for testing purposes. This basic tut sums it up (ignore the .dts part): http://www.deadonque.com/buddyblog/tutorials/LoDsTorque3D.html
Im a little bit out of practice but i once created a simple screenshot which tries to explain it. You are supposed to have all LOD meshes within the same .dae file, all in the same spot, or positioned congruent to each other if you like. I also found the template.dae used for the screenshot, it has 2 LOD meshes, one called *a400 and one *a30. The a400 one is rendered as long the sign takes more than 400 pixel of the display area, the a30 one is rendered from the size of 399 down to 30 pixel in size. below that nothing is rendered. I hope this helps, as gimmik you also have an example of how to animate rendered meshes within the same dae, enjoy. You could use it to make something like this: This is a fast concept sign made by me, but feel free to make something similair for your map please! Sadly animated collision meshes are not possible as far as i know, would love to get corrected on that one! Edit: somehow the attached picture is a little small so here you have it in a readable size: https://www.dropbox.com/s/2jomo3wc6a9agb0/LODM.jpg Edit2: i forgot about the 1:1 button in the attachment picture viewer... w/e ^^
Thanks, but the wiki link is related to blender or sketchup. This is about the shape editor in T3D. I may have misunderstood the T3D documentation but it seems that you can make a LOD from separate .dae files. So I can make a two models in sketchup. One low poly and one high poly. Then in the shape editor I can open one of them and import the other to use as a different LOD. The problem is I don't know what order things need to be done in, or what in the example T3D documentation is the high poly or the low poly model. I have just made a blank test map, so I will just experiment until I either break it or figure it out. Cheers - - - Updated - - - Ah so the 400 is 400 pixels on the screen, not distance away. So if its bigger than 400 pixels the high detail will be shown. when its less than 400 the next one down will be shown. I think I know what to do now, so i set the high detail mesh to 400 and the lower detail one to less than that. Thank you!
exactly. Note that the 400 and 30 are just random numbers taken as example, you adjust these to the appropriate sizes needed for your own meshes and likes.. kinda obvious but just to get sure. Im not sure if there is a limit on how many lod meshes you can use but i think i saw 4+ at least at models delivered with the game. Edit: Also important to note, to save you some nervous and time... you can edit the name of the lod meshes inside the t3d editor, just in the section i highlighted, that way you dont have to export new .dae files over and over again to import again and all that stuff, but be able to adjust it live while testing. have fun.
This is awesome, Thanks! I managed to get it working, yes I found that it was changing way to early with 400 and 30. For my tall building the high detail one needed to be set to 1200 and the low detail one was 400. I set the imposter to come on at 100, but i don't think i want that on as its a bit crusty looking. Now i have got two buildings working in my test map i can get back into sketchup and cut all the details out of the stuff i made and apply them to my city map. Its going to be a bit of a long slog, but It should help the frame rate a bit i hope. Here is a few sneaky pic's Its not going to be a huge GTA 5 quality looking map seeing as i made the bulk of it in about a week using sketchup and paint.net. I had already made it as relatively low detail as i could, mostly because i wanted to get a variety of buildings quickly. Sadly it was not low detail enough. When looking down the full length of one of streets I struggle to get 27 fps on max settings. Its 60-140 fps on low settings though. Its not as bad on the edges of the city, but gets worse the deeper you go in. Thank you for all the help, I'm going to be a busy boy for quite some time.
finally something different. All maps in BeamNG looked atm still the same over and over again. Your map should be really great
Thanks please don't expect to much though. The textures are all different resolutions and of differing quality. As I made everything in sketchup they don't have that glossy well rendered look that you pros using blender can achieve. It kind of has that really old railway simulator feel to it. If i can reduce the rendering cost with my new found knowledge it should turn out to be quite fun though. Yes I had a feeling that was kind of bad for my system spec's. Hence why i was trying to figure out how to set different LOD for everything. I mean don't get me wrong I can drive around the city quite happily with it dropping down to 27 fps in places. And like i said, If i turn the graphics settings to low then i get 60+ everywhere. Not great considering when on dry rock island i get around 70+ fps on high settings. Anyway guys, Thanks for helping me figure out how to do it. I now have to open each model I made and butcher it to within an inch of looking normal and set it as the low detail version. should take about a day or three. If the fps is still shocking after this then I will try it with the 2D imposters enabled. If that's still no good then all i can say is i tried. It should help though I hope lol. cheers - - - Updated - - - I thought it was too good to be true. When i reloaded the level it was saying failed to load resource and the names of my low detail models. Its weird because I had it working. I could scroll in and out an see it changing between them. I clicked the little save button once i had it like i wanted it. but its all gone and is shouting errors at me when I reload the level. Any clue as to what i did wrong? this is the high detail this is the low detail What i did was select the high detail building and opened the shape editor. I then set the drop down box to "new detail" I clicked "import shape into" and selected the low detail model. I tweaked the numbers until it changes detail at the right distance, and hit the save button. back in game it was working until I reload the level. so why is it not saving correctly? sorry for being such a noob.
That looks very nice and is something different, nice work. The roadlayout reminds me a littlebit on a carmageddon city map. I never imported a new detail shape into a high poly model, so i have no idea what is happening there. I did set up the hierarchy of the dae as the wiki shows in the screenshot, or nearly as that. So both meshes, high and low poly, are in the same .dae file while importing it into T3D, if the hierarchy is set up right using emptys/null-objects you will instantly see both lod meshes in the shape editor. I have no idea if you can edit this stuff on sketchup as i never realy used it, if not you would have no problem downloading blender and learning just to use it to combine multiple meshes/dae you exported from sketchup into a single .dae that has the right setup and re-export.
I don't have a problem downloading Blender, but i do have a problem using it lol I tried importing that building into blender but it just looks grey and I have no idea how to go about setting up the low detail one next to it and re-exporting it. The scene tree on the right hand side of blender just looks like a mess of sketchup parts, and looks nothing like the correctly set up one in the picture further up this post. This is just the high detail building imported from sketchup This is the high and low detail building together on top of each other There seems to be some errors in blenders console window too At this point I'm ready to hide blender away and never look at the cluster of meaningless buttons and menus ever again lol I wish I knew how to get the settings to save in T3D. It looked like it worked making the LOD from two separate .dae files. Shame it seems unable to save it properly. I hope it is something I was doing wrong, but i cant think of any other way to try and get it to save. All I know is that the map is near enough junk right now. I have to clear about 100 error boxes when loading the level. Looks like I will have to delete all copies of the 3 buildings and all the lamp posts that I tried to set LOD up for. Then exporting them all again with new names and spend ages placing them again just to get rid of the errors. I guess there is no real point in continuing the map either if your going to need a super computer to run it. Just one last stab in the dark. In the folder i have been putting my models in I noticed there are some new .cs files that relate only to the models i set up LOD on. It has the name of the low detail model in it. It is the same name as the failed to load resource error messages when loading the level. Do you think if i put the full file path instead of just the name of the .dea file that it would help? Seeing as its having trouble finding the file when loading. Though I think it will just break things even more. Not sure what to do now. Sorry guys, Looks like the map is a failure.
damn :/ That are a lot of seperate mesh objects for a single building, i only modeled every lod mesh i use as single mesh so i realy just know that way to handle it. Also im sadly not yet on the part of the work where i use lod models in my map, as my main road mesh is too big and allways all over the display and i dont want to cut it into pieces, so i have no clue why it is not saving correctly. I hope someone else has an idea to make your desired way work out. Beside that i could only offer to have a look at one of your high and low detail models of a random building to see if i get same results or how much work it would be to combine those seperate meshes into a single one, as this is what i would suggest to do. Saves you a lot of nervous also with material references and settings but might be some work to merge them all. Still it is better than having to fight with the T3D editor imo. Edit: dont throw blender away^^ all the buttons have lovely uses you just have to learn about and there is tons of educational material for blender in the interwebs, you can learn most of it just by watching youtube videos and you can start wherever you want, interface first would be handy as it explains you what to do with the hierachy stuff.
Thank you for your offer of having a look at my building files. I have removed them from my post because i fixed it! I have been searching for blender tutorials on trying to make LOD out of two separate .dea files but nothing really comes up that applies. The search continues for a tutorial that fits my situation. Although I have kind of lost the will to continue at the moment. The best I can do for now is to try and clear the errors when loading the map. That way at least its not a total fail, just a very laggy map. If you managed to get my method to work then please tell me what you did differently to me. If you managed to combine the files in blender then I hope you can make a detailed tutorial for a blender noob to understand. Either way, Thanks for your help! I'm feeling very despondent at the moment. just for clarification this is what it says in the T3D documentation about importing geometry from a seporate file. See point 2 Have i misunderstood this? - - - Updated - - - I think i cracked it! it was the .cs file! I changed the name of the low detail version in the .cs file to the full file path and it seemed to work! so from this: to this: (yes i know the building names are different in each pic, I didn't take a pic of the original) ok off to do further testing..... Thanks for all the input, Im not feeling so despondent now!
The thing is, the only way i would know is to just combine both dae(which are meshes) inside a scene of blender, so you open the first .dae and then import the second one to the same scene, but this method would kind of require you to have the dozen seperate meshes of a single level of detail to be merged together. So just a single mesh per LOD model/.dae. You can merge objects more or less easy, depends on shapes and topology you have and/or want to achieve after merging. If you have set up your textures correcty in new created blender materials in front, it might also merge the textures using uv maps but im not sure as i dont use blender yet. But have a look at tutorials for merging/combining objects: http://goo.gl/8uV7zd To find the right tutorials for your purposes, think practical what you want to do and then search as basic as it can get "blender how to combine two objects" or "meshes". Edit: forgot to mention again, the reason for all this merging is just to get the hierarchy right and easy, but i just remembered.. you maybe can group all the seperate meshes into an Empty (google for blender empties), and so get 2-3 groups each being one level of detail, to name the empties *_xxx (x being pixelcount settings) and give the meshes no numbers. Not that it would make much difference if your way is working fine now! I just think its nice to know other options too. That is nice to hear! I hope that was the core/only problem, would be sad to see this project die! Good luck.
Thank you so much for your insight! Yes I do think this has fixed it. So the way to make different LOD using separate .dae files goes like this: place high detail model in map. select it and open the shape editor, select "new detail" in the drop down box Click "import shape into" and pick you low detail model Tweak the numbers to get it to change at the right distance and hit save. open the .cs file with the name of the high detail model and add the full file path to the low detail model named inside and save it. I have reloaded the map and I don't get any errors and I can see the detail level changing as I drive about. So touch wood I don't run into any more problems as I carry on. Funny why the auto generated .cs file doesn't put the full file path in there, just the model name. Still at least it seems to be working without errors.....but for how long lol I hope after doing this the fps will improve, but so far i cant notice any improvement with just the 3 buildings, all the lamp posts and one section of road working. I am yet to make low detail versions of the most complex models, so I have my fingers crossed that they will make the most difference. Cheers once again
Glad if im able to help and you are welcome, looking forward to some [wip] thread maybe? or did i just miss it.. Thanks for the overview, will try that way for sure once.
I haven't started a WIP thread yet. I wanted to get it looking nicer first. Also my last WIP thread nobody really took much notice, so I figured I wont waste my time on it until I have a beta ready. I do have one more question about LOD though. How do i set up the correct distance for the models to change when it depends what screen resolution you are using? I set it up so it changes at what looks to be the right distance when in 1080p. When I shrink the window down to 720p nothing changes until you are way to close to the model. This is very annoying. I guess I will have to reset up all the distances for a smaller window size, but it will mean when in 1080p that most of the city will be in the high detail state for way longer than it needs to be. Its a bit of a catch 22 situation.
Well, i would expect more interest for such a map. Sadly i have no experience with the problem of different screen resolutions as i did not come to this point of testing yet. I would think you need to have the values adjusted to be in the middle of the available range, meaning if 1080p needs its lod value to be 20 and 1024x768 needs just a 8, test it on 14 on both resolutions. Not sure this will have any usefull outcome but just an idea. Otherwise you would have to release different versions, which would not be that comfortable considering the settings for these values are saved within the .dae files instead of some .cs as i know?