Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Fil

Pages: [1] 2 3 ... 17
Geology and Terrain / Re: A challenge: htraE - Earth inverted
« on: January 22, 2013, 01:57:57 AM »
No! I am not the author!.. It has a link to deviantArt, where I came across it.
I have a strong feeling WM was not used for making it, otherwise it would be geographically correct :) But I have no idea!
My idea with the post was to motivate others to try to do something like this using WM :) Sounds easier to do it in WM than in an image program.. :)

Geology and Terrain / A challenge: htraE - Earth inverted
« on: January 21, 2013, 07:09:17 AM »
It's been quite a long time since my last post.. But I'm still alive! :)

I have a slight challenge for anyone to practice on!
I came across this artistic image of the Earth, flipped inside-out..  - How would our planet look if we changed "up" with "down"?

Really neat... HOWEVER: It's geographically wrong! :twisted: There should be a huge mountain range at the Mariana Trench, and a really deep area under Mount Everest.. Would anyone accept a challenge to see how the Earth would actually look like if inverted?
An extra challenge would be the night texture: placing of cities and city-lights along bays and flat areas near waterways!

Possibly, you could:
- find height-map of Earth including underwater region
- obvious use for an Inverter device
- one or two gradients could bias/threshold the application of slow to height, so that more snow appears near the poles
- creative use of weathering device to use as mask for the city placement
Sounds interesting, no?

By the way, "htraE" is Earth spelled backwards ;)

Geology and Terrain / Re: Terrain Relief for Inspiration
« on: June 07, 2009, 08:35:05 AM »
For some serious inspiration, there is a 45min film on youTube about our own planet. The film brings the inevitable topic about the care for the environment, but it is well packed with inspiring and breathtaking images, and that is the reason why I'm posting it.

Bug Reports and Help / Re: Curved Terraces
« on: October 03, 2008, 11:21:40 AM »
hmm.. Can you compare the result with the linear gradient to the point as to subtract on from the other? How non-linear is it?

Or even better do this: use a North South gradient and terrace that with a modulation given by an East-West gradient. That should make a nice curve-ish shape along the original gradient terrain. What shape does that resemble you? ;-)

General Discussion / Re: Very Impressed!!!
« on: September 30, 2008, 09:59:04 AM »
Hello WM team!  Hope some of you remember this old renderhead?  I guess Fil, Rhalph and Oshyan (of course, Stephen!) are still kicking around here somewhere?  How the hell are you all?
Heya Jeff!! You're back!!
Glad to read you again! I also had a time away from WM, but I'm trying to get back.. Slowly, unfortunately. My time will remain virtually nonexistent until Oct 15, and scarce until Dec 15, then I will be away for one complete month on vacation, but after that I should have spare time again!!

I was under the impression TG2 is out already... No? Oh well.. I'm a bit away from reality still, it seems!

General Discussion / Re: Can WM2 make heightmaps which tessellate?.
« on: July 28, 2008, 11:21:59 AM »
What do you mean? you want to create a single tile which can be itself seamlessly tileable? Like for creating a wallpaper?

Geology and Terrain / Re: Generate PLANETS
« on: July 28, 2008, 11:12:59 AM »
How do I create a large continent that has it all - mountains, plains, lakes, etc. etc..?

Well, that doesn't sound much dependent on World topology, as it seems to be Holly Grail of WM usage. (this means that your world is made up of areas (need to find heightmap to use as mask for this) and each ear contains a special type of terrain there).
The problem only appears if you really what to guarantee a seamless joining of the ends of the world.. like tile#1's left-side must join seamlessly with tile#99's right-side..  If that is your problem, one solution is to have a blend of the two. You can use a Chooser device to choose between two terrains based on a third input, which can be noisy and distorted to give it a unexpected blending.. The problem is you need the other the adjacent tile for doing this, and that is on the other side of the world.

I don't know if the best way would be to generate a MxN world, and then make a new tmd which would do the blending. it would open up the 4+2(M-2)+2(N-2) tiles of the border and would blend them, producing 4+2(M-2)+2(N-2) tiles to replace the existing ones.
The trouble with this is the TMD is dependent on the number of tiles you wave. And it would have to be built as a "post processing" philosophy.

Geology and Terrain / Re: Generate PLANETS
« on: July 23, 2008, 11:18:09 AM »
Well, if the game is purely 2D, you may not need to show the sphere, but you somehow need a spherical mapping for players to move on. For instance, if you are 80 degrees in latitude and walk East, you walk less to reach the same spot you are than if you were at the equator. Similarly, if you walk North always, there will be a time when you suddenly are walking South. For that you need a spherical mapping, and the resolution of the terrain should be kept constant there.

Quite some while back, there was a discussion about how to map tiles to a sphere, as it had some resolution problems near the "poles"..pixel size would effectively need to chenge.. I don't remember how that ended..
But you may consider making a sphere out of a cube, for instance. If you inflate a cube so that it fills to a spherical shape, you might have one of the best ways to put a multiple of 6 tiles onto a sphere that least distorts everything.

Bug Reports and Help / Re: Hills with a specific grade
« on: June 28, 2008, 04:55:56 AM »
I was expecting to get an email when it was responded to I guess.
For future posts, make sure "Notify me of replies" is checked on the "Additional Options" below the text box, so that you are sent an email.. To get that on by default, you need to go to your profile, and in "notifications and Email" check the option "Turn notification on when you post or reply to a topic."  8)


Feature Requests / Re: Feature Request Forum
« on: June 24, 2008, 02:03:51 AM »
...monks pitches a tent and starts cooking some hot dogs... :D

Well, you can place a tent on the terrain in WM.. In fact I had a macro for it actually ;) But I think there is no way to place users on the terrain yet :P And I really would like to be in some of the terrains I see or make :(

General Discussion / Re: TG2 Tech Preview release date announced
« on: November 29, 2006, 03:17:44 AM »
I think the testers of TG2 are the ones delaying its release, waiting for WM Pro to come out, so they can create terrains to put under the clouds...
(I'm joking, of course)

Plugin Development Forum / Re: Problem with recursive function
« on: November 18, 2006, 05:31:15 AM »
Recursion is a bit of a pain if not done very carefully.. The hardest part is always to debug it :P
I've not done any recursive maneuvers in a plug-in for WM yet. I've been afraid of it :)
I had a few ideas for stuff to do that involved recursion, but for those I've always thought of making my own stand alone application to try it out before putting it in the PDK. Personally I'm not really at ease with the idea of using the MSVC debugger on WM without the source code for WM it self, so there can be a lot of calls WM stuff, that I can't follow very well. So, to avoid debugging *in* WM, I would suggest coding your classes outside, workout if they're behaving well, and then throw them in the PDK afterwards.
You may need to write some interface code for giving it a BMP image and writing a bmp image for output, to test it. BMPs and TGAs are among the easiest file formats to write.. Though, you can also use PNG..  But most of the essential stuff can be tested by looking at the numbers :P (But it's not as hard as debugging "The Matrix" ;))

Bug Reports and Help / Re: I can't download world machine!
« on: November 01, 2006, 07:01:11 AM »
The only file that is available for download through WM's page, is called "WM125Basic.exe"
If it is a download problem, you can email Stephen through the support email, and ask him to send you the file attached or so. (3MB attachment :P)
If the file reaches you ok, and the problem still occurs, well tehn I have no explanation for it.. :shock:

Could it be some windows thing, that associates some weird behavior to an .exe file?

The reason for "why" is philosophically linked with the true boolean - and thus incomprehensible - nature of the computer being! .. or something like that..   :D

Well, no! I have no clue :P  I can only suggest you to re-install the graphics driver... Unless by some reason, only the older drivers behaved decently, and these don't.. hmm, did you upgrade anything? DirectX or something like that?
Are you running on a laptop or desktop PC ? (PCs tend to be more fixable with driver updates than laptops, I think)
But a "driver issue" is the most plausible thing that could be happening..

Still, can you tell us what world sizes your are using, and preview size an such? Thanks!

Plugin Development Forum / Re: Problem with recursive function
« on: October 31, 2006, 06:34:37 AM »
First off (and not meaning to be rude) I didn't read all your code up there :)
But if Nikita is right about what is happening, you need to end the recursion somewhere, so you need to know the "depth" in the tree of calls to functions. (typically a parameter can be used, like calling areaIsBasin(int x, int y, int depth), and checking the depth for knowing what to do inside the function.

If you'd like to "keep track" of where you've looked in the main height field and where you haven't, you may find it useful to get a new HF with the same size, but set to zero, and when you traverse your original HF, you set this one to a value higher than zero. You can even count the number of times youve consulted it, if you increment a value.  Don't forget to call "->release();" on that auxiliary HF, so that you cause memory leaks, each time you move a slider or build the network :)

Bug Reports and Help / Re: I can't download world machine!
« on: October 30, 2006, 01:10:09 AM »
You mentioned a "limited account".. Is that public computer, like in a library or university? Such system could not give you permissions to install stuff.

There is only one file that needs to be downloaded, which is the "WM125Basic.exe".
The rest of the files are extracted from this installer. If these files aren't found after installation, that means they could not have been written to disk, I suppose.
Does this make sense in your case?
Choose a different directory for installing it, instead of the default "\Program Files\"

Bug Reports and Help / Re: I can't download world machine!
« on: October 29, 2006, 04:57:30 AM »
That is odd..  Possibly FireFox is trying to execute the installer instead of downloading. Try right-clicking on the link and choose "Save target as.." Otherwise, it works fine with my FirFox (I upgraded to 2.0 last week)

Plugin Development Forum / Re: Using Coord(x, y) crashing WM
« on: October 25, 2006, 03:56:54 PM »
mu-hu-ha-hahh! the power of the moderators! :-D

Nah, I think it is a good thing to leave here! It transmits a message of "don't worry, we've all made mistakes like those" :) Besides, if anyone manages to crash WM in a plugin, it's good to have this place to discuss possible reasons for it, and to try (guessing) what is wrong in the plugin code. Very unlikely will be a bug in the PDK, though it there is, it should important to correct it.

But so far, all crashess I had were my fault :P
Typical bugs are to release an HF that is being passed as output, forget to initialize an input HF, going out of bounds accessing the HF... etc.. Sometimes invalid parameter values and divisions by zero can occur, with a joyfull (crash) fireworks display!
Infinite loops are also neat occupations for the CPU :)

Plugin Development Forum / Re: Using Coord(x, y) crashing WM
« on: October 25, 2006, 02:06:40 AM »
hmm.. ...err..  :?  Ok :D
So far, all crashes I managed to cause in WM using the PDK were because the guy coding them was a dumb nuthead! :D So don't feel frustrated if you crash WM once in a while.. It's part of the job :)
Progress once step at a time, to keep changes and bugs under control, and also to easy up on debugging.

Plugin Development Forum / Re: How to compile your plugin
« on: October 24, 2006, 03:46:03 PM »
oh.. Well, I have set up a new project, to leave the example as backup.. This is also a good think for training and finding out where the settings need to be changed :)
But for your case, basicly it should envolve you to comment code, change a few values on the number of devices, remove files from the project, and delete them afterwards, so they don't end up confusing you later. Anyhow, here is a big tuto on it..

So hey, imagine you wanted to plage my LEGO Filter, and wanted to make a DLL with a single device in it. Here is what you'd have to do:
in DLLExample.cpp, you'd have to make sure only your filter would be called, this means commenting all code inside the switch(i){   } and only leave the part:
Code: [Select]
case 0:
Device *dev =  new LegoFilter; // Instantiate the device temporarily to get at its name and life funcs
dat.lifedata = dev->GetLifeVars();
strcpy(, dev->GetTypeName());
dat.type = TYPE_FILTER; // Hey, I'm coding a filter!
delete dev;
*result = dat;
Notice this:
Code: [Select]
default: // Out of devices; return false.
return false;
This is what tells WM that you only have 1 device in it. WM checks for device 0, then for device 1, once it reaches a "false" WM found the number of devices inside this plugin DLL!

Right! Now obviously you need to implement a class called LegoFilter :P So let's take a look at how to do that!

If I remember well, I canibalized the Inverter Filter. So basicly I made a copy of the Inverter.cpp file (because it was also a filter) and started changing every contructor name, and deleteing stuff I didn't need.
Read carefully through the coments as these will tell you what is being done.

Still the most important things I did were:
First off, dont forget to add the #include "LegoFilter.h" at the top of DLLExample.cpp, right after the include of the "DLLExample.h" file..
In LegoFilter.cpp
Code: [Select]
// What you MUST DO in the constructor of your device:
// 1) Set the Nametag, Maker and Killer in the lifeptrs struct.
// What you SHOULD do in the constructor:
// 2) Call SetLinks() with the # of inputs and outputs your device is going to use
//      ...if you dont do #2, you will use the default # of inputs your parent class assigns
lifeptrs.maker = LegoFilterMaker;          // this is the method for being born! :-)
lifeptrs.killer = LegoFilterKiller;              // this is the method for suiciding :-P
strncpy(lifeptrs.nametag, "LEGO", 4);   // 4-character ID for my Lego device!
SetLinks(2, 1);                                  // I'm a filter, I have 2 input ports and 1 output!
in(1)->SetFlag(1);                             // oh, and my second (=1) input port is an optional one ;)  (flag = 1)

Now, I made sure the version was one I could read! Imagine this code is changed in two years, with version 3.. If this DLL (version 1) is loaded then, I must not load this device, because version 3 is bound to be somthing really complicated :D
Code: [Select]
// You are REQUIRED to write out and read in your 4-byte Device ID tag, as shown below. It is also recommended that your device
// have an internal version number that you keep track of to allow backwards-compatibility if you ever change your Device save layout...
// Also, make sure you call your super class's Load and Save functions as shown here. Failure to do so will cause major problems.
bool LegoFilter::Load(std::istream &in) {
char tag[5]; tag, 4);
if (strncmp(tag, lifeptrs.nametag, 4) == 0) {
int ver = 0;*) &ver, 1);
if(ver > 1)// the version that is being loaded is newer than this code can handle, say goodbye!
return false;
// if it is older, that we probably know how to deal with it..
return Filter::Load(in);
return false;

bool LegoFilter::Save(std::ostream &out) {
out.write( lifeptrs.nametag, 4);
int ver = 1; // This is the current version!
out.write((char*) &ver, 1);
return Filter::Save(out);

Then you need to code your device's content:
Code: [Select]
// The Activate function is where you work your magic. You should do four things in the Activate function:
// 1) Retrieve your inputs by calling RetrieveData(input#)
// 2) Do whatever you will do on it...
// 3) Store the data to make it available to your outputs
// 4) Return true to indicate successful activation, or false if there was an error.
bool LegoFilter::Activate(int pstate) {
HField *hf = HF(RetrieveData(0) ); // Get main input HF!
HField *shf = HF(RetrieveData(1) ); // get the Stud shape HF!
Oh and don't forget to do the house cleaning work, of deleting the temporary/auxiliary HFs that were not outputted! This is how my Activate code ends:
Code: [Select]
shf->Release(); // you're now worthless, too!
// Handoff to output(s)
StoreData(hf,0); // pass the heightfield to our output stage.

return true; // Success! woo-hoo!

Right, so now, what am I missing? ...

Oh, ofcourse! in LegoFilter.h there are a few obvious things to change:
Code: [Select]
virtual char *GetDescription() { return "Converts a terrain into something apparently made by LEGO";};
virtual char *GetTypeName() { return "LEGO Filter"; };

I think this is it..
Remember that I don't code plugins in a while, so there might be something missing..

There are other things to say about user interface, but hey, try this out first with the inverter, before that :) You already have that hint on how to flag an input as optional ;)

PS - ofcourse, I forgot about the image.. I made a neat image, and placed on the first 32x32 position of the bitmap1.bmp file, corresponding to device i=0 :)

Pages: [1] 2 3 ... 17