Tracks - 3DSMAX 2016 to rFactor 2 workflow...

Discussion in 'Modding' started by Woodee, Apr 30, 2016.

  1. Woodee

    Woodee Registered

    Joined:
    Oct 4, 2010
    Messages:
    4,004
    Likes Received:
    1,058
    Can someone point me in the right direction? I love flow charts :)
     
  2. Gijs van Elderen

    Gijs van Elderen Registered

    Joined:
    May 1, 2014
    Messages:
    1,393
    Likes Received:
    469
    3Ds max 2016 ==> gJED ==> dev mode ==> rF2

    3Ds max or any other 3D moddeling program:
    - Create a scene. (Road, terrain, fences, buildings, trees, track side objects.)
    - give the objects the apropriate object names
    - give the objects the apropriate material names.
    - UV map the objects: gMotor shaders make use of max 4 UV Sets
    - If the gmotor shader requires vertex colors: apply vertex color. Build a shaderFX for those.

    Phong, blinn or lambert => for gmotor shaders that uses only a T1
    A layered shader can be used for shaders with: T1, T2, T3 ... In the gmotor shader name you find how the "mix" them: multiply, add, ...
    For gmotor shaders that uses vertex colors: i use ShaderFX and make a shader for it.

    Export to FBX with the game exporter. (Simple and easy)
    - triangulate
    - use 2014/2015
    - Z up

    gJED:
    - Assign the gmotor shader and textures
    - give objects its properties
    - reflection mappings

    Dev mode:
    - AIW
    - Camera's




    But first you need to know how the gmotor shaders are working with your modeling program.

    If you open a ISI track with gJED you can see what gmotor shader(s) is used for what object.

    To see how gmotor is working and what texture is using what UV set:
    - Make test plane in your modeling program.
    - give it 4 differently mapped UV sets.
    - in gJED: assign the gmotor shader.
    - assign a checker texture to each channel one by one.
     
    Last edited by a moderator: May 2, 2016
  3. Woodee

    Woodee Registered

    Joined:
    Oct 4, 2010
    Messages:
    4,004
    Likes Received:
    1,058
    When you say multi UV set, do you mean multi-subobject map?

    I'd like to try and fit Quixel Suite/Substance painter into this workflow if possible.
     
  4. Jka

    Jka Member Staff Member

    Joined:
    Jan 31, 2011
    Messages:
    954
    Likes Received:
    213
    UWV mapping coords of single material. Depending on gMaterial shader, it requires 1 - 4 independent mapping coords. In 3ds max enviroment, we are talking channels instead of sets.
     
  5. MikeeCZ

    MikeeCZ Registered

    Joined:
    Sep 29, 2012
    Messages:
    1,544
    Likes Received:
    180
    UVW Channels, you should use them as little as possible, only when benefits outdo negatives (mostly amout of pixels that would otherwise be needed with only 1 channel)
    I have never needed more than 3 but that was only for quite some advances terrain blending where you mix in vertex alpha and vertex color aswell.
     
  6. Gijs van Elderen

    Gijs van Elderen Registered

    Joined:
    May 1, 2014
    Messages:
    1,393
    Likes Received:
    469
    With gJED it's different. The if the shader uses 4 UV sets/channels it's best to fill those in. Those can be copy's of each other.
    For example: T1 x T1 bump spec.

    T1 = UV 1
    T2 = UV 2
    Bump map = UV 3
    Spec = UV 4

    UV 3 and UV 4 are just a copy of UV 1. :)

    In Max with the gmotor plugin you probably only need 2 channels.
     
  7. Woodee

    Woodee Registered

    Joined:
    Oct 4, 2010
    Messages:
    4,004
    Likes Received:
    1,058
    Do you apply these as 4 separate bitmaps with a multi-subobject map type?

    Remember we are talking about 3dsmax 2016 that is not compatible with gmotor plugins!!

    [​IMG]
     
  8. MikeeCZ

    MikeeCZ Registered

    Joined:
    Sep 29, 2012
    Messages:
    1,544
    Likes Received:
    180
    Why would it be better in gJED to waste with performance like that? That is very bad for optimization, Do you want to explain why is it better to copy paste UVW channels for gJED?
    No shader uses any pre-defined number of UV channels, only number of textures, there is nothing making you use differend UV channel for a differend texture or even more than one UVW channel.
    You should only use more than one channel when you absolutely have to (for example when the shape of the particular object is such that it has a lot of UV channel1 overlapping and you need mapping for AO, you would use channel2 for AO). Unless you can explain what do you mean
     
  9. MikeeCZ

    MikeeCZ Registered

    Joined:
    Sep 29, 2012
    Messages:
    1,544
    Likes Received:
    180
    gJED cannot read MAX materials except of applied albedo (T1) map, the rest of the material settings (shaders, map settings, etc) has to be done directly in gJED after importing the FBX file... the file will automatically import with plain T1 shader on it and you have to change it to whatever you want it to be
    that applies to every material ID
     
  10. Tuttle

    Tuttle Technical Art Director - Env Lead

    Joined:
    Feb 14, 2012
    Messages:
    2,480
    Likes Received:
    775
    If you have already a gMotor scene (max 2010/11/12), you can use the gMotor exporter to convert all your mats to standard (diffuse, specular and bump channels with textures), before export to FBX, and then you'll get gJED loading these mats as basic Bump/Specular Map T1. You can do this going in the Main Control section of the gMotor exporter in 3dsmax, and then convert to standard mats.

    You can do similar with no gMotor scenes, creating same matballs (Multi/Sub) and using standard mats instead gMotor and using these 3 channels as a base.
     
  11. Woodee

    Woodee Registered

    Joined:
    Oct 4, 2010
    Messages:
    4,004
    Likes Received:
    1,058
    I am only talking about 3dsmax versions which are NOT compatible with gmotor plugins because the 3dsmax version is too new (2013 and newer).

    On one hand people are saying, setup all the UV's before even getting to gJED. Then others are saying just set 1 diffuse map then set the rest in gJED.

    The realroad shader has at least 3 UV channels, terrain shader has 4 UV channels as seen in the rf2 wiki.

    So how do the materials need set before getting to gJED?
    Visual explanations please, as I am having trouble understanding all the terminology.
     
  12. MikeeCZ

    MikeeCZ Registered

    Joined:
    Sep 29, 2012
    Messages:
    1,544
    Likes Received:
    180
    You obviously dont know what UVs are...
    There is a difference between UV channel/set and a texture slot
    real road shader has atleast 3 texture slots, not uv channels.. UV channels are not related to the material settings, its the object that holds UV data for each vertex in that object. In materials you only specifiy which texture uses which UV channel... majority of objects will only use 1 UV channel but easily upto 3 textures (diffuse/specular/normal) all using the same UV channel.
    Your example - Real road shader would, when well made, use 2 UV channels. One for Diff/Spec/Normal textures of the tarmac and another channel for the rubbered in texture that is invisible until you rubber the track in. (a possible third UV channel would be for so called "detail" map, which adds sorta close up detail of sorts that is tiling in a differend way than the other textures)
    UV is also referend to as mapping, it holds 2D coordinates of every vertex within that object as positioned within a texture.
    As i said, in some special cases, you will need more than 1 channel (set of coordinates) usually for optimization reasons (to save pixels). In case of real road its needed because the texture of the tarmac needs to follow the direction of the road itself, where the texture of the rubber on the road needs to follow the direction of the race line. (so when your track gets rubbered in, the skids and rubber looks right)
    If you choose, you can use realroad shader with just one UV channel, use the same UV mapping for the tarmac textures and real road textures, but that will most likely look like the skids are going in an odd way, a way they wouldnt in real life.

    The UV mapping has to be done before exporting into gJED as gJED cannot edit UV coordinates. It is the material settings (therefore shader used and number of textures used) that need to be set in gJED after importing your object
     
    Last edited by a moderator: May 3, 2016
  13. Gijs van Elderen

    Gijs van Elderen Registered

    Joined:
    May 1, 2014
    Messages:
    1,393
    Likes Received:
    469

    In gJED all texture slots have predefined UV sets assigned to them. There is no other way to tell gJED what texture belongs to what UV set.
    Downfall is you need to know them in gJED before you can assign/use them in your moddeling program. A shader list with the texture slots and its UV set ID would be nice. (Most are obvious)



    The Real Road shader according to the rF2 wiki makes use of 3 UVW channels while infact it makes use of 4 UV sets. UVW channels and UV sets are not the same thing. JKa and Luc can explain the differences.
    (BTW: UVsets in Maya and Blender you can name them whatever you want, they are not numbers. The order upon creation will give them it's "ID number".)

    All i know is for the real road shader i need to apply these UVsets for gJED. This aplies to Blender and Maya. Don't know about others...
    [TABLE="class: wikitable"]
    [TR]
    [/TR]
    [TR]
    [TH="bgcolor: #555555, align: center"]Stage[/TH]
    [TH="bgcolor: #555555, align: center"]Type[/TH]
    [TH="bgcolor: #555555, align: center"]UV set[/TH]
    [TH="bgcolor: #555555, align: center"]RGB[/TH]
    [TH="bgcolor: #555555, align: center"]Alpha[/TH]
    [/TR]
    [TR]
    [TD]1[/TD]
    [TD]Albedo Map[/TD]
    [TD]1[/TD]
    [TD]Classic albedo (low frequency details)[/TD]
    [TD]Low frequency Specular highlights and wet mask[/TD]
    [/TR]
    [TR]
    [TD]2[/TD]
    [TD]Multi Map[/TD]
    [TD]2[/TD]
    [TD]Asphalt detail map (high frequency details)[/TD]
    [TD][/TD]
    [/TR]
    [TR]
    [TD]3[/TD]
    [TD]Normal Map[/TD]
    [TD]3[/TD]
    [TD]Pronounces either stage 1 or 2 cracks or asphalt grain[/TD]
    [TD][/TD]
    [/TR]
    [TR]
    [TD]4[/TD]
    [TD]RaceGroove Map[/TD]
    [TD]4[/TD]
    [TD]Rubber racing line[/TD]
    [TD]Additive specular map for rubber highlights[/TD]
    [/TR]
    [TR]
    [TD]5[/TD]
    [TD]Specular Map[/TD]
    [TD]2[/TD]
    [TD]High frequency Specular highlights[/TD]
    [TD]Tileable puddle map[/TD]
    [/TR]
    [TR]
    [TD]6[/TD]
    [TD]Marbles Map[/TD]
    [TD]2[/TD]
    [TD]Rubber debris off racing line[/TD]
    [TD]Mask for marbles RGB[/TD]
    [/TR]
    [TR]
    [TD]7[/TD]
    [TD]Reflection Map[/TD]
    [TD]4[/TD]
    [TD]Placeholder cubemap[/TD]
    [/TR]
    [/TABLE]
    The Normal map with UVset 3 is a copy of UVset 1 for curbs or a copy of UV set 2 for the road. Or you can give it its own UV's. For example: concrete tiles.



    The rF2's wiki aplies to 3ds max with the gmotor materials. There is no way to tell gJED what UV channel the Normal map uses other than give it it's own.
    [TABLE="class: wikitable"]
    [TR]
    [/TR]
    [TR]
    [TH="bgcolor: #555555, align: center"]Stage[/TH]
    [TH="bgcolor: #555555, align: center"]Type[/TH]
    [TH="bgcolor: #555555, align: center"]UV Channel[/TH]
    [TH="bgcolor: #555555, align: center"]RGB[/TH]
    [TH="bgcolor: #555555, align: center"]Alpha[/TH]
    [/TR]
    [TR]
    [TD]1[/TD]
    [TD]Albedo Map[/TD]
    [TD]1[/TD]
    [TD]Classic albedo (low frequency details)[/TD]
    [TD]Low frequency Specular highlights and wet mask[/TD]
    [/TR]
    [TR]
    [TD]2[/TD]
    [TD]Multi Map[/TD]
    [TD]2[/TD]
    [TD]Asphalt detail map (high frequency details)[/TD]
    [TD][/TD]
    [/TR]
    [TR]
    [TD]3[/TD]
    [TD]Normal Map[/TD]
    [TD]1 or 2[/TD]
    [TD]Pronounces either stage 1 or 2 cracks or asphalt grain[/TD]
    [TD][/TD]
    [/TR]
    [TR]
    [TD]4[/TD]
    [TD]RaceGroove Map[/TD]
    [TD]3[/TD]
    [TD]Rubber racing line[/TD]
    [TD]Additive specular map for rubber highlights[/TD]
    [/TR]
    [TR]
    [TD]5[/TD]
    [TD]Specular Map[/TD]
    [TD]2[/TD]
    [TD]High frequency Specular highlights[/TD]
    [TD]Tileable puddle map[/TD]
    [/TR]
    [TR]
    [TD]6[/TD]
    [TD]Marbles Map[/TD]
    [TD]2[/TD]
    [TD]Rubber debris off racing line[/TD]
    [TD]Mask for marbles RGB[/TD]
    [/TR]
    [TR]
    [TD]7[/TD]
    [TD]Reflection Map[/TD]
    [TD]3[/TD]
    [TD]Placeholder cubemap[/TD]
    [/TR]
    [/TABLE]


    My question for 3Ds Max/gJED users (without the gmotor materials) : What tabel should they use?
     
    Last edited by a moderator: May 4, 2016
  14. Luc Van Camp

    Luc Van Camp Track Team Staff Member

    Joined:
    Oct 4, 2010
    Messages:
    1,030
    Likes Received:
    15
    The difference between both tables is stage 3 (Normal Map). That stage uses its own UV set, but typically people will simply assign either Channel 1 or 2 so it matches with either the Albedo or the Multi Map. Technically, table 1 is the correct one from gJED's perspective.
     
  15. MikeeCZ

    MikeeCZ Registered

    Joined:
    Sep 29, 2012
    Messages:
    1,544
    Likes Received:
    180

    If that is true and you are forced to you use UV channels as directed by gJED than that is seriously poor design.

    The chart says you would use a differend UV channel for Normal map than for either albedo or detail map (low and high frequency details). I dont know why on earth would anybody want to do that.
    Eliminate that oddness and you are back to 3 channels exactly as i desribed before.

    I guess its beceause for some odd reason gJED forces you to use pre-defined UV channels so they wanted to leave you with freedom of not having normal map lining up with the other two textures if your desire would be such, if you want to stay conventional you need to as you said before copy paste the mapping.. that is wastefull and i dont understand it
     
  16. Gijs van Elderen

    Gijs van Elderen Registered

    Joined:
    May 1, 2014
    Messages:
    1,393
    Likes Received:
    469
    The amount of UV coordinates are described and hardwired in the directx shader. It's not a poor design of gJED or directed by gJED.

    If you use 1 UV channel in 3ds Max with the gmotor materials and the shaders uses 3 UV coordinate sets. This 1 UV channels will be exported as 3 UV coordinate sets. (Copy's of UV channel 1)
    I don't understand why you think using 1 channel is better for perfmance reason? If it is... You should use a shader that uses only 1 UV coordinate set.

    gJED reads those 4 sets UV's from the FBX file.
     
  17. Woodee

    Woodee Registered

    Joined:
    Oct 4, 2010
    Messages:
    4,004
    Likes Received:
    1,058
    [​IMG]
    Sets?

    [​IMG]
    Channels?

    What goes where and why? I want to make gJED understand me! :D
     
  18. Gijs van Elderen

    Gijs van Elderen Registered

    Joined:
    May 1, 2014
    Messages:
    1,393
    Likes Received:
    469
    - First "set?"

    are "MatBalls" Material balls: give them the aproriate material name. With the prefix that you can find in the .tdf file. Like Road_xxxxx or Gras_xxxxx . Those prefixes are only needed for everything you can drive on. You can choose whatever you want for other materials.

    - Second "set?"

    are your texture slots. If you fill in a diffuse color map, specular map color map and a bump color map.
    and export it to gJED. gJED will fill in a bump map specular T1 shader for you.

    I use the amount of texture files as UV channels. So maximum 4. If i only need 1 UV channel i only fil in 1 texture. In gJED the other textures will use this same UV channel. In Maya i can skip this and create the UV channels i need. But to see what i'm doing i give it some textures.

    BTW: Blinn material = excellent choice to begin with.

    - Channels?

    if you want to export it to FBX and gJED: UV channels are UV Set. So table 1 for you.
    (If you use the gmotor materials those are not the same)


    But first things first! Get to know your modeling program.
    If you are familiar with the viewport and navigation in 3Ds Max.
    Start with this turorial: https://youtu.be/Q_Ks3QdmfvA

    I recomend to do similar beginner tutorials with Blender and Maya aswell.

    Choose the moddeling program that suits you best.
     

Share This Page