Sign in to follow this  
grandell

Recolouring a part decoration

Recommended Posts

Hi all, I'm using Stud.io to recoloring few Creator Expert sets, in this case the Ferrari F40 from red to dark bluish grey

My question relates to the three unique printed pieces, the windscreen and two black 10 x 3 wedges, which have red stripes printed on them.
Stud.io/Bricklink ids:
19212pb01 Trans-Brown (Old Trans-Black) Windscreen 1 x 12 x 4 Tapered with Red Stripe on Both Ends Pattern
50955pb023 Black Wedge 10 x 3 Left with Red Stripe Pattern
 50956pb023 Black Wedge 10 x 3 Right with Red Stripe Pattern

Is it possible to change the color of the stripe itself? Or would I be better off just using a plain piece and applying a decal? I've been looking through the dat files, and I can see the files for the original part, the modified part, and the pieces in the s folder that make up the stripe, and I think I'm looking to change a(t least one) color value somewhere from a 4 (red) to a 72 (dark bluish grey), but I can't see where to do it.

It also looks like I can't actually edit the original files, but that's fine, I have managed to make a copy of each piece, and was hoping to make a simple change to the dat files, but I'm thinking it might be easier to just make a new part from scratch

 

thanks!

Edited by grandell

Share this post


Link to post
Share on other sites

Hi,

It would be simpler if you named the parts (LDraw ID / filenames) and told us which CAD you’re using (LDCad, MLCad, LeoCAD, Studio, …?).

 

Share this post


Link to post
Share on other sites

Thanks, I'll edit my post above. I'm pretty new to this whole parts customization business.

I'm using Stud.io and Part Designer

Share this post


Link to post
Share on other sites

Ok, then (part of this you seem to already have done but for completeness):

  1. Look into data/StudioPartsDefinitions2.txt to see that 50956pb023 uses 50956p01.dat.
  2. There’s two copies of that file, one in ldraw/parts and one in ldraw/Unofficial/parts.  Fortunately, they are the same.
  3. Copy it in your working directory (you may rename it to be sure there’s no confusion).
  4. Open it: it uses two subfiles, one is for the studs (stu(d)g(roup)), the other is a subfile.
  5. Create a subdirectory ‘s’ in your working directory.
  6. Copy the subfile in it (rename it too).
  7. Open the file.  You see two subfiles used at the top (it’s subfiles all the way down!):
    • the first one is in colour 16, and looking its description inside, you see it’s the “body” without the surface, not interesting for us,
    • the second is in colour 4, it seems to be the coloured stripe,
    • the rest of the file is all in colour 16, and the comments show it’s the rest of the surface, not interesting for us.
  8. You don’t need to copy these files, they don’t need to be changed: we found the stripe, it’s the subfile s/50956p01s02.dat and its colour is given in s01, so we don’t need to edit it (it’ll be colour 16 in there).
  9. Now you can edit the files:
    • Change the main file name if not already done in 3.
    • Change the first subfile name if not already done in 6.
    • Edit the main file to use the new name.
    • Edit the subfile and change the colour 4 to 72 or whatever.
  10. Now you can import the main file in PartDesigner, it should load the subfiles (modified and unmodified) and now the stripe should be 72.
  11. Export to Studio.
  12. Repeat for the other part (or not, as it’s a mirror… but it may be simpler to just repeat).

The keys are:

  • Finding the .dat files.
  • Understanding how subfiles work in LDraw, particularly:
    • that 16 is the special “current colour,”
    • that “s\” means that the file is in a subfolder named “s”
  • Understanding how PartDesigner and Studio work with subfiles:
    • PD looks for them in the current directory, and then in Studio’s files
      • that’s why you need an “s” subfolder (unless you remember to remode “s\” in the calling files),
      • that’s why you don’t need to copy all the subfiles you won’t modify.
    • When PD saves or exports a model, it “flattens” the first level (that is, the subfiles used in the main file are incorporated into the resulting .part/.dat, the sub-subfiles are left untouched).
    • Studio first look for subfiles in its files.  So beware when you modify subsubfiles: PD will load the modified ones, Studio won’t find them or will load the unmodified ones.

Hope that’s clear for you because I’m not sure it’s clear for me :grin:

Share this post


Link to post
Share on other sites

Thank you!! That actually makes a surprising amount of sense. And, it looks like I was pretty much on the right path, I just couldn't work out where to isolate the colour information for the stripe, but it makes sense that the stripe is the generic 16 "current colour" in it's subfile, and the 50956p01.dat file just tells it to be red

 

I started writing out what I think I need to do, as it sounds like I can just make a working directory copy of the part and tell it to apply the original stripe in a different colour, without needing to go through step 5? But I'm at work now, so I'll give it a go tonight and see what happens, and then come back after I've broken everything :laugh:

It sounds like maybe I've missed a level somewhere, and there are three layers to this, not two... or that I need the s subdirectory in the working folder because that's where stud.io is looking for all the pieces

Edited by grandell

Share this post


Link to post
Share on other sites

50956p01.dat (a) uses s\50956p01s01.dat (b) which you need to edit.

So you can skip the “s” subfolder if you change the reference “s\50956p01s01.dat” in 50956p01-renamed.dat (a) to “50956p01s01-renamed.dat.”  You are already renaming the file (b) and you already need to change the main file (a) to reflect that, so yes, you can also remove the “s\” bit.

I explained everything wih keeping the “s\” because it’s needed or simpler to keep it in many cases.

Share this post


Link to post
Share on other sites
50 minutes ago, SylvainLS said:

I explained everything wih keeping the “s\” because it’s needed or simpler to keep it in many cases.

Agreed, it makes sense to keep all the customisation stuff completely separate from the core files (especially because those can't be edited)

Share this post


Link to post
Share on other sites

Just want to thank SylvainLS again for this!

Had a few little issues with stud connectivity, which might have been something to do with the difference in the way PartDesigner and Studio look at subfiles? Or it could have been the shoddy way I hacked together my files and folders.

One interesting thing I did notice though, and which makes a lot of sense in hindsight, is that for the two wedge pieces, the stripe is a separate shape file added on top of the piece, but for the windscreen the part itself had four sections recoloured (the two side faces and two parts of the front curves)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.