EQ2Interface.com
Search Downloads


Go Back   EQ2Interface > Featured Projects > EQ2MAP

Reply
Thread Tools Search this Thread Display Modes
  #1  
Unread 08-22-2005, 10:06 AM
SaintPeter's Avatar
SaintPeter SaintPeter is offline
A Griffon
This person is a EQ2Map developer.
Interface Author - Click to view interfaces
 
Join Date: Nov 2004
Server: Guk
Posts: 536
Default Mapping in 3d with PovRay

One of the things that can be very frusturating when dealing with multi levelmaps is the difficulty of visualizing how the different levels fit together. Luckily, we have a complete set of points in all 3 dimensions so it is possible, with the right script, to draw the lines in 3D for better visualization.

PovRay
Persistance of Vision Ray Tracer is an open source, procedural ray tracer. It uses a 'C' like language to describe the scene it is rendering. It also allows for animation and has a large number of other advanced rendering features.

Mapper3d
Since PovRay, like SVG, uses a text file with descriptive syntax, it is trivial to modify the existing mapper Perl script to output to a POV compatible syntax. The resulting data file can then be "included" into a POV scene file and rendered.

The attached .zip contains 3 files:
mapper3d.pl -- The script that turns a log file into 3d points
3d_map.pov -- The overall scene file, with light and camera controls
map_data.pov -- A sample data file from caoimhin's Solusek Eye data

Camera Control
From 3d_map.pov:
Code:
object {
union {
#include "map_data.pov" 
}
 
} 
 
camera {
location my_look_at - <0,-300 + (clock * 300),-600>
direction 1.5*z
right	 x*image_width/image_height
look_at my_look_at - <150,0,0>
}
Mapper3d generates a variable "my_look_at", which is a 3d vector for the center of the viewable map. I use this as a basis for where the camera is located and pointing, by subtracting another vector from it.

It can be a little frusturating initially to determine exactly what you're looking at. You'll need to putz with the offset vectors until you can recognize the scene.

Animation
Even with a 3d view, it's not always obvious what portions of the wireframe overlap. You can use PovRay to produce a series of frames as an animation.

To do animation, any of the variables can be adjusted by the value of "clock", which sweeps from 0 to 1 over the number of defined frames. As above, <0,-300 + (clock * 300),-600> evaluates to <0,300,-600> at the first frame (Clock = 0) and <0,0,-600> at the last frame (clock = 1), with intermediate values for each succesive frame inbetween, IE: <0,150,-600> half way through the animation. This moves the position of the camera down.

Note that PovRay does not output an animation, only single frames. You'll need to use something like Imageready or Animation Shop Pro to stitch them together.
Attached Thumbnails
Click image for larger version

Name:	SE_Combo_07.png
Views:	292
Size:	2.3 KB
ID:	3487  
Attached Files
File Type: zip mapper3d.zip (24.6 KB, 206 views)
__________________
Reply With Quote
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 11:11 PM.


Our Network
EQInterface | EQ2Interface | WoWInterface | LoTROInterface | ESOUI | MMOUI