VR Modding

Feedback and information for X Rebirth VR Edition

Moderator: Moderators for English X Forum

Post Reply
Archaine
Posts: 19
Joined: Mon, 7. Dec 15, 23:21
x3ap

Getting there.

Post by Archaine » Mon, 13. Aug 18, 02:55

UtiTrader,

I now have my ship in the game!
Complete with Lod's, Collision, and textures.
It has it's own ship group, texture group, etc.

Questions

No need, figured it all out.

Thanks
Archaine

Though I still cannot spawn actors in the skunk and have them work properly, they only have one dialogue option and that is "goodby" If I spawn them on a ship with a dock and assign them to the skunk they work fine. How do you create actor that works directly in the skunk. Does it have a platform entity?

I use the search tool on the forum, but I get no results for anything with it.
I search for "pilot" and it says no results (and I know pilot is mentioned a thousand times in the modding forum?) Just saying my questions are not out of lazyness, I haves spent hours searching.

Archaine
Posts: 19
Joined: Mon, 7. Dec 15, 23:21
x3ap

Mesh Modding

Post by Archaine » Sat, 18. Aug 18, 06:41

Not too many mesh modding post here, so I will contribute from what I have learned.

All of this can exist in a mod folder under extensions - no core packing.

First you have to unpack all the existing data convert xmf to dae with the XRConvertersMain.exe - This will give you a library of examples to work from. Also copy XRConvertersMain.exe and XRConverters.dll into your mod's assets folder to later reconvert your data when your ready. I have a temp folder in my assets directory that I put the dae exported from max in and run the bat file below to reconvert, then copy the xmf's back into the ships data folder.

FOR /R "temp" %%f IN (*.dae) do (
XRConvertersMain.exe exportxmf "temp" "%%f"
)
pause

Set 3dsmax system units to cent and working units to cent or generic.

Importing/exporting max2017-18
Autodesk collada import/export - works best, but does not handle vertex colors and will mess them up so you will have to recolor and alpha these.
Import scale = 1, rest of the settings = default.
Open collada plugin - You get vertex colors, but the mesh is buggy in game, normals or tangents or something messed up. The x-converter will not convert meshes exported with open collada, so Autodesk native will have to be used for export.

I import existing ships dae data in to get proper node layout and naming conventions, node names equate to parts and child names have material data in name (naming conventions is all important in the node tree)

Example.
units_size_xl_capital_destroyer_1 (root node)
......part_heck (dummy node for rear part)
...........part_heckXcollision (collision mesh)
...........part_heckXlod0 (dummy node for rear lod0)
.....................part_heckXlod0XargonXar_hullpattern_01 (visual mesh)
.....................more parts
...........part_heckXlod1 (other levels of detail, usually 4 total)
.....................repeat of the above node with less detailed geo.

The end of the part name is the material info for the part. XargonXar_hullpattern_01 (X's are dividers, first part = directory last part = material name)

Model up your own stuff, rename but keep the node format and create your own mats if you like, create a material group for them in material_library.xml, and put your textures in the assets/textures folder. (tie it all together in material xml - (open it up and look at existing material formats and mimic those but with your own names)

Import in weapons and props from the props folder in the extracted data.
place these where you need, and model around them, (don't export them with your model, they will be replaced by the prop in game, you just need to call out its name an position/rotation in the master ship xml. (I have a script at the end to help get this location data from your model and explain the process in more detail.)

Create your own ship group in shipgroups.xml, and ship type in ships.xml.

I used the existing ship's xml and macro, just renaming stuff and pointing to my new parts(and removing old ones). when you convert your dae's back to xmf it creates an xml that has the part info for your new model, paste new part component data into the ships master xml. (don't forget to point the data connection at the top of the master xml to your own data ie. extensions\modname\assets\shipsize\yourshipname.

Anyway, if anyone wants a clearer tutorial I might put something together, just hard to do without images, and can't post those here.


Here is a maxscript to get location data from your props. open max script editor, create a new script and paste it in, open the listener to see the data.

(--ARC-XpropData - 3dsMax 2018 - should work in lower versions too.
--List of steps you need to do first.
--Zero props to match xworld (ie. turrets - apply xform modifier to prop node(and children) and rotate 180 about x-axis then collapse)
--Zeroing props may differ depending on prop, have not tired very many.
--Place props in relation to master model, and then place prop nodes under root node.
--Rotate root node -90 about x-asis to zero out rotational transforms (y-z axis flip compensation) if woking with z up.
--Select a single prop (just it's main node is fine) and run script to get positon and rotation, cut and paste from script listener into xml.
--I never used Yaw Pitch and Roll rotations, so they will need to be converted (swaped around, made neg/pos, or a mixture)
--Re-rotate your root node back to it's original position before exporting.
--Don't export the props (selectively export or delete props first)

xpos = $.position
px = xpos.x * -1
py = xpos.y
pz = xpos.z

xquat = $.rotation
qw = xquat.w
qx = xquat.x
qy = xquat.y * -1
qz = xquat.z * -1

xrot = $.rotation as eulerAngles
yaw = xrot.z
pitch = xrot.x
roll = xrot.y

format "<position x=\"%\" y=\"%\" z=\"%\" />\n" px py pz
format "<quaternion qx=\"%\" qy=\"%\" qz=\"%\" qw=\"%\" />\n" qx qy qz qw
format "<rotation yaw=\"%\" pitch=\"%\" roll=\"%\" />\n" yaw pitch roll
)


Anyway, hope this helps anyone wanting to work with their own geometry.

Archaine

Post Reply

Return to “X Rebirth VR Edition”