3DSmax and DAE

Discussion in 'Content Creation' started by DiscoQuinn, Jan 6, 2016.

  1. DiscoQuinn

    DiscoQuinn
    Expand Collapse
    BeamNG Team

    Joined:
    Jun 17, 2015
    Messages:
    28
    Hey guys, I'm just needing a little pointing in the right direction.

    I design wheels for fun and wanted to toss a few in game to get the hang of importing objects into BeamNG.
    I've done lots of modding for SLRR and have a routine for that game, but exporting DAE's from 3DSmax, and setting up the materials is all new to me for this game.

    With some digging through old threads I was unable to get a good grasp. I've installed OpenCollada for my 3DSmax 2016, seems to work fine and opens in other programs alright. I've attempted over writing some other models just to try it out and had no luck.

    I'm looking for guidance on
    -How to organize my materials for the wheel in 3DSmax
    -How to organize my model for proper export of DAE (having multi-models in one file is new to me.)
    -If anyone has a simple single rim pack I can use as a template to write over.

    Thanks in Advance!

    ~Q

    You can find a sample of some of my wheels here:
    https://speedhero.wordpress.com/2016/01/06/loops-and-hoops/
     
  2. Goosah

    Goosah
    Expand Collapse
    Global Moderator
    BeamNG Team

    Joined:
    Aug 30, 2013
    Messages:
    790
    1) Separate/combine the meshes into relevant "editable poly" objects

    For example, combine all your components of a wheel into one editable poly object called speedhero_wheel_1 or something, using "attach" function in the editable poly menu). The name you choose for the object is what you will reference in the flexbodies section of the jbeam. All the elements of that object will then be rendered in the game when that name is referenced.

    2) Create dummy standard materials (only the material name is important) and apply them to the objects as needed. A single material can be applied to an element, or you can use multi/sub-object material to put multiple materials on one element (applying only to selected polygons for example).

    When the game loads the .dae file, it associates the material name to certain textures and properties defined in a materials.cs file in the vehicle folder. If you do not have a materials.cs file, or your .cs file lacks all the materials needed, the game will create a materials.cs file in documents/BeamNG.drive/vehicles/xxx. You can take this file, modify it as needed, and put it in the vehicle folder with your .dae

    2) Make sure the part is the right size and using meters units,

    3) Set all the object origins to 0,0,0 using "affect pivot only" in the side menu. Select the objects you are exporting, alt+right click, hit freeze transform, then freeze rotation, then transform to zero, then rotation to zero. Then, in the utilities tab on the side menu, choose "reset xform", and hit "reset selected".

    3) Export the objects as a .dae (use openCOLLADA exporter available on the net)

    ss+(2016-01-06+at+04.17.52).png


    4) Add an entry in the flexbodies section of the relevant jbeam that looks something like this:

    ["speedhero_wheel_1", ["wheel_FR","wheelhub_a_FR","wheelhub_b_FR"]],

    The first quote being the name of the object in the .dae, the others being the groups of nodes the mesh will be bound to.
     
    #2 Goosah, Jan 7, 2016
    Last edited: Jan 7, 2016
    • Like Like x 1
  3. DiscoQuinn

    DiscoQuinn
    Expand Collapse
    BeamNG Team

    Joined:
    Jun 17, 2015
    Messages:
    28
    Can I apply materials to the wheel in 3DSmax, like a generic chrome, or do I have to have a UVWmap and apply a DDS file to the whole thing?
     
  4. Goosah

    Goosah
    Expand Collapse
    Global Moderator
    BeamNG Team

    Joined:
    Aug 30, 2013
    Messages:
    790
    You can apply generic chrome by using a null.dds texture in the common folder. Heres an example. Nothing is used from the 3dsmax material other than the name afaik.

    singleton Material(speedhero_wheel1)
    {
    mapTo = "speedhero_wheel1";
    diffuseMap[0] = "vehicles/common/null.dds";
    specularMap[0] = "vehicles/common/null.dds";
    diffuseMap[1] = "vehicles/common/null.dds";
    specularMap[1] = "vehiclescommon/null.dds";
    specularPower[0] = "16";
    specularPower[1] = "16";
    pixelSpecular[0] = "1";
    pixelSpecular[1] = "1";
    diffuseColor[0] = "1 1 1 1.0";
    diffuseColor[1] = "0.0 0.0 0.0 0.4";
    useAnisotropic[0] = "1";
    useAnisotropic[1] = "1";
    castShadows = "1";
    translucent = "1";
    translucentBlendOp = "None";
    alphaTest = "1";
    alphaRef = "0";
    cubemap = "BNG_Sky_02_cubemap";
    materialTag0 = "beamng"; materialTag1 = "vehicle";
    };
     
  5. DiscoQuinn

    DiscoQuinn
    Expand Collapse
    BeamNG Team

    Joined:
    Jun 17, 2015
    Messages:
    28


    Welp, Goosah comes to my rescue yet again. I was missing some important underlines and other simple things. Neato. I can now use this as a base for many other wheels I design. Neat.

     
    #5 DiscoQuinn, Jan 7, 2016
    Last edited by a moderator: Jan 7, 2016
    • Like Like x 3
  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