Solved Texture is missing for .dae object

Discussion in 'Mod Support' started by GDUB, Jul 3, 2017.

  1. GDUB

    GDUB
    Expand Collapse

    Joined:
    Jul 3, 2017
    Messages:
    21
    Hi There,

    " 55.93346|W|ColladaErrorHandler::handleWarning|game:vehicles/hopperM/vehicles/hopperM/hopper.dae - Collada Shape warning: Collada <lines> element in hopper_fascia is not supported."

    I've been browsing the threads and no one seems to have had the same problem (hard to believe), or they are asking about this in a way I couldn't think of.

    The issue is. I tried modding hopper. Changed fascia, headlights etc. in blender. Accidentally created a second instance of the base hopper material, so blender renamed it hopper.002 and all the originals to hopper.001. That was obviously not referenced in materials.cs and even if I had the stamina to change material assignments to 930 objects (or to write the python for it) I was unable to do so. If I renamed hopper.001 to hopper, blender automatically changed it back. Even after deleting hopper.002. Anyways, I tried changing materials.cs instead, so it would reference hopper.001. That lead to parsing error! Obvious in hindsight, just not foresight. So then changed the materials names in blender to hopper_001 and referenced that in materials.cs. Everything came back, EXCEPT my modded parts have shitty textures. I deleted all material assignments to modded parts and then assigned the same material as the body,door etc. to the fascia. I don't know why, but it just looks different. it is exactly the same material as the valance or the doors or the fenders, but it's not metallic, instead it looks like grey plastic. See below! Everything is exactly the same for material assignment as the normal objects in blender, the intensity, hardness, shading, transparency. Perfectly the same. I can only assume it has to do with the above error report from the startup log which I also can't explain.
    PS: I intentionally removed the hood because I thought it might be colliding with the fascia, causing the error.
    HopperM.png
    Please help!
     
  2. Nadeox1

    Nadeox1
    Expand Collapse
    Spinning Cube
    BeamNG Team

    Joined:
    Aug 5, 2012
    Messages:
    14,683
    That error means your object contains lines.

    Lines cannot be rendered, so the game discard them and shows you a warning.
    That's unrelated to the materials problem you are having.

    Also, you need to fix your model, as having materials with .001/.002/etc. is a very bad idea.
    You just have to rename the material in one object, and it will change for all the other objects using the same material:
    Video - Click to Play - Direct Link
     
    • Agree Agree x 1
  3. GDUB

    GDUB
    Expand Collapse

    Joined:
    Jul 3, 2017
    Messages:
    21
    Thanks for the guidance, I've sorted the materials issue. By the way. The original skin didn't work on my modded parts, so I created a new material for them, I UV unwrapped the hood,fascia and fender each and created pngs after texture painting, which I converted to .dds with GIMP 2.8. I exported it with the right compression and with mipmaps, then referenced them on materials.cs. The strange thing is, the texture does show up on the modded parts but it's skewed. As if the dds would not map to the object the same way in blender unwrapping and in-game. I checked the modeling and texturing guide. If I want to alter the skin of the original in-game car to fit the modded parts, do I have to join the bit's that make up the bodywork and unwrap them as 1 object before creating an image and converting to dds? If not, how could I make the paintjob cover the modded parts?
     
  4. Nadeox1

    Nadeox1
    Expand Collapse
    Spinning Cube
    BeamNG Team

    Joined:
    Aug 5, 2012
    Messages:
    14,683
    Your models must have two UV Maps.
    One for the standard stuff, and the other is used by skins.
    Open the .dae of on the official vehicles that has skins, and you will see body panels have two UV Maps.
     
  5. GDUB

    GDUB
    Expand Collapse

    Joined:
    Jul 3, 2017
    Messages:
    21
    OK. So I can see the UV Maps. How do I edit the original .dds skin files to actually fit my modded parts?
    If I UV unwrap the parts the different bits go all over the place, unless I do it from a given perspective. If I changed the grille, is it possible to remove the original grille from the hopper_n.dds, hopper_d.dds, hopper_s.dds files and move the unwrapped UV map of the new one? Or do I have to select each face on the bodywork and unwrap them together to create new dds files?
     
  6. Nadeox1

    Nadeox1
    Expand Collapse
    Spinning Cube
    BeamNG Team

    Joined:
    Aug 5, 2012
    Messages:
    14,683
    Sorry, I lost a bit the topic since the last reply.
    So, let's recap: You are making a new part for the hopper, and now wondering about the UVMaps.

    If you want to use the original material and textures, then it means you are not going to modify any of those (They must remain original).
    You just have to unwrap your custom meshes (just the part you made) to fit the already existing texture maps (and use the same material that the game uses for that texture).

    If you want to create your own textures, then create a separate, new material and create separate, new UV. That means you are not going to re-use any of the original textures.
     
  7. GDUB

    GDUB
    Expand Collapse

    Joined:
    Jul 3, 2017
    Messages:
    21
    OK, so I'm looking for exactly this:
    "If you want to use the original material and textures, then it means you are not going to modify any of those (They must remain original).
    You just have to unwrap your custom meshes (just the part you made) to fit the already existing texture maps (and use the same material that the game uses for that texture)."
    I keep the material and the texture files untouched, now how do I unwrap my custom meshes? If I bring any of the original dds files and do the unwrapping the faces will be distorted in one way or another and seams will end up on the middle of my hood.
    upload_2017-7-21_9-55-6.png upload_2017-7-21_9-55-52.png upload_2017-7-21_10-5-37.png

    Unless I unwrap from perspective, as below:

    upload_2017-7-21_10-7-15.png
    But now my unwrapped hood sits in completely the wrong place with the wrong size on the texture map and I have literally no idea how to move it, modify it or do anything about it so it actually maps the same way as the original hood. Or does texture map mean something else in this context? I've been scouring youtube, blenderart, stackoverflow and google in general for days and nobody has anything relevant to say about this. Every tutorial is about creating your standalone image texture from scratch or fitting your image to a single object.
     
  8. Nadeox1

    Nadeox1
    Expand Collapse
    Spinning Cube
    BeamNG Team

    Joined:
    Aug 5, 2012
    Messages:
    14,683
    Yes, that's normal.

    The image texture is not a square (1:1 ratio), but a rectangle (1:2).
    UV works based on coordinates. The coordinates are the same regardless of the image size/ratio.
    For example, I unwrapped this square plane to fill the entire UV space. If I use a square texture, it will map correctly. If I use a non-square texture, it will stretch.
    Video - Click to Play - Direct Link


    The same for your UV. If you unwrap your model on a square image it will look fine.
    By the time you select a non-square image, your UV will appear stretched. You can fix that by scaling the UVMap in the correct axis (In my example, I'd scale 1/2 on the Y axis, to make it become a square again).

    These stuff is pretty much the basics of UV Unwrapping, not really related to the game, but it's general 3D modelling knowledge.
    I advice to check some tutorials, they will be able to introduce you to this part in better way :)
    This series is pretty neat:


    It will explain you how this stuff works, and how to work with UV Maps, unwrap & modify them.


    PS- By the way, some questions left.
    When you exported your custom meshes as a .DAE, did you export the entire 'hopper' and saved the .dae by replacing the original 'hopper.dae'?
    Or you only exported your custom mesh, and saved them under a separate .dae file?
     
    • Like Like x 1
  9. GDUB

    GDUB
    Expand Collapse

    Joined:
    Jul 3, 2017
    Messages:
    21
    Technically I haven't changed anything in the hopper folder. I made a new vehicle folder in the Docs/Beamng/mods, copied every hopper file over and wrote some python code to rename all objects and meshes, all filenames and every single hopper reference in all the json, jbeam, pc and cs files. I am aware of the technique of just loading a single part for modding, but there were too many intricacies, ie. the modded hood doesn't fit the original fascia and fenders, the modded fascia doesn't have a grille, has different lights, doesn't fit the original hood or fenders etc., so I just created a standalone model rather than getting bogged down with the config specs.
     
  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