DNMViewer Tutorial

Topics about .dat, .srf, .dnm, .ist, Blender, Gepoly, etc.
Post Reply
User avatar
Dragon029
Veteran
Veteran
Posts: 601
Joined: Sun Feb 06, 2011 6:09 am
Favorite Aircraft: F-35A
Location: Australia
Has thanked: 42 times
Been thanked: 85 times
Contact:

DNMViewer Tutorial

Post by Dragon029 »

Code: Select all

This is the .doc tutorial copy/pasted + formatted into the forum, with images uploaded to imgur.
Video added!
The video only covers part of the tutorial however, so I recommend reading the tutorial first!
---------

Dragon029’s DnmViewer Tutorial!

Alright, so first thing’s first – if you’re not fluent in Japanese, I highly super duper recommend you download the English version of dnmviewer.exe (courtesy of Duckyl).

So basically, dnmviewer is a program for dealing with .dnm’s only – you cannot modify .srf’s in it. However, despite the name, it does let you do a lot more than just view .dnm’s.

Personally, I’ve only ever used dnmviewer for creating and animating .dnm’s, including things like my PAK FA’s, my hybrid VTOL MQ-21, etc.

After realizing what it was capable of, I simply learned how to use it via experimenting – I didn’t even have the English version at the time.

Now, this tutorial isn’t going to teach you exactly how to do everything, but it will teach you how to begin using dnmviewer and give you a basic understanding of how it works and how you can use it.

After you finish the tutorial and start using it, I just highly recommend that you experiment on your own – if you want to be a successful modder on YSF, you’ve got to have the ability to explore on your own – ask questions, but don’t rely heavily on others.

English Dnmviewer.exe download.

Overview:

So this is dnmviewer:

Image

So looking at our User Interface (UI), we have a taskbar up top like most Windows programs; we have a bar on the left which is where we’ll be organizing our .srf’s; down the bottom we have controls for placing, rotating and animating .srf’s; in the centre of the screen, we have the viewing window, where we’ll see our model being made in real-time.

Now, if we check out the taskbar options up top, we’ll see we have:

File:

Image

So obviously, that’s just for opening / saving .dnm’s – simple enough; moving on:

“Indecations”

Image

I’m not sure what indecations is meant to be (“indications”?), but either way, all it does is set the size of the side and bottom tool bars – you can do this by clicking and dragging the borders of these bars anyway, so you shouldn’t ever have to click on the “indecations” options anyway.

Settings:

Image

Now, this one is actually important:

“Non-OpenGL Wind” – this turns on/off the rounding of normals, making the model look all blocky – keep it enabled / smooth unless you have a fetish for blocks.

“Wireframe Indication” – this makes the model see-through and only shows the edges of polygons – unless you’re tripping out, keep it off.

“Axis/Non Indication” – this turns on / off the x/y/z axis lines – although these lines aren’t labeled, I’d keep it on, as they definitely help as a directional aid.

“Insert random stuff here” – this is actually the toggle for perspective / orthographic view – I’ll explain what they are what why they can be important later.

“Propeller Revolution”
– propellers can rotate in dnmviewer – when you click this setting, a window pops up where you can set the speed that rotation is seen at – this has no effect over how fast props will rotate in YSF, so there’s no real need to touch this setting. If you want the default values, because you’ve changed these settings – the top value is 20, the bottom value is 100.

“Illuminant” – I’ll get to this soon, but it’s basically where you can change the lighting in dnmviewer.

“Background Colour” – lets you change the default background colour of dnmviewer, meaning you can have your model in front of a sky blue background.

“Background Image” – or you can instead actually import a picture of the sky as the background – note that dnmviewer will only accept .png images.


Help

Image

This is kind of useless actually, as there is no help files that go with dnmviewer. However, the “About dnmviewer” option does let you see what version of dnmviewer it is. Again though, that’s useless info because it hasn’t been updated in years and years.

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

Creating / Starting a .dnm

So lets get down to actually making a model!

First, go to the left box / bar and right click just to the right of those dots.
A menu will appear; to insert a .srf, go to “Insert” and across to “Open/New Srf” – the for the record; the other 2 options are useless – dnmviewer supposedly has a copy / paste system, but I’ve never been able to get it to work, neither on the Japanese or English versions of dnmviewer.

Image

Anyway, so once you click that, a generic Windows (or OSX) file-search/open window will open.

Go find the .srf that you want to act as the base of your plane – generally, this will be the fuselage.

Once you select / open that .srf, another window will appear. Now, as the “ID” hints, this is where you’ll have to give a unique part name to your .srf – this is required because a .dnm has to have coordinates / animation data for .srf’s and if you have multiple identical .srf’s, it needs to be able to distinguish between each one.

But ignore that for now; just give it a name that makes it easy to identify like “fuselage” or “body” and click “OK”.

Image

So we’ve inserted “greyfuselage.srf” and called it “fuselage”.

However, because of how I made my model, I need to rotate it – unless you use sketchup to make stuff, you probably won’t have this issue.

But because of this opportunity, I’ll show you how to rotate your model:

Image

See that “POS” set of boxes? It’s the 2nd across or the 4th from the right.

Anyway, so as you can see, there are X, Y and Z boxes. The top boxes are for moving .srf’s in those directions. The bottom boxes are for rotating .srf’s around those axis.

To get it facing the right direction (so that it faces forward when we try to fly it in YSF), we’re going to rotate it 180 degrees around the X axis and then -90 degrees in the Y axis. There are other ways you can rotate it, like 180 degrees in the Z and 90 degrees in the Y, but all ways are fine and the end result is the same:

Image

Image

Now that we have our fuselage, let’s start adding other parts to our model:

Let’s add a rudder! Now, what we’re also going to be doing is making this rudder a child of the fuselage .srf. You don’t always need to do this, but in my / our case, the rudder we’re about to insert will be facing the wrong direction (180X, -90Y) and we’d need to rotate it, along with every other part that I’ve made this way.

Or I can make it a child of the fuselage and it’ll be rotated with it (making things quicker / easier).

If you’re confused, just make this next part a child anyway:

Right click on our “fuselage” on the left and go to “Indent” and then across to “Re-Read”. For the record, the other options actually do work, except for “Indent Copied Srf”. We’ll get to them later though.

Image

In the meantime however, go and find the part that we want. In my case, I’m going to add a rudder onto my plane:

Now, if you made your rudder properly, it’ll appear in the centre of your plane.

Why? Because you should always make moving parts (control surfaces, gears, etc) have their hinge at the XYZ origin. In other words, you should always have the point the your model rotates around at X=0, Y=0, Z=0.
In our case, this means that on the rudder, the middle of the bottom surface (the middle of where it attaches), should be sitting at the XYZ origin. Looking below, you can see that ours is correct, because it’s sitting in the middle of the plane.

From there however, we want to move it to where it’d normally sit, up on the tail of the aircraft.

If you take notes of your .srf coordinates, etc when making them, this can be super simple, but alternatively, you can just trial and error them into place – because of how dnmviewer instantly shows you where you’re moving a part, it can be very simple and quick to line things up.

A personal tip: get the rudder to be hovering over the fuselage and just line up the X and Z coordinates. Then just reduce it’s Y value until it’s just touching. Once it’s there, make any alterations you need to it’s X and Z coordinates.

Image

Also, it’s easiest to line up corners, like the two highlighted here:

Image

Once you’ve got it in place (I recommend to 3 decimal places, although sometimes I’ve had to go to 4 or 5 or 6 to get things correct (and not showing ridges, etc), it’s time to animate it:

If you go to that bar on the left where we have our .srf’s, you can click on the tab called “STA Control” (up at the top-left) and your .srf list will be replaced with these:

Image

Here we can activate / deactivate each of the parts. Note that before you can make parts move, you need to click “Enable” up at the top. If you ever need to reset everything back to default positions, you can just flick it off and then re-tick it.

Now, animating our rudder is super easy; first just go down to the bottom-left and change what it’s CLA value is:

Image

Once we’ve selected “Rudder” we can see that it’s CLA is 8.

Now, upon selecting rudder, you might see your rudder disappear. This is because of it’s STA’s and NST count (see below):

Image

So, for a rudder, there are 3 NST’s – I personally can’t remember what they stand for, but basically it dictates how many types of positions a part can be in – a rudder, having 3, has a default (zero rudder input; STA1) position, a maximum left position and a maximum right position.

Now, ticking those STA boxes signifies that you want that part to appear in that position – you could have it that when you yaw left, your rudder disappears (this would be done by unticking STA2).
However, because we generally obey the law of conservation of energy / mass, we want all 3 STA’s to be ticked.

Now, go back to the STA controls, enable them and choose rudder to go left.

In STA2, go down to the Z axis rotation box and input 15 – you’ll see the rudder turn.

Image

Right, now we want to also make our rudder turn the other way when we yaw right. To do this, just simply go to STA3’s Z axis rotation and put in the opposite value; -15.

Note that when you trigger a full left-rudder, you’re just telling YSF to transfer from STA1 to STA2 – when it comes to rotation this is easy / obvious, but when it comes to translations (movements in the X/Y/Z directions), it can involve parts moving in arcs to get to where they need to.

Image

This is how you animate parts in dnmviewer – for an elevator, simply follow those rules about placing your XYZ origin at an .srf’s rotation point, give it a CLA (elevator for example) and give it some rotational values in the X, Y or Z rotation boxes. Also note that if you wanted (for example), a rudder that yawed diagonally like on the YF-23 or J-20, you’d want to import it either as the child of a rotated object, or you could import it as a vertical or horizontal surface and then rotate it 45 degrees in the POS’ rotation boxes.


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


Perspective vs Orthographic

Now, here’s a little ‘issue’ with my plane; when I have both of my rudders on, and I have them both rotate 15 degrees, one of them looks like they’re turning more than the other:

Image

This might maybe appear a legitimate issue, but really, it isn’t. Why? Because we’re viewing it in perspective; things that are closer appear bigger.

There is another way (of many) to view things though; orthographically:

Image

This is what our plane looks like when everything appears at it’s true size – even though it’s closer, the nose of the plane appears a fraction the size of a rudder, because it is a fraction of the size (height specifically) of the rudder.

As we mentioned before, you can toggle between perspective and orthographic by going to Settings and then clicking on the jumble of characters (the 4th option, under “Axis/Non Indication”).

Where this comes in particularly handy is when you’re creating 3 views of your aircraft – all too often do people submit side views, front views, etc of their aircraft in perspective; creating these incorrect depictions of their aircraft:

Image
Image

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

Lighting settings

Sometimes it can be hard to see our models properly, which can make things like the placement of parts difficult.

To fix this, one thing we can do is alter the lighting settings in dnmviewer:

Image

Now, let me explain the important parts of this:

A – This is where the source of light is – normally dnmviewer has it directly in front of the aircraft, along the Z axis. However, you can also go more realistic by making the light source at 0Z and 1Y. This makes the lighting appear from above. This is also what you generally see in YSF.
B – This where you can quickly choose lighting conditions, in case you’re not very spatially minded – SURFVIEW is the dnmviewer default, where light comes from Z. YSFS is where light comes from Y. The second YSFS shows nighttime conditions on the plane (how your plane looks at night in YSF). The fourth ??? I have no idea and doesn’t seem to really have much difference.
C – This is where you can tweak the colour of the light being projected as well as the contrast – the top value (0.8) is the brightness (where 1 is pretty much just white) where it is brightest. The lower value (0.3) is the brightness where it’s darkest. If you have these values the same, your aircraft will look like it’s not being shaded at all.
D – This is where you can set up multiple light sources – simply select a light (LIGHT1) for example and tick the box to the right with the “??” next to it. This allows you to get light hitting your aircraft from every angle, etc.

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

Background colour

While you can also change background image, I find having a flat colour much more useful – look at the images above of my aircraft / the tutorial – the later images have brighter backgrounds. Why? Because showing perspective and lighting with a bad background looked bad:

Image

Note how the rudder is a bit hard to see, especially on the trailing edge.


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


ADVANCED SECTION



This is where I’ll teach you about animating aircraft in general in YSF.

The biggest thing that you’ll need to understand in order to make complex moving parts, is just the child / parent system and also how null .srf’s work.

First, let me give you a basic example of how the child / parent system works:

Image

This is a bomb bay – the bomb bay doors that cover it are made of 4 individual .srf’s.

In order to make it appear semi-realistic, the inner doors (B) have to rotate on the edge of the outer doors (A). Now, a tip – if you can, try and make A and B identical .srf’s – a stretched hexagon (or any other shape) that has it’s XYZ origin in the middle of one of it’s edges – it’s a bit hard to explain how it helps, but if you try it yourself you’ll hopefully understand.

Now, if you were setting up a door like this, you’d have the fuselage as the overall parent.
Then, you would rotate and move around A so that it’s rotational point is on the bottom of the fuselage. Rotate it back to horizontal and make sure it lines up with the black ‘bomb bay’, so that no black is showing at it’s edges, etc.
When you’re ready, set it’s CLA to a bomb bay’s and have it rotate 95 or 100 degrees outwards when triggered.

Then to add the inner doors, insert B as a child of A, with it’s rotational point on the edge of A (on the ‘yellow’ side). Again, close the doors and make sure they fit correctly over the bomb bay. And again, set it’s CLA to that of a bomb bay, but make it rotate in the opposite direction to A, and a little less than 180 degrees (170, 175, etc) so that it doesn’t overlap (but instead sits sort of next to the other door).

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

Control Mixing

In real life, no modern, expensive aircraft only gives 1 role to each of it’s flight controls. With the invention of fly-by-wire and advanced flight computers, an aileron can work as an aileron, rudder, elevator, speed brake, flap, etc when needed (and they will on aircraft like F/A-18’s and F-35’s).

While it may be a bit silly or time consuming to give every control surface the ability to act as everything, it can be a very nice and noticeable touch to give things like elevators multiple abilities. An F-111 for example relies very heavily on it’s elevators for roll control.

But how do you do this? Very simply:

Let’s take the elevators on this Honey Badger – we don’t have moving surfaces on our wings, so let’s make them act as ailerons as well as elevators.

First, right click on your fuselage .srf, or whatever is the parent to your elevators.
Then go down to Indent and “Indent Empty Srf”:

Image

An “ID” box will open, asking for you to give a name to the empty / null .srf we’ve just created – give it a name that reminds you that it’s an aileron and elevator (and remember to give a mark to differentiate left from right) – I’ll go with “Railelev”

Next, we want to be able to make these empty .srf’s the parents of the actual elevator .srf’s – we want the actual visible models to be the children of these invisible, empty .srf’s.

To do this, right click on our “Railelev” / “Lailelev” empty .srf’s and go Indent, “Make Accessible”:

Image

This is what you’ll get as the finished product:

Image

Next, to make our actual elevators as children, just drag them into those gaps – if you can’t see the gaps, make sure you’ve expanded those .srf’s by clicking on the little “+” marks.

Also, if they’re not going into the gaps, make sure the little bar that appears, is in this kind of position:

Image

Now, give the empty .srf’s aileron CLA’s and leave your elevators with just elevator CLA’s.

Now here’s a super important thing; if you’ve just dragged them in like I’ve shown, you must copy over the POS X/Y/Z information to the empty parent .srf, and then delete that POS information out of the child .srf.
If you don’t do this, your model will rotate around the X Y Z origin in dnmviewer, making your control surface jump off your plane when it moves.
Also, you’ll most likely need to reduce the amount that your control surfaces rotate as elevators, etc.

Why?
On our Honey Badger, if the elevator moves more than about 15 degrees, it’ll strike the rudder. To prevent this from happening (it looks bad), we want the very maximum amount of rotation to be less than 15 degrees.
I’ve gone ahead and made the elevator function only move the surfaces 7 degrees either way and made the aileron function only move them 7 degrees. That means if I were to do something like pitch up and roll left, the back of my elevator wouldn’t hit my rudder.
You could also do things like make the elevator rotate 10 degrees and the aileron rotate 5 degrees, etc, but whatever works for you.

Image

Here’s an example of some basic 2 level mixing: our elevators move as ailerons as well and our rudders also work as spoilers.

2 level mixing is just the beginning though; for 3D thrust vectoring you’ll have elevator, aileron and rudder functionality for one or more .srf’s and for some parts you might even do all that plus more – just remember that everything together on an airplane; rudders for example generally create roll because they’re up high on an aircraft. To “counter” that on my Tu-160 for example, I made it so that when yawing to the left for example, the right aileron would droop down a bit to remove the rolling action that would incur in real life.

Of course, you don’t have to do any of this and many modders don’t, but sometimes it can be an easy way to make low detail planes look impressive.

Image

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

Assorted tips:

1. I always make everything in a .dnm the child of one “master” empty .srf. What this lets you do is:
A. Move the entire model around, making it easier to view / zoom in on parts.
B. Move the point that the entire plane rotates around (move the plane’s XYZ origin). In YS, this will appear to act as a plane’s centre of gravity – if you put the nose as point, when you pitch down, it’ll appear like you’re throwing your plane upwards before you start moving downwards.

2. If your landing gears aren’t pieces of art, you can make them disappear once they go inside the plane by unticking their STA1. This will make them go into the plane, then disappear. When you deploy them, they’ll reappear and then come out.

Image

Image

In that example, I left the rear gears there because I was actually challenging myself to be able to make a gear that could fit in such a tiny space.

The other thing is that if you also have your gear doors as “low speed gears” (another type of CLA, where they rotate in and out before and after the gears), the gears themselves disappear before the gear doors close, which looks bad. On a nose gear this is of no issue, but on the main gears I’ve got, where they’re visible from the side, it’s a bad idea.

3. If you want your props or engine faces to move faster, make an empty .srf and make it the parent of the prop. Then make them both propellers (CLA3) – the prop will rotate twice as fast now. Unfortunately this doesn’t work the other way around; there’s no way to make a slowly rotating object. One especially cool side effect of this process though is that you can achieve the effect where if you increase throttle enough, the prop / fan face will appear to slow down, stop and then reverse rotation.

4. Things don’t have to work exactly like in real life – if you wanted to give the appearance of achieving high angles of attack, you could make the entire aircraft tilt with changes in the elevator. You can make variable geometry control the size of engine nozzles or afterburner flames, etc.

5. Again; explore, experiment, enterprise – it’s a life skill to be able to try out new things and push boundaries – to exploit every potential out of things given to us. If you get confused, just give stuff a go and see what happens.

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

If you have any questions, feel free to PM me (Dragon029) on YSFHQ.

-- Sun Jan 12, 2014 1:25 am --

So apparently it's been 1 year, 8 months and 21 days since I posted this thread, but either way, here's an attempt at a video tutorial (little sleep + a bad throat don't help) that helps explain animation, by giving a demo of adding an elevon to one of my planes.
Per Ardua Ad Astra
>>> Dragon Addon Pack <<<
(PAK-FA, F/A-52, F/A-36, MQ-21)
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests