Go Back   Knife Edge > RealFlight - Designer's Corner > RealFlight 8 - Designer's Corner
Use of this site is subject to our Terms of Use. | Technical Support is available from Great Planes Software Support.

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 11-19-2017, 11:31 PM
tridge tridge is offline
Registered User
 
Join Date: Nov 2015
Posts: 41
RF8 and Blender with FBX import

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_Mo...ers/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
Reply With Quote
  #2  
Old 11-21-2017, 01:46 AM
abaser's Avatar
abaser abaser is offline
Registered User
 
Join Date: Jun 2010
Location: stuttgart, AR
Posts: 4,449
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.
Reply With Quote
  #3  
Old 11-22-2017, 12:07 AM
tridge tridge is offline
Registered User
 
Join Date: Nov 2015
Posts: 41
Quote:
Originally Posted by abaser View Post
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.
Quote:
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
Reply With Quote
  #4  
Old 11-22-2017, 12:26 AM
csgill75's Avatar
csgill75 csgill75 is offline
Registered User
 
Join Date: Mar 2009
Location: Florence, Alabama
Posts: 3,269
Quote:
Originally Posted by tridge View Post
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.
Reply With Quote
  #5  
Old 11-22-2017, 12:42 AM
abaser's Avatar
abaser abaser is offline
Registered User
 
Join Date: Jun 2010
Location: stuttgart, AR
Posts: 4,449
http://www.knifeedge.com/forums/show...6&postcount=16

This should link you to a post I made to where you can download the method I used. When you save the zip file remove the .rfx extension. To see the entire post click on blender tips and tricks in top right of the page. This was the easiest way I found when I used blender.
Reply With Quote
  #6  
Old 11-22-2017, 11:57 PM
tridge tridge is offline
Registered User
 
Join Date: Nov 2015
Posts: 41
Quote:
Originally Posted by abaser View Post
http://www.knifeedge.com/forums/show...6&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
Reply With Quote
  #7  
Old 01-12-2018, 11:55 AM
robertlong13 robertlong13 is offline
Registered User
 
Join Date: Nov 2017
Location: New Hampshire, USA
Posts: 34
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/0...ify-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.
Reply With Quote
  #8  
Old 01-12-2018, 11:22 PM
robertlong13 robertlong13 is offline
Registered User
 
Join Date: Nov 2017
Location: New Hampshire, USA
Posts: 34
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 by robertlong13; 01-16-2018 at 02:08 PM.
Reply With Quote
  #9  
Old 01-16-2018, 01:38 PM
Ryan Douglas's Avatar
Ryan Douglas Ryan Douglas is offline
Administrator
 
Join Date: Mar 2002
Location: Corvallis, OR
Posts: 2,714
Previous post is now visible above.
Reply With Quote
  #10  
Old 01-16-2018, 02:11 PM
bosshawg's Avatar
bosshawg bosshawg is offline
Registered User
 
Join Date: Dec 2007
Location: Norfolk,England
Posts: 81
Exclamation Re:Newer Blender Exports!

Quote:
Originally Posted by tridge View Post
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.
Quote:
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).


Quote:
Originally Posted by robertlong13 View Post
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!
Quote:
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!
Attached Files
File Type: rfx Canberra_EA.RFX (4.91 MB, 2 views)
File Type: rfx Canberra249b.zip.rfx (6.67 MB, 3 views)
File Type: rfx Canberra279.zip.rfx (7.15 MB, 1 views)

Last edited by bosshawg; 02-14-2018 at 07:53 PM. Reason: Corrected 279zip to Export as FBX in the right dimensions
Reply With Quote
  #11  
Old 01-16-2018, 02:51 PM
robertlong13 robertlong13 is offline
Registered User
 
Join Date: Nov 2017
Location: New Hampshire, USA
Posts: 34
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.
Reply With Quote
  #12  
Old 01-16-2018, 05:28 PM
robertlong13 robertlong13 is offline
Registered User
 
Join Date: Nov 2017
Location: New Hampshire, USA
Posts: 34
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)
Reply With Quote
  #13  
Old 01-17-2018, 05:50 PM
robertlong13 robertlong13 is offline
Registered User
 
Join Date: Nov 2017
Location: New Hampshire, USA
Posts: 34
My blender addon took me longer than I expected to get ready. It's now up on GitHub now (https://github.com/robertlong13/io_scene_realflight). Hopefully this is helpful to you and the rest of the ArduPilot community, Tridge. In conjunction with BS_Modify_Pivot, this makes the workflow a breeze.

Please let me know if you run into any issues with it, or if you have any questions.
Reply With Quote
  #14  
Old 01-17-2018, 08:57 PM
bosshawg's Avatar
bosshawg bosshawg is offline
Registered User
 
Join Date: Dec 2007
Location: Norfolk,England
Posts: 81
Question 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
Attached Files
File Type: rfx HeliKopt.zip.rfx (5.80 MB, 0 views)

Last edited by bosshawg; 02-14-2018 at 08:09 PM. Reason: Corrected Helikopt.zip to accept Longer Name Lengths & 2 suit New FBX dimensions
Reply With Quote
  #15  
Old 01-17-2018, 09:22 PM
robertlong13 robertlong13 is offline
Registered User
 
Join Date: Nov 2017
Location: New Hampshire, USA
Posts: 34
Quote:
Originally Posted by bosshawg View Post
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.

Quote:
Originally Posted by bosshawg View Post
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 by robertlong13; 01-18-2018 at 09:41 AM.
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:23 PM.