Go Back   Knife Edge > RealFlight - Designer's Corner > RealFlight 9 - Designer's Corner
Use of this site is subject to our Terms of Use. | Looking for technical support? Read this!

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 10-25-2019, 06:23 PM
ceu.gomez ceu.gomez is offline
Registered User
 
Join Date: Oct 2019
Posts: 6
Modeling for Ardupilot SITL

Hi guys,
So, I'm having a touch of trouble getting custom 3d-models into realflight. We have been developing autopilots through ardupilot for a while, and are trying to build a simulator for our airframes in RealFlight 9 with ardupilot's native FlightAxis link SITL integration. We have custom 3d-models of our plane in both 3DSMax 2019 and Blender, but implementing them into the game hasn't worked so far.

Brief rundown of the steps I've taken so far (I can elaborate if necessary):

- Imported our STLs into both blender and 3DSMax
- Assigned the naming conventions detailed in KnifeEdge's aircraft development guide and parented all parts to the fuselage
- Created a ~CS_SPINNER and a ~CS_ENGINE part at the motor mount hub, parented to fuselage
- Applied a solid grey 32x32 TGA texture to all parts with the UVMap Editor, located in the same directory as the model
- exported from 3DSMax as a .3DS file (in the same directory)
- called with recommended export settings
- Ran 3ds2kex, both the beta and non-beta versions available for download from knifeEdge's site, on the file. I get the license & terms of use output in the command prompt, but no output file. The converters work on the supplied samples in the folder.

I'm kind of not sure what to do next! All the 3ds plugins available are for legacy versions of the software, which Autodesk no longer supports. Do you guys have any suggestions for possible ways to go from here? We are running Windows 10 x64.

Thanks! you guys are doing some awesome stuff here.
-jake
Reply With Quote
  #2  
Old 10-25-2019, 09:43 PM
Donamy Donamy is offline
Registered User
 
Join Date: May 2019
Posts: 467
Try saving the file as an .FBX file from MAX.
Reply With Quote
  #3  
Old 10-28-2019, 03:21 PM
ceu.gomez ceu.gomez is offline
Registered User
 
Join Date: Oct 2019
Posts: 6
That feels like it should work, but RealFlight throws an error right at the end of the export dialogue box:
'Error: Cannot locate path to texture file within KEX file. Corrupted KEX file?'

The only tga I'm using is in the same directory as the .FBX that I'm trying to import. Is there a subdirectory I should place it in so RealFlight picks it up after it does the KEX conversion, or something? Or is there a way to edit that path into a KEX file?

-jake
Reply With Quote
  #4  
Old 10-29-2019, 01:16 AM
Donamy Donamy is offline
Registered User
 
Join Date: May 2019
Posts: 467
Are you sure the texture is applied, to all the parts that use it? I'm just throwing things out there.
Reply With Quote
  #5  
Old 11-04-2019, 07:07 PM
ceu.gomez ceu.gomez is offline
Registered User
 
Join Date: Oct 2019
Posts: 6
So, I went through and remapped all the textures to the .TGA (2048x2048) in 3DSMax, with one material created with the bitmap attached. RF9 still doesn't want to import it directly as an FBX, citing unable to find texture in the generated KEX, but the converter now at least tries to parse it and outputs 'The model uses too few bitmap materials. Please reconfigure the model to use exactly one bitmap.' I can see the materials rendered on each segment in the 3DS viewport; how should I set up the materials so it doesn't throw this error?

Thanks for your help :P 2 minds are better than one regardless

-jake
Reply With Quote
  #6  
Old 11-04-2019, 11:16 PM
Donamy Donamy is offline
Registered User
 
Join Date: May 2019
Posts: 467
That's exactly the way I do it. Did you try turning on and off alpha channels ?
Reply With Quote
  #7  
Old 11-14-2019, 01:04 PM
ceu.gomez ceu.gomez is offline
Registered User
 
Join Date: Oct 2019
Posts: 6
Yeah, I have lol. I'm sure I'm just doing something small wrong in the import/export process that's throwing off the Knife Edge conversion engine, but it does seem that their software library for content creators would benefit from a bit of an update :P

Thanks for your help, I'll update this thread if I make any significant progress!
Reply With Quote
  #8  
Old 12-09-2019, 04:08 PM
ceu.gomez ceu.gomez is offline
Registered User
 
Join Date: Oct 2019
Posts: 6
Got it! took a while, but the models import straight from the 3dsMAX 2019 FBX exporter.

If anyone was running up against a similar issue, the fix was to:

- strip paths from all assets and manually place them in the same folder as the 3d model.

-THEN set the paths to textures within asset tracking, make them relative to project folder, export as FBX, and import to RF9
Reply With Quote
  #9  
Old 12-15-2019, 01:38 AM
fgibson's Avatar
fgibson fgibson is offline
Registered User
 
Join Date: Sep 2019
Posts: 90
Wondering if you (or anyone else) have been able to export fbx files from blender that don't generate the RF path error. I can import objects into RF from Wings3D (3ds files converted to fbx with the Autodesk fbx converter) but I always get the path error on files exported from blender.

RF does some weird things with my object colors and I was hoping that being able to export fbx files directly from blender might solve that problem.

I just started learning blender a few days ago and I think they named it that because trying to understand it makes you feel like your brain is in a blender!
Reply With Quote
  #10  
Old 12-17-2019, 01:28 PM
ceu.gomez ceu.gomez is offline
Registered User
 
Join Date: Oct 2019
Posts: 6
I looked into it, but the FBX exporter in Blender is Very limited [read: it sucks].
You can try playing with the blender tutorials given by KnifeEdge (in the downloads section of this site), but if you have the capability to acquire a student or trial license of 3dsMax, i strongly recommend using that, if just as an export tool.

It is 100% possible to model completely in blender, export to 3dsMax, assign materials in 3ds, and export an FBX from there (in fact, that's how i've been doing it. Autodesk's 3d tools leave something to be desired, IMO).
Reply With Quote
  #11  
Old 12-18-2019, 04:55 PM
tridge tridge is offline
Registered User
 
Join Date: Nov 2015
Posts: 48
Glad you got it working!
Don't forget to submit your model as a pull request on:
https://github.com/ArduPilot/SITL_Models
I'd really like to expand the set of models for ArduPilot
Reply With Quote
  #12  
Old 12-18-2019, 11:08 PM
fgibson's Avatar
fgibson fgibson is offline
Registered User
 
Join Date: Sep 2019
Posts: 90
Quote:
Originally Posted by ceu.gomez View Post
I looked into it, but the FBX exporter in Blender is Very limited [read: it sucks].
You can try playing with the blender tutorials given by KnifeEdge (in the downloads section of this site), but if you have the capability to acquire a student or trial license of 3dsMax, i strongly recommend using that, if just as an export tool.

It is 100% possible to model completely in blender, export to 3dsMax, assign materials in 3ds, and export an FBX from there (in fact, that's how i've been doing it. Autodesk's 3d tools leave something to be desired, IMO).
I like working in wings3d because I'm doing simple objects like shelters, fences, sheds, etc. - typical flying field stuff...no aircraft. But after hours of trying I just can't get the results I want. Even with mapping the entire model, the surfaces are super shiny when imported to RF.

I don't qualify for a Max educational license and I certainly can't afford to purchase it so I guess I'm stuck with what I have for now.

Thanks for the info.
Reply With Quote
  #13  
Old 12-19-2019, 12:34 AM
Donamy Donamy is offline
Registered User
 
Join Date: May 2019
Posts: 467
Try making a "name"_s.tga . All black and nothing will be shiny. Make sire it is in the same folder as the original .tga
Reply With Quote
  #14  
Old 12-19-2019, 01:14 PM
fgibson's Avatar
fgibson fgibson is offline
Registered User
 
Join Date: Sep 2019
Posts: 90
Quote:
Originally Posted by Donamy View Post
Try making a "name"_s.tga . All black and nothing will be shiny. Make sire it is in the same folder as the original .tga
Wow, you just made my day...week...maybe year! No more shiny grass runways or roof shingles!!

Thank you!
Reply With Quote
  #15  
Old 12-19-2019, 01:29 PM
Donamy Donamy is offline
Registered User
 
Join Date: May 2019
Posts: 467
You can adjust the shine by lightening the areas you want to have reflections such as windows or chrome.
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 02:58 PM.