Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsShowcase → Introducing, the CaveyTerrainGenerator
Introducing, the CaveyTerrainGenerator
2007-03-18, 2:05 PM #1
So, we already had a terrain generator. The only problem with it was that it wouldn't create meshes. Mine does.

It's web-based, since php is the only language i really know (aside from AVR C++). It's simple to use, just go to CTG, upload an image, and copy the code you get into a .3do file.

What do you think?
Last edited by mb; today at 10:55 AM.
2007-03-18, 4:30 PM #2
Just a minor modification to the script:

Why not send the resulting code back as a 3do file? Just generate the file, create the headers, and then users won't need to bother pasting it into notepad all the time.
2007-03-18, 5:46 PM #3
Would you like your algorithm re-written in C++ and made into a simple command-line application?
Wikissassi sucks.
2007-03-18, 6:27 PM #4
If this works, all of my past JK work will be put to shame. :(
2007-03-18, 8:09 PM #5
Originally posted by Isuwen:
Would you like your algorithm re-written in C++ and made into a simple command-line application?


Sure, why not. I can release the php files for free use later today.
Last edited by mb; today at 10:55 AM.
2007-03-18, 11:01 PM #6
Sounds interesting, but are there any examples of it working?
SnailIracing:n(500tpostshpereline)pants
-----------------------------@%
2007-03-19, 5:54 AM #7
Turned this
[http://www.menkaapois.net/uusi/thumbs/lol1174308834-t.jpg]

into this

[http://www.menkaapois.net/uusi/thumbs/jed1174308813-t.jpg]


Oh yeah, i forgot to add. you must import the file into JED and then export as a 3do, since there's no way calculating the normals in PHP :(
Last edited by mb; today at 10:55 AM.
2007-03-19, 7:02 AM #8
Here's the result of another program i'm working on. Terrain texture generator. Since you can't apply a texture on every mesh in forceremap at once, this one splits an image into pieces.

[http://www.menkaapois.net/uusi/thumbs/JSHOT1011174312800-t.jpg]
Last edited by mb; today at 10:55 AM.
2007-03-19, 9:44 AM #9
[http://www.menkaapois.net/uusi/thumbs/JSHOT1041174322565-t.jpg]

Uploaded a demo level to my jkhub page

I will release the source soon. It's a mess but you can try if you understand it :P
Last edited by mb; today at 10:55 AM.
2007-03-19, 12:01 PM #10
Why shouldn't it be possible to calculate the normals in PHP? If you know which vertices form a triangle, then you can calculate the normals just fine. If you know that vertice A, B and C form a triangle, then you can get two vectors AB and AC by subtracting Bx, By, and Bz from Ax, Ay and Az (same thing for components of C). Then you do a vectorproduct of these two vectors, normalize the resulting vector, and voilà, your normal.
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)
2007-03-20, 1:04 PM #11
Improved it a little, Click.

The heightmap splitting doesn't quite work yet. The generated terrains don't join seamlessly. I know what's wrong but don't have the time to fix it now..

If you use the texture splitter, keep in mind that the texture you upload must have width of 512.
Last edited by mb; today at 10:55 AM.
2007-03-21, 5:07 AM #12
what in the hell is "AVR" C++?
[ B A H ]
Bad *** by nature,
Hackers by choice
2007-03-21, 5:30 AM #13
Originally posted by StrikeAthius:
what in the hell is "AVR" C++?


The language used to program these [http://www.menkaapois.net/gm/images/thumbs/thumb_1174480109.jpg]

:neckbeard:
Last edited by mb; today at 10:55 AM.
2007-03-21, 2:55 PM #14
sweet, i bet those are fun to play with.

im still confused though.. whats with the "AVR" part..? unless its like some kind of proprietary language *similar* to C++ for IC programming (in which case it wouldnt really be C++ anymore) why not just say u code C++ and do the terrain gen in that? remember its only the grammar that makes up a computer language, not a specific API used with it :)


ill give u six brownies if you port the code to an IC and make a USB plug-in that generates terrain 3dos ;)
[ B A H ]
Bad *** by nature,
Hackers by choice
2007-03-21, 8:25 PM #15
Originally posted by StrikeAthius:
sweet, i bet those are fun to play with.

im still confused though.. whats with the "AVR" part..? unless its like some kind of proprietary language *similar* to C++ for IC programming (in which case it wouldnt really be C++ anymore) why not just say u code C++ and do the terrain gen in that? remember its only the grammar that makes up a computer language, not a specific API used with it :)


ill give u six brownies if you port the code to an IC and make a USB plug-in that generates terrain 3dos ;)


Well, I've programmed 8051 derivatives and PIC16 derivatives. Most of the commercial compilers available for these platforms extend C's syntax to make various aspects easier, such as bit/byte addressing, interrupt service routines, working with segmented code/data space, etc. It's not simply an API; there are new keywords added to the language.
[This message has been edited. Deal with it.]

↑ Up to the top!