![]() |
|
#1
|
|||
|
|||
Hi,
I've created an addon module to make it easy to create height fields. The attached zip file contains the modules (kgarr.py, HeightField.dlc) and a test script (testHeightField.py). I've commented the test script to explain what each command does. Let me know if this isn't what you wanted. I didn't implement the cylinder because I'm still not clear what it is supposed to look like. Do you have an image or a sample file? |
#2
|
|||
|
|||
Thanks, as soon as I get a sample of the cylinder, I will send it over.
One other question. Is it possible to apply a color map to the height values? something like this. ![]() It does not have to be exactly like that, but something simular. |
#3
|
|||
|
|||
Hi,
I've attached a modified version of the addon module that allows setting a color map. The sample script shows how to use this, it also displays a wireframe version of the heightfield over the colored version. |
#4
|
|||
|
|||
is it easy to get the data from a outside source, like the 50x50 CSV file attached.
|
#5
|
|||
|
|||
If this isn't easy, then I don't know what is
![]() Code:
import csv height = [ [float(val) for val in row] for row in csv.reader(file('data.txt','rUb')) ] |
#6
|
|||
|
|||
Thanks Again!
Is it easy to map the color to the height of the surface, like in the picture above. For example, the highest points have an RGB value of 1 0 0 and the lowest points have a value of 0 0 0, any height between has a value between those. |
#7
|
|||
|
|||
here are some examples of the cylinder
![]() ![]() ![]() the radius comes from a 2D matrix, one dimension being the points around the cylinder, the other being the points along the cylinder. |
#8
|
|||
|
|||
Hi,
I've attached a new version of the test script that generates colors based on the height. |
![]() |
Thread Tools | |
Display Modes | Rate This Thread |
|
|