Modding for YSFlight in Blender

Topics about .dat, .srf, .dnm, .ist, Blender, Gepoly, etc.
Locked
User avatar
Doomsday
Staff
Staff
Posts: 880
Joined: Mon Feb 07, 2011 2:01 am
Favorite Aircraft: PEW PEW PEW PEW
Location: PEW PEW PEW
OS: PEW PEW PEW PEW PEW
Has thanked: 1 time
Been thanked: 130 times

Modding for YSFlight in Blender

Post by Doomsday »

This topic has been copied from the topic How to Paint Models for YSFlight in Blender to include all known blender tutorials in one place.
How to Paint Models for YSFlight in Blender
* Importing a DNM
* Views / Controls
* Display modes (wireframe etc)
* Understanding object and edit mode
* Selecting and painting polygons of an SRF (object, edit and vertex paint modes)
* Selecting and cutting polygons (advanced painting).
* Creating Text
* Converting Text to a mesh
* Positioning Objects (SRF's)
* Scaling or changing its size
* Conforming / Shrink wrapping text to a surface of another object
* Creating a single object
* Using points to create a new mesh/object/srf
* Moving the object through space
* Placing the object
* Cutting the object
* Separating portions of the object (creating two separate SRFs)
* Parenting one object to another (Insignia follows a moving rudder part)

Special thanks to Kurosaki from YSPilots.com for providing these useful videos.
Image
PEW PEW PEW PEW PEW PEW PEW PEW PEW PEW PEW PEW PEW PEW PEW PEW PEW PEW

Team Awesome# 131
User avatar
Kurosaki
Rookie
Rookie
Posts: 91
Joined: Thu Feb 10, 2011 12:34 am
Been thanked: 15 times

Re: Modding Resource Lists

Post by Kurosaki »

YS Flight Blender Tutorials and other resources

Lesson 1 : https://www.youtube.com/watch?v=g3PZ-YP08KA
Lesson 2 : https://www.youtube.com/watch?v=ilBDP8TPum4
Lesson 3 : https://www.youtube.com/watch?v=-f25E0WZepk

Be sure to read the descriptions to know what it is that will be discussed and if it applies to you.


YS Flight blender "Paint Kit" and other text tutorials : http://www.mediafire.com/?lndxnedb1bbt2

*Contains most recent blender scripts by Vincent (2/10/2011), Blender 2.49a, python, perl, perl scripts, fonts to use in blender, and other base editing programs. Tested on Windows XP SP3 and Windows 7 (64-bit).
READ THE INSTALLATION INSTRUCTIONS AND FOLLOW THEM.
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: Modding for YSFlight in Blender

Post by vandal »

How to shrink wrap text to the surface or skin of the aircraft by Kurosaki

Heres just the text of the tutorial "How to shrink wrap text to the surface or skin of the aircraft. DOWNLOAD THE FULL VERSION WITH PICTURES HERE


Steps to have a text conform to the hull or portion of an aircraft

1) Open blender (right click and erase (x) the box, lamp and camera)

2) Go to File >> Import >> .DNM

3) Select the .DNM file you would like to place text on

4) Switch to Textured or shaded mode mode.

5) To create Text, hit spacebar >> add >> Text. Reposition the text to be on the outside of the aircraft, on a side/wing. Right side up.

6) To rotate the text, (default words say “text”), press “n”, use the rotate about the x-axis 90 degrees till it is right side up.

7) Note that the text is about 10 ft from the hull of the aircraft, use the control arrows to pull it closer.

8) We now need to activate controls or “Modifiers” to command the “text” to conform to the hull of the aircraft. Select Modifers >> “Shrink Wrap”

9) Toggle, or ensure the 3 “Enable modifier” buttons are activated (render during…etc).

10) In the box that says “OB”, type the ID for the hull (Usually defined as 0000 {zero, zero, zero, zero..]). If its something else, simply right click on the hull (while still in object mode), and ceck the number after the (1) in the main view area.

11) After typing in the object (number), it will automatically apply the “Shrink Wrapping” of the text. However, it will appear blotchy or not solid as the original flat text did before. This is because the offset is set to zero, or the level at which the shrink wrapping is applied is directly at the level or surface of the aircraft’s skin. Set the offset to 0.013 or 0.015.

12) Now the projection of the text is fitted to the side of the aircraft, and offset away from the skin/surface enough to be visible. To edit the text, hit tab or manually switch to edit mode. A cursor will appear now allowing you to backspace and erase the text (the word text as well), and type your own.

13) To select a different font, while in edit mode, select the “Load” button from the font from the bottom menu and navigate to your preferred font.

14) If you are not totally pleased with the position of the text, play around with moving it by:
a) RETURNING TO OBJECT MODE (TAB key)
b) Use the handles or arrows indicating axes of movement to adjust it(use the left/right,
up/down relative to the aircraft, but not in/out).

15) Once you have made up your mind on font size, rotation, and other position ideas, its time to convert the text to a mesh and export the DNM (whole aircraft file).
a) Alt+C (enables conversion options) – select Mesh. This will basically freeze the adjustable object into the form and position it is in.
b) Select File >> Export >> DNM…RENAME THE DNM SO YOU DO NOT REPLACE THE ORIGINAL AIRCRAFT. Follow steps then to create a separate user folder, and create the other nessecary files to use the aircraft in YS Flight.


ANNOTHER OPTION

Instead of exporting the DNM, you can export the text as its own SRF to use elsewhere. This will be accomplished by :

a) Ensure you are in edit mode
b) Right click on the text to select it
c) Under “select” >>> “Select Inverse” or press “Ctrl+ i” to select the aircraft
d) Press “X” and select “erase selected objects” (everything but text)
e) File >> Export >> SRF
Image
Awesome 171st pilot
A member from yesteryear!
Also known as Princess Vandel
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: Modding for YSFlight in Blender

Post by vandal »

Original post by vincentweb
First, we will split the window of the 3D view
Move the cursor to the separation between the 3D view and the panel. The shape of your cursor change and you see 2 arrows.
Image


Right click, and select Split Area
Image


Move your separation anywhere, and change the window type to Outliner
Image


Then, you can see the parenting tree of the DNM.
Don't hesitate to enlarge the window, else you won't see well the tree.
If you have difficulties to see everything, you can move the tree with the middle button of your mouse.
Because the import script creates an Empty linked as parent for each object, you'll MyObjectEmpty above myObject in the tree.

Here, we can see that the objects 0002 and 0003 and among the children of 0001 which is among the children of XXXX.
You can notice that 0002 and 0003 share the same mesh called "nozzle".
Image
Image
Awesome 171st pilot
A member from yesteryear!
Also known as Princess Vandel
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: Modding for YSFlight in Blender

Post by vandal »

Original by Kurosaki
At the request of several and since new versions of Blender scripts will be available soon (hopefully)...I've decided to release my incomplete Blender Tutorial. I will not be responding to a lot of emails about certain procedures, or "how do you..." type of stuff as I don't have the time (and I've started painting in FS2004 more as well :x ). Post your comments here and maybe I can clear something up. Good luck and happy blending.

Image

Guide 1 (many topics and functions...)
Shrink Wrapping Tutorial (also in the "Guide 1")...should read both (different examples)
Image
Awesome 171st pilot
A member from yesteryear!
Also known as Princess Vandel
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: Modding for YSFlight in Blender

Post by vandal »

Original by Kurosaki
Blender Text and Symbol Tutorial


The following is a tutorial to help you create text and symbols/logos for aircraft. Essentially it will cover the generation of .SRF's with blender and the scripts developed by Mr Vincent.

Some things to consider or already have before beginning:
* Blender 2.48
* Python 2.5.2 (21st February, 2008)
(you can probably find these at "Oldapps.com")
*The most current versions of the Blender scripts
* Fonts/symbols of your choice from iconianfonts.com
* Fonts (USAF stencil or whatever fits your taste) from here
* Once blender is installed, move your desired truetype fonts to the C:\programfiles\blenderfoundation....\.blender folder ('dot' blender)

These fonts/symbols/images are designed to help speed up the process of creating accurate text or common aircraft logos. It is not to negate artistic ability, but speed up the process. You are always free to create the SRF by hand...but this should be a straight forward method to help enhance the aircraft modding process.


1) Make sure you have a '.blender' folder in the path described above...if not, reinstall and choose the second option for users when installing

2) Open blender

3) Delete the box, lamp and camera in the field of view (right click, press x, select delete)

4) Hit space bar >> go to "Add">>"text"

5)Default text/font will appear saying "Text", since it is already selected, we just need to switch to "edit mode" to change it

6) Once in edit mode, a cursor will appear at the end of 'text'. backspace over it, and go to the font segment of the bottom toolbar area...Press "load" (center bottom area of your screen)

7) The screen should now transition to a load/folder/file area of the blender directory. If it does not navigate directly to your .blender folder, navigate to it with the "." and ".." in the upper left of the screen...otherwise, select the font you placed there earlier.

8) Once the font is selected, you should be able to type and see your font/letters appear.

9)Once finished typing the desired words/lettering, switch back to "object mode" (<tab> button)

10) Next to where it says "object mode" in the small pull up tab, select "Object" >> Convert object type >> Mesh

11) The text is almost an SRF. It is actually converted now to a polygon pattern that we can now paint/color...select the same pull up bar where "object mode" is, and switch to "vertex paint"

12) NOW!...pay attention...we need to change draw type mode or how the data is displayed..select the small brown box/cube next to the vertex paint mode area and switch to textured.

13) The text now displays the color it will be as if it is imported and placed on an aircraft in DNMviewer (in this case, its default color is white)


14) Everything, all text, should still be selected and is rimmed by a faint pink outline. If not, press 'a'.

15) In the center of the bottom toolbar area, the Font area is now called "Paint". The color can be changed by clicking on the white box in the center of the paint area.

16) Once you have selected a color, press the button labeled "SetVCol" below the color box to paint the entire set of text

17) I recommend you scale the text to be about 1/2 to about 2/3 of the size it is by default. press "s" and adjust the scale as you desire (Left click to set/confirm scale).

18) NOW, SAVE the work you have done as a .blend file. This is so you can come back and alter it if the size is incorrect.

19) Go to File>>Export>> SRF

20) Choose a location, and import the SRF into dnmviewer with an aircraft to see if the size is correct.

21) IF the size is not correct, return to blender, rescale or size down the text, save a new .blend file, and export to a NEW/DIFFERENT named SRF


Hope that this tutorial helps and that you can see the power blender has to create text and some symbols easily usable with YS flight aircraft. You are free to modify this process and learn more efficient methods as you gain experience. Don't be afraid to experiment and create unique work.

When the text has been converted to a mesh, you can then alter polygons of the text and conform it to fit an aircraft. Sometimes it helps to import an entire aircraft when the text is generated to see how its scale compares. Remember to erase/remove the aircraft before export.

Although I used a stencil font, it eliminated a polygon on a corner. More solid symbols or fonts will probably work better.
Image
Awesome 171st pilot
A member from yesteryear!
Also known as Princess Vandel
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: Modding for YSFlight in Blender

Post by vandal »

Original post by vincentweb
I have no normal problem, as you can see in this picture:
Image


I recommend Python 2.5 (the version I am using), with Blender 2.49 I am using too

What were the exact name of the KZS planes you could not import?


How to paint an object with Vertex Paint, version2

We are in object mode. Select the object to paint.
Image

Press the V key, the object becomes white. We are now in the Vertex Paint Mode.
Image

Press the F key or the Painting Mask button (on the left of the layers). We now see the faces.
Image

Select the faces you want to paint (with a right click, or with the B key, or...), and pick a color.
Image

Press the SetVcolor button.
Image
Image
Awesome 171st pilot
A member from yesteryear!
Also known as Princess Vandel
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: Modding for YSFlight in Blender

Post by vandal »

Original post by vincentweb
Here is what I would do:

1) Select the body, go in the local view to only this this mesh (NUM PAD / key)
2) Go in the wireframe view more (Z key) and go in the left side view (trap I've just noticed the problem this view is called back view in Blender so go to this view with SHIFT + NUM PAD 1)
3) Load the Air Trans background picture

4) Go in the face mode selection
5) Select the faces we will need to cut by using the Border select tool (press the B key twice) so that we select the front and bottom faces (if you use MAJ+right click to select, you select only the face of the top, whereas here we want to select the faces on the left (top) and on the right side (bottom) at the same time)

6) Use the cut tool on the selected faces

7) Tadaa!
Image
Awesome 171st pilot
A member from yesteryear!
Also known as Princess Vandel
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: Modding for YSFlight in Blender

Post by vandal »

Original post by vincentweb
Blender tutorial[/center]


A tutorial to create a ground object with Blender.

There is now several scripts to import/export DNM and SURF files.
See this topic: http://forum.yspilots.com/viewtopic.php?f=5&t=1605


A few basics :


How to select a vertex/edge/face ?
You must know :
1 edge = 2 vertexes
1 face = 3/4 vertexes/edges
The are 3 modes of selection : vertex, edge, and faces


You can select a vertex/edge/face by right clicking on the Vertex/edge/face
To keep the selection, and selecting an other thing, use Maj+right click

You can use the B key to select all the vertexes/edges/faces in the box you can draw, or, if you press this key twice, all what is in the circle (which you can re-size with the scroll button of the mouse)

To select all the points : A key


How to move something selected ?

G key (Grab)

rotate ?
R key

re-size ?
S key

make an edge/face ?
F key

create a new vertex ?
you need 1 vertex selected, do Maj + left click

Delete a vertex/edge/face selected ?
X key

Extrude ? (gropolyx lift polygon)
E key

Duplicate ?
Maj + D

Convert a text object to a mesh?
Alt + C to convert to curves
ALT + C again to convert to mesh

Rotate the 3D view ?
use the middle button of your mouse
8,4,6,2 Num Pad

Move the 3D view
Maj + Middle button of the mouse
or
CTRL + 8,4,6,2 (Num Pad)

Zoom on the 3D view
CTRL + Middle button of the mouse
or scroll button

switch to the others view ?
top : 7 Num pad
front : 1 Num Pad
side : 3 Num Pad

what are the normals ?

The normals determinate the side you see your face, because you can see a face only in one side, the side where the normal is pointing out.
So all the normals should point to the outside, else, you will have transparent parts

how to calculate all the normals outside
CTRL + N

to do it manually : W key then "flip normals"



to download Blender

I recommend you to see some videos tutorials on the Blender website.

Also, the =http://download.blender.org/documentat ... tutorials are good.


(from the old tutorial : )

IMPORT something to Blender


First, we need to import our plane.

We will paint the ef-2000-0.dnm

We want to paint the body, so open ef-2000-0.dnm with the notepad.
What we need is between PCK body.srf 5063 and PCK cover.srf 111

Copy these line and paste them into a file called like myef.srf ; the file must begin with Surf, and finish with END or E.

We use Surfview/o (in Winutils1) to open the myef.srf we want to repaint.

So we have opened our .srf and make : File/save VRML1
call the file for exemple. myef.wrl

You can close Surview/o.

Now, we open Blender.

Press X key/Erase verticals to erase the cube.
Make File/import/VRML1 and select the file created with surfview/o
and press and enter or click on the import button.
Image
Awesome 171st pilot
A member from yesteryear!
Also known as Princess Vandel
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: Modding for YSFlight in Blender

Post by vandal »

Original post by vincentweb
How to easily create a coarse model


- Go to Object Mode
- Duplicate your fuselage (MAJ + D)
- In the Edit Panel, go to Modifier
- Click on Add Modifier
- Select Decimate
- Decrease Ratio (or modify the number with Maj+Click)
- Press Apply
Image
Awesome 171st pilot
A member from yesteryear!
Also known as Princess Vandel
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: Modding for YSFlight in Blender

Post by vandal »

Original post by vincentweb
How to remove the black shadows?


Summary
Where do black shadows come from?
The solutions
Defining sharp edges - method 1 - automatic
Defining sharp edges - method 2 - manual
Splitting the mesh - method 1 - automatic
Splitting the mesh - method 2 - manual


Where do black shadows come from?
The black shadow problem aka (vertex normal problem) comes from smoothed meshes (meshes with a lot of rounded vertices)) which contain edges that separate two very inclined faces. Picture 1.1 is an example of mesh which contains such edges.
We call those edges: sharp edges, and defines alpha the non-oriented angle of inclinaison between the faces (we assumed we gave no orientation to the space so alpha is defined between 0 and 180 degree.)
You can notice the intensity of the shadow varies with the inclinaison of the faces, see pictures 1.2 and 1.3.


The solutions
There are two solutions to remove those shadows.
- the smart ones consists in "unrounding" the vertices of the sharp edges. However there is no way define rounded/unrounded vertices with Blender. However Blender allows us to mark some edges as "sharp". When you run the export script, it will search for all the "sharp" edges and will unround all the vertices belonging to the sharp edges.
- the other one consists in separating the mesh along the sharp edges, the drawback is that it duplicate the vertices of the sharp edges


Defining sharp edges - method 1 - automatic
1) Launch the Unshadow script (see picture 3.1).
2) If this script finds two faces whose alpha angle is greater than "Min sharp angle", it will mark the common edges of those faces as "sharp".
The script adds an EdgeSplit modifier in order to see the visual change after some edges were marked as sharp. Do not apply this modifier!!


Defining sharp edges - method 2 - manual
1) Make sure the Draw Sharp button is ON (see picture 3.7)
2) Select the edges to make sharp (be sure to be in the edge selection mode)
3) Press CTRL+E and select Mark Sharp


Splitting the mesh - method 1 - automatic
1) Enable the Edge Split modifier. See picture 4.1.
If this modifier find two faces whose alpha angle is greater than "split angle", it will split the mesh along the common edge of the two faces.
2) Press Apply to separate the mesh.
If you use the Remove Double tool (which merge close vertices together), it will cancel the action of the edge Split modifier.


Splitting the mesh - method 2 - manual
1) Select the sharp edges. It may be quite handful to use the Edge loop tool as in my case.
2) Press the V key (rip) and press Enter without moving the mouse so that the separated vertice be at the same position.
Image
Awesome 171st pilot
A member from yesteryear!
Also known as Princess Vandel
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: Modding for YSFlight in Blender

Post by vandal »

Original by vincentweb
------------------------ The nozzles -----------------------

First we need to separate the current nozzles of the fuselage
We first select the nozzles in the main body
Image

After we pressed the P key to separate the nozzles from the fuselage, we get:
Image

We delete the left nozzle
Image

Let's improve its shape
We go to the local view "/" key to work on this right nozzle:
Image

We delete the front faces:
Image

We will extend the nozzle with the extrude tools (E keys) and the scale tool (S key)
Image
Image
Image
Image
Image


But we can notice with the Textured "Draw Type" that we can see trough the nozzle when we look inside it.
Image

To make those faces double sided, we need the "YS Face mode". Let's install this script:
Image
Image
Image

The script is quite intuitive to use, let's paint our nozzle too.
Image
Image
Image

Before to animate our nozzle, we need to move its center point (pivot).
We move the 3D cursor at the place we want our pivot, and press Maj+S Key to snap the cursor to the grid
Image

Press the "Center cursor" button to move the pivot
Image

So the nozzle moved to the origin. We can see that when we exit the Local view ("/" key)
Image

Continue below
Image
Awesome 171st pilot
A member from yesteryear!
Also known as Princess Vandel
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: Modding for YSFlight in Blender

Post by vandal »

Original post by vincentweb
First, we will give an elevator animation to our nozzle. Let's say Blender our nozzle must act as an elevator by setting its CLA. For this action, we will use the "dnmViewer" script (an unfinished script whith the same interface)
Let's run the script
Image

To properly use it, we need to enable its space handler:
Image

Then we can assign the elevator CLA to the nozzle
Image

Now we can add an animation to our elevator. For the elevator we must set 3 keys: the neutral position, the UP position and the DOWN position. Since we will use the frame 1, 11 and 21 later (for the aileron animation), so we will add our animation keys at the frames 31, 41 and 51.
Go to frame 31. The elevator is in the neutral position, press I to add an animation key, and choose "Rot".
Image

Go to frame 41, make a 30 degres clockwise rotation, add an other key
Image

Go to frame 41, make a 60 degres counterclockwise rotation, add an other key
Image


But the nozzles also move when you turn right/left. When you turn left, the right nozzle rotate downward whereas the other rotate upward. And when we turn left and go up... So we need to compose the two mmouvements.
The solution is to create an emtpy object with an aileron CLA which will have the aileron animation. So that our nozzle follow this empty object, we will create a parent link between those two objects.
To create our empty object, we add a plane, and remove all its vertices:
Image
Image

Then we move this object at the desired position
Image

To create the parent link, we select the nozzle first (the child) and then the empty object (the parent) and press CTRL+P
Image

Since the parent of the left nozzle will have the opposite animation, we duplicate now the empty object and the right nozzle to create the left nozzle
Image

Then we add the aileron animation to the empty object of the right nozzle: frame 1-> neutral position, frame 11->down , frame 21-> up
and to the empty object of the left nozzle: frame 1->neutral position, frame 11->up, frame 21->down
Image
Image



But look, the afterburner flames don't follow the nozzles, so we need to create a parent link between the flames and the nozzles. (In fact I had to delete and make an other flame animation which was relaying on a location animation to appear/disappear)
Image


Final result in the attached file.
Image
Awesome 171st pilot
A member from yesteryear!
Also known as Princess Vandel
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: Modding for YSFlight in Blender

Post by vandal »

Oritinal post by vincentweb
Simplify a mesh

You remember I had presented you an other way with the decimator. The decimator is very quick to use, but you don't control what you simplify. With this method, we will remove the edges by groups, without having to build again the faces.
To use the following method, you will need the Bmesh module. This module will be integrated in the next beta of Blender 2.50, but you can find a built alpha version.

Selected the edges you want to remove.
Image

Press X, and select Dissolve
Image

Admire the result!
Image



Cut a mesh

Choose the edge selection mode CTRL + TAB + 2
Image

Select the edgeS you want to cut
Image

Press k and choose Knife exact, and cut.
Image

Admire the result!
Image


Paint a mesh

Choose the face selection mode CTRL + TAB + 3. Got to the vertex Mode paint. And press the F key to enable the paint mask.
Image

Select the faces you want to paint.
Image

Coose the color you want to give to the selected faces, and press Set VCol
Image

Admire the result.
Image
Image
Awesome 171st pilot
A member from yesteryear!
Also known as Princess Vandel
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: Modding for YSFlight in Blender

Post by vandal »

Original post by vincentweb
Make a moving part

Object Mode, select the mesh you want to add animations key, for example an elevator. Go to a random key, eg 41. Use the arrows keys to move to a key.
Image

The first key of the elevator must be the neutral position. It's it current position. Let's add a key. Press the I key and select LocRot
Image

Watch the new key added in the Ipo curve at the key 41.
Image

Go to some frames further, eg 51.
Image

The 2nd key of the elevator must be the maximum UP position. Rotate the object to the maximal UP position.
Image

Insert a key again. Press the I key and select LocRot
Image

See the second key added in the IPO window?
Image

Go to some frames further, eg 61.
Image

The 3rd key of the elevator must be the maximum DOWN position. Rotate the object to the maximal DOWN position.
Image

Insert a key again. Press the I key and select LocRot
Image

Now we have the 3rd in the IPO window.
Image

You can watch the steps of the animations to check everything is like you expected with the arrows keys. You can also watch the animation with ALT + A
Image

Don't forget to add the CLA of the animation (8 for the elevator) as explained in the previous tuttorials.
Image
Image
Awesome 171st pilot
A member from yesteryear!
Also known as Princess Vandel
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: Modding for YSFlight in Blender

Post by vandal »

Original post by vincentweb
The objective of this tutorial is to create animations for YSFlight with Blender.

In a first time we will see how to create simple animated movement. Then we will see how to create more complex animations using guides.


Notice:
- this is the detailed way to make animations, I am thinking to make a little python script to create easier animation
- all the functions of the dnmViewer script aren't available yet (you can only modify/watch the CLA of an object, what you see near POS/STA si'nt relevant yet)

-------------------

Simple animations


We will see the three basic animations: hide/show, rotation, translation.
I chose the example of a basic cockpit. You can download the file at the end (see the 'start file')
Image
We will work only with the TOP View (7 num pad key) in this tutorial.


The thing you must remind is that those animations are done by inserting keys at several frames using the I key. Once you have pressed the I key, you must tell what you want to record:
- the position of the object for translation movements -> "Loc"
- the rotation of the object for rotation movements -> "Rot"
- both for translation and rotation movements -> "LocRot"
- if the object is visible or not for hide/show movement -> "Layer"


Hide/Show animation

Hide/show movements are simulated by switching an object to the layers (link layers) 1 or 2.
- if the object is visible, it must be in the layer 1
- if the object is not visibile, it must be in the layer 2

We want the "B" to appear when the brake is ON, and to disappear when it is off. When you make a brake animation, there are two keys to record: the brake OFF key and the brake ON key (in this order).

Let's record the brake OFF key at frame 1 for example. The "B" object must be invisible, so in layer 2. Put the "B" object in layer 2, and insert a "Layer" key.
ImageImage

Now let's record the brake ON key at frame 11 for example. The "B" object must be visible, so in layer 1. Put the "B" object in layer 1, and insert a "Layer" key.
ImageImage

We must record the fact that this animation will be played when we will press the "brake key". This is done by modifying the CLA of the object as depicted below:
Image

To play the animation you can:
- use the keys of the timeline Window
- press ALT + A (ESC to stop)
- use the arrow keys

You can slow down the animation as shown below:
Image


Rotation animation

We assume that the aircraft which will use this cockpit panel had a system to stop the engine when the "bomb door key" is pressed.
We want the needle in the dial to simulate an engine speed indicator. So the needle must be in the bottom left when the engine is off ("bomb bay door open"), and in the bottom right when the engine is on ("bomb bay door closed").

So, select the neddle in the dial, and make a little rotation test (press the R key, see how the needle rotate and press ESC). Not very good, isn't it? Rotations are made around the midpoint of an object. So we must move the midpoint of this needle as explained below:
Image


We must record 2 keys for the bomb bay door animation. In the first key, the bomb bay door is closed (engine is ON). In the second key the bomb bay door is open (engine is off). We will record our 2 keys in the frames 1 and 11.

So we record those 2 keys:
ImageImage

And we modify the CLA
Image



Translation animation

We will animate an other needle to display the state of our elevator.

We start by modifying the midpoint of our needle. The "Center New" button will move the midpoint to the "gravity center" of the object.
Image

For an elevator animation, we have 3 keys to record: the neutral position, the up position and the down position. We will record those keys in the frames 1, 11 and 21 (arbitrary choice).
ImageImageImage

Now play the animation!
You may have noticed that the movement is accelerated at the beginning and decelerated at the end. It's because Blender uses by default a "Bezier interpolation". Let's change the interpolation to "Linear". This step is not mandatory, but I recommend to use linear interpolation with you make animations with rotations along an axis which is not the X nor Y nor Z axis.
Image
Image
Awesome 171st pilot
A member from yesteryear!
Also known as Princess Vandel
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: Modding for YSFlight in Blender

Post by vandal »

Original by vincentweb
In this tutorial we will see how to make animation along an oblique axis.


Image
Image
Image
Image
Image
Image
Image
Image
Image
Image
Image
Image
Image
Awesome 171st pilot
A member from yesteryear!
Also known as Princess Vandel
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: Modding for YSFlight in Blender

Post by vandal »

Original by vincentweb
geometry tools

Geomtools is a Blender scripts which enables to make different geometric operations like projections or intersection.

You can:
- Project vertices on a face
- Project vertices on an edge
- Calculate the Intersection of a face and some edges
- Calculate the Intersection of 2 edges
- Calculate the intersection of faces
- Project vertices on their nearest plane
- Align and distribute vertices

More information about the different tools here:
http://glender.hybird.org/

----------------------------------------------------------------------------

You can use the "nearest plane" tool to clean a mesh:
Image

We start to select the vertices to project
Image

Then we launch the script
Image

and select "nearest plane"
Image

admire the job !
Image
Image
Awesome 171st pilot
A member from yesteryear!
Also known as Princess Vandel
Locked

Who is online

Users browsing this forum: No registered users and 2 guests