F.L.E thread 2

Community Forums/Showcase/F.L.E thread 2

RifRaf(Posted 2004) [#1]
F.L.E open source landscape editor. THREAD #2. first thread http://www.blitzbasic.co.nz/Community/posts.php?topic=37611


RifRaf(Posted 2004) [#2]
#jhocking. you can just remove the camerafog command to solve your problem. :).

what do you thing of the gui interface, and movements?

@NOEL How are your efforts with overhang creation comming along?


Falelorn(Posted 2004) [#3]
Damn didnt see this, maybe post a moved to this thread in the old one Rif.


RifRaf(Posted 2004) [#4]
TO SOLVE THE RESOLUTION THING BEING TO SMALL .. you can simply change graphics3d 640,480,32,2 into
graphics3d 640,480,32,3 now you can maximize the window and everything will stretch so you can see it better..


RifRaf(Posted 2004) [#5]
last update until tomorrow night at best

download old version
www.hoverhavok.mmocrafter.com/FLE_GUI_RIF.ZIP

then update the fle folder with these 3 files
http://www.hoverhavok.mmocrafter.com/fle.bb
http://www.hoverhavok.mmocrafter.com/flegui.bb
http://www.hoverhavok.mmocrafter.com/gui3.png?http://www.hoverhavok.mmocrafter.com/gui3.png

adds a menu that allows you to select terrain resolution.. meaning how many segments are in it.


*(Posted 2004) [#6]
RifRaf: remove the ? from the end of the bottom link :)


RifRaf(Posted 2004) [#7]
there ya go.

heres a shot of a mountain top cave made in F.L.E using my pull function. am still tweaking this ability.

http://www.hoverhavok.mmocrafter.com/cavetest.jpg?


jfk EO-11110(Posted 2004) [#8]
A sidenote:
Working with FLE gave me some new motivation to optimize some grass functions. Currently I got a system working that is using 4 million virtual Grass quads. Physicly there are only 400 in use, just positioned around the camera, using entityAutoFade to fade from grass to nongrass. This prevents the grass poping in and out pretty well. I got 4 Million precalculated positions and rotations for the quads, stored in a 2d array, so I only got to calculate the player position inside the array. Works very well, is really fast.



EDIT:
Then again you should consider: 4 mio positions and rotations are eating 80 megabytes of ram (flag,x,y,z,pitch), tho probably this could be otimized a bit by packing multiple values into some longs, eg. the flag and pitch together surely don't need more than 16 bit... I also tried to use a system that created the positions using location-initialized random-seed, but unfortunately there is a small pause whenever the player crosses the border between 2 clusters, that is about every 20 "meters".


N(Posted 2004) [#9]
Real nice, jfk.

@NOEL How are your efforts with overhang creation comming along?


Like I said before, the only real problem is the lower layers clipping into the top layers. I'm really not sure how to fix this problem, but it's bugging the living hell out of me.


RifRaf(Posted 2004) [#10]
JFK, can i get my hands on that grass system? :) and where did you get those trees. :)


RifRaf(Posted 2004) [#11]
ok made some progress on my lunch break, you can now fairly easily create caves.. will tidy up the functions tonight

http://www.hoverhavok.mmocrafter.com/caves.jpg?


Shambler(Posted 2004) [#12]
It's all looking very promising.

One thing that sticks out like a sore thumb though is the way textures are stretched over the geometry. e.g. caves and pulled geometry.

Could this be easily solved?

It would make the results so much more impressive.


xmlspy(Posted 2004) [#13]
Rifraf, I think this is the best thing you have done so far!!, looks very promising, the head chat program made my PC crash a lot, I'll try this one out, once you release version that has the cool cave making part. ALE killer!


jfk EO-11110(Posted 2004) [#14]
RifRaf - this is the prototype test source so far:

the media used can be found in the FOREST demo from the code archives. The water AnimTexture can be produces with TextureWobbler (toolbox), make a 15*128*128 strip. The skybox is taken from the darkmatter CD, but of course any other Skybox can be used. If you use this in a release, please credit me.


Beaker(Posted 2004) [#15]
jfk - use <codebox> instead of <code>. Saves people mousewheels. :)


Sweenie(Posted 2004) [#16]
Maybe the pushed/pulled parts could be subdivided?
This would prevent too stretched triangles.


RifRaf(Posted 2004) [#17]
use a little smart pushing.. dont hold push in one place.. move it around in a circle pattern ect.. play with it some and get a feel for it. if you hold it you will pull the same, verts and therefor stretch more.

Subdividing might be a solution, ill try it out and see how high the poly count gets, i imagine it will get insanely high.


Caff(Posted 2004) [#18]
Hi - can someone release the most present version (in full, all files/folders)? I've been trying to piece together from scratch but I'm getting nowhere with all these ZIPs and RARs.


jfk EO-11110(Posted 2004) [#19]
should work nicely if you run the ablend3.bb (bprobably needs to be renamed to FLE_main.bb or something the sooner or the later). You could install this:
http://www.hoverhavok.mmocrafter.com/FLE_GUI_RIF.ZIP
then update
http://www.hoverhavok.mmocrafter.com/fle.bb
and
http://www.hoverhavok.mmocrafter.com/flegui.bb

And then you still need the media files (mainly 6 textures and an example heightmap), that can be found in this older release:
http://www.melog.ch/dl/fle_ablend3.zip


Caff(Posted 2004) [#20]
forget it


RifRaf(Posted 2004) [#21]
im sure nobody minds if you host anyhting , but make sure you know what your puttin up.. what you posted is not the latest version the latest version does have gui, and ive linked it above already.. just textures missing.


RifRaf(Posted 2004) [#22]
Here is newest version with test textures in there.
http://www.hoverhavok.mmocrafter.com/rifraf_fle.zip


jfk EO-11110(Posted 2004) [#23]
Of course, I meant to take only the textures from the file on my server. Sorry if I wasn't clear enough. Well, after reading it again, I think it was very clear. However.


RifRaf(Posted 2004) [#24]
@jfk , any wya to save the b3d export as a single B3D insstead of 2? does the b3d format allow children meshes to be included, if so we could parent the layer one to the other layers and export that way.. ????


jfk EO-11110(Posted 2004) [#25]
I am not very familar with child nodes inside B3D Files, maybe somebody else may know this. I am only afraid that if you load such a multi-node mesh that includes children using the LoadMesh Command, the children will become Surfaces, so you'd need to load it using LoadAnimMesh. I am not sure about this.


RifRaf(Posted 2004) [#26]
well the weekend is here again. ! ill try to get some hours in on FLE. im still tweaking with it.. trying to get existing functions working better. Current shot here shows a snow scene.

next up.. a mesh dropper so you can decorate the terrain.
HTTP://WWW.HOVERHAVOK.MMOCRAFTER.COM/FLESNOW.jpg?


Falelorn(Posted 2004) [#27]
Nice Rif, btw sorry I keep missing you online. Ill be around Sat afternoon (late)


ashmantle(Posted 2004) [#28]
You're doing excellent work as always ^^


jfk EO-11110(Posted 2004) [#29]
the snow scene looks very nice. A bit harsh that this wasn't in side the latest newsletter, but anyway.

At some point you can add this to the toolbox IMO. And wasn't there a dedicated Forum for open source blitz projects, by ckob I think?


RifRaf(Posted 2004) [#30]
not sure about the forum, havent read the newsletter yet. ill add it to the toolbox as soon as i get some basic dropper fuctions in there. :) oh, and when i can get it to export to a single b3d, instead of 2


jfk EO-11110(Posted 2004) [#31]
I wouldn't worry too much about the 2-file problem. There are several benefits with 2 files, eg.:

-Do collision detection only with the bottom mesh.
-Do linepicks only with the bottom mesh.

and with the Dropper funtionality I don't know if you really need that, because if you want to make it properly, it will become a huge job. Then you probably also have to include a lot more, like lightmapping, world editing (bonus, medipacks, ammo etc). well, what I want to say is: you better release a perfect Terrain editor without a dropper than a Terrain editor with a halfbaked Dropper. Droppers are pretty project-customized IMHO. Currently it is also easy to load the exported Terrain meshes with an existing Dropper.

I mean, of course, it's your decision. But personally I would use this software for it's genious terrain mapping, and not as a dropper since I already got plenty of them and I also already have choosen the one I like most, and customzed it to work together with my engine.


RifRaf(Posted 2004) [#32]

good point about the 2 file thing. however i will continue with the dropper, because its somthign i will use myself. it is not that huge of a project ive done them before .. in maptile3d, just have to find a clever way to make it very easy to scale rotate and postision without getting messy gui or controls. I mihgt post the 2 versions, terrain and terrain + dropper.


RifRaf(Posted 2004) [#33]
ok small progress, havent had alot of time to code today.. but i did manage to make a few functions work much better.. first thing i did was make the painting tool paint in more of a circle pattern than a square, then made the randomize texture function work more reliably. meaning the results look much more natural now. heres a pic of a randomized terrain. (rand also paints with circle brush now)



wmaass(Posted 2004) [#34]
Looking good! Any chance of an updated version to try?


slenkar(Posted 2004) [#35]
that landscape looks cute Id like to see that in my future game


RifRaf(Posted 2004) [#36]
ill try to get an update posted later tonight.


jfk EO-11110(Posted 2004) [#37]
the circular brush seems to be a very useful thing.


Hubbster(Posted 2004) [#38]
looks nice, keep up the good work Rif =)


RifRaf(Posted 2004) [#39]
well i didint have the energy or time to learn the B3D file format so i just wipped up a FLE loader you can put in your project.. Now to anyone who doesnt know. The FLE editor can EXPORT B3D format, but it will spit out 2 files, one of them is the solid underlayer, the other is a combination of the other layers together. The neatest thing here is you cna set up collisions on JUST layer one if you want and that may speed up the collision checking between objects and terrain.

anyway you can use the fle loader and get it all in one mesh. works like this
MYMESH = LOAD_FLE (" test.fle")





jfk EO-11110(Posted 2004) [#40]
This is a nice idea, but tell me how ong does it take to load it this way? (sorry haven't got a 3d-capable machine running right now)


Braincell(Posted 2004) [#41]
Hey , you're doing a great thing guys.


RifRaf(Posted 2004) [#42]
not long at all.. very fast


Rob(Posted 2004) [#43]
This sounds excellent so far.
How will it work culling wise?

I would be interested in using something like this system!


RifRaf(Posted 2004) [#44]
well im considering making the fle loader sperate the mesh into x segments so that each segments can be hidden by others. an letting you pass how many segments in the load call. like MYMESH=LOAD_FLE ("test.fle",8) would chop it into 8 segmesnts. all parented to MYMESH so anything you do to MYMESH is done to the children.

Right now im struggling with B3D format.. the vertex colors arent saving for some reason.. anyone have any help to give on this Im just writing vertex colors after vertex positions as stated in the B3D specs.


Rob(Posted 2004) [#45]
for vert cols, the chunk header needs to be changed to accomodate it first... I forgot which parameter needs changing.

Will we be able to make and edit a long strip? I fancy making a sort of linear overhead scrolling thingy :)


wmaass(Posted 2004) [#46]
cough -- update! --cough :)


RifRaf(Posted 2004) [#47]
soon as i get vertex color saving done :) ill update, wanted a decent vertex lightmapper in it.


RifRaf(Posted 2004) [#48]
heres a recent shot. you can now paint colors onto the terrain too. this shot is a little extreme just to show it in action, but if you use colors that go with the terrain style it can look really cool. I made a road by painting brown onto the terrain , it looked good, and saved me from having to use another texture layer for the road.




wmaass(Posted 2004) [#49]
Oh all right...


jfk EO-11110(Posted 2004) [#50]
Currently I am not sure anymore if you have to use values from 0.0 to 1.0 or from 0.0 to 255.0. Simply try both. The ARGB parameter (2) is already set in the MESH chunk, so it should work.

b3dWriteFloat( 1.0 ) ; r (0.0 to 1.0 or 0.0 to 255.0?)
b3dWriteFloat( 1.0 ) ; g (However, must be floats :) )
b3dWriteFloat( 1.0 ) ; b


Rob(Posted 2004) [#51]
0 to 1.


Rob(Posted 2004) [#52]
Regarding painting in circle pattern, please consider falloff, that is, the influence is almost zero at the edges and strongest in the middle...


Rob(Posted 2004) [#53]
I can't get this to work. Does anyone have a full ready-to-go zip of everything I need?


jfk EO-11110(Posted 2004) [#54]
Did you try this:
http://www.hoverhavok.mmocrafter.com/rifraf_fle.zip
Some comments in the readme file are definitively outdated. I think you need to run "fle.bb"

make sure to run the right bb file. There must be 6 textures and the blitzsys dll. you can also take the media files from this old (no gui, no nothing) release:
http://www.melog.ch/dl/fle_ablend3.zip

If you still got problems, then some of us may need to go down on our knees and please rifraf to compile a release zip that was actually tested in a seperate folder :)


Rob(Posted 2004) [#55]
fle.bb isn't in the above archive www.hoverhavok.mmocrafter.com/rifraf_fle.zip

it has fle_gui but not fle.bb

It's a shame this is so disorganised cos it really looks special.


RifRaf(Posted 2004) [#56]
www.hoverhavok.mmocrafter.com/rifraf_fle.zip
that is the last link i posted, and it is still a good one. the rounded painting is not in that one, but ill upload a new one in a few hours i think


ckob(Posted 2004) [#57]
which zip do I download?? I downloaded the last one rifraf posted but I get an error saying this function cant be found
choosenewmap()

comment those lines out and it says im missing rockslope() is there an include or something missing?


jfk EO-11110(Posted 2004) [#58]
Rob, I thought I have seen fle.bb in this zipfile. And I was sober.
EDIT it's definitively there, at least in the zip file I downloaded right before I used to post.
EDIT2 - ah, it's ziped with a folder: myprojects\alphablend\withsave
For some weird reason this fle.bb is the only file that is using a path, the other files inside the zip are on the top level.
However, use a filefinder for fle.bb, should be somewhere on your HD.


ckob(Posted 2004) [#59]
yeah i found it...i just unzipped it into the main folder


Rob(Posted 2004) [#60]
Weird. Thanks lads...


Paul "Taiphoz"(Posted 2004) [#61]
Not sure if this is known of not, but when I load a height map into it it seems fooked up. the black area's as really high and the white are low, its like the mesh is inverted.


jfk EO-11110(Posted 2004) [#62]
Never noticed this. Maybe time for a "invert topology" button then.


RifRaf(Posted 2004) [#63]
havent noticed that either. will look at it. should be very very simple fix though


Rob(Posted 2004) [#64]
is it possible to make a thin long strip as opposed to a square terrain?


RifRaf(Posted 2004) [#65]
its very possible, but not coded in there yet
. because FLE can reference the terrain with l_index(x,z) you can in the optimizemesh function(s). Put an IF clause in there that will only copy tiangles inside your desired rectange of the terrain. make sense?


Rob(Posted 2004) [#66]
yep certainly does. I would probably try to rewrite it though as it will then allow me to edit it properly without straying out of bounds...

Also, apparently on export strange surface things happen according to Ross.


Ross C(Posted 2004) [#67]
Yeah, when i export a terrain, it exports 2 different files. The first file contains the mesh and the first texture, the base one i'd assume. The next file contains the mesh too, but mapped with alphaed textures and such. Seems like the two should be combined.


RifRaf(Posted 2004) [#68]
bloodlocust, you can add that easily too, the BRINGUP() function handles painting, and such, and the ALTERLAND() function does terraforming, you can add a (in rect) check after the linepick and the small area the determines the X,Z values for l_index. if it is not inside your desired rect, just RETURN from the function


wizzlefish(Posted 2004) [#69]
whenever I run fle.bb, it says "too many perimeters" and "function not found." is there anyway to fix this?


RifRaf(Posted 2004) [#70]
YES, download the latest version. posted above, and now here again

www.hoverhavok.mmocrafter.com/rifraf_fle.zip


wizzlefish(Posted 2004) [#71]
It downloaded OK, but fle.bb is all messed up. Even when I get the Inlcude files working, it still messes up. Does that exact link work on your computer? It doesn't on mine...


Rob(Posted 2004) [#72]
The fle.bb file is still hidden inside that other folder. IMHO thats very silly and the archive should be fixed... But what do you want for free?


jfk EO-11110(Posted 2004) [#73]
Ross - yes, the first mesh is the bottom mesh, used to kill all Alpha-Z-Order Troubles caused by VertexAlpha of the second Mesh. Simply load both meshes at the same position, then assign EntityFX mesh2,34 to the second mesh.

Rifraf - you really should release the zip with an example bb that shows how to load the Exports, as well as a further example that shows how to load it from the .FLE file.


RifRaf(Posted 2004) [#74]
its free open source, im assuming anyone interested is willing to look at the source and try to understand it. Ill compile an exe for everyone else at some point, or anyone else is more than welcome to do so. FLE is not somthign im supporting in the way i would support a compiled shareware title. im at work at the moment, and cant do anythign about the zip. but again, if anyone else wants to rezip it. you are more than welcome to do so.

To load the exported b3d..

Top=loadmesh(name_2.b3d")
Bottom=loadmesh(name_1.b3d")
entityparent (top, bottom)

to load an FLE use Loader.bb as AN include.. not in zip.. code posted above in codebox.

TERRAIN=LOAD_FLE("name.fle")

thats it.


Ross C(Posted 2004) [#75]
Thanks jfk and RifRaf :)


Rob(Posted 2004) [#76]
How is the terrain optimised? does it reduce uneccesary polys?


RifRaf(Posted 2004) [#77]
yes it removes all commpletely transparent tris. btw ive the version on my HD spitting out a single B3D mesh instead of 2. with no alpha zorder issues. just need to fix the texturing and its ready.


Rob(Posted 2004) [#78]
Sounds wonderful. Is there any chance of letting people choose how many quads X and Z they want the terrain? ;)

And also maybe exporting by chopping it up into pieces for later optimisation. Maybe specify how many chunks x and z also :)

This is really good work though!


jhocking(Posted 2004) [#79]
Hear hear. I've been asking for a control over the number of segments for a while now.


RifRaf(Posted 2004) [#80]
in the latest version you have the segment control.. you can choose small, med,large, or xlarge. Now in the source code you can change what each one of thoe menu options will set the segments to. There is currenlt not a seperate variable for X and Z but you could add that easily.


jhocking(Posted 2004) [#81]
Ah, I missed the last download.


RifRaf(Posted 2004) [#82]
woot!. ok i got single b3d mesh exporting in there. Just have to finish up on the optimizing and ill upload latest.. Ill compile it this time.


RifRaf(Posted 2004) [#83]
ok new download finally. This is the compiled EXE this time.

New things.

1) Paint terrain textures in circle brush, with falloff from center to edge.
2). rough lightmapper in. when you click lightmap , it will light the terrain withth elightsource at the CAMERAS position.. so move where you want the light, and click lightmap.
3). EXPORT OPTIMIZED SINGLE B3D MESH! no more loading 2 files. thanks to the awsome specs data on this site.
4). you can COLOR the terrain with the color brush.. . manually lightmap it, or add color variations for the look of it.
5). When you EXPORT the B3D, FLE will also save a *.BMP file with the same front name as the B3D file.. this BMP is lightmap you can use just in case you dont want to use the vertex lights. The lightmap BMP is created from the vertex colors. that you created while in FLE with lightmapper and color brush

a side note, you can change flags on the B3D entity once you load it and you wont effect it much, unless you add flag 32 or 4. those will alter the appearance.

thats it.. give me some feedback.

http://www.hoverhavok.mmocrafter.com/fle_compiled.zip
http://www.hoverhavok.mmocrafter.com/fle13.jpg?


wmaass(Posted 2004) [#84]
Yeah! Thanks RifRaf!


jhocking(Posted 2004) [#85]
Woot! This latest version kicks ass.


jfk EO-11110(Posted 2004) [#86]
impressive. how did you manage to save it in one B3D? Are you using multiple child nodes? And does it work with LoadMEsh, or is LoadAnimMesh required?


RifRaf(Posted 2004) [#87]
loadmesh works fine. and yes, you have to start the MESH chunk, then create all the NODES chuks beneath it, each node nested to the last. creating children. and removing the 65k limit for the terrain because its a mesh or surface limit and the terrain is actually 6 meshes. each can be up to the vert limit. however the optimizing works pretty good, and you wont come closee to that limit per mesh.. even per terrain in most cases


RifRaf(Posted 2004) [#88]
next im going to try to learn a more common 3D file format so anyone can use it, not just b3d users


ckob(Posted 2004) [#89]
is the source updated with the latest version as well? i couldnt find it


Caff(Posted 2004) [#90]
Nice I like it, apart from the camera control is a bit fiddly (I guess if you get used to it it's ok)

I would make the W,A,S and D keys go forwards/backwards and rotate left and right - only my personal preference though.


wizzlefish(Posted 2004) [#91]
It's the best terrain editor I've seen that money can't buy. :)

The only thing I would suggest would be too add some more textures--add a sand texture, especially.

Going a bit farther, you could create a built-in water creator, that would create real "water-like" effects. I dunno. It just sounded interesting, since I have NO clue on how to make water....

But I strongly suggest a sand texture...I don't have the latest version in source code, so I can't add anything....

But nice work--keep it up! :)


wmaass(Posted 2004) [#92]
I think you can subsitute your own textures, and also if you have the source you can have more than 6 textures. Is that right Rif?


RifRaf(Posted 2004) [#93]
yes try clicking on thetexture thumbnail to change it to a new texture


wizzlefish(Posted 2004) [#94]
thanks! I'm really looking forward to this....

ummm--what about using it in commercial games? can we use it?


wizzlefish(Posted 2004) [#95]
For some reason, I can't "paint." Everything is the default texture, no matter what. I can change the default texture, but I can't "paint" on other textures. Do you know what happened? :(


RifRaf(Posted 2004) [#96]
are you using right mouse button?, and yes use terrains made with it in any project


RifRaf(Posted 2004) [#97]
@ckob, no it isnt.


Ross C(Posted 2004) [#98]
What would be cool, dunno how easy it would be to implement, texturing, based on the height of the terrain. If this were added and some sort of texturing, based on a bitmap, i'd happily pay for this. It's getting better and better all the time. Very good work man!


ckob(Posted 2004) [#99]
RifRaf: awww :) i look forward to the next code update this open source project is coming along nicely.

Ross C: its free and the best part is that its open source :)

I think texturing based on hieght is a good idea and it wouldnt be all the hard to add, would save tons of time


jfk EO-11110(Posted 2004) [#100]
height-based texturing was salready in, dunno if rifraf droped it again. (formerly known as topological mapping)


RifRaf(Posted 2004) [#101]
FLE discussion thread continued here
http://www.blitzbasic.co.nz/Community/posts.php?topic=38385