New 3D AAmap Previewer!

General Stuff about Armagetron, That doesn't belong anywhere else...
Post Reply
Durf
Match Winner
Posts: 426
Joined: Mon Jul 30, 2012 10:35 pm

New 3D AAmap Previewer!

Post by Durf »

Hi everyone!

For those who have been waiting; here's the new 3D AAmap Previewer!
I kinda just threw it together real quick, so if I missed something, or there is a bug, I'm sorry and please let me know!

What's different about this new one? (from the old one found on the durf.tk homepage)
- No dtd required
- accurate map walls!
- zone colors (supports 20 zone types; and colors fort/flag zones like it does in game)
- better browser support! (should work in just about everything - no promises for IE 8 or less)
- canvas fallback (if you don't support WebGL / GPU accelerated graphics, you can use the CPU canvas)
- axes / position indicator (right underneath the camera, on the grid)
- size factor! (detects size factor settings in the map file and displays like it would in-game)
- probably lots more that I forgot to mention.

This should support all maps for all tron versions under 0.4. (supports 0.2.9sty+ct+ap, but not 0.4)

If you see a triangular notice on the right-hand side, it means that you aren't using WebGL and you're running off the CPU.
To fix this, make sure you have the latest version of your browser, and that you have the latest version of your video card driver.
If you already have the latest of everything, then there are some development options in chrome you can forcibly turn on to increase the FPS you can get (should you need it).
Basically, for chrome it means going to "chrome://gpu" to check what is enabled; and "chrome://flags" to change anything labeled 'GPU accelerated ...' or 'hardware acceleration ...' to 'enabled', and that should turn on WebGL.

Oh and did I mention that there is a textarea that you can EDIT?
Yup, technically speaking it's also an editor!
I have no clue what armabell is like, and I wasn't really trying to make an editor.
So this basically relies on your knowledge of aamap xml markup.


So first thing you'll see is that welcome popup:
You can simply close it if you want, or choose to open a file from there.

Camera controls:
WASD (or arrow keys) to move
Q & E to adjust altitude
F to freeze the camera position
G to toggle the grid floor on & off (for better FPS)
Use the mouse to rotate the camera and look around (pan & tilt)

Keep in mind that these controls are much like a 'first person shooter' game's controls with the "no clip" option on.
Meaning the movement you take is relative to your old position / orientation; example:
If you are facing forward, and press Q, you will stay at the same X and Y position in the map, but go vertically higher (altitude).
But, if you were facing down (top-down view) and pressed Q, you would travel FORWARD without actually increasing your height (relative to you, its 'up', but to the map its forward).


If you have any questions, comments, suggestions, etc..
Feel free to email me, PM me, or respond here to this thread.

Again, it can be found at: http://durf.tk/3d
Enjoy! :]

P.S - Are the buttons too transparent? They are opaque when you hover over them, but I'm talking about just on their own..they're not too invisible are they? Hard to tell on some monitors; let me know!
User avatar
sinewav
Graphic Artist
Posts: 6413
Joined: Wed Jan 23, 2008 3:37 am
Contact:

Re: New 3D AAmap Previewer!

Post by sinewav »

Armabell was a bit junky, so you aren't missing anything. I will say GZ to you, this is a fantastic effort. Yes, the buttons are too dark. Possible improvements: put a legend with the keyboard controls on the screen and add a light source so walls have definition. Keep up the good work.
Attachments
3d-pview-1.png
Durf
Match Winner
Posts: 426
Joined: Mon Jul 30, 2012 10:35 pm

Re: New 3D AAmap Previewer!

Post by Durf »

Thanks for the feedback!

Yes I had plans to do much more with it; including a light source and perhaps even using the actual game's textures! We'll see how it goes. As it is now, there is no "light source" and no computations are done for that (for better FPS).

There is a legend with keyboard controls, but you must click the "Help" button to see them.
I didn't want to clutter up the screen..

I noticed in your photo you were getting 15 fps. But you didn't have the WebGL notice.
If you are on chrome, try "chrome://gpu" in your address bar to see if you have hardware acceleration enabled.
You can enabled your GPU acceleration options in "chrome://flags" and re-launch chrome to take effect.
There's a few settings for GPU acceleration but once I turned them on, I get around the same FPS as I do for Armagetron!

Else you can re-size the window (or make sure the grid display is off) for better fps.

Not a big deal I guess, but it looks smoother with more fps ;D

I'll post back here when I've adjusted the transparency.

But for now, there are 5 buttons along the top-left:
Open, Map Info, XML Source, Help, About

Also, in the bottom right, you can "Toggle Grid"....for those who couldn't see the buttons.

Glad you liked it.
If anyone wants this integrated into their public resource (bunch of links to preview your maps in 3D, or 2D) send me a PM or an email and well figure it out ;o


P.S - here is a map file with a good example of different wall heights: http://durf.6te.net/arma/resource/Durf/ ... .aamap.xml right click and save as, or copy over the source code in the previewer to see.
There's a castle in it, and my attempt at remaking a light cycle out of rim walls ;o
User avatar
Tank Program
Forum & Project Admin, PhD
Posts: 6711
Joined: Thu Dec 18, 2003 7:03 pm

Re: New 3D AAmap Previewer!

Post by Tank Program »

Epic! Very cool stuff going on there.
Image
Durf
Match Winner
Posts: 426
Joined: Mon Jul 30, 2012 10:35 pm

Re: New 3D AAmap Previewer!

Post by Durf »

Glad you liked it!

I have since changed the default opacity of the buttons; should be better (but still transparent enough to be ignored).

Also just a quick note about my earlier posts:
The developer page I mentioned is not "chrome://flags" but rather it is "about:flags".
Sorry for the confusion. Feel free to contact me should you need help getting max FPS in the browser.


Furthermore, the Durf.tk homepage has been given a small update!
Bonus tools were added, and links have been updated for the latest release of each tool!
Some more major updates are on the way so, only a small update for now.


But back on topic:
Thanks again for the feedback!
Glad you like!
I hope this 3d previewer / editor serves many of you well in the future ;D
User avatar
Matoso
Average Program
Posts: 56
Joined: Sun Nov 22, 2009 8:10 pm

Re: New 3D AAmap Previewer!

Post by Matoso »

great work durf!
keep it up!
Albert Einstein wrote:"Only two things are infinite, the universe and human stupidity, and I'm not sure about the former."
Image
User avatar
Titanoboa
Reverse Outside Corner Grinder
Posts: 1795
Joined: Sun Feb 22, 2009 8:07 pm

Re: New 3D AAmap Previewer!

Post by Titanoboa »

Cool stuff!

I'd personally prefer using WASD to move, and ↑←↓→ to turn. Better control, I'd imagine. I guess you could combine it: both the arrow keys and the mouse turn by default, with an option for disabling mouse control.

It's pretty awesome though. Although unlikely, if I ever make maps again, I'll be using this. (I used to simply write the map files myself. As I understand it you can do that here, with the slight improvement that there's a 3D preview one click away :D)
Durf
Match Winner
Posts: 426
Joined: Mon Jul 30, 2012 10:35 pm

Re: New 3D AAmap Previewer!

Post by Durf »

Thanks Matoso, will do ;)
Titanoboa wrote:Cool stuff!

I'd personally prefer using WASD to move, and ↑←↓→ to turn. Better control, I'd imagine. I guess you could combine it: both the arrow keys and the mouse turn by default, with an option for disabling mouse control.
Interesting...I'd have to make a few additions to the code, but I could add that functionality in a future version.
We'll see ;) good suggestion. (I'm putting this project aside for now since it works fine as it is, so not too too soon; got a couple other things I wanna do first...it's been noted)
Titanoboa wrote:It's pretty awesome though. Although unlikely, if I ever make maps again, I'll be using this. (I used to simply write the map files myself. As I understand it you can do that here, with the slight improvement that there's a 3D preview one click away :D)
Exactly right :D
Awesome that you think its awesome :P
Post Reply