PDA

View Full Version : RF 7 with Blender 2.7, is that possible?


barboalni
06-09-2014, 06:07 PM
Hi, all,

After a looong time without flying, and thanks in part to getting a copy of RF7 last Christmas, I've started building again and together with a friend we expect to... crash one of those wonderful FT Flyers shortly. I was thinking of building the FT Flyer in RF7 so that my friend (who has never flown an RC plane) and I (not flying in 20 years) could get some training.

Since I don't have a 3ds license, I started building the FT Flyer in Blender 2.70, trying to follow to the specs in the KnifeEdge pages. That has taken some time, given my previous knowledge of Blender (zero) and 3D modelling and design in general (between nothing and zero) And now after quite a few false attempts and a lot of rebuilding and reparenting (fortunately the FT Flyer is quite simple) I wanted to see if at least RF could display something resembling a plane.

But I guess that ignorance can take me only this far. I'm not stuck on this two areas:

1- There's a script in these forums (very difficult to download by the way) that I should put somewhere in my Blender install, but that somewhere does not exist in my version of Blender. Then again, I don't know even if that script still works or not with Blender v 2.7.
2- I have modelled the plane and assigned materials to the meshes, but I really need some Dummies guide to mapping textures that starts from the very beginning and using Blender v 2.7. All the tutorials I've found either assume you know everything about Blender and focus on tricks for texture mapping or are for older versions and the already confusing Blender UI has changed since that version. Or worse yet, they start by saying "just map the texture using the view blahblah taking care of aligning control points with normal extrusion vectors" (or something like that)

Any help appreciated. If I finally manage to create something actually useful I'll share it here.

phrank
06-09-2014, 06:33 PM
I would say, stay as far away as you can from Blender. A very short list of people have had success with it.
Instead, get the FREE student license for 3dsMax, everything you need is there, except the painting part which can be done with Gimp or Photoshop.
Many tutorials, including some specifically for Realflight.
All that info is spread throughout these forums, google, and You tube, so I won't bore you with specific links.

barboalni
06-09-2014, 06:49 PM
Thanks for your reply. I was not expecting it to be that difficult. I'd prefer to use free software, so perhaps it is worth some Python-fu and exploration (after all, KnifeEdge does not discourage using Blender) I always can fall back to 3ds if all else fails.
I would say, stay as far away as you can from Blender. A very short list of people have had success with it.
Instead, get the FREE student license for 3dsMax, everything you need is there, except the painting part which can be done with Gimp or Photoshop.
Many tutorials, including some specifically for Realflight.
All that info is spread throughout these forums, google, and You tube, so I won't bore you with specific links.

abaser
06-09-2014, 08:46 PM
The script you are trying to use is designed for 2.49b. It will not work with 2.7. Now, you could try to take your model from .7 to .49b, but with certain changes to the software, your more than likely going to get a corrupt file because 49b doesn't recognize the new materials from .7. Now, if you feel compelled to redo the script, I hope you have a very good understanding of coding because a completely new script is required, not just modification of the old. I went through great lengths to get a new exporter script written, but cut my losses and went with max. Best move I ever made.

barboalni
06-21-2014, 08:48 PM
Replying to myself: I've been struggling with the 2.49 script and finally managed to get something out of the export script that was recognized and accepted by 3ds2kex and imported by RF7 (albeit the results look quite funny)

As anticipated by your comments, it has not been easy to reach this alpha state since (a) I don't know much about Blender, much less about what changed in the Blender Python APIs between 2.49 and 2.70 (and it seems it changed a lot) (b) there is no documentation about what 3ds2kex expects to find in the .3ds file (c) there is close to no documentation about the .3ds file format itself and (d) the script was written for Python 2 and now Blender is using Python 3.

The script is for sure unfinished and likely very wrong in quite a few areas, so I've created a GitHub repo in case anyone wants to take a look and/or improve it. Please understand that I'm a noob at Blender and 3D modeling in general, so don't expect me to understand even basic concepts easily or the 3D jargon.

Repo is at https://github.com/barbolani/export3ds2kex

I'll keep trying to fix whatever I can, using a basic cube and the FT Flyer as testbeds.

barboalni
07-08-2014, 04:07 AM
Basic import seems to work, but there are still some bugs to solve:


Parenting on more than one level does not position the objects correctly. Basic Fuselage parenting works, but you can't for example use parenting to attach the landing gear to the wheels and the gear to the fuselage (does work if you leave the gear without parent because everything ends up attached by default to the fuselage)
UV mapping does not work correctly. You can use an empty bitmap to map at least one mesh and use materials to overcome the 3ds2kex requirement of using a single bitmap.
The .sup file generation has not been exercised or tested
Probably more bugs that I've not discovered

I'm stopping development at this point, since it can at least import my FT Flyer in RF7 and it gives a decent rendition. The behavior in the air appears realistic, although I haven't flown the FT Flyer long enough to confirm that. I've also given up in trying to understand the rest of the data structures that a .3ds file has and how 3ds2kex wants to interpret them.

Until Knife Edge documents what data the 3ds2kex utility is using in the .3ds file (especially what coordinate system(s) are expected in each track data point and in each transformation in the object matrix data) it is very, very hard to continue by trial and error and I've already devoted too much time to this. It starts to feel like work and no longer fun to be all the time exporting from Blender and importing into RF7 just to see the results of a small change. And no "do just like 3ds Max does" is not good enough since the .3ds file format is barely documented, if at all. All you can find is documents dating back from the 90's that start saying "the .3ds format is not documented anywhere but here is what I've found..." And no, the brief Autodesk reference it is not enough because it does not say what the 3ds2kex utility is expecting.

I feel somewhat let down by Knife Edge: they make the best RC simulator in comparison with the competition in all aspects but price, so I was expecting them to be above the rest in their support for integration with other modeling packages in addition to 3ds Max. Not that they have to write an export module for Maya, Blender or any other 3D modeling package out there, but at least document what their own utilities want to see in their input.

Anyone can pick up the code from GitHub and improve it if he/she likes to. I'll try 3ds when/if I feel like I want to learn the basics of another 3d modeling package. Have fun.

Boof69
07-08-2014, 07:19 AM
There is no need to use blender for the export at least. 3ds Max 2012 is free and now the exporter allows for 27,000 polys. If one prefers to model in blender they should do so, but then simply import into max for parenting, naming, and pivot setting. Then export for RF.

barboalni
07-08-2014, 08:07 AM
I've not tried your suggestion, but judging by the source code of the Blender .3ds exporter (of which the KEX exporter is a close descendant) I'd advise against counting on that to work. It is highly likely that the model won't import correctly in 3ds.

If you want to model airplanes for RF, 3ds Max is at the moment the only viable option IMO.

abaser
07-08-2014, 08:22 AM
Even if it doesn't, there's several other formats that might work just fine. You don't have to stick to 3ds throughout, just the final export. I used obj when coming from wings. And I used to do just what you're trying yo do. I'll try to recall what format I used between the two.