This is kind of a request for added functionality for the material editor. Id like a quick way to make basic materials for new DAE files when you first load them. As it is now, before you can load a new 3D model into the game you have to; go into Explorer and make a new material.cs in its directory, then write a script for each material by hand. This can be difficult unless you keep very careful track of each material associated with the model. I just got done generating over 100 materials for 5 models and it was almost impossible to keep track of all the common materials and avoid making duplicates. I also made a few typos along the way and was pretty difficult to solve. It would be much a more pleasant task if the material file was generated automatically using the DEAs material set and the available DDS files located in the target's location. Even an external tool that could write basic material script would be a huge improvement. After the initial script is generated, its a simple task to add transparency and other settings in the editor. Bump and spec maps are also a manual task, but not as big a deal, since they are less common.
This is done sometimes, especially if you tick the 'Copy UV' and 'Copy Textures' when exporting to DAE from Blender.
I use 3DS Max and use the OpenCollada copy images function to keep track of the materials that are currently being handled. I copy the names from the files outputted straight to the material.cs using a F2+Ctrl-C,Ctrl-V macro on my gamepad. This makes it a little quicker, but still just a stop-gap. Ill check out the blender export plugin, it seems promising.
Need to be more precise: In blender it 'works' if you use Blender Render mode and assigned the textures from the 'Textures Panel': Usually works only for the texture that is assigned to the diffuse mode, but it's something And ticking the boxes I mentioned earlier on export. You'd need to put the DAE and textures under the same folder too.
I think that you should not put over 100 materials for 5 objects, it might be very hard on performance as each material adds drawcalls and only surfaces (polygons) with same material can be batched up, batching is then one that saves map maker from killing the CPU and allowing GPU doing it's job. Then again I have no idea how gigantic your objects are, but thought I bring this up as that material number and object number sounds me to be oblivion to performance Performance is reason why textures are put into texturemaps, atlases, which are just many textures combined to one that allows one to use one material for group of textures, then if UV maps consists only single polygons per island, that kills performance too.
Thanks for the explanation. That should get me going in the right direction. Merging everything into big meshes was just for simplifying the initially building of the material.cs file. Most of the textures are already libraries with several maps each. Its just a ridiculous number of objects. Im planning on breaking them down into individual objects later, so that they can be added to the forest system, which is good at handling massive amounts of copied assets.
Yeah, trick that goes on forest items is that batching, any identical UV map piece using same texture (and material) is done in one batch, which saves a lot of CPU time and helps keep GPU fed and crazy part is that polygons don't really matter much at all, because when you do have UV map islands, those are what are polygons that game 'sees', not the polygons you have in modeling software. Also most harmful for performance are pieces using less than 1000 polygons or so (I'm not 100% certain of number) and I guess TSStatic objects are not batching, at least them hit performance limits much easier. Another funny part is that for GPU there are no objects, only surfaces and surfaces are related to UV maps and textures/materials. It is all quite interesting how it really works, if you are interested to learn more, I have collected some links here https://www.beamng.com/threads/opti...nd-others-differences-has-lots-of-info.57689/ some links are randomly offline, but come back online at times. All that info helps to up you game so to speak, to get most out of this engine and some aspects are totally upside down compared to what is commonly thought. I guess all professionals know about those things, but for me it was quite revealing to find out all of that, also it was surprising to learn how harmful LODs can be in some cases. With BeamNG it seems to be very big difference of proper optimization, at least with current version, it can be much more than allowing to build 4 times more.