Help for first mod

Discussion in 'Car Modding' started by doc-brown, May 13, 2016.

  1. doc-brown

    doc-brown Registered

    Joined:
    May 13, 2016
    Messages:
    6
    Likes Received:
    0
    Hello guys,

    I want to create my first mod for rFactor 2. I created a car-body, but I can not manage it to get the car in the game. My idea is to use an existing car and replace the car-body with my car-body - as a first step. I am using the "Car Modding Complete Tutorial" of the rFactor homepage. The gMotorMaterial-Plugin is the point, where I get stuck. The problem is that I am using 3ds Max 2017. The oldest version you get on the Autodesk homepage is 2014. But the gMotorMaterial-Plugin works only up to 2012.
    So I don't know how I should continue. My problem is the body material-assignment. Is there any other solution for people, who have no 3ds Max 2012? Or is that the only way?
    Is there an other solution with 3ds Max without the plugin?
    Or is there a solution with blender?
    Or can I create a mod for another game (for example Assetto Corsa) and convert it to rFactor 2?

    Thanks for your help.
     
  2. Gijs van Elderen

    Gijs van Elderen Member

    Joined:
    May 1, 2014
    Messages:
    1,396
    Likes Received:
    466
  3. RJames

    RJames Registered

    Joined:
    Nov 2, 2012
    Messages:
    567
    Likes Received:
    0
    You can export out your model to .fbx format and then import it into gJED (Program found in /support/tools/gjed.exe)

    With that tool you can assign and setup textures (although you still need to do all your mapping in max beforehand). From there you can export straight out to rf2 format.

     
  4. doc-brown

    doc-brown Registered

    Joined:
    May 13, 2016
    Messages:
    6
    Likes Received:
    0
    Thanks!
    I thought that gJED is not the right tool, because in the rfactor-wiki stands that you can not assign material to meshes.

    Do I need 3dsimed? Actually I am using it. But when gJED exports to rf2, too, then I do not need it any more. Right?
     
  5. Gijs van Elderen

    Gijs van Elderen Member

    Joined:
    May 1, 2014
    Messages:
    1,396
    Likes Received:
    466
    Nope, you don't need 3dsimed. :)

    Just a 3d moddeling program that exports it too FBX.

    in your 3d moddeling program you create:
    - The 3D objects and assign a material to it (a phong E, lambert or blinn material, it doesn't matter)
    - Create a UV map, (cars have mostly 1UV channel)
    - bake a ambient occlussion + UV wire snap shot. (For the body template)
    - material names has to be correct for the WC... (Wild Card) materials. (You can rename them in gJED if needed)

    In gJED you assign the apropriate shader and other textures the shader needs. And the specular and reflection property's.
    You export the only gmt's to the cars maps folder and adjust the .gen file.

    gJED can create a .gen file for you but it isn't implemented yet.
     
  6. doc-brown

    doc-brown Registered

    Joined:
    May 13, 2016
    Messages:
    6
    Likes Received:
    0
    I use 3ds max, but I have actually not very much practice, so it is a bit difficult.
    I made a test with a cube. I want to expand a existing car with a cube on the roof. It works and I could see the cube in the game, but on a complete wrong position.
    I loaded the existing car in 3ds max and imported the cube. Then I positioned the cube on the roof and deleted all parts except the cube. I saved the cube as a fbx-file. When I open now this file with 3dsimed the position is right.
    If I use gJED then I can not see my cube, only that area with the sun, is that right?!
    Nevertheless I can export the cube to a gmt-file. But if I open now this gmt file with 3dsimed, the cube have an other position. The same wrong position, which I can see later in the game. Maybe the problem are the axes. I do not know, but could it be that gJED twist the axes?!
     
  7. Gijs van Elderen

    Gijs van Elderen Member

    Joined:
    May 1, 2014
    Messages:
    1,396
    Likes Received:
    466
    For gJED it's important to set 3ds max with Z-up and units in meters (i think that's default) and export it to FBX with Z-up.
    New versions of 3DS Max have a "Game Exporter". It's a FBX game exporter plugin you'll need to enable in the plugin manager (or wathever it's called in 3ds max). It simplifies the setting to a few.
    FBX 2014/2015, Z up and triangulate are the settings that works best for me.

    If the position is not correct 3ds max vs gJED. You propably need to reset its pivot point to global center. With 3D Maya i click on "freeze transform" to do this. With 3DS Max it's a X-form modifer or something...

    If you can't see the object in gJED, like you discribe it. It sounds like you're "inside" the cube. Move backwards: Assign some buttons to move forward, backwards, left right.

    BTW: 3dsimed is a great tool, but i wouldn't recommend it as a reference.
     
  8. doc-brown

    doc-brown Registered

    Joined:
    May 13, 2016
    Messages:
    6
    Likes Received:
    0
    Thanks again! This settings were crucial. Indeed I have still problems with converting the units, either the cube is to big or to small. But I think that should not be that big problem.

    But now I have an other question. How can I create a very simple dds-texture for my car-body? For the beginning the body should have one color. Only the windows and maybe the lights should have an other color. Should I create for those parts a extra object with a separate dds-texture?
     
  9. Gijs van Elderen

    Gijs van Elderen Member

    Joined:
    May 1, 2014
    Messages:
    1,396
    Likes Received:
    466
    First you need to create a UV map: you need to think like a tailor :). ==> 3DS max 2017 has a nice new features. https://www.youtube.com/watch?v=t_TzQYabCh4
    I use the Maya 2016 bonus tools "auto unwrapping" for complex shapes. ==> https://www.youtube.com/watch?v=HLhazEa8wmw ==> Watch from min 10:30

    Watch a few UV unwrapping tutorials for Max.

    Once you have your UV map: Create a UV snap shot: I think it's called "render UV template" in 3DS max ==> https://www.youtube.com/watch?v=vCcx-0X--H0
    You can open the UV template with photoshop and start painting. Hide the Wire layer and save as .dds.

    Once you have your complete car body. I recommend to bake a Occlusion map and put it in photoshop. It should match your wire template.

    [​IMG]
    [​IMG]
    [​IMG]
     
    Last edited by a moderator: May 16, 2016
  10. doc-brown

    doc-brown Registered

    Joined:
    May 13, 2016
    Messages:
    6
    Likes Received:
    0
    Great! Thanks for the links. There I still have a lot to do. :)

    One more question about the GameExporter. Maybe I still have a wrong setting. I load the existing main-car to 3ds max and positioned and scaled my new carbody. Then I deleted all other parts and exported the body with the GameExporter to a gmt.file. The problem now is that I get the new body in the game, but the position of the body is offset. Dimension and orientation are right, but the axis origin (y and x) is not in the middle of the car.
     
  11. Gijs van Elderen

    Gijs van Elderen Member

    Joined:
    May 1, 2014
    Messages:
    1,396
    Likes Received:
    466
     
    Last edited by a moderator: May 20, 2016
  12. doc-brown

    doc-brown Registered

    Joined:
    May 13, 2016
    Messages:
    6
    Likes Received:
    0
    No way that I manage it so far without your help. Thanks! There are so many settings to know. Therefor I would have googled a very long time...

    The task to set the originin to the global center in 3ds max is 'Reset XForm' and 'Freeze Transform' with ALT + right mouse.


    Now you can see my car body correctly in the game :) I hope no more problems will pop up.
     
  13. T1specialist

    T1specialist Registered

    Joined:
    Jan 11, 2012
    Messages:
    237
    Likes Received:
    163
    I have a complete 3d model with uvmap and textures but I have no idea how the gjed works. How do you actually go about setting the shaders? All the tutorials I've read are either written for rfactor experts or simply do not cover the workflow inside gjed at all. For example no matter what I do inside gjed the skin texture of the car stays either black or white. The texture is blue dds file with mipmaps and no alpha layer in that case.

    This is how it looks now:
    http://imgur.com/KREwRuk
    For some reason none of the colors match with the textures either.

    Anyways, it is just me not knowing how this works. Anyone who could explain how to go from here? How to setup one shader for example? Or an url where such things are explained for gjed? Thanks.

    e: I'm working in blender so I have an fbx export and not much else at this point.
     
    Last edited by a moderator: Jun 10, 2016
  14. Coutie

    Coutie Moderator

    Joined:
    Oct 5, 2010
    Messages:
    2,460
    Likes Received:
    1,289
    Make the ambient colour brighter. If that doesn't work, have you assigned a material to the car body(and other parts) in your 3d program?

    Sent from my HTC One using Tapatalk
     
  15. T1specialist

    T1specialist Registered

    Joined:
    Jan 11, 2012
    Messages:
    237
    Likes Received:
    163
    All objects have materials set. Ambient color doesn't change anything. The car stays black. (this time with green skin)

    This is my material settings:
    http://imgur.com/HUtxRFd
    Tried all kinds of colors.

    edit: maybe it is my dds export settings in gimp. Are these correct:
    http://imgur.com/IxCxH3o
     
    Last edited by a moderator: Jun 11, 2016
  16. Gijs van Elderen

    Gijs van Elderen Member

    Joined:
    May 1, 2014
    Messages:
    1,396
    Likes Received:
    466
    The material you use in Blender doesn't matter. Material names are more important for Wild Card material names. (Iike: WCCARBODY)

    If you suspect the .dds settings: You can try a .jpeg file.

    But i suspect that the UV-mapping information is lost some how or UV set order is messed up. Maybe with the .fbx export settings.
    What are the UV set names? and what are your .fbx export settings?
     
    Last edited by a moderator: Jun 11, 2016
  17. T1specialist

    T1specialist Registered

    Joined:
    Jan 11, 2012
    Messages:
    237
    Likes Received:
    163
    It was kind late when I posted that message. I have not actually set up materials in blender. Just set the name of the material and what texture is to be used (and I think gjed ignores the latter).

    Here's my fbx export settings:
    http://imgur.com/C8x73gW

    When I went to see the uvmap names I found out that I had actually two uvmaps for the car body. The 2nd one I have no idea where it has come from (probably appeared when I was combining several objects with same materials into one object). Anyways I deleted that 2nd uvmap and tried again with gjed. Car still black. Tried jpg file. Still black. When the car loads into gjed it is this dull non reflective black. When I change the T1 shader to the car body it becomes white. When I then add the correct texture it turns into black but not completely unreflective

    The name of the car body uvmap is what blender puts there by default: "UVMap". Every material has that uvmap name. Should every material have different named uvmap?

    What are the default wild car material names? The material for the car body in my car is now named WCCARBODY. Is that wrong?
     
  18. Gijs van Elderen

    Gijs van Elderen Member

    Joined:
    May 1, 2014
    Messages:
    1,396
    Likes Received:
    466
    I've this "black object problem in gJED" when i use Travellers import scripts and combine objects. Something messes with the UV set order. But i don't know what.

    Could you try again without combining the objects?

    I've no problem combining objects i've made myself.

    WCCARBODY is OK. My mistake...
     
  19. T1specialist

    T1specialist Registered

    Joined:
    Jan 11, 2012
    Messages:
    237
    Likes Received:
    163
    I don't really understand what you mean by the uv set order?

    The combination of the objects is not the issue. This happened before I combined those objects too. It is probably something simple. Does gjed support using nulls as parents for objects?
     
  20. T1specialist

    T1specialist Registered

    Joined:
    Jan 11, 2012
    Messages:
    237
    Likes Received:
    163
    Do the textures and uvmaps need to be named in certain way? Currently the WCCARBODY texture is named as paint.dds. Is that ok?
     

Share This Page