Fridger wrote:I made a number of tests with the result, including the one displayed on Matthews new Webpage (Europa). Everything works as it should: Just fine.
I compiled the sources without a single error message. I followed the instructions to the letter, yet my Europa's cylindrical map is crossed by colour bands.
Fridger wrote:Actually Gimp2 is meanwhile the "standard" GIMP. It is very stable and has considerably more to offer than Gimp1. Also for people who dislike to work with many different small windows
In WinMe it's quite unusable due to its unstability, so I usually do all image manipulations with Gimp 1.2.
I converted this
shaded altitude map
http://www.solarviews.com/raw/jup/amalthe4.jpg into a suitable displacement map. I applied a couple of Gimp filters to eliminate the shades
without touching the height info.
Then, I used this texture to automatically build a new, high resolution 3D model of Amalthea.
Anyway, here are the steps to displace the sphere. I have included a little script that (I hope) will
properly scale the altitude range and then fold the plane into a sphere. There are two constants that can be adjusted to match Phoebe's relief parameters, if someone manages to gather the data.
The goal is to maximize the accuracy of the object's 3D representation, given the resolution of the data available.
You must save it as
anyname.py in the
Blender\Scripts folder.
1] Start Blender
2] Put the mouse pointer over the dark gray main window. Hit
NumPad 7
3] Hit
Del to erase default cube mesh. When confirmation request appears, hit
Enter.
4] Hit
Space. In the panel that appears, go to
add->mesh->plane. Hit
Enter.
5] Hit
w, select
Subdivide. Hit
Enter. Repeat 5-6 times.
6] Hit
f5. At the bottom of the window, hit the
AddNew button. Four panels appear. Go to the
Texture-labelled one. Hit
AddNew button. Click on the little mark where it says
Tex.
7] Hit
f6. Press the
Up/down arrowed button. Go to where it says
None. Select
Image. Two panels appear. In the
Image-labelled one press the
LoadImage button. Select and open the displacement map.
8] Hit
f9. Four panels appear. In the
MeshTools-labelled one press the
Noise button once. The mesh is now displaced.
9] Put your pointer over the main window and press
Tab. Now the mesh should be pink.
10] Put your mouse pointer in the limit between the top menu bar and the main window. The pointer should be converted into a vertical double arrow. Drag. A new window appears. Hit the
FilePaths button.
11] Several folder-input boxes appear. Go to the
Phyton-labelled one, and press the
small squared button, with a sheet in it.
12] Go to the main menu:
file->import-ZFold. The plane should have been folded into a sphere.
13] Put the pointer over the main window. Hit
Tab. The mesh should be yellow again.
14] Go to the
MeshTools-labelled panel near the bottom of the screen. Push the
RemDoubles button to remove the seam.
You can rotate the model dragging the mouse with
Alt-LeftMouseButton pressed. For a shaded representation, hit
z. For a smooth representation, press the
SetSmooth button in the
LinksandMaterials panel.
Code: Select all
#!BPY
"""
Name: 'ZFold'
Blender: 233
Group: 'Import'
Tooltip: 'Adjust Z length and folds a plane'
"""
#--------------------------------------------------
# By Toti
#--------------------------------------------------
# Change these constants accordingly to your data, BUT ADD A DECIMAL PART:
SATMAXRADIUS = 110.0 #in km. from Celestia
DELTAHEIGHT = 16.0 #in km, from Galileo's site (NASA)
#--------------------------------------------------
# Do not change these constants:
MAXN = -1000000000000
MINN = 1000000000000
#--------------------------------------------------
# Here starts the code:
import Blender
import math
from Blender import NMesh, Object
satMinRadius = SATMAXRADIUS-DELTAHEIGHT
obj = Object.GetSelected()
meshName = obj[0].data.name
mesh = NMesh.GetRaw(meshName)
vq = 0
min = MINN
max = MAXN
for v in mesh.verts:
if v.co[2] >= max:
max = v.co[2]
if v.co[2] <= min:
min = v.co[2]
vq += 1
origDeltaZ = max-min
finalDeltaZ = DELTAHEIGHT / satMinRadius
factor = finalDeltaZ / origDeltaZ
print "\n\nSatellite info"
print " Maximum radius: %s" % SATMAXRADIUS
print " Minimum radius: %s" % satMinRadius
print " Delta altitude: %s" % DELTAHEIGHT
print "Original mesh info"
print " Delta altitude: %s" % origDeltaZ
print "Final mesh info"
print " Delta altitude: %s" % finalDeltaZ
print "Correction factor used: %s" % factor
print "Vertices processed %s" % vq
for v in mesh.verts:
v.co[2] = (v.co[2] - min) * factor
NMesh.PutRaw(mesh, meshName)
Blender.Redraw()
#--------------------------------------------------
# This performs the actual sphere transform. This is Anthony C. D'Agostino original code:
# Copyright (c) 2000 Anthony C. D'Agostino
# http://ourworld.compuserve.com/homepages/scorpius
# scorpius@compuserve.com
# October 5, 2000
# Displacement Mapping Suite (Version 1.0)
for vertex in mesh.verts:
theta = vertex.co[0] * math.pi # range was [-1, 1] now [-pi, pi]
phi = vertex.co[1] * math.pi/2 # range was [-1, 1] now [-pi/2, pi/2]
radius = vertex.co[2] + 1
x = radius*math.cos(phi)*math.cos(theta)
y = radius*math.cos(phi)*math.sin(theta)
z = radius*math.sin(phi)
vertex.co[0] = x
vertex.co[1] = y
vertex.co[2] = z
NMesh.PutRaw(mesh, meshName)
Blender.Redraw()
I Hope this helps