Blender cmod export script (updated)

Post requests, images, descriptions and reports about work in progress here.
mmmeghele
Posts: 8
Joined: 15.02.2010
With us: 14 years 9 months

Re: Blender cmod export script (updated)

Post #21by mmmeghele » 30.08.2010, 00:25

john Van Vliet wrote:i suppose that it might be all done with out running it from inside blender ???????

i open blender - work on the mesh
then ,while in blender, use the export / cmod
and save it as a cmod ( the exact same way i would for a 3ds /.ply /.obj file )

Hi John,
I tried the export in cmod from inside blender but nothing changed.
I also downloaded some very simple models from motherlode (satgeneric and ao7). These models are in 3ds format and I can import and export them in cmod without problems.
My model is a vrl file imported in blender. The import phase works fine and I can save my .blend file, but when exporting it in cmod the above error come out :(
Maybe I need some additional python module or library?
Thanks for your help.

Michele

Avatar
John Van Vliet
Posts: 2944
Joined: 28.08.2002
With us: 22 years 3 months

Re: Blender cmod export script (updated)

Post #22by John Van Vliet » 30.08.2010, 04:20

--- edit ---
Last edited by John Van Vliet on 19.10.2013, 23:01, edited 1 time in total.

mmmeghele
Posts: 8
Joined: 15.02.2010
With us: 14 years 9 months

Re: Blender cmod export script (updated)

Post #23by mmmeghele » 31.08.2010, 00:24

Hi John,
the version of the script I downloaded is linked in this thread (the package name is blender-cmod-exporter-2.zip). At the beginning of the script it is reported the line: "Blender: 248".
in yours the line is "Blender: 240" so maybe yours is a previous version.
I also tried to use it to export some mesh but I can't see it in my export menu'. If I run it from the command line ( blender file.blend -P yourscript.py ) doesn't happen nothing... it seem to me that the script is not executed. 8O
Perhaps I'm doing some basic error since I have just few hours of experience with blender and celestia and python, so please be patient :)
Some info about the hardware/software:
quad 1.6 GHz, 4 GB ram, ATI 4570 graphic card and fedora 12 x86_64, kernel 2.6.32.19-163.
I'm running blender 2.49b compiled with python 2.6 and my python version is 2.6.2

Thanks for your links, too. I'm trying to figure out if cmodview could help me.
Michele

Avatar
John Van Vliet
Posts: 2944
Joined: 28.08.2002
With us: 22 years 3 months

Re: Blender cmod export script (updated)

Post #24by John Van Vliet » 31.08.2010, 00:36

--- edit ---
Last edited by John Van Vliet on 19.10.2013, 23:01, edited 1 time in total.

Avatar
John Van Vliet
Posts: 2944
Joined: 28.08.2002
With us: 22 years 3 months

Re: Blender cmod export script (updated)

Post #25by John Van Vliet » 31.08.2010, 01:22

--- edit ---
Last edited by John Van Vliet on 19.10.2013, 23:00, edited 1 time in total.

mmmeghele
Posts: 8
Joined: 15.02.2010
With us: 14 years 9 months

Re: Blender cmod export script (updated)

Post #26by mmmeghele » 02.09.2010, 16:55

Hi John,
sorry for the retard.
In my box, fedora 12, the directory .blender in my home is not a link and is writable by my user. I already put the script in that dir and I used it to convert some model. Some of them are successfully converted, but when I try to convert a .blend file imported from a different format (my case: wrl file) the error come out.
In my first post I reported the output of the script ran from the terminal, but if I open blender from the terminal and then following your instruction export in cmod format I obtain the same error.
So I think the only way is understand what this error really means, but my knowledge of python is zero, less or more. :mrgreen:
Any hint will be well accepted :D

Avatar
John Van Vliet
Posts: 2944
Joined: 28.08.2002
With us: 22 years 3 months

Re: Blender cmod export script (updated)

Post #27by John Van Vliet » 02.09.2010, 20:41

--- edit ---
Last edited by John Van Vliet on 19.10.2013, 22:59, edited 1 time in total.

mmmeghele
Posts: 8
Joined: 15.02.2010
With us: 14 years 9 months

Re: Blender cmod export script (updated)

Post #28by mmmeghele » 04.09.2010, 14:13

Hi John,
last time I forgot to specify that blender is installed from yum.
I obtained some result.
john Van Vliet wrote:what exact meshes are causing the problem ?
The cmod output file is only 17 bytes and there is no other than the first line:

#celmodel__ascii

Therefore I think the first mesh that the script read is causing the problem.
did you download the models from the net?
where did you get them ?
This model is a satellite prototipe covered from non disclosure agreements, so I can't let it circulate on the net.

can you post a link to the orig. wrl files
they might just be bad files . Are they vrml 1.0 or the much older vrml 97 ?
are there textures involved or just colored surfaces ?
I'm afraid I can't, for the reason mentioned above, sorry. :(
Ok now the workaround. Since the blender-cmod-exporter work with a model imported from a .3ds file, I imported my .wrl file and saved in .blend, then exported in 3ds and imported again in blender. At this point exporting in cmod work very vell and I have my model converted.
Now it's not clear to me how to edit the ssc to open my cmod in celestia, and optionally how to add some texture to my model (it's a cad model so there are only colored surfaces).
My goal is just make some sort of movie, possibly including solar wind action on the satellite, and celestia seemed to me a good solution.
Could you indicate me some link, or tutorial?
Thank you again.

Avatar
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 3 months
Location: NY, USA

Re: Blender cmod export script (updated)

Post #29by selden » 04.09.2010, 20:38

Now it's not clear to me how to edit the ssc to open my cmod in celestia, and optionally how to add some texture to my model (it's a cad model so there are only colored surfaces).

Surface textures should be applied in Blender, before you export the model to CMOD.

Below is a very simple SSC file to display a satellite model in low orbit around the Earth. There are many more parameters available for defining the orbit more accurately. More information about SSC parameters is available in the Celestia WikiBook, which is at http://en.wikibooks.org/wiki/Celestia

Code: Select all

"MySatellite" "Sol/Earth" {
Mesh "mysatellite.cmod"
Radius 0.02
EllipticalOrbit { Period 0.064 SemiMajorAxis 6800 }
Albedo 0.1
}


Some information about creating and using SSC files is available at http://www.lepp.cornell.edu/~seb/celest ... intro.html
Selden

mmmeghele
Posts: 8
Joined: 15.02.2010
With us: 14 years 9 months

Re: Blender cmod export script (updated)

Post #30by mmmeghele » 05.09.2010, 14:08

selden wrote:Below is a very simple SSC ...

Thank you Selden for suggestions, links and code. I adapted it to my model and now it is in Celestia.
My next issues are textures (in blender), and the positioning of the model in L1 (I've found an interesting thread in viewtopic.php?f=9&t=11976), but I think they are OT here.

I'll move/open an other thread.
Thank you guys. :)


Return to “Add-on development”