RF8 and Blender with FBX import

tridge

Member
I'm trying to use the new FBX import capability in RF8 to make it easier to build models using blender, using blender 2.79.
The part I'm struggling with at the moment is the orientation of the pivot axes for elevons. I've started with this model created by lorbass:
https://github.com/ArduPilot/SITL_Models/tree/master/RealFlight/Tridge/TailSitters/Caipirinha
that was created using 3DS max, and exported as a FBX, then imported into RF8 as FBX, and exported from there as a RFX.
I'd like to be able to edit this model (and other models in blender). When I import it in blender the elevons end up pivoting about the wrong axis, giving something more like flapping wings than elevons.
I have managed to get the elevons to pivot around the correct point, but I haven't yet found a way to setup the axis of the pivot to be along the edge of the elevon.
Any suggestions?
Cheers, Tridge
 
While I don't condone modifying others models I will say this. Changing pivots in blender is a lengthy process. Search YouTube for the specifics if you choose to proceed. Personally, I'd recommend getting the student version of max and learning that program instead. You'll get more help along the way since that's what everyone uses here these days.
 
While I don't condone modifying others models I will say this
I probably should have explained that lorbass and I are working on this model (and other models) together.
Personally, I'd recommend getting the student version of max and learning that program instead. You'll get more help along the way since that's what everyone uses here these days.
I'll persist with blender for now as I'm aiming to create a workflow that others in the ArduPilot dev team can use to create new models. I want to create a workflow which will allow all the team members to participate without expensive tools.
I'm now starting to create a "RealFlight Tools" plugin for blender to try to make this sort of operation (setting a pivot to an edge) easy. I haven't succeeded yet :)
 
I'll persist with blender for now as I'm aiming to create a workflow that others in the ArduPilot dev team can use to create new models. I want to create a workflow which will allow all the team members to participate without expensive tools.
I'm now starting to create a "RealFlight Tools" plugin for blender to try to make this sort of operation (setting a pivot to an edge) easy. I haven't succeeded yet :)

There is no expense when you use a student version of 3ds Max. It's completely free. The only stipulation is that you can not sell the work you do in the student version. Very few people use blender here.
 
https://forums.realflight.com/showpost.php?p=224716&postcount=16
This should link you to a post I made to where you can download the method I used.
thanks for the link!
Have you tried setting up pivots for control surfaces in a more recent version of blender?
I have got the surface to move correctly by using a custom transform orientation based on a face of the control surface, so that using R XX rotates correctly, but when I export to an FBX file it doesn't retain the orientation of the pivot. I also tried exporting to a 3ds file and using 3ds2kex.exe, but that just gives me an error "File has no nodes"
I suspect the FBX exporter doesn't retain pivot orientation. If it does work for you please let me know.
Cheers, Tridge
 
I know this thread is old, but this was a lot of trouble of me too at first. I've had success with this addon for blender (https://www.blendernation.com/2017/08/29/bs-modify-pivot-add/), that mimics the functionality of 3DS max's "affect pivot only" feature. It's exactly what you need.

I'm using Blender 2.79, and the FBX export is working fine for me. I did have to edit the python script so that it would rename the collider meshes from ~CS_COLL.XXX to ~CS_COLL. I've only just started learning, but I've successfully made a laughably basic trainer based on this video (https://www.youtube.com/watch?v=aLQcCTI2v8A). All the control surfaces and the steering wheel work perfectly.

I can post my model and edited python script if you'd like.
 
EDIT: this was posted while the above post was awaiting moderation.

I had success with Blender's FBX export. To move pivots, I use the "BS Modify Pivot" addon for Blender. It mimics the functionality of 3ds max's "affect pivot only" feature. I can confirm that my pivots exported in the correct orientation. I made a laughably simplistic trainer plane and verified that the control surfaces do in fact move correctly.

The only problem with Blender is that all parts need a unique name, which is a problem with the collision meshes, which, to my understanding, all need to be named ~CS_COLL. I edited the python script for the FBX export to rename anything of the form ~CS_COLL.* to ~CS_COLL.

I'd be happy to post all of my files, but I have a feeling I'll have difficulty uploading anything until I've made a few posts. I attempted to post here several hours ago, but I guess it was rejected by automod (or it was flagged for review by a human mod and they haven't had a chance to review). It could be due to the age of the thread, or it's because I'm a brand new forum member and was attempting to post links in my very first post. On the off chance it was some bug and the post got deleted entirely, I'm trying again. I apologize if this is considered bad form.
 
Last edited:
Re:Newer Blender Exports!

Have you tried setting up pivots for control surfaces in a more recent version of blender?
Yes,In Blender 2.79 The FBX exports all Pivots Correctly...(In Blender2.79 FBX Export Settings Config Panel Y is FORWARD & Z is UP)!".
Such that FBX imports correctly & retains the orientation of the pivots.
Unfortunately the FBX import loses your NUP's for Retracts & Lights.(Tryed most settings to retain them.)
Dont have RF8 to check further!
I have attached "Canberra279.zip.rfx" to this Post {download from forum AS IS,then after download delete ".rfx" part of filename & unzip as Normal}.
It Contains a Blender 2.79 .blend file and .FBX file hopefully showing differences between .blend with NUP'S SET & .FBX WITHOUT.
tried exporting a 3ds file and using 3ds2kex.exe, but that just gives me an error "File has no nodes"
Rayvels "export_3ds2kex.py" script installed in Blender 2.49b is the ONLY 3DS export from Blender that WORKS.

Digressing; Any Newer Version of 3dsMAX than 2012 exported as .3ds file still WORKS with the 3ds2kex.exe(beta) Standalone Converter from the Command Line To generate a Kex that will work with RealFlight7.[Max 12 Character tga Name eg; "12345678.tga"]
Allowing baked Materials(20,000 Poly Limit Tho).


I had success with Blender's FBX export. To move pivots, I use the "BS Modify Pivot" addon for Blender. It mimics the functionality of 3ds max's "affect pivot only" feature. I can confirm that my pivots exported in the correct orientation. I made a laughably simplistic trainer plane and verified that the control surfaces do in fact move correctly.
Cool & Congratulations!.As i said previously I don't have RF8 to check further the FBX Import Procedure.
But RF8 should still Import Canberra_EA.RFX From a Later version(some editing of Canberra_s.tga with Gimp/Photoshop May B required to remove excess Gloss/Specularity due to change in Versions)See Thread Here!
The only problem with Blender is that all parts need a unique name, which is a problem with the collision meshes, which, to my understanding, all need to be named ~CS_COLL. I edited the python script for the FBX export to rename anything of the form ~CS_COLL.* to ~CS_COLL.
I Have attached "Canberra249b.zip.rfx" & "Canberra279.zip.rfx" to this Post {download from forum AS IS,then after download delete ".rfx" part of filename & unzip as Normal}.
Hopefully If you Open the .blends in Either Blender 2.49b OR 2.79 and look in the Outliner You should see How 2 Name & Parent the individual collision meshes.
Hope This is of some Help.
Re: I'm happy to post all of my files.
Hopefully my Post Should Explain how 2 Bypass The Forums Posting Restrictions 4 Non Standard Filetpes :).AnyHow Good Luck!
 

Attachments

  • Canberra_EA.RFX
    4.9 MB · Views: 9
  • Canberra249b.zip.rfx
    6.7 MB · Views: 8
  • Canberra279.zip.rfx
    7.1 MB · Views: 10
Last edited:
Wow! Thank you so much for the wealth of information here, bosshawg.

I hadn't played with retracts yet, so I didn't know about the NUP issue. I'm going to look into that.
 
Okay, I've figured out the NUP issue, and I've edited my FBX export to properly handle them. I've imported into RF8 and it works. I'll try to bundle it as a blender addon and share it tonight.

The reason they weren't exporting properly is that the "User Defined" tab in 3DS max exports everything in there as one string inside a property named "UDP3DSMAX". When blender exports custom properties, it actually exports them as properties. You can work around this without my script change by making a custom property named "UDP3DSMAX" in blender and setting its value to "NUP_MaxRotationY=-90" for example. The only issue with that is that I don't know how to add the carriage return if you need to add multiple lines (blender will escape '\r' to '\\r', so that won't work)
 
Questions?

Wow Good Work Geezer!.
Had a Pop @ your suggestion with custom property named "UDP3DSMAX" with "NUP_MaxRotationY=-90" seemed to stick with FBX Export & Re-Import in Blender.
?Are You Saying that in the Future that your NUP'S Must B set as Custom Properties?...& NOT in Logic Editor like you had 2 for 2.49b?

Have attached HeliKopt.zip.rfx
?Because of a Name length limit in Blender of 21 Characters found Need 2 edit SUP file!...with2.49b
This Limit is still present with 2.79!..Any Ideas? How 2 acheive this without a SUP...?
The Above Comment is Wrong!.I have corrected the zip to accept longer Name Lengths & Set dimensions in Blend file to properly Export as FBX for RF8
 

Attachments

  • HeliKopt.zip.rfx
    5.8 MB · Views: 0
Last edited:
Wow Good Work Geezer!.
Are You Saying that in the Future that your NUP'S Must B set as Custom Properties?...& NOT in Logic Editor like you had 2 for 2.49b?

Yes, with my FBX exporter, you would simply set your NUPs in Custom Properties.

Have attached HeliKopt.zip.rfx
?Because of a Name length limit in Blender of 21 Characters found Need 2 edit SUP file!...with2.49b
This Limit is still present with 2.79!..Any Ideas? How 2 acheive this without a SUP...?

I just opened up 2.79 and was able to make a name up to 64 characters.

My exporter addon is live on github now. I tried to post a link to it earlier, but it's awaiting moderation. You can search io_scene_realflight on github in the meantime.
 
Last edited:
Great job Robert.
Appreciate your efforts. I managed to make my own simple glider in 2.79 and exported it into RF8!

Now I see sens to make it more complex. I was struggling to learn 3dmax for RF only, but for a guy who started from Blender from beginning it's very very difficult to get use to UI philosophy of 3dmax ;/

Thank's a lot and hope to see your tools for RF!

Michal
 
Gear Door Problem!

@robertlong13?
Have attached a TestP-51_EA.rfx & TestP-51.zip.rfx[Contains .blend .fbx .kex .tga]
posted screenshot of errors reported by RF8 the retracts work,GearDoors Do Not {tryed both ways,No Luck 4 Either}
What am i doing Wrong?,
I could do this with RF7 & Blender2.49b!
ps:Thank U 4 Your Script!,mostly everything else Workz {lights R a bit hit & Miss tho}
 

Attachments

  • TestP-51_EA.RFX
    4.8 MB · Views: 6
  • TestP-51.zip.rfx
    5.6 MB · Views: 9
  • GearNUPErrors.jpg
    GearNUPErrors.jpg
    209.9 KB · Views: 11
Back
Top