-
-
Notifications
You must be signed in to change notification settings - Fork 134
Tutorials with examples
This page will provide some examples of how to work with a particular DragonFF tool.
Note! All images can be viewed in their original resolution using RMB > Open in new tabIn this tutorial we will look at how to create a "pulsation" effect on a marker.
Background
-
It all started with that I came across example of a marker from the PS2 version created by aap (well known in the GTA modding scene).
And his marker had a previously unseen "glow" effect with periods on the mission entry marker.
Later I found out that it was created with the help of his model converter tool convdff but it did not help me achieve the same result on my model.
Also, while examining the game code, an interesting line was found, called C3dMarker, and the values m_nPulsePeriod and m_fPulseFraction contained in it.
And only thanks to joint efforts on the server GTA Gropies in Discord we managed to understand and recreate this effect on a custom model.
And the thing turned out to be that in the example from aap in the cylinder.dff file, the debugger of his program (as of 2016, as I understand it) mistakenly wrote garbage data in the form of 0xCD to the value where the normal values should be, and this led to this effect.
Creating the effect using Blender
-
I will give an example on a standard cylinder in blender.
- Before starting, you must enable the display of split normals.
- Select all vertices and merge them using the keyboard shortcut Alt + N and "Merge"
- Select all vertices in "Edit Mode" , and in the "Mesh" tab > "Normals" (or the keyboard shortcut Alt + N) select "Point to Target" and assign a value of 1000 to the X axis
- In the "Object" tab > "DragonFF - Export Object" The "Normals" and "Export Custom Split Normals" items must be enabled, after which you can export the model to the game.
First example on the main page page
Second example on the main page
The algorithm of actions is almost the same as in the first example from 1 to 4.
With the exception of point 3, where you need to select the vertices and set the normals in "Point to taget".
Normals need to be set in a special way, as shown in the animation.
And at the end, do the same as in point 4 of the first example. To consolidate the result, you can turn off and on the values "Export Normals" and "Export Custom Split Normals".
In this example, we will create a "Scissor" and "Butterfly" style door opening on a vehicle.
Base
-
It's not that easy to set up. Keep in mind that the game initially opens the door only in one axis, which is Z.
In this case, the axes in the model work as follows:
Axis X - Rotating the door to the right is 45°, and rotating it to the left is -45°
Axis Y - Lifting the door is 90°, and lowering it is -90°
Axis Z - Opening the door to the right is 45°, and opening it to the left is -45°
First, you need to set the door opening point correctly. Each model has its own individual point, but for most models, it is sufficient to set it to the vertex point of the door.
An example for "Scissors"
- We select door geometry objects with the ok and dam tags and empty with the name of the door side (in my case door_lf_dummy)
- Next, go to the "Transform" tab and set "Mode" to "XZY Euler"
- First, we will rotate the "Origin" of the geometry.
- And now we will rotate the empty.
- Then copy the empty with the door name (door_lf_dummy) and uncheck the "Export Frame Name" box in the "Export Object".
- We insert the entire hierarchy (door_lf_dummy) into our copy.
Select the geometry of the doors of the ok and dam parts
Open the "Option" tab and select "Origins" (or use the keyboard shortcut Ctrl + .)
In rotation mode, specify the Y axis rotation in local mode with a value of 90°
In the "Option" tab, remove the selection from "Origin" and select "Parents"
Selecting the empty door object
And just like with the origin geometry object, we rotate the dummy along the Y axis by a similar 90°
This completes the action.
For the right side of the doors, the Y axis is set identically.
After all the manipulations done, you can export and check in the game.
An example for "Butterfly"
- Rotating the "Origin" of the geometry objects
In the rotation mode, we specify the rotation values for the Z -45° axis and for the X -45° axis.
- Rotating the empty object
The algorithm of actions is almost the same as in the "Scissors" example, but at the rotation stage, the rotation values for the Z and X axes are added.
And just like with the origin of geometry objects, we rotate the empty along the axes by the same ones for the Z -45° axis and for the X -45° axis.
This completes the actions on the left side, and the same actions are performed on the right side of the doors, but the values of the X and Z axes are mirrored on the right side.
That is :
If the Z axis on the left side is -45°, it will be 45° for the right side.
If the X-axis on the left side is 45°, it will be -45° for the right side.




















