It is currently Sat, 18-11-17, 0:32 GMT

All times are UTC




Post new topic Reply to topic  [ 15 posts ] 
Author Message
PostPosted: Wed, 06-07-16, 15:06 GMT 
Offline
User avatar

Joined: Mon, 04-07-16, 21:18 GMT
Posts: 23
Location: Ohio, U. S. A.
Hello Everyone!

I have read this forum site for a while now, and I have had many questions, but no one to ask. And now that I have an account here, I can ask the experts for help!

Here is my problem:
I downloaded some shape files for Tethys from here: http://sbn.psi.edu/pds/resource/tethysshape.html
I managed to convert the 64q shape file to CMOD format, as well as orient it to match up with the Celestia location labels.
But there is just one problem:

The model renders well, but the texture doesn't.
Attachment:
File comment: As you can see, there is no texture.
tethysmodelpost.jpg
tethysmodelpost.jpg [ 51.92 KiB | Viewed 3130 times ]


I converted the CMOD file to ASCII format. This is what the beginning part says:
Code:
#celmodel__ascii

material
end_material

mesh
vertexdesc
position f3
normal f3
end_vertexdesc

vertices 147456

What, if anything, should I change?

Help would be very much appreciated.

Thanks.

_________________
CM1215: Celestial Master in learning.


Top
 Profile  
 
PostPosted: Wed, 06-07-16, 19:00 GMT 
Offline
User avatar

Joined: Mon, 03-09-07, 23:01 GMT
Posts: 388
Location: Tuscany, Tyrrhenian Sea
Hi! Welcome to CM. If the package does ship the texture, its declaration should be:

Code:
#celmodel__ascii

material
texture0 "tethys_texture_here.*"
end_material

mesh
vertexdesc
position f3
normal f3
end_vertexdesc

vertices 147456


if the texture is not shipped, then you can color the mesh with the directive:
Code:
#celmodel__ascii

material
diffuse 0.5 0.5 0.5 #RGB from 0 to 1, this is gray like 128 128 128 in non-decimal mode
end_material

mesh
vertexdesc
position f3
normal f3
end_vertexdesc

vertices 147456

_________________
Never at rest.


Top
 Profile  
 
PostPosted: Wed, 06-07-16, 20:13 GMT 
Offline
User avatar

Joined: Tue, 04-09-07, 21:55 GMT
Posts: 773
Location: N 42.38846 W 83.45456
hi CM1215

the quad ?

i normally use the vertex
with some very minor editing -- there is a python scrip i posted here that dose that
"pdsVertexTAB2obj.py"
here is a link
https://drive.google.com/file/d/0B6ZYAd ... sp=sharing

they are basically a obj mesh but there are two minor versions
one with the listing for the mesh as the start of the file OR at the start of the mesh section

now there are TWO types of ASCII text based cmods
uv mapped and NON mapped
if you have 3 columns of coordinates it is NON UV mapped

for uv mapped there are 5 columns of coordinates

to have a texture in the cmod you need to have it UV mapped

how you go about this is dependent on HOW you made the cmod

I keep a old copy of blender 2.49b and use the old blender plugin
then use the celesta tool "cmodview"( in the celesta source code to convert the text cmod to a BINARY cmod )

now there is also a Anim8tor plugin ( MS windows)
and a Perl script around someplace that can convert some tab files to a cmod

_________________
"I don't pitch Linux to my friends, I let Microsoft do that for me."
Using OpenSUSE 42.1 & Scientific Linux 6.7


Top
 Profile  
 
PostPosted: Thu, 07-07-16, 1:51 GMT 
Offline
User avatar

Joined: Mon, 04-07-16, 21:18 GMT
Posts: 23
Location: Ohio, U. S. A.
My bad.

I meant to put "ver64q." I did use the face-vertex model.

My ASCII CMOD file has 5 columns of coordinates, so it is UV mapped.

I tried using your python script, but I don't know how to run it on windows.

I ended up converting it to OBJ format the old-fashioned way: with Microsoft Excel.

Excel worked just fine, but a faster method of conversion would be useful.

And fenerit, what do you mean by the package shipping or not shipping the texture?

_________________
CM1215: Celestial Master in learning.


Top
 Profile  
 
PostPosted: Thu, 07-07-16, 4:40 GMT 
Offline
User avatar

Joined: Tue, 04-09-07, 21:55 GMT
Posts: 773
Location: N 42.38846 W 83.45456
a spreadsheet works for replacing a column with a " v" and a "f "

Quote:
And fenerit, what do you mean by the package shipping or not shipping the texture?

i am guessing he was thinking it was from a add on


as to a faster method
there are TWO types of tab vertex formats
-- different grads and postgrads in different groups are doing the same thing DIFFERENTLY - go figure

the python script will run in the win10 terminal
it was an advanced shell in win7 and NOT "cmd.exe " though that should work
i normally run Mingw on windows so i have access to a REAL terminal "Bash"

Code:
python pdsVertexTAB2obj.py tethys_ver512q.tab tethys_ver512q.obj

run that in the folder with the 512 tab file

BUT this script uses just one of the two formats ( there is NO check for that built into the one off script )

the top of the tab file
Code:
 1579014                                             
         1     -287.73537      322.28496      303.48280
         2     -286.47195      322.84280      304.10808
         3     -285.24143      323.43434      304.76676
         4     -284.07057      324.08456      305.48873
         5     -282.93384      324.76543      306.24571
         6     -281.74804      325.39029      306.95000
         7     -280.46574      325.92629      307.55632
         8     -279.19458      326.46900      308.17250
         9     -277.98250      327.07000      308.84801
        10     -276.77419      327.68089      309.53347
        11     -275.54511      328.27042      310.19790
        12     -274.27180      328.81236      310.81375
        13     -272.98683      329.34095      311.41573
        14     -271.72936      329.89664      312.05060
        15     -270.46867      330.44975      312.68175
        16     -269.14223      330.92814      313.23672
        17     -267.77438      331.35735      313.74579
        18     -266.52982      331.86320      314.33269

this is the WRONG FORMAT
down at line "1579015" is the face count "3145728"
is this
Code:
 1579013      325.56031      287.19514     -305.91506
  1579014      326.59723      286.36166     -305.14386
   3145728
         1         1       515         2               
         2         1       514       515               
         3       514      1028       515               
         4       514      1027      1028               
         5      1027      1541      1028               
         6      1027      1540      1541               
         7      1540      2054      1541               
         8      1540      2053      2054               


the vertex count at the top and the face count at the start of the faces

the two values need to be at the TOP
Code:
1579014  3145728                                       
         1     -287.73537      322.28496      303.48280
         2     -286.47195      322.84280      304.10808
         3     -285.24143      323.43434      304.76676
         4     -284.07057      324.08456      305.48873
         5     -282.93384      324.76543      306.24571
         6     -281.74804      325.39029      306.95000
         7     -280.46574      325.92629      307.55632
-------------------- many lines later ----------
   1579013      325.56031      287.19514     -305.91506
   1579014      326.59723      286.36166     -305.14386
         1         1       515         2               
         2         1       514       515               
         3       514      1028       515               



at this point i open the obj in the current blender 2.77
rotate it so that front is 0 long ( -180 to 0 to +180 ) and north UP ( the #1 key on the num pad )
UV unwrap to spherical
add the texture
export it to obj ( new name )
import it into blender 2.49 ( uses the antique API )
and resave as a cmod ( the old blender script has a bug in the old 2.49 blender - the mapping is inverted south up )

as i recall Anam8tor did not have that issue on Winxp

_________________
"I don't pitch Linux to my friends, I let Microsoft do that for me."
Using OpenSUSE 42.1 & Scientific Linux 6.7


Top
 Profile  
 
PostPosted: Thu, 07-07-16, 16:25 GMT 
Offline
User avatar

Joined: Mon, 04-07-16, 21:18 GMT
Posts: 23
Location: Ohio, U. S. A.
The python script worked successfully.

And how do I rotate the model so that it is at 0 long?

I copied the CMOD export script from here: http://blenderartists.org/forum/archive/index.php/t-316288.html
I got blender 2.49b and imported tethys_ver512q.obj.
But when I tried to export it to CMOD, I got this error:
Code:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Program Files (x86)\Blender Foundation\Blender\.blender\scripts\cmod_export.py", line 19
    out = file(filepath, 'w')
      ^
IndentationError: expected an indented block

_________________
CM1215: Celestial Master in learning.


Top
 Profile  
 
PostPosted: Fri, 08-07-16, 0:25 GMT 
Offline
User avatar

Joined: Tue, 04-09-07, 21:55 GMT
Posts: 773
Location: N 42.38846 W 83.45456
that old script is still floating around ,the 2.40 version of the script is bad
i also can not edit that post , nor add to it .The thread is CLOSED .

this is the last version of the blender plugin 2.48
https://drive.google.com/file/d/0B6ZYAd ... sp=sharing

_________________
"I don't pitch Linux to my friends, I let Microsoft do that for me."
Using OpenSUSE 42.1 & Scientific Linux 6.7


Top
 Profile  
 
PostPosted: Fri, 08-07-16, 13:18 GMT 
Offline
User avatar

Joined: Mon, 04-07-16, 21:18 GMT
Posts: 23
Location: Ohio, U. S. A.
The CMOD export script doesn't work for Blender versions 2.49b, 2.49, or 2.48. I keep getting this error:
Code:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Program Files (x86)\Blender Foundation\Blender\.blender\scripts\cmod-export-mesh.py", line 306, in main
    path_dir = '%s' % os.environ['PWD']
  File "C:\Python25\Lib\os.py", line 429, in __getitem__
    return self.data[key.upper()]
KeyError: 'PWD'


What version of blender and version of python should I be using with the script?

_________________
CM1215: Celestial Master in learning.


Top
 Profile  
 
PostPosted: Mon, 11-07-16, 21:52 GMT 
Offline
User avatar

Joined: Mon, 04-07-16, 21:18 GMT
Posts: 23
Location: Ohio, U. S. A.
Since Blender didn't work for me, I thought I might as well try Anim8or.

But I can't figure out how to get the Anim8or CMOD export script to work on it either! :wall: :wall: :wall:

Here is what I did:

1: I downloaded Selden's CMOD export script for Anim8or, and put it in a scripts folder I made in my documents.
2: I downloaded Anim8or versions 0.95 and 0.97d.
3: I ran each version.
4: I went to File>Configure ...
5: I set the "Scripts" directory to the folder that I made.
6: I checked the box "Preload Scripts."
7. I clicked OK.
8. I tried to export to CMOD format, but found it wasn't on the list of file types, so I reloaded Anim8or.
9: I tried again to export to CMOD format, but it still wasn't on the list.
10: I went back to the "Configure ..." menu to see what was the trouble, only to find that the entire menu had been reset to defaults!

How do I tell it to remember the options that I set for the "Configure ..." menu?

Thanks.

_________________
CM1215: Celestial Master in learning.


Top
 Profile  
 
PostPosted: Mon, 11-07-16, 23:27 GMT 
Offline
User avatar

Joined: Tue, 04-09-07, 21:55 GMT
Posts: 773
Location: N 42.38846 W 83.45456
you did read the documentation
http://www.anim8or.com/scripts/index.html

run animator
set the script folder ( default is the location of "anim8tor.exe" )
place a check in the "preload scripts " and restart

and this is also stated on seldens page
http://www.lns.cornell.edu/~seb/celesti ... g.html#4.1

it works for me and i am using WINE to emulate a windows environment
there is a option to export to cmod in the
"object / export"
on the bottom of the list -- the last one

now anim8tor can NOT read png and psd images
only Windows bitmaps ( .bmp ) and jpg
this is a old program



Quote:
10: I went back to the "Configure ..." menu to see what was the trouble, only to find that the entire menu had been reset to defaults!

How do I tell it to remember the options that I set for the "Configure ..." menu?

is this win7 ?
and is anim8top in "program files"
if so
REMOVE it from there

just place the script in the same folder as the exe

_________________
"I don't pitch Linux to my friends, I let Microsoft do that for me."
Using OpenSUSE 42.1 & Scientific Linux 6.7


Top
 Profile  
 
PostPosted: Tue, 12-07-16, 0:53 GMT 
Offline
User avatar

Joined: Mon, 04-07-16, 21:18 GMT
Posts: 23
Location: Ohio, U. S. A.
The Anim8or folder is in my downloads.
The scripts folder is also in my downloads. (My mistake in the previous post.)
I am using Windows 7.

I followed the steps on the Anim8or site, and I even tried putting the script in the same folder as the anim8or.exe file, but I still end up with the same problem.

Anything I do in the Configuration menu is undone when I close Anim8or.

There must be a way to make Anim8or remember what I did to the configuration menu, even after a restart.

_________________
CM1215: Celestial Master in learning.


Top
 Profile  
 
PostPosted: Tue, 12-07-16, 2:32 GMT 
Offline
User avatar

Joined: Tue, 04-09-07, 21:55 GMT
Posts: 773
Location: N 42.38846 W 83.45456
uac in 7 is well " odd" and a mess

have you r-clicked the exe and selected "run as administrator "
this is a 98 / ME / XP era program

_________________
"I don't pitch Linux to my friends, I let Microsoft do that for me."
Using OpenSUSE 42.1 & Scientific Linux 6.7


Top
 Profile  
 
PostPosted: Wed, 13-07-16, 11:22 GMT 
Offline
User avatar

Joined: Sun, 02-09-07, 23:16 GMT
Posts: 119
Location: Upstate NY, USA
What anti-malware software are you running?
Does it include a "sandbox" option?
If so, can you disable it?

Your symptoms (the scripts directory and preload checkbox being reset to their default values) are consistent with Anim8or being run in a "sandbox" so that it thinks it's updating the system registry but the modified registry entries are being restored to their previous values when Anim8or exits.

_________________
Selden


Top
 Profile  
 
PostPosted: Wed, 13-07-16, 11:36 GMT 
Offline
User avatar

Joined: Mon, 04-07-16, 21:18 GMT
Posts: 23
Location: Ohio, U. S. A.
Avast! antivirus does include a sandbox mode, but it is an option when you right-click on a file; unless you click "Run in sandbox mode", it doesn't run in sandbox mode.

But when I tried to "Run as administrator", it worked just fine.

I am still trying to re-orient the model to correctly match up with the Celestia locations. I'll let you know when I am done with that.

_________________
CM1215: Celestial Master in learning.


Top
 Profile  
 
PostPosted: Thu, 14-07-16, 1:21 GMT 
Offline
User avatar

Joined: Mon, 04-07-16, 21:18 GMT
Posts: 23
Location: Ohio, U. S. A.
Good News!

My Tethys model is finished! And it looks good even without a texture!

I probably shouldn't give myself all the credit, though.

The original shape file was derived by Robert Gaskell. I converted it to CMOD format and correctly oriented it via Blender to match up with the Celestia location labels.

Take a look!
Attachment:
File comment: Here we can see the large crater Penelope and part of the Ithaca Chasma.
Tethys2Image1.jpg
Tethys2Image1.jpg [ 86.9 KiB | Viewed 2933 times ]

Attachment:
File comment: The crater Odysseus is visible at the top.
Tethys2Image2.jpg
Tethys2Image2.jpg [ 68.82 KiB | Viewed 2933 times ]

Attachment:
File comment: This screenshot was taken from within the crater Telemachus.
Telemachus2.jpg
Telemachus2.jpg [ 39.63 KiB | Viewed 2933 times ]

Attachment:
File comment: We can see here that the crater Odysseus is facing the sun.
Tethys2Image3.jpg
Tethys2Image3.jpg [ 70.97 KiB | Viewed 2933 times ]

Attachment:
File comment: Here, we can see how well oriented the model is to match up with the location labels.
Tethys2Image4.jpg
Tethys2Image4.jpg [ 72.63 KiB | Viewed 2933 times ]

Attachment:
File comment: In this image, Saturn and Tethys appear as crescents.
Tethys2Image5.jpg
Tethys2Image5.jpg [ 44 KiB | Viewed 2933 times ]


Here is the download link: https://drive.google.com/file/d/0B5A59f3et_cJbzZJQXhDbTZ1bjg/view?usp=sharing

If you have any problems with this addon, please let me know.

Enjoy!

UPDATE: If Tethys appears darker to you than in the screenshots, simply change the Color from [ 0.300 0.300 0.300 ] to
[ 0.700 0.700 0.700 ] in the Tethys_Model.ssc file.

_________________
CM1215: Celestial Master in learning.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 15 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group