Trying to get models from 3ds Max into Drive. Having issues. Help appreciated!

Discussion in 'Content Creation' started by CoffeeCrazy, Oct 26, 2015.

  1. Nadeox1

    Nadeox1
    Expand Collapse
    Spinning Cube
    BeamNG Team

    Joined:
    Aug 5, 2012
    Messages:
    14,683
    • Like Like x 1
  2. CoffeeCrazy

    CoffeeCrazy
    Expand Collapse

    Joined:
    Aug 4, 2013
    Messages:
    75
    Thanks, that's perfect! I will try and find time this weekend to get everything re-installed, and try and reproduce the errors (or not get them at all which would be incredible).

    Or, would it be easier for me to send you the models + textures to see if that end of it is alright?
     
    • Like Like x 1
  3. Nadeox1

    Nadeox1
    Expand Collapse
    Spinning Cube
    BeamNG Team

    Joined:
    Aug 5, 2012
    Messages:
    14,683
    It's just the static models having issues? Then you can just send them and I will put them in a map.
     
  4. CoffeeCrazy

    CoffeeCrazy
    Expand Collapse

    Joined:
    Aug 4, 2013
    Messages:
    75
    That's the thing, I'm not sure if it's a material issue in-engine or material config with importing into Torque, or an issue with the model file itself. Like material ID's, multi/sub-object textures etc. I tried variations with no success.

    I will say, if you are able to help me figure this out and we can get past it, I will be so happy I won't even know how to handle it. I might explode.
     
  5. Nadeox1

    Nadeox1
    Expand Collapse
    Spinning Cube
    BeamNG Team

    Joined:
    Aug 5, 2012
    Messages:
    14,683
    It's probably something with the static object, not related to the map. Just send in the .dae, textures and materials.cs file for that object and I'll have a look.
     
  6. CoffeeCrazy

    CoffeeCrazy
    Expand Collapse

    Joined:
    Aug 4, 2013
    Messages:
    75
    Nadeox, say I import an object and accidentally did something wrong with my material.cs, and want to start over, how do I remove the cache for this? Every subsequent time I import my object, it just uses the previous data instead of changes I made.

    Thanks!

    Also, how can I remove texture smearing/bleeding? I attached an image as example. You can see the road in the distance has a lot of black lines through it. This is because the texture itself has black surrounding the road tiling. It's not visible when you are close, but far at an angle it seems to show up. Unsure how to get rid of it. The picture isn't the best example. Understandably in this test the tops of the roads DO have black lines visible, but this does happen on the regular road as well, the black smears all over from texture bleeding.
     

    Attached Files:

    • artifact1.png
    • ada4bdfd15e114f549f42dcb0814fa4a.png
    #26 CoffeeCrazy, Feb 21, 2016
    Last edited: Feb 21, 2016
  7. Nadeox1

    Nadeox1
    Expand Collapse
    Spinning Cube
    BeamNG Team

    Joined:
    Aug 5, 2012
    Messages:
    14,683
    The cache should be in:
    Documents/BeamNG.Drive/levels/YOURLEVEL/files

    Everything you save from the ingame editor ends up there. So if you edit a material from the material editor, the materials.cs gets saved in that path.

    As for the black lines, not sure. Maybe some wrong setting in the mipmap?
    I use these settings for DDS (Mipmap is untouched basically)
     
    • Like Like x 1
  8. CoffeeCrazy

    CoffeeCrazy
    Expand Collapse

    Joined:
    Aug 4, 2013
    Messages:
    75
    Thanks, I'll double check those settings later. For your VR map, how large is each piece of your city? Like how do you break objects up for import? Is the road for the entire city one object? Is the entire city one object? To ask the question bluntly, I want to know how much road I can make before I need to split it into two objects.
     
  9. Nadeox1

    Nadeox1
    Expand Collapse
    Spinning Cube
    BeamNG Team

    Joined:
    Aug 5, 2012
    Messages:
    14,683
    ou5emZ6.jpg

    Depends. The grid texture is 2x2m. It's all modular. That's why the whole thing is only 3MB.
     
  10. CoffeeCrazy

    CoffeeCrazy
    Expand Collapse

    Joined:
    Aug 4, 2013
    Messages:
    75
    Thanks for the info! Lost my original reply to you with an accidental edit. Don't remember what I wrote. Anyways here's an update:

    Specular maps aren't working. I have the .dds files in the same folder as the others, saved in the same format (the one you suggested).

    Upon import the Spec slot is blank for each diffuse material.

    singleton Material(whatgoeshere)
    {
    mapTo = "overpass_road3";
    diffuseMap[0] = "newroadtesting.dds";
    diffuseMap[1] = "newroadtesting_Red.dds";
    specularMap[0] = "newroadtesting_spec.dds";
    specularMap[1] = "newroadtesting_Red_spec.dds";
    specularPower[0] = "1";
    specularPower[1] = "1";
    useAnisotropic[0] = "1";
    useAnisotropic[1] = "1";
    };

    I attached all of the files as well. Thanks again for the help Nadeox!
     

    Attached Files:

    #30 CoffeeCrazy, Feb 22, 2016
    Last edited: Feb 22, 2016
  11. Nadeox1

    Nadeox1
    Expand Collapse
    Spinning Cube
    BeamNG Team

    Joined:
    Aug 5, 2012
    Messages:
    14,683
    Had a look. There was quite an error in the materials.cs file.
    What you had (Bold/Red = Wrong):

    Collada has a feature that let it store some material informations directly in the .DAE file (it's a bit obscure to be honest. In T3D, the object will use that information, unless it finds a materials.cs file with the correct parameters.

    In the first two errors, you had to put the materials name in there. In the first one you inserted something that makes reference to anything. In the second you put the name of the object.
    That means the engine found no 'whatgoeshere' or 'overpass_road3' material, and decided to use the informations in the DAE for the material. That explains why it wasn't using the informations from your materials.cs

    The rest is a different error.
    [0], [1], etc. refers to the layer. In the game, objects can have up to 4 layers (Like the layers in Photoshop, one over another).
    What you did is telling the game to put one texture at layer 0 (base), and then another texture at layer (1). Since both texture are full opaque, layer 1 is completely covering layer 0.

    This is the corrected material.cs
    Result:



    Tab spacing is not necessary, but makes things nicer for the eyes.

    For the black lines, that happens because you should leave a margin.
    What happens in all games, is that when the camera is far, the UV precision come less.
    You have 0 margin between your texture and the background (which is black). If you add a small margin (let's say 4px) where the colour of the texture just bleeds off, the problem is solved.

    This is a texture with 0px margin:
    srYSvSJ.jpg

    Same, 16px margin:
    6QSGCe9.jpg
     
    #31 Nadeox1, Feb 22, 2016
    Last edited: Feb 22, 2016
    • Like Like x 1
  12. CoffeeCrazy

    CoffeeCrazy
    Expand Collapse

    Joined:
    Aug 4, 2013
    Messages:
    75
    I absolutely love you.

    I'll try to wrap my head around it in a bit, but your post is incredibly helpful! This could make things go from nightmare to easy.
     
  13. Nadeox1

    Nadeox1
    Expand Collapse
    Spinning Cube
    BeamNG Team

    Joined:
    Aug 5, 2012
    Messages:
    14,683
    Some 'after-post' edit with other informations above. Please check :)
     
  14. CoffeeCrazy

    CoffeeCrazy
    Expand Collapse

    Joined:
    Aug 4, 2013
    Messages:
    75
    Thanks again. I'm just in the mindset of leaving enough room to pack a texture full of information to use it on many things. In this case I can still do that, but I'll have to stretch the sides of the texture a bit like you suggest. I can probably just take a 1px selection and stretch it at the borders. Will look ugly on the texture but in-game won't notice it.

    This is the first time I've tried making a single object do multiple things. Kind of like modular faces/textures. I didn't want my road to look like something that repeats endlessly. This was a test for an overpass road over a highway, which will also surround highways and be in a major city area. I don't plan on making a huge map, but am aiming at GTAV styled roads. I don't want to make modular sections everywhere that share the same texture sets. I want a lot of variation in the models and textures. Though doing it this way lets me be more creative without hogging up too much memory.

    Making a city is my only passion in 3d modeling left. I don't care if it takes a year to make a small city, this is what I want to do. I feel I have the ability to make clean, sharp textures that look good and models that can match them well. The hardest part is getting it all to work in the engine, and coming up with a design for a city. With that said, if you have any city sketches let me know! Been researching for ages, have folders loaded with designs, real world images etc. I have an issue where if I can see it I can make it with small variations. Though in some cases my creativity can be lacking and I don't want to plagiarize anything. So this leaves me stumped often.

    Bleh, I'm blabbering now.

    My remaining questions for the night:
    1. How large can I make my road before I need to start culling(is this the proper term? I mean split and start another road object)
    2. How do I align things, or "snap" things in the engine? Or do I have to just do it by eye very carefully?
    3. Ideally how many 2048x2048 textures can I have be loaded into memory at the same time without murdering a medium-spec computer? If I lower it to 1024x can I double that number, or does it not work that way?
    4. How do you like your coffee?
     
    #34 CoffeeCrazy, Feb 22, 2016
    Last edited: Feb 22, 2016
  15. Nadeox1

    Nadeox1
    Expand Collapse
    Spinning Cube
    BeamNG Team

    Joined:
    Aug 5, 2012
    Messages:
    14,683
    1. There is not exactly an answer for that. Depends on how complex the object is. If you see performance drop, then you should split.

    2. When I made VR_City, I used a grid-snap of 2 meters.


    3. Depends pretty much on the case (GPU, VRAM, etc).

    4. Black, no sugar.
     
    • Like Like x 3
  16. CoffeeCrazy

    CoffeeCrazy
    Expand Collapse

    Joined:
    Aug 4, 2013
    Messages:
    75
    Quick question. Does BeamNG support decals on custom models? For instance, if I make a road with no lane lines, can I also add lane lines on top with a texture and transparency? Will I have texture flickering? I'm not too concerned about any "floating" issues when the camera is too far away, just that they don't flicker.

    To be specific, these would be my own custom decals placed on my own models.

    Thanks!
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice