TF58 - SRFTEX.PL tutorial

Topics about .dat, .srf, .dnm, .ist, Blender, Gepoly, etc.
Post Reply
User avatar
vandal
Veteran
Veteran
Posts: 1178
Joined: Thu Feb 03, 2011 3:16 pm
Favorite Aircraft: Tornado GR4
Location: Great Britain
Has thanked: 23 times
Been thanked: 148 times

TF58 - SRFTEX.PL tutorial

Post by vandal » Fri Aug 12, 2011 8:15 pm

Original by Taskforce 58. Files that need to be downloaded have been uploaded by Vandal but all credit goes to TF58
Before we start the lesson, you will need the following:
  • these files
  • ActivePerl installed on your computer.
  • SRFTEX.PL (remember that you also need SurfData.pm for srftex to work properly!)
  • Gepolyx and GepolyO
  • The suzy tools srfmerge.exe, and possibly srfmove.exe (if you don't like using gepolyO to move a model).
  • Some kind of DNM management tool. You can get by with just a text editor, but only if you like to suffer. I use the perl script DNMbuild.
The basic idea behind srftex is to place your wordmark/logo/roundel ("the decal") on to a specific spot of a model ("the base") so that it will follow the contour of the base exactly. In this lesson, our example will be placing a USAF star&bar roundel on a fictitious aircraft body, facing the left side.

The bulk of the work in using srftex is actually not the perl script itself, but the prep work you need to do on the decal beforehand.

First of all you need to prepare your base surface. Most of the time this will just be the aircraft model itself, although if your model is fairly complicated, it might be a good idea to extract just the polygons defining the area which the decal will be laid on.
{ see the file base.srf attached }

Make sure all the polygons on the surface which the decal will be going are flat. A polygon with only 3 vertices are always flat. Any polygon with 4 or more vertices, you will have to carefully inspect them. Any "curvy" or "bumpy" polygons (i.e. the vertices are not all lying on the same plane) will confuse srftex.

Next, you will have a decal. The decal should be oriented so that it is roughly pointing at the right direction, in our case it is lying on the Y-Z plane facing left (negative X-axis).
{ see the file decal.srf attached }

Now you have to determine the location of the decal. In this example, I have determined that it should be located at (-3.00, 1.00, -3.20).
Image
You have to position the decal so that it is floating just above the spot it is on. In this case, the Y/Z value of 1.00/-3.20 is the desired location. The X value of -3.00 is not as critical, as long as it place it "above" the surface - it could just as easily be -2.50 or -3.50 .

Once you have the right location, move the decal there.
{ see the file decal_moved.srf attached }

Now merge both the moved decal and the base together.
{ see the file _Merged.srf attached }

Now look at the merged files in gepolyx, using a view directly from the left:
Image

The most critical part of this lesson is that we have to cut the decal along the edges of all the polygons that made up the base. I have highlighted those edges in green here:
Image

After the cuts...
Image
{ see the file decal_after_cut_with_base.srf attached }

Once the cuts are done, delete everything except your decal, and save.
{ see the file decal_cut.srf attached }

Now we can move on the the script itself. Start srftex.pl, and you should see a window like this:
Image

On the first section "Files", select your base model for the "Base" box, and your cut decal for the "Texture" box.

For the "Axis" section, if you are:
- putting a decal on the left/right of the base model, such as a decal on the fuselage, use the "Right or Left" option.
- putting a decal on the top/bottom of the base model, such as on top or below an aircraft's wings, use the "Top or Bottom" option.
- putting a decal on the front/rear of the base model, such as how the USN sometimes paint the aircraft's number on the nose of a helicopter, use the "Front or Back" option.

For the "Side" section, this is a refinement of the "Axis" section. If you are putting the decal on the left of the base model (i.e. "Right or Left" on the "Axis" section), or if you are putting the decal on the bottom of the base model (i.e. "Top or Bottom" on the "Axis" section), or if you are putting the decal on the back of the base model (i.e. "Front or Back" on the "Axis" section), select the "Left or Bottom or Back" option. Otherwise you have to select the other.

In the last "Option" section, clear both check boxes.

Once you get all the options set, click on "Create", and after a short while it will tell you it has completed the operation. You will now get a new file with the name in the following format:

_{name of decal}_on_{name of base}.srf

Since our decal is "decal_cut.srf", and the base is "base.srf", srftex will give us "_decal_cut_on_base.srf". This is the decal, with the cuts, with all the vertices laid on the same surface as the base model.
{ see the file _decal_cut_on_base.srf attached }

Now you can put this into your dnm model as your final, contour following, decal. You need to offset the decal a little bit towards the side it is on to ensure that it will be displayed on top of the base model. In this example. since the decal is the the left of the model, I put it about 4mm offset to the left (-0.004 on the X axis).
{ see the file srftex_lecture.dnm attached }
Image
Awesome 171st pilot
A member from yesteryear!
Also known as Princess Vandel

User avatar
Taskforce 58
Veteran
Veteran
Posts: 680
Joined: Thu Feb 10, 2011 9:06 pm
Favorite Aircraft: F-104, Tu-95, Piaggio Avanti
Location: YYZ VOR 062 radial, 17.5 DME
Has thanked: 53 times
Been thanked: 236 times
Contact:

Re: TF58 - SRFTEX.PL tutorial

Post by Taskforce 58 » Fri Aug 12, 2011 11:43 pm

There's an attachment in the original post on YSP which includes all the files mentioned in the post. You should grab that and include it here.
Image

User avatar
vandal
Veteran
Veteran
Posts: 1178
Joined: Thu Feb 03, 2011 3:16 pm
Favorite Aircraft: Tornado GR4
Location: Great Britain
Has thanked: 23 times
Been thanked: 148 times

Re: TF58 - SRFTEX.PL tutorial

Post by vandal » Sat Aug 13, 2011 12:30 am

Here it is https://rapidshare.com/files/3572122666 ... ecture.zip
It was included, just a little hidden at the top of the post.
Image
Awesome 171st pilot
A member from yesteryear!
Also known as Princess Vandel

User avatar
Gunny
Business Class Membership
Business Class Membership
Posts: 3250
Joined: Sun Feb 06, 2011 6:17 pm
Favorite Aircraft: Any thing with a prop.
Location: New Iberia.LA.
OS: Windows 10 & XP SP3
Has thanked: 586 times
Been thanked: 785 times

Re: TF58 - SRFTEX.PL tutorial

Post by Gunny » Sat Aug 13, 2011 1:38 am

It seems Rapidshare dosent want to share unless you pay for there service. :(

User avatar
vandal
Veteran
Veteran
Posts: 1178
Joined: Thu Feb 03, 2011 3:16 pm
Favorite Aircraft: Tornado GR4
Location: Great Britain
Has thanked: 23 times
Been thanked: 148 times

Re: TF58 - SRFTEX.PL tutorial

Post by vandal » Sun Aug 14, 2011 12:29 am

there should be a free option. The pay version is for pre-rapid share, faster and able to do multi-downloads from rapid share.
Image
Awesome 171st pilot
A member from yesteryear!
Also known as Princess Vandel

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest