Jump to content
Hash, Inc. Forums

Recommended Posts

Some of you old timers might remember GridWizard. Well, I've returned to rewriting it in VB using Visual Studio 2005. I've changed the name to AM TerraForm (620kb Self-Extracting File)

 

This is not a plugin - it is a stand alone app that saves to the AM v11.05 .mdl format. This is the first beta release.

 

Currently, you can create flat grids and landscape meshes from imported .bmp, .jpg, .gif, .png and .wmf files in 1, 4, 8, 16 , 24 and 32-bit formats.

 

.png supports transparency but I haven't tested it yet so I don't know what will happen.

 

Not all of the interface controls or menu items have functionality.

 

There is a Help file but it doesn't install yet - just copy the Help folder into the folder where the AM TerraForm executable is installed.

 

You will need the Microsoft .NET Framework installed. You can download it here: Microsoft .NET Framework (22mb)

 

There are a few things I may be able to save you some time on:

  1. The bitmap images are displayed with a picturebox control which is currently limited to the aforementioned file formats. there are no plans to add support for .tif, .tga, etc.
     
  2. I have no desire to learn C++ programming. VB has reached a stage where one can program pretty much anything that you can with C++ without any significant loss of speed or efficiency. Therefore, AM TerraForm will almost certainly never be an AM Plugin.
     
  3. I do not have access to a Mac and even if I did, I wouldn't waste time trying to program AM TerraForm for that platform. It's not because I'm a Mac hater, I just wouldn't want to spend the time learning to program for the Mac OS for just this one application; I have better things to do with my time.

Feel free to e-mail me at AlphaScorpious@inorbit.com with questions/comments/suggestions.

Share this post


Link to post
Share on other sites

Thank you, Thank you, Thank you!

 

We have been waiting for this to be resurected.

 

Isn't there a way to import DEM's (digital elevation map) as well?

Thanks again.

 

David

Share this post


Link to post
Share on other sites

Isn't there a way to import DEM's (digital elevation map) as well?

It's not coded yet but it will be there. I'm also going to attempt to code a random fractal generator and a 3D shaded preview.

Share this post


Link to post
Share on other sites

This is great! The GridWizard was a big time saver.

 

Thanks!

 

Eugene

Share this post


Link to post
Share on other sites

Wow. What a way to make a reappearance.

 

Thanks Mike!

 

(Note to Self: Do NOT attempt to create geometry using the most complex image you can find (saved to 2049x2049... um... terra is still forming.) :P

Share this post


Link to post
Share on other sites
I'm also going to attempt to code a random fractal generator and a 3D shaded preview.

 

Woo hoo! :D

That would be cool!

Share this post


Link to post
Share on other sites

(Note to Self: Do NOT attempt to create geometry using the most complex image you can find (saved to 2049x2049... um... terra is still forming.) :P

Since the main focus was to get the mesh data into AM, I never focused on actually defining in the model file the patch data or the group data. I plan on it, but only as the last thing after everything else is working. The reasoning is simply that AM will do that itself. The downside is that it takes a long time but at 2048 by 2048 patches (4,194,304!) the number of lines of data that needs to be calculated is the total number of CPs multiplied by 4 plus the toal number of splines. In the case of 2048 by 2048 mesh, the total lines of data that would need to be calculated is 33,558,528. You might expect that to take awhile. :blink:

Share this post


Link to post
Share on other sites

I have a new build available: AM TerraForm 1.0.0.2 (Beta 1) (859kb)

 

Besides some bug fixes, I did some work on the Slope control so that you can switch between millimeters, centimeters and meters. This will allow you more accurately proportionalize the grayscale differences of meshes that have extremely small or large mesh units.

 

The Menu items are now coded and/or linked to their controls. The Info button will display the screen but it doesn't display any mesh info yet.

 

The installer will now install the Help file which has been updated with a detailed explanation of the controls. There is a also a sample folder with a grayscale image, a color image and an ASCII text file although the ASCII import isn't coded yet.

Share this post


Link to post
Share on other sites

Hey, Michael, it's good to see you back, and I'm impressed you just jumped right in and did some coding again. Don't be a stranger - you can contact Hash anytime with questions.

Share this post


Link to post
Share on other sites

I have a new build available: AM TerraForm 1.0.0.2 (Beta 1) (859kb)

 

Besides some bug fixes, I did some work on the Slope control so that you can switch between millimeters, centimeters and meters. This will allow you more accurately proportionalize the grayscale differences of meshes that have extremely small or large mesh units.

 

The Menu items are now coded and/or linked to their controls. The Info button will display the screen but it doesn't display any mesh info yet.

 

The installer will now install the Help file which has been updated with a detailed explanation of the controls. There is a also a sample folder with a grayscale image, a color image and an ASCII text file although the ASCII import isn't coded yet.

 

Michael,

1. Can we (Members of the Forum) help financially to support your work?

2. Can you provide the capability to use feet and inches (don't really ever use yards)?

 

Thanks again for bringing this work back to A:M users!

So...... what other types of things do you want to code?

 

David

Share this post


Link to post
Share on other sites

Hey, Michael, it's good to see you back, and I'm impressed you just jumped right in and did some coding again. Don't be a stranger - you can contact Hash anytime with questions.

Thanks, Martin. It's good to hear from you. I'll definitely ask for help if I run into problems.

Share this post


Link to post
Share on other sites

1. Can we (Members of the Forum) help financially to support your work?

I wouldn't mind making some $$$ but it's more of a question of who is willing pay for it and how much; i.e. what does the community think it's worth? Not that I think asking for $5-10 is a big deal, especially since I'm going to have to learn DirectX programming for the 3D preview, but I'd kind of have to go to the trouble of setting up a way to pay, some kind of copy protection (even though that's almost pointless nowadays), registration, etc.

 

2. Can you provide the capability to use feet and inches (don't really ever use yards)?

Yes, I can do that. Today the plan is to get the Options menu item coded so that default paths and settings can be set so I should be able to add the option of choosing a measurement system.

 

So...... what other types of things do you want to code?

I have thought that maybe a parametric tree generator would be good. A few years ago someone was working on one for AM but I don't know if it was ever completed.

 

The problem I have, if you can really call it a problem, is that if I'm going to put any effort into something that anyone other myself is going to use, I want it to be as useful and professional as I am reasonably able to accomplish. Most people would probably have been happy enough to have a utility that created a mesh from a bitmap. I can't leave it at that - it leaves too much work in AM to get it closer to what you might want. If a utility can create the data for the mesh, then it should provide some quick and easy way to manipulate that data before it gets to AM so that there is little to no work to do on the mesh before you start texturing it.

 

In the case of a parametric tree generator, one aspect would be leaves. It would be easy enough to create a patch based upon the the leaf image to be used as a cookie cutter. I could even have the utility write that cookie cutter map into the .mdl file, but is that good enough? Shouldn't there be a setting so that the leaf can be randomly twisted, turned, warped and even curled? How would the user texture the trunk and branches? The only way I can see to make it as versatile for the user as possible is have the utility write groups for each branch and the truck. Then a group for each set of branching of branches. Maybe a setting forHow would the branches twist, turn and bend?

 

You could ask why not leave some of that stuff to the user, but I would ask why do that? If it's going to take more work to manipulate a model created from a utility to get what you want than it would to just create it from scratch without the utility, why even bother haviung a utility?

 

I guess you can see that I struggle with what I should or shouldn't do.

Share this post


Link to post
Share on other sites

I have thought that maybe a parametric tree generator would be good. A few years ago someone was working on one for AM but I don't know if it was ever completed.

We could give you the source to the existing parametric tree generator, and using "Hair" for leaves handles all that "facing you" and " "twisting" stuff, (and if you needed some other leaf/hair option, we could probably add that too.) However, you would have to code in C++.

 

I wouldn't mind making some $$$ but it's more of a question of who is willing pay for it and how much; i.e. what does the community think it's worth? Not that I think asking for $5-10 is a big deal, especially since I'm going to have to learn DirectX programming for the 3D preview, but I'd kind of have to go to the trouble of setting up a way to pay, some kind of copy protection (even though that's almost pointless nowadays), registration, etc.

There's no A:M aftermarket sales, Mike, but we could give you a free upgrade or a "Hash" jacket or something.

Share this post


Link to post
Share on other sites

1. Can we (Members of the Forum) help financially to support your work?

I wouldn't mind making some $$$ but it's more of a question of who is willing pay for it and how much; i.e. what does the community think it's worth? Not that I think asking for $5-10 is a big deal, especially since I'm going to have to learn DirectX programming for the 3D preview, but I'd kind of have to go to the trouble of setting up a way to pay, some kind of copy protection (even though that's almost pointless nowadays), registration, etc.

 

2. Can you provide the capability to use feet and inches (don't really ever use yards)?

Yes, I can do that. Today the plan is to get the Options menu item coded so that default paths and settings can be set so I should be able to add the option of choosing a measurement system.

 

So...... what other types of things do you want to code?

I have thought that maybe a parametric tree generator would be good. A few years ago someone was working on one for AM but I don't know if it was ever completed.

 

The problem I have, if you can really call it a problem, is that if I'm going to put any effort into something that anyone other myself is going to use, I want it to be as useful and professional as I am reasonably able to accomplish. Most people would probably have been happy enough to have a utility that created a mesh from a bitmap. I can't leave it at that - it leaves too much work in AM to get it closer to what you might want. If a utility can create the data for the mesh, then it should provide some quick and easy way to manipulate that data before it gets to AM so that there is little to no work to do on the mesh before you start texturing it.

 

In the case of a parametric tree generator, one aspect would be leaves. It would be easy enough to create a patch based upon the the leaf image to be used as a cookie cutter. I could even have the utility write that cookie cutter map into the .mdl file, but is that good enough? Shouldn't there be a setting so that the leaf can be randomly twisted, turned, warped and even curled? How would the user texture the trunk and branches? The only way I can see to make it as versatile for the user as possible is have the utility write groups for each branch and the truck. Then a group for each set of branching of branches. Maybe a setting forHow would the branches twist, turn and bend?

 

You could ask why not leave some of that stuff to the user, but I would ask why do that? If it's going to take more work to manipulate a model created from a utility to get what you want than it would to just create it from scratch without the utility, why even bother haviung a utility?

 

I guess you can see that I struggle with what I should or shouldn't do.

 

Mike,

I was thinking there may be a few users that would pony up for more than $5-$10. My company will contibute $100 toward your efforts (my website is woefully behind so don't judge or work based on it), perhaps there are more that will match or beat that. Paypal would work. The community as a whole seems a little tight when it comes to what they'll spend.

 

Let me brainstorm on it for a bit but here are some things:

 

There are things that we need to do to create our accident scenes.

Modeling the scene takes more time than anything else.

We use tree hair for large areas and cookie cutter trees for smaller more detailed portions.

 

We've gotten pretty good at making roads, but they still take time (sweeper plugin helps a lot here).

 

There is an area I was interested in a while ago called camera mapping. While I didn't understand it completely, it basically allowed you to create course geometry then map an image onto it via the camera.

 

I think it worked in V11, doesn't in V12 (haven't tried the newest version).

The technique could be used for vehicles etc.

 

There has to be other things.

David

Share this post


Link to post
Share on other sites

Well, if you are seriously considering developing tools for vegetation, aswell as terrain, then I have some ideas. I will try to give it some time tomorrow and will post something in this thread for you to think about.

Share this post


Link to post
Share on other sites

We could give you the source to the existing parametric tree generator, and using "Hair" for leaves handles all that "facing you" and " "twisting" stuff, (and if you needed some other leaf/hair option, we could probably add that too.) However, you would have to code in C++.

I'll finish AM TerraForm first then I can take a look a tree generator.

 

but we could give you a free upgrade

That wouldn't go amiss!

 

 

I was thinking there may be a few users that would pony up for more than $5-$10. My company will contibute $100 toward your efforts (my website is woefully behind so don't judge or work based on it), perhaps there are more that will match or beat that. Paypal would work. The community as a whole seems a little tight when it comes to what they'll spend.

Let's wait until I finish AM TerraForm first so that it's merits can be more fairly judged.

Share this post


Link to post
Share on other sites

We could give you the source to the existing parametric tree generator, and using "Hair" for leaves handles all that "facing you" and " "twisting" stuff, (and if you needed some other leaf/hair option, we could probably add that too.) However, you would have to code in C++.

I'll finish AM TerraForm first then I can take a look a tree generator.

 

but we could give you a free upgrade

That wouldn't go amiss!

 

 

I was thinking there may be a few users that would pony up for more than $5-$10. My company will contibute $100 toward your efforts (my website is woefully behind so don't judge or work based on it), perhaps there are more that will match or beat that. Paypal would work. The community as a whole seems a little tight when it comes to what they'll spend.

Let's wait until I finish AM TerraForm first so that it's merits can be more fairly judged.

 

I used the old version and knew it had potential. A few tutorials on how to use the features would have been really helpful. My point was I am willing to help you defray the costs/time required to develop it.

David

Share this post


Link to post
Share on other sites

My point was I am willing to help you defray the costs/time required to develop it.

I appreciate that, but I'm currently unemployed and wouldn't want to accept any payment for a project that wasn't finished since I can't, at this point, fully guarantee it's completion.

Share this post


Link to post
Share on other sites

Well it looks like you're making great progress.

 

Sorry you are unemployed.

Been there, done that, bought the tee shirt.

 

Wouldn't it be helpful to receive $ for you work?

 

Not prying, just wondering.

 

David

Share this post


Link to post
Share on other sites

Wouldn't it be helpful to receive $ for you work?

Of course - especially now. But here's my concern: In '04 I was looking for work and landed a job at a warehouse. Within a month I was promoted to Floor Supervisor and spent the next 4 months working an average of 13 hours/day Mon-Sat. Another job I had in a prepress department was an average of 10 hours/day with every other weekend off. And most of the time it was 12/hour days. In 18 months I worked an 8-hour shift less than a dozen times.

 

If I get offered a job at an acceptable rate of pay, then I could easily find myself in a situation where I have an extraordinarily small amount of free time for weeks or even months. If I'm working 70-80 hours a week 5-7 days a week, the small amount of free time I have isn't going to be spent writing code for AM utilities.

 

If people start supoorting my efforts finacially before the application is ready for release and then it ends up being months before a new build with a few small changes/fixes is released, not only would it make me look bad, it wouldn't be fair to furture 3rd party developers if I had soured the AM community on supporting works in progress.

Share this post


Link to post
Share on other sites

Wouldn't it be helpful to receive $ for you work?

Of course - especially now. But here's my concern: In '04 I was looking for work and landed a job at a warehouse. Within a month I was promoted to Floor Supervisor and spent the next 4 months working an average of 13 hours/day Mon-Sat. Another job I had in a prepress department was an average of 10 hours/day with every other weekend off. And most of the time it was 12/hour days. In 18 months I worked an 8-hour shift less than a dozen times.

 

If I get offered a job at an acceptable rate of pay, then I could easily find myself in a situation where I have an extraordinarily small amount of free time for weeks or even months. If I'm working 70-80 hours a week 5-7 days a week, the small amount of free time I have isn't going to be spent writing code for AM utilities.

 

If people start supoorting my efforts finacially before the application is ready for release and then it ends up being months before a new build with a few small changes/fixes is released, not only would it make me look bad, it wouldn't be fair to furture 3rd party developers if I had soured the AM community on supporting works in progress.

 

It makes sense. I guess I was so thrilled you were working on it, that it seemed to good to be true.

Obviously you are very capable, intelligent and articulate which is why you end up in positions of responsibility.

 

Thanks for your hard work for the community. If by the slimmest of chances you are located in the Atlanta area, I could offer to by a nice dinner for you and your wife/significant-other as compensation for your work so far.

 

David

Share this post


Link to post
Share on other sites

If by the slimmest of chances you are located in the Atlanta area, I could offer to by a nice dinner for you and your wife/significant-other as compensation for your work so far.

Thanks, but I'm Portland, OR.

Share this post


Link to post
Share on other sites

PROGRESS REPORT

 

When I started programming this project I had planned ahead and was implementing a way for the user to define their own default settings besides being able to save certain configurations. Then I found that Microsoft had already impemented a way to do so. Essentially, it's just creating an XML file, but to make use of this feature, I had to decide everything I wanted the user to be able to define as a default setting, add controls to do so, then write code to read and write those settings at any time.

 

This going back through what I had already written and removing my "thinking ahead" code and replacing it to work with the new options code; so far, it's been a 3-day spin through hell.

 

I am now satisfied with the interface, the controls and all the options. Since nothing I have been working on the past few days will change the way meshes are currently created, I won't be posting a new beta until all the options code, menu code and updated Help files are complete. Then I will tackle ASCII/DEM import, random fractal generation and 3D preview, in that order.

Share this post


Link to post
Share on other sites

but we could give you a free upgrade

That wouldn't go amiss!

Come on over to the office any time and pick one up.

Share this post


Link to post
Share on other sites

Come on over to the office any time and pick one up.

Thanks! I'll probably head over there Thursday afternoon.

Share this post


Link to post
Share on other sites

NEW BETA RELEASE: AM TerraForm

 

Aside from various small fixes I've added a few of things:

 

User-Defined Defaults

Display color images as grayscale

Save and Load control settings

Switch between Metric and Standard measurement systems

 

The Help file has also been updated to include a description of the Menu fucntions.

Share this post


Link to post
Share on other sites

This is awesome. While i am not a programmer, I would put $ twards something like this.

Keep up the great work.

Share this post


Link to post
Share on other sites

PROGRESS REPORT

 

It turns out that I've missed a couple of hefty bugs. I don't know why, but I assumed that setting a minimum value for a text edit box would display that value when the control lost focus if the box was blank - it doesn't. Not a big deal - the minimum value is still used but you still shouldn't be able to have a blank text edit box in AM TerraForm.

 

Also, certain controls that should be disabled for certain mesh types become enabled after viewing About, Mesh Info or User-Defined defaults.

 

After fixing these two problems, I'll be adding code to prompt the user to save settings or recreate mesh data if the control settings have been changed. I'm also going to try and add the patch data to the model file so that large meshes can be used in AM immediately instead of having to wait for AM to create the patch data.

 

Look for an updated build this evening or sometime Friday.

 

I was looking at the ASCII import and the USGS website since I want to get ASCII import working this weekend. The USGS website's DEM (Digital Elevation Model) data is saved in SDTS (Spatial Data Transfer Standard) format which consists of a series of .DDF files. I'm not going to attempt to write an SDTS Importer for AM TerraForm at this time because if the USGS ever changes the SDTS header (which they did a few years ago), then the importer wouldn't work anymore. Besides, I also cannot guarantee that any SDTS file a user might attempt to use is ISO complaint. There are a plethora of utilities like SDTS2DEM that will create the old-style DEM files that a user can can open in a text editor and delete the header infomation. AM TerraForm's ASCII import is only going to read in XYZ data.

Share this post


Link to post
Share on other sites

Any chance of a simple tutorial? I'm adding some images, but I don't know what to do then. Does it show the mesh that's generated? Or do we export and preview it in AM?

Share this post


Link to post
Share on other sites

NEW BETA 2 BUILD RELEASE: AM TerraForm

 

The only addition is that I've added saving the patch data in the model file so that AM doesn't need to do it. I also created a default group of the entire mesh named All of Me; for some reason, when you import the model, the group name doesn't display although when you click the blank designation it will select the whole mesh. This is a pretty big improvement on the usability of AM TerraForm since large meshes are now instantly usable instead of having to wait for AM to calculate all the patch data; I frequently use 256x256 meshes and if I rememebr correctly, it used to take AM 7-8 hours to calculate the patch data.

 

I also removed that message box that was popping up when you click the Create Mesh button.

 

Any chance of a simple tutorial? I'm adding some images, but I don't know what to do then. Does it show the mesh that's generated? Or do we export and preview it in AM?

AM TerraForm doesn't show a preview of the mesh yet; it won't for some time since I don't how to program in DirectX yet. So yes, you have to import into AM to see the mesh created.

 

Once your image is ready, all you need to do is adjust any settings you might want and click the Create Mesh button. It will generate all the data needed for an AM model and display a message when finished telling you how long it took to generate the data. At this point you can still make adjustments and click the Create Mesh button again to update the data with your new settings. When you're ready to save, just click the Save Model button and you will be prompted for a location to save the model to. All you need to do then is import the model into an AM project.

Share this post


Link to post
Share on other sites

NEW BETA 2 BUILD RELEASE: AM TerraForm

 

This build just contains a few bug fixes and the addition of of some messages and prompts if you're trying to create a mesh when an image has been changed and not updated, changing settings but not updating the mesh, and saving a model with changed settings but not an updated mesh.

Share this post


Link to post
Share on other sites

PROGRESS REPORT

 

With a little luck, I might be able to get the ASCII import working this weekend.

 

The issue that has been most on my mind is how to generate a random fractal landscape. The most common method I'm aware of (actually the only method I'm aware of!) is called the Diamond Square method. There is nothing wrong with this method in and of itself, except that you're pretty much locked into having to have a mesh that has the same number of units along each axis. I could say "square" except that with AM TerraForm the units don't have to be square so that you can have a mesh with an equal number of units along each axis without being "square".

 

What I want to be able to do is allow the user the versatility to create a mesh with square units but not square dimensions. So the Diamond Sqaure method is out. I have an idea that might achieve similar results without requiring square dimensions so we'll just wait and see if it works.

Share this post


Link to post
Share on other sites

The issue that has been most on my mind is how to generate a random fractal landscape. The most common method I'm aware of (actually the only method I'm aware of!) is called the Diamond Square method. There is nothing wrong with this method in and of itself, except that you're pretty much locked into having to have a mesh that has the same number of units along each axis. I could say "square" except that with AM TerraForm the units don't have to be square so that you can have a mesh with an equal number of units along each axis without being "square".

 

What I want to be able to do is allow the user the versatility to create a mesh with square units but not square dimensions. So the Diamond Sqaure method is out. I have an idea that might achieve similar results without requiring square dimensions so we'll just wait and see if it works.

The way to generate fractal terrain and planets is to combine Perlin noise in fractal dimensions as championed by Kenton Musgrave. You may be able to find some doc on the Web if you look for Musgrave papers or references but if you are really serious about that, I would strongly recommend you get a copy of the book "Texturing and Modeling : A Procedural Approach" By David S. Bert, F. Kenton Musgrave, Darwin Peachey, Ken Perlin and Steven Worley. This is the definitive bible for that sort of thing. A must absolutely have IMO.

 

Once you have your fractal noise generator, you can apply it to any sort of grid, regular or irregular. And you don't have to limit yourself to a grid too. For instance, you could start with a relatively coarse grid and complement with displacement / bump map for higher frequency details that would come from higher layer of the same procedure that generated the mesh.

Share this post


Link to post
Share on other sites

The way to generate fractal terrain and planets is to combine Perlin noise in fractal dimensions as championed by Kenton Musgrave. You may be able to find some doc on the Web if you look for Musgrave papers or references but if you are really serious about that, I would strongly recommend you get a copy of the book "Texturing and Modeling : A Procedural Approach" By David S. Bert, F. Kenton Musgrave, Darwin Peachey, Ken Perlin and Steven Worley. This is the definitive bible for that sort of thing. A must absolutely have IMO.

 

Once you have your fractal noise generator, you can apply it to any sort of grid, regular or irregular. And you don't have to limit yourself to a grid too. For instance, you could start with a relatively coarse grid and complement with displacement / bump map for higher frequency details that would come from higher layer of the same procedure that generated the mesh.

Thanks, Yves. I'm a big fan of MojoWorld; it's easily the most complex piece of software I've ever used. What actually inspired me to return to writing a landscape utility for AM is that I think MojoWorld sucks at 3D object import - I don't think the renderer handles things like trees and plants very well. I'm pretty sure that I can create more realistic landscape images with AM than with MojoWorld simply because in AM it would all be in a contianed environment in a contained format.

Share this post


Link to post
Share on other sites

NEW BETA 2 BUILD RELEASE: AM TerraForm

 

Besides a couple of bug fixes I've got ASCII import working. What I really want to do is create as accurate a grayscale bitmap as possible to reflect the ASCII data, but with only 256 values to use, it's going to be pretty limited. Just remember that the ASCII files need to be pre-formatted before import into AM TerraForm - just rows of numbers representing a grid separated by either a space or a comma. I included the comma as a separator just in case someone might try editing their data in Excel and saving the file as a .csv file.

 

I'm working on some ideas to be able to reflect heights more accuartely by using 24-bit color data that utilizes blues for sea level and below, greens for lower altitudes, browns for mid-heights and grayscale for mountains, but that's going to have to wait for at least v2.

Share this post


Link to post
Share on other sites

I'm working on some ideas to be able to reflect heights more accuartely by using 24-bit color data that utilizes blues for sea level and below, greens for lower altitudes, browns for mid-heights and grayscale for mountains, but that's going to have to wait for at least v2.

Why not just use 16-bit grayscale bitmaps?

Share this post


Link to post
Share on other sites

Why not just use 16-bit grayscale bitmaps?

Because I didn't think of it? LOL! I'll have to do some experimenting with that. Photoshop only displays grayscale images as HSB and even color images at 16-bits/channel still only have a 0-255 RGB sliders instead of 0-65535. That makes it hard to justify creating a 16-bits/channel image if you can't select any color/shade in the range. Still, I guess I can at least store height data from an ASCII file as a 16-bit grayscale image; I'm just concerned about how it gets edited - if you import ASCII data and create a 16-bit grayscale bitmap based on that data, then what happens if you try and edit it in an app like Photoshop that currently doesn't appear to offer users that whole 16-bit range for each RGB or Black to White slider? I'll have to try it and see what happens - I have a feeling that the 16-bits/channel data gets converted to 8-bits/channel.

Share this post


Link to post
Share on other sites

16-bit images are kept 16-bits in Photoshop. You can apply filters and edit them with the editing tools like the brush, the eraser, etc. In fact, converting an 8-bit image to 16-bits is a required operation for some image editing steps if one doesn't want to get quantizing artifacts in the end result.

 

True that the sliders don't offer you all the 65k grayscale values to play with. But unless you want to precisely edit each individual pixels with precise gray value, there is no point in getting access to higher precision gray values. What one would most probably do when editing a gray scale elevation map is to use a a soft brush along with soft blur, smudge, burn, etc. and different assortment of filters plus curve and levels. Those all support and work on 16-bits images.

 

My experience is that Photoshop can display 16-bits images as HSB as well as any other color representation you wish provided you select the representation you want in the info pannel or in the preferences.

 

It is possible that other paint applications doesn't support 16-bits as well as Photoshop. For instance, I know that Paintshop 12 does convert 16-bits png (I didn't test other 16-bits file formats but png) files into 8-bits when it reads them from file. So Paintshop would be out of the loop for such a job.

Share this post


Link to post
Share on other sites

It is possible that other paint applications doesn't support 16-bits as well as Photoshop. For instance, I know that Paintshop 12 does convert 16-bits png (I didn't test other 16-bits file formats but png) files into 8-bits when it reads them from file. So Paintshop would be out of the loop for such a job.

From what I can tell, only TIFF and PNG even support 16-bit grayscale. The problem I am having is that when I create a new bitmap instance using Image.FromFile, it is automatically a 32-bit RGB image, even if I haven't displayed it yet. What I haven't been able to figure out is how to determine what image type and bit-depth an image is before I import it - if I can do that, then if I know in advance that an image is 16-bit grayscale, I can use the .PixelFormat method and force it to be imported as such.

Share this post


Link to post
Share on other sites
Cinepaint is supposed to support 16 bit images. They are overdue with their release, so there are only partially working versions available at the moment. Hopefully, they aren't too far away from updating.

Share this post


Link to post
Share on other sites

PROGRESS REPORT

 

I'm still stuck on trying to to find the best way to display the data from an ASCII file as a grayscale image, but I'm getting closer.

Share this post


Link to post
Share on other sites

PROGRESS REPORT

 

I've got the problem of how to display a visual representation of ASCII data resolved to my satisfaction. There are still a dozen or so other things I have to change/add. I should have a new build uploaded later this evening.

Share this post


Link to post
Share on other sites

NEW BETA 2 BUILD RELEASE: AM TerraForm

 

A couple of bug fixes and image display of ASCII import that can be saved for editing and use as a topographic map. Originally I had posted the file formats used by VB's picture box control, but yesterday I realized that the description said "typical use". Another description lists even less choices. It turns out that that all the choices are .bmp, .emf, .exif, .gif, .jpg, .png, .tif and .wmf so I have updated the code to allow for all of those formats.

Share this post


Link to post
Share on other sites

Mike,

You are releasing faster than I can download!

Making great progress I see. Now I just have to set aside some time to explore.

 

Thanks!

Share this post


Link to post
Share on other sites

Yes, I agree with Rodney. You are doing an amazing job here, Mike.

 

I am very excited to test TerraForm but I haven't had a chance to take a look yet. Hopefully today sometime.

 

Thank you so much for working on this! :)

Share this post


Link to post
Share on other sites

PROGRESS REPORT

 

I spent a very frustrating weekend trying apply the very simple concept of recursive subdivision to create an fBm image for use as a landscape. What sounds simple isn't always simple to apply and such was the case for me and fBm, or, probably more familiar to most of you, a plasma fractal. There are plenty of explanations available and lots of code examples, but nothing I could find gave a step-by-step explanation of exactly what the code was doing. Worse for me, almost all fractal source code available is in C, C++, Java or Pascal - very few examples in VB and none in VB .NET that I could find. The VB .NET forums weren't any help either.

 

So after dozens of hours of profanity, hacking apart VB 5 code examples and rewriting it for VB .NET, I actually managed to get an fBm image even though I don't know exactly what my code is doing every step of the way. So hopefully sometime today I will have a new beta uploaded with the random landscape generation working.

Share this post


Link to post
Share on other sites

Hell that sound's a lot of work ,Many thank's ,I am realy looking forward to this

Share this post


Link to post
Share on other sites

I would have just build a regular grid and displace the CPs according to the fBm value under each grid point. No need for recursive subdivision.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...