CMOD models and normal maps
-
Topic authorFarGetaNik
- Posts: 484
- Joined: 05.06.2012
- With us: 12 years 5 months
- Location: Germany
Fenerit wrote:This do match the normalmap
Hm sorry but when loading this into Celestia, the normalmap still doesn't fit with the model. Here is my cmod, it works when using png for texture and normalmap. I might post my processed Dione texture if someone is interested, it is a 14k png (86 MB).
- Attachments
-
- dione-mesh.zip
- (1.14 MiB) Downloaded 367 times
-
Topic authorFarGetaNik
- Posts: 484
- Joined: 05.06.2012
- With us: 12 years 5 months
- Location: Germany
Thanks despite still not perfect but I think I have hit Celestia's limits. Ok here is my Dione texture:Fenerit wrote:Good work! Happy you have solved the modelling issues. I'm interested in your Dione surface texture.
https://drive.google.com/file/d/0B14NSu0PnA5xSGRkdUxsRUFRMWc/view?usp=sharing
of course it's derived from this one: http://photojournal.jpl.nasa.gov/catalog/PIA18434
-
Topic authorFarGetaNik
- Posts: 484
- Joined: 05.06.2012
- With us: 12 years 5 months
- Location: Germany
I made a tutorial on my process on preparing models for Celestia. You should find the answer there.
The tutorial that you are speaking of seems to be outdated...things aren't going the same way with me. I'm trying to apply a texture to the dione_ver512q model.
I couldn't double click anywhere to open a window to select "spherical projection". The texture on the model appears to be two textures mirrored over the sphere, each mirror taking up half of the sphere.
Exporting the model to cmod yields one file, not two, and when I load it into cmodview, it appears completely black, and I can't edit anything.
Please help.
I couldn't double click anywhere to open a window to select "spherical projection". The texture on the model appears to be two textures mirrored over the sphere, each mirror taking up half of the sphere.
Exporting the model to cmod yields one file, not two, and when I load it into cmodview, it appears completely black, and I can't edit anything.
Please help.
CM1215: Celestial master in learning.
- John Van Vliet
- Posts: 2944
- Joined: 28.08.2002
- With us: 22 years 2 months
there is no need to convert the blend to a obj and THEN use Anim8tor
cmodview opens uv mapped obj meshes just fine
however there is a bug in the cmodview code the uv mapped wavfront obj mesh reads the images from the bottom up
to you need to flip the image vertically
east and west are the same but north is down and south is UP
so you are using " dione_ver512q.tab"
the table file
edit it as per the instructions earlier then run the python script on it
this gives you a obj file
open it in blender
the North is NOT UP!!! this needs to be changed and check that the prime meridian is in the center
( the 7 on the keypad for the northpole and the 1 for the prime meridian )
when it is rotated correctly fallow any of the 10's to 100's of youtube videos and guides on uv mapping
cmodview opens uv mapped obj meshes just fine
however there is a bug in the cmodview code the uv mapped wavfront obj mesh reads the images from the bottom up
to you need to flip the image vertically
east and west are the same but north is down and south is UP
so you are using " dione_ver512q.tab"
the table file
edit it as per the instructions earlier then run the python script on it
this gives you a obj file
open it in blender
the North is NOT UP!!! this needs to be changed and check that the prime meridian is in the center
( the 7 on the keypad for the northpole and the 1 for the prime meridian )
when it is rotated correctly fallow any of the 10's to 100's of youtube videos and guides on uv mapping
-
Topic authorFarGetaNik
- Posts: 484
- Joined: 05.06.2012
- With us: 12 years 5 months
- Location: Germany
CM1215 wrote:The tutorial that you are speaking of seems to be outdated...things aren't going the same way with me. I'm trying to apply a texture to the dione_ver512q model.
Indeed I used an older version of anim8or in that tutorial (0.98) but it should work in newer versions also. You might have to search for it online if there is a dramatic change in fnctionality.
CM1215 wrote:I couldn't double click anywhere to open a window to select "spherical projection". The texture on the model appears to be two textures mirrored over the sphere, each mirror taking up half of the sphere.
So you were able to UV map the mesh then. Only the projection was stuck on planar instead of spherical, because the double-clicking didn't work to pop up the window you can select spherical. Make sure you have the model selected, as shown in the screenshot. Then double-click anywhere on the model (or anywhere not on the UI really).
CM1215 wrote:xporting the model to cmod yields one file, not two, and when I load it into cmodview, it appears completely black, and I can't edit anything.
Did you install the cmod export script?
John Van Vliet wrote:so you are using " dione_ver512q.tab"
the table file
edit it as per the instructions earlier then run the python script on it
this gives you a obj file
If I recall correctly I wasn't able to convert the tab files for Saturns moons into obj's with that method, but it worked for some other models. This script definately needs an update to. I had to modify it slightly to work at all.
Like on my old CM thread, I should have been more specific. I had already converted it to obj, otherwise I wouldn't have been able to load it up.
I am using Anim8or 0.95c, so my version must be older than yours. Double clicking on the model opens a small "mesh editor" window. There is no "spherical projection" option on it.
I was also trying to UV map it on blender, but there aren't any online tutorials on how to UV map a complex planetary model...well I can't see any at least.
The UV mapping seems to be the hardest part of this whole process.
I am using Anim8or 0.95c, so my version must be older than yours. Double clicking on the model opens a small "mesh editor" window. There is no "spherical projection" option on it.
I was also trying to UV map it on blender, but there aren't any online tutorials on how to UV map a complex planetary model...well I can't see any at least.
The UV mapping seems to be the hardest part of this whole process.
CM1215: Celestial master in learning.
Anim8or's UV projection menu is only available after you have selected the "UV" button and are applying a UV mapping onto a mesh (or onto a region selected in the point-editor). While UV mapping, double click on the object. The popup menu in v1.0b (which is currently available on the Anim8or Forum) looks like this:
Selden
-
Topic authorFarGetaNik
- Posts: 484
- Joined: 05.06.2012
- With us: 12 years 5 months
- Location: Germany
How big is the mesh? If it's enough to crash anim8or, you won't have a good time loading this monster into Celestia...
What texture are you using? I remember that Anim8or doesn't load png at all, and even 4k or 8k texture will crash it. I usually work with 1k jpg copies of my textures and apply a higher-resolution one later in Celestia.
What texture are you using? I remember that Anim8or doesn't load png at all, and even 4k or 8k texture will crash it. I usually work with 1k jpg copies of my textures and apply a higher-resolution one later in Celestia.
I was using the default Celestia Dione texture that is in the medres folder. It is a 1024x512 jpg file.
The model file in the obj format is 125 Mb in size. You can see what it looks like in this screenshot. Note that there is no texture on the model. What you see is purely the model.
Not entirely true. I have an equally hi-poly mesh that loads into Celestia just fine. The only difference is that it isn't UV mapped. It's available on my first thread on the Celestial Matters forums. Here is a screenshot:
The model file in the obj format is 125 Mb in size. You can see what it looks like in this screenshot. Note that there is no texture on the model. What you see is purely the model.
FarGetaNik wrote:If it's enough to crash anim8or, you won't have a good time loading this monster into Celestia...
Not entirely true. I have an equally hi-poly mesh that loads into Celestia just fine. The only difference is that it isn't UV mapped. It's available on my first thread on the Celestial Matters forums. Here is a screenshot:
CM1215: Celestial master in learning.
-
Topic authorFarGetaNik
- Posts: 484
- Joined: 05.06.2012
- With us: 12 years 5 months
- Location: Germany
Wow the biggest model I am using is 15 MB... I just realized I have an equally large model of Mimas lying around on my hard drive
In that case I am out of ideas. If you are willing to share your obj model I could try it myself, or if you can tell me how you created it to begin with. As I stated, I wasn't able to convert the models of Saturn's moons into obj using that Python script.
In that case I am out of ideas. If you are willing to share your obj model I could try it myself, or if you can tell me how you created it to begin with. As I stated, I wasn't able to convert the models of Saturn's moons into obj using that Python script.
How about I do both?
Here is the download link for the obj: https://drive.google.com/open?id=0B5A59f3et_cJTmNuMTVGNFRMeTg
As for using the script, there are some things you must do that have not been explained... (This is for a Windows system)
1. Download and install Python 2.7. Be sure to let it install to it's default folder, which should be C:\Python27
2. Get the script and put it into the Python27 folder.
3. Go to this thread: http://forum.celestialmatters.org/viewtopic.php?f=4&t=854&sid=16067675f432ca5f7a1f61ac0f3aeba9 and follow JohnVV's instructions on how to fix the .tab file to make it compatible with the script. His post should be the 5th one down.
4. Take your modified .tab file and put it in the Python27 folder.
5. Open the Windows (not Python) Command Prompt. It should start out with the directory being on C:\Users\<YourUserName>. This is not where you want to be. Into the prompt, type "cd.." (without the quotes and with both dots) repeatedly until your directory is back on the root C: drive. Once you are there, type "cd Python27" (again without the quotes) into the prompt. You should now have C:\Python27 as your directory.
6. Type this into the prompt:
7. It should lock up for a second or 2, but after that, you should have a modeller-ready obj file.
If something goes wrong, such as if Python errored, check that you fixed the .tab file correctly. If something still goes wrong, check that you have the files where they should be, which is in the Python27 folder. If something still goes wrong, let me know and I'll see what I can do.
Edit: I forgot to mention that the script only works on Gaskell models. I don't know how to convert the models by other people.
Here is the download link for the obj: https://drive.google.com/open?id=0B5A59f3et_cJTmNuMTVGNFRMeTg
As for using the script, there are some things you must do that have not been explained... (This is for a Windows system)
1. Download and install Python 2.7. Be sure to let it install to it's default folder, which should be C:\Python27
2. Get the script and put it into the Python27 folder.
3. Go to this thread: http://forum.celestialmatters.org/viewtopic.php?f=4&t=854&sid=16067675f432ca5f7a1f61ac0f3aeba9 and follow JohnVV's instructions on how to fix the .tab file to make it compatible with the script. His post should be the 5th one down.
4. Take your modified .tab file and put it in the Python27 folder.
5. Open the Windows (not Python) Command Prompt. It should start out with the directory being on C:\Users\<YourUserName>. This is not where you want to be. Into the prompt, type "cd.." (without the quotes and with both dots) repeatedly until your directory is back on the root C: drive. Once you are there, type "cd Python27" (again without the quotes) into the prompt. You should now have C:\Python27 as your directory.
6. Type this into the prompt:
Code: Select all
python pdsVertexTAB2obj.py NameOfTabFile.tab NameOfOBJFile.obj
7. It should lock up for a second or 2, but after that, you should have a modeller-ready obj file.
If something goes wrong, such as if Python errored, check that you fixed the .tab file correctly. If something still goes wrong, check that you have the files where they should be, which is in the Python27 folder. If something still goes wrong, let me know and I'll see what I can do.
Edit: I forgot to mention that the script only works on Gaskell models. I don't know how to convert the models by other people.
CM1215: Celestial master in learning.
-
Topic authorFarGetaNik
- Posts: 484
- Joined: 05.06.2012
- With us: 12 years 5 months
- Location: Germany
CM1215 wrote:Here is the download link for the obj: https://drive.google.com/open?id=0B5A59f3et_cJTmNuMTVGNFRMeTg
Ok thank you I was able to UV map the mesh in anim8or, as you can see here:
However I had problems converting it into a cmod. I could export it as cmod, and spend a lot of time loading the files to stich them together into an ascii cmod. But cmodview was not able to open this file. Does anyone know if there is a limit to the file size cmod can load? It is a 211 MB ascii cmod after all. And maybe the 256p mesh will provide nearly as much detail as the 512p one, as it looks quite smooth at most areas.
But here is the UV mapped obj for you, maybe you can convert it yourself.
https://drive.google.com/open?id=0B14NSu0PnA5xR2xZYW5GZ3VSZkE
Thanks for the tutorial, I have to look into this in depth later. I have to reinstall python... well I was using pyhton 3 so maybe that's the reason I failed.
Thank you very much!FarGetaNik wrote:But here is the UV mapped obj for you, maybe you can convert it yourself.
I am apparently using either an older or newer version of the cmod export script than you, for it still only exports 1 file. But this single file still retains the UV mapping, for when I loaded it into Celestia, the texture and model both rendered excellently. This different version does the material and model combining for me, so I don't have to. The only problem I found was that the model is incorrectly oriented. Surprisingly, I only had to rotate the model 180 degrees in the y-axis for the model to be correctly oriented. The texture renders well, the model renders well, and all's well. I never had to open it in cmodview. Here are some screenshots with the 14k texture you had on this thread:
I've packaged the model as a ready-made addon. It can be downloaded here: https://drive.google.com/open?id=0B5A59f3et_cJSGJTb1ZmUWJudmc
I've also attached the different version of the script:
1. You don't have to reinstall Python...you can have both Python 2 and Python 3 installed at the same time. They use different directory folders.FarGetaNik wrote:I have to reinstall python... well I was using pyhton 3 so maybe that's the reason I failed.
2. I haven't tested the script with Python 3. All I know is that it works fine with Python 2.
Last edited by CM1215 on 10.09.2017, 18:14, edited 1 time in total.
CM1215: Celestial master in learning.