Page 1 of 3

Map Drawing

Posted: 16 Mar 2008, 14:55
by user
These are two of the best screen shots of this widget:

1.
Image
2.
Image

they are:

1. Small Divide, smooth shading, no texture 8x8 quads.
2. Sands of War v2, uses the Alpha channel, smooth shading, 32x32 quads.

It is better than the old one, much faster.
It now allows using normals, textures, transparent maps.
And it has a algorithm for "generating" the map texture.

Re: Map Drawing

Posted: 16 Mar 2008, 16:59
by Argh
Um, that's fricking awesome, and I think I could probably modify it very easily to do L3DT-style behaviors. May I see the sourcecode? I was planning on hacking up my crude demo of things tonight, but meh, that looks more sophisticated than what I had in mind, anyhow.

Re: Map Drawing

Posted: 16 Mar 2008, 18:26
by Argh
Thanks, user, I'll test that side-by-side with the approach I'm going to test tonight :-)

Re: Map Drawing

Posted: 16 Mar 2008, 19:40
by user
with some editing, i could make it read a grayscale image to use as an alpha channel, and make it delete vertices with low alpha values, to make a fast map renderer.

it would have to save the image data to a text file, so it can easily be accessed, without saving it to a big table or reading it every time.

more things could be done, like making an sm3 map editor, or a lua map format.

Re: Map Drawing

Posted: 16 Mar 2008, 22:05
by Argh
I've just gotten home... lemme play with it a bit, I'm still answering posts / pms / email. I think the biggest things it needs is:

1. It should read an alpha.

2. It should be able to use multiple textures, at different sizes.

3. It needs to render shadows. However, the SMT / SM3 formats already do that part, why do it again?

4. I'm not sure about deleting vertices, but meh, I'm probably just stupid about how what you're describing would work.

I have a crazy idea about how to make this work... not a new map format, but using a special SMT / SM3, then some LUA on top, which I think will run really fast, especially if it used fragment shaders. But it's a crazy idea, so lemme test it first before I waste your time :-)



[EDIT] The attachment is gone from your post :| I'll test this when I have a chance to download it...

Re: Map Drawing

Posted: 16 Mar 2008, 22:18
by user
expect another edit for the next version soon, there is some small changes i will make.

only power of 2 alpha textures will be allowed.
[EDIT] The attachment is gone from your post :| I'll test this when I have a chance to download it...


thats because i was updating it just when you came.
4. I'm not sure about deleting vertices, but meh, I'm probably just stupid about how what you're describing would work.
i mean deleting vertices that have a very low alpha value, that won't be seen in game, to make it run faster
3. It needs to render shadows. However, the SMT / SM3 formats already do that part, why do it again?
to render shadows, just add the draw world shadow call, then i think it should work.

Re: Map Drawing

Posted: 16 Mar 2008, 22:20
by Argh
Ok, I'll test this when I'm done with the normalmap demo. It'll be a few hours, and I'll check back here for updates when I'm done with that.

Re: Map Drawing

Posted: 17 Mar 2008, 00:13
by user
my plan on this is to make it use multiple layers, with multiple textures, defined in another pgm file.

by the way, found an error on the lua file i posted, the alpha map looks good, but it isn't, this will get fixed soon.

Re: Map Drawing

Posted: 17 Mar 2008, 09:07
by Argh
Can I have copies of the PPM files? I'd like to compare what you're doing with what I've been trying out.

Re: Map Drawing

Posted: 17 Mar 2008, 22:24
by user
wait for an update, it wont work in any way, that screen is wrong, it looks alright, but after some looking i found that it isn't.

i really can't find a good way to make it read the alpha correctly, i tried converting the number from a 0 to (mapx/detail) number to a 0 to alpha image x number, it converts alright, but the alpha values go all wrong.

i will try a new way i just found out.

Re: Map Drawing

Posted: 17 Mar 2008, 22:28
by user
the new way will work out like this:

after reading the image, it will use a box filter to resize the loaded image
to the number of vertices that will be drawn.

Re: Map Drawing

Posted: 18 Mar 2008, 22:42
by Argh
Ok, I'm I'll wait for an update. I tried something over here, it works, but in old Spring, it works really poorly, and in new Spring, it does something very screwy with the planes... :P

Re: Map Drawing

Posted: 18 Mar 2008, 23:08
by user
wait some more time for this, please, because i have to finish ribbon effects demo soon, i have a good plan for it.

map drawing is being made on spring 76b, because SVN spring doesn't works for me, always crashes when starting, that is bad, because i used to make my lua effects on the lastest revision.

next things for this, should be using a big texture instead of small per
quad texture.

by the way, what are the GL extensions required by height map texture? , looking on the code, i can see some extension names.

Re: Map Drawing

Posted: 01 Apr 2008, 00:38
by Forboding Angel
anyone going to do anything with htis?

Re: Map Drawing

Posted: 01 Apr 2008, 01:18
by Argh
It doesn't work yet, with SVN spring. I'm just waiting for all of User's stuff to reach final versions for now, I intend to use several of them in the World Builder demo...

Re: Map Drawing

Posted: 01 Apr 2008, 17:02
by user
anyone going to do anything with htis?
i will finish it soon, and it will allow doing alot of things, such as multiple layers, or multiple textures per layer, using different files.

this can be used for lots of awesome things, such as a new map format, ground decals, adding more detail on maps, maybe even reflective ground.
It doesn't work yet, with SVN spring.


post the results you get using SVN spring.
I'm just waiting for all of User's stuff to reach final versions for now, I intend to use several of them in the World Builder demo...
ground fog is final for now, and its new config has all that issues fixed, fog is final for now too, and i made some configs that make it look like real fog, rain is really good at the moment.

Re: Map Drawing

Posted: 07 Apr 2008, 10:35
by Forboding Angel
I don't suppose anyone would take this on anytime soon... We really really really need a more efficient map system.

Re: Map Drawing

Posted: 07 Apr 2008, 23:49
by user
do you really want this done soon?

Re: Map Drawing

Posted: 08 Apr 2008, 00:29
by user
the issue argh posted about this thing on SVN spring, will get fixed soon,
i finally got spring SVN executables working.

Re: Map Drawing

Posted: 08 Apr 2008, 06:19
by Forboding Angel
YAY!!!
I am farking DYING to get going on working with this system.