Project Blender 2.63 + to Orbiter import/export addon

SpaceNut

New member
Joined
Jun 15, 2008
Messages
316
Reaction score
0
Points
0
Location
Lorain
Help!

I'm having a heck of a time here... and it's not because I'm new to either Orbiter (9 years now) or Blender (about 2). I'm also familiar with GraphicAll.org, as I've been getting the latest builds for some time.

I had a heck of a time getting io_orbiter_msh.py, the link on page 1 doesn't lead to the file, it leads to the master file associated with the distributed revision control system, and there are no instructions on how to use it. Anyway, I finally have the python script, but now I'm having issues downloading blender

Any archive that I download from Graphicall.org gives me errors when I attempt to extract the archive... Both winRAR and 7zip both say the same thing... "unsupported compression method". What gives? I've never had trouble using winRAR to extract, and I've tested other archives and they're fine. Anyone have a clue what's causing this and how to resolve?

Thanks in advance to anyone who can help.
 

vlad32768

Member
Joined
Oct 11, 2010
Messages
78
Reaction score
0
Points
6
Where is the "GLSL viewport shading mode" i dont find it.
You can select GLSL on the properties tab (press "N" in 3d View window to toggle). You can see it on the first screenshot in the first post (Atlantis)
Oh, I understand. You can't see your exported model's textures in Orbiter engine.

I still have the same error message and can't export the orbiter mesh.

chpeller said:
Traceback (most recent call last):
File "C:\Program Files (x86)\Blender Foundation\Blender\2.62\scripts\addons\io_orbiter_ msh.py", line 772, in execute
export_msh(self.filepath,self.convert_coords,self. apply_modifiers,self.delete_orphans)
File "C:\Program Files (x86)\Blender Foundation\Blender\2.62\scripts\addons\io_orbiter_ msh.py", line 749, in export_msh
tex.image.save_render(os.path.join(texpath,tex_fna me))
RuntimeError: Error: Couldn't write image: C:\Users\cpn\Documents\Orbiter2010\Meshes\aurigate x\
Are there any spaces in file name "\aurigate x\"?

Anyway, that's strange. I don't know why it can't write the file. Maybe there are some problems with file permissions.
Yes, sending me your .blend file with textures is a good idea :)
Please also write your Blender revision number.

---------- Post added at 04:13 PM ---------- Previous post was at 03:58 PM ----------

I had a heck of a time getting io_orbiter_msh.py, the link on page 1 doesn't lead to the file, it leads to the master file associated with the distributed revision control system, and there are no instructions on how to use it.
The http link doesn't lead to "master file". It leads to automatically generated .tar.gz archive with the latest version of the script. Modern archivers (7zip) can open it.
Of course, you can use Git if you are familiar with it.
Any archive that I download from Graphicall.org gives me errors when I attempt to extract the archive...
Try again.
I've just downloaded Blender from Graphicall.org and all is fine.
 

SpaceNut

New member
Joined
Jun 15, 2008
Messages
316
Reaction score
0
Points
0
Location
Lorain
Ok, I've got the script, and I've got Blender, I tried WinZIP and that unpacked the 7z archive and I've got blender, but I don't see the orbiter addon in the addon window... is the script supposed to be in \scripts\addons?

That's where I have it.

Update:
Ok, I've got blender and the python script running, and I can load meshes from the orbiter mesh folder no problems... Thing is, any attempts at loading a mesh I've created (using the blender/python script or not, so I know it's not the python script), I get a CTD with a missing mesh warning. All I'm trying to do is replace a pre-existing mesh with a new one...

Any ideas anyone?
 
Last edited:

Traveller

Donator
Donator
Joined
Apr 25, 2012
Messages
27
Reaction score
0
Points
1
Yes, place the "io_orbiter_msh.py" file in the Blender scripts\addons folder. Once in Blender, look for "Import-Export: Orbiter mesh (.msh)" in the User Preferences/Addons page-- or you can type "orbiter" in the search box on that same page.
 

SpaceNut

New member
Joined
Jun 15, 2008
Messages
316
Reaction score
0
Points
0
Location
Lorain
Yep, finally got it working! Thanks, and kudos to Vlad for making this great tool. Anim8or has always been the sort of defacto tool the orbiter community turned to for a simple and free 3D modeling program, but Blender is much closer to 3D studio than it is to Anim8or, and it's just as free... so a mesh import/export tool was just the thing we needed to eliminate conversion steps. Thanks again Vlad!

---------- Post added at 03:19 PM ---------- Previous post was at 12:40 PM ----------



Ok, I loaded up the dragon mesh and rendered it using Blender's new cycles rendering engine. The standard Blender render engine was getting a bit long in the tooth, and there are other plugin rendering engines such as Yafaray and LuxRender, but the Blender community has been developing a newer, more realistic rendering engine called Cycles.

One of the neat features is support for CUDA, NVidia's General Purpose GPU platform which basically allows you to code the GPU with C++ as if it were a CPU. GPU's are really good at certain types of computing because they have so many cores (I had a 9800GT with 124 CUDA cores, and this feature alone prompted me to go out and buy a new GTX 570 with 480 CUDA cores!!!).

Besides graphics, certain calculations can benefit from parallel computing such as wave analysis, Analyzing air traffic flow, and other non-graphical uses. Coders were trying to use graphics APIs to gain the advantage of having so many cores, so NVidia stepped up and developed CUDA which enables one to code in C+.

Now.. on the graphical side... you can set Blender to use CUDA so that the video card's GPU does the rendering calculations.... not your CPU, and the results are amazing. The image below was rendered with 2500 passes, and took 58.21 seconds to complete. Now, I didn't render using the CPU to compare, but it would have taken several hours to render using just the CPU.

I loaded up Glider's SpaceX Dragon capsule, set the rendering engine to Cycles, then had to manually re-load the textures because cycles works a bit different than the standard Blender rendering engine, but that's it. I used all the standard textures with the exception of the hatch foil because the white foil didn't look that good, and I set the metal ring to glossy and the windows to glass material types, and this was the result:

 
Last edited:

Hlynkacg

Aspiring rocket scientist
Addon Developer
Tutorial Publisher
Donator
Joined
Dec 27, 2010
Messages
1,870
Reaction score
3
Points
0
Location
San Diego
Now.. on the graphical side... you can set Blender to use CUDA so that the video card's GPU does the rendering calculations.... not your CPU, and the results are amazing. The image below was rendered with 2500 passes, and took 58.21 seconds to complete. Now, I didn't render using the CPU to compare, but it would have taken several hours to render using just the CPU.

How exactly did you go about setting that up?

I'd like to try some renders of the Shuttle and other models in my library.
 

Traveller

Donator
Donator
Joined
Apr 25, 2012
Messages
27
Reaction score
0
Points
1
In the File/User Preferences/System tab, select "CUDA" as the Computing Device (lower left corner of window).

In the middle of the status bar, just to the left of the Blender logo, you will see "Blender Render". Click the triangle scroll buttons there and select "Cycles Render".

That will change the Scene properties (camera icon).

The "Device" tag should now appear in the "Render" tab. Select "GPU Compute" instead of "CPU".

There is now an "Integrator" tab, which contains the number of passes for both Render and Preview, as well as other values.

Lastly, in the 3D-view view object list now contains "Rendered", in addition to "Material", "Texture", "Solid", "Wireframe" and "Bound Box".
 

vlad32768

Member
Joined
Oct 11, 2010
Messages
78
Reaction score
0
Points
6
How exactly did you go about setting that up?

I'd like to try some renders of the Shuttle and other models in my library.

1. User Preferences->System->Compute device->CUDA
2. Enable "Cycles" renderer

Your video card should be a modern NVIDIA; my GTX580 renders extremely fast. ATI cards and OpenCL don't work good yet. High amount of video memory is very important for complex scenes.
 

SpaceNut

New member
Joined
Jun 15, 2008
Messages
316
Reaction score
0
Points
0
Location
Lorain
Vlad beat me to it.... but now the textures.....

You're going to have to manually reassign the textures... to do so select an object, select the Materials button in the properties panel. Click the "use nodes" button. You'll see where the surface texture is defined... It'll be set to diffuse BSDF, leave it there, then below that, you'll see the color picker, click the color itself to adjust color... or, click the little dot to the right of the color and select "Image Texture". After you do that you'll see the "Open" button, click it, and navigate to Orbiter's texture folder and select the appropriate texture.

For glass, click the button labeled Diffuse BSDF and select glass....

For shiny surfaces like metals, select Glossy BSDF and set the gloss to 0.1 or 0.2, 0.0 is just TOO glossy.

For lighting, add a plane, set it's surface type to Emission and put it above the object and your DONE with lighting in most cases. Unlike Blender's standard renderer, Cycles calculates actual physics lighting with ambient occlusion, so you don't have to add a metric ton of lights of differing types, colors, intensities to "fake" a photo realistic scene.

Oh, and get this, in the 3D View, besides Bounding Box, Wireframe, Solid, Texture and Material... you now have Rendered !!!!

That's right, you can not only render images, but you can render in real time while in Object or Edit modes. Click the Render Button in the properties panel, open the Integrator, and you can set render and preview render number of passes. That's also where you enable CUDA support (in the Render Pane, after enabling it in the system menu...Compute Device in user preferences as Vlad said. Set to CUDA, make sure your card is selected.

YOU MUST HAVE A CUDA CAPABLE NVIDIA VIDEO CARD TO ENABLE CUDA SUPPORT !!!

Add ons can be viewed in a "whole new light" with cycles :)

Hope this helps... have fun! :tiphat:

EDIT:
If you don't have a CUDA capable card (here's the list... http://developer.nvidia.com/cuda-gpus ) then you can still render using cycles and your pokey CPU. You'll be looking at some pretty long rendering times, so to do a good render of 500 passes or more, you're gonna be looking at an overnighter. Setup it up before bed and hope it's done in the morning, and if you do have a CUDA card, you're looking at a few minutes at most for most renders. Even with a CUDA card, it has to also support the 2.0 or better shader model for it to work. It was working with my NVidia 9800 GT for a while, but at some point they jumped to the 2.0 shader model support and my 9800 only had 1.3, which is what actually prompted me to go out and (gulp) spend $330 bucks on a GTX 570, which, btw, I'm quite impressed and happy with.
 
Last edited:

jrriss

New member
Joined
Mar 1, 2009
Messages
19
Reaction score
0
Points
1
I get this:

Code:
Export execute
Traceback (most recent call last):
  File "C:\Users\randall\Desktop\Win7.x64-47570\2.63\scripts\addons\io_orbiter_msh.py", line 776, in execute
    export_msh(self.filepath,self.convert_coords,self.apply_modifiers,self.delete_orphans)
  File "C:\Users\randall\Desktop\Win7.x64-47570\2.63\scripts\addons\io_orbiter_msh.py", line 612, in export_msh
    if not (mat.name in mtrls):
AttributeError: 'NoneType' object has no attribute 'name'

location:<unknown location>:-1


Blender
2.63.10
r47570
 

Attachments

  • io_orbiter_m.png
    io_orbiter_m.png
    234.8 KB · Views: 32

vlad32768

Member
Joined
Oct 11, 2010
Messages
78
Reaction score
0
Points
6
I get this:

Code:
\io_orbiter_msh.py", line 612, in export_msh
    if not (mat.name in mtrls):
AttributeError: 'NoneType' object has no attribute 'name'
I suppose that there is an empty material slot in object's material slot list. Delete this slot or assign a material to it.
 

SpaceNut

New member
Joined
Jun 15, 2008
Messages
316
Reaction score
0
Points
0
Location
Lorain
Hey Vlad, in post #1, you state that for exporting, the script only exports the 1st material. Is this a limitation of Orbiter or do you plan to ultimately add multiple material out?


Thanx

Ok, I edited some meshes with notepad and saw there are multiple materials, so I guess the question is, is multiple material support coming?
 
Last edited:

vlad32768

Member
Joined
Oct 11, 2010
Messages
78
Reaction score
0
Points
6
Hey Vlad, in post #1, you state that for exporting, the script only exports the 1st material. Is this a limitation of Orbiter or do you plan to ultimately add multiple material out?


Thanx

Ok, I edited some meshes with notepad and saw there are multiple materials, so I guess the question is, is multiple material support coming?

Yes, this is a limitation of Orbiter. One orbiter mesh group uses one and only one material, but different mesh groups can use different materials.

The script exports the 1st material of a Blender mesh object. The next mesh object can use a different material.

In order to support multiple materials in one Blender mesh object, the script has to separate a Blender mesh with multiple materials into multiple Orbiter mesh groups with one material each. I don't think that this is a good idea.
 
Last edited:

SpaceNut

New member
Joined
Jun 15, 2008
Messages
316
Reaction score
0
Points
0
Location
Lorain
Pretty cool Ripley, useful I guess if you don't have CUDA support. I can render that with my computer in the amount of time it took for him to upload/wait/download though...

I rendered the same blender file seen in the video (Credit Mike Pan) in 3 minutes 27 seconds to a total of 750 passes and it looks the same. Did it with 500 passes in 2 1/2. NVidia totally rocks. I have a GTX 570 with 480 CUDA cores that eats renders like that for lunch without the pesky register/upload/download, but it's certainly a godsend to anyone without CUDA support.
 

MachJok

Member
Joined
Dec 27, 2009
Messages
46
Reaction score
0
Points
6
R47940

Hey this addon looks great. I am having trouble installing it. Who though a drag/drop + activate would be difficult? I am using R47940 2.63.11 and I tried with the official 2.63 release. I put the .py into the addons folder but it would not find anything under "orbiter". Next I tried a manual install of the script using the "Install Addons" with the .py in another folder but that did not work either. For what ever reason the script will not show up.

Thanks in advance for any and all help!

MachJok
 

SpaceNut

New member
Joined
Jun 15, 2008
Messages
316
Reaction score
0
Points
0
Location
Lorain
I believe the python script goes into \scripts\addons\ and then in blender, select user preferences from the file menu and then click the add ons tab, then check the checkbox for the mesh importer/exporter. You should then see it from File...Import (or Export)... then Orbiter .Msh
 

MachJok

Member
Joined
Dec 27, 2009
Messages
46
Reaction score
0
Points
6
Thanks! I had followed the procedure but the last part has been unsuccessful because the selection for the plugin is not there. Import-Export: Orbiter and "orbiter" under the search don't return any results. There is nothing in the list that shows the orbiter plugin.
 

vlad32768

Member
Joined
Oct 11, 2010
Messages
78
Reaction score
0
Points
6
Thanks! I had followed the procedure but the last part has been unsuccessful because the selection for the plugin is not there. Import-Export: Orbiter and "orbiter" under the search don't return any results. There is nothing in the list that shows the orbiter plugin.

That's strange. All works fine with R47980
 
Top