DM perspective

Questions about how to create your own dungeons and replacement graphics and sounds.

Moderator: George Gilbert

Forum rules
Please read the Forum rules and policies before posting.
User avatar
linflas
My other avatar is gay
Posts: 2445
Joined: Tue Nov 04, 2003 9:58 pm
Location: Lille, France
Contact:

DM perspective

Post by linflas »

i'm trying to code a(n impossible) tool that would generate automatically RTC wallset bitmaps from a real 3d scene : walls and planes first, stairs and alcoves later.
but i cannot get a real 3d scene that fits correctly DM perspective .. i use Zyx's bitmap has a layer and try to move cubes by hand and extract coordinates... quite long and finally not possible, because this perspective doesn't seem correct : anyone could confirm this ?
Tom Hatfield
Ee Master
Posts: 688
Joined: Mon May 07, 2001 7:00 pm
Location: Indiana, USA
Contact:

Post by Tom Hatfield »

Makes sense. The graphics for DM were hand-drawn and may not be physically accurate.
User avatar
Gambit37
Should eat more pies
Posts: 13720
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Post by Gambit37 »

You can force any perspective you want using arbitrary one-point perspective which is what is in use in DM.

It's one reason why all the 3D clones don't look "right" -- ie, they don't look like DM, even though they are probably more accurate in real-world terms.
User avatar
linflas
My other avatar is gay
Posts: 2445
Joined: Tue Nov 04, 2003 9:58 pm
Location: Lille, France
Contact:

Post by linflas »

so i must find a way to 'distort' my 3d scenes..

*brain heating*
User avatar
Gambit37
Should eat more pies
Posts: 13720
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Post by Gambit37 »

I'm no expert in this. Cow or Tom should be able to offer you better advice.
User avatar
linflas
My other avatar is gay
Posts: 2445
Joined: Tue Nov 04, 2003 9:58 pm
Location: Lille, France
Contact:

Post by linflas »

well i think i'm getting lucky : i found the right position for camera, 2.6 meters ! :D
Image

i can move the cube wherever i want, and it fits almost perfectly :
Image
Tom Hatfield
Ee Master
Posts: 688
Joined: Mon May 07, 2001 7:00 pm
Location: Indiana, USA
Contact:

Post by Tom Hatfield »

I don't think I can really help. Linflas seems to have solved the problem, but I thought it might be worth mentioning (for future developers) that another reason DM is difficult to imitate is because there are a couple feet of ground visible at the bottom, and the perspective doesn't really lend itself to this. When you move the camera back farther to capture this ground, you tend to push it outside of walls, and if you adjust the field-of-view, your perspective gets messed up.

I'm rather surprised linflas found a solution at all; I'd always assumed the perspective was inaccurate for the sake of atmosphere. So that "cube" looks more like a 5x5x4 box. Is that about right?
User avatar
Sophia
Concise and Honest
Posts: 4240
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Post by Sophia »

What are you using to render the 3d scene? :)
User avatar
linflas
My other avatar is gay
Posts: 2445
Joined: Tue Nov 04, 2003 9:58 pm
Location: Lille, France
Contact:

Post by linflas »

Tom wrote:So that "cube" looks more like a 5x5x4 box. Is that about right?
you're right, it's not a cube. it's a 5x3.4x2 box !!! :shock:
in fact the whole scene is not possible in 3D, but it works perfectly to make 2D bitmaps :)

@sophia : this is blitz basic 3D engine (code is about 150 lines long).. and now i have stairs !

Image
User avatar
linflas
My other avatar is gay
Posts: 2445
Joined: Tue Nov 04, 2003 9:58 pm
Location: Lille, France
Contact:

Post by linflas »

oh no ! more... problems !

I should have been warned with Gambit's post about pits in 'RTC bugs' : I used Zyx's "zones.gif" bitmap as a layer, which means CSBwin perspective... not RTC.
I thought i could make a tool that works for both of them...
:cry:
User avatar
PaulH
Ghastly gastropod
Posts: 3763
Joined: Wed Aug 07, 2002 10:27 pm
Location: Level 6

Post by PaulH »

A view from somebody who doesn't really know what they are talking about...

The resolution of these pics looks fantastic compared to what we are used to. However this makes the very straight edges of the walls, briks, tiles, stairs etc look a little false. I don't know of this can be overcome easily, but it would certainly complement the above graphics if we had a few crumbling edges etc
User avatar
Gambit37
Should eat more pies
Posts: 13720
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Post by Gambit37 »

Yep, you can do that using transparent areas. I have some nice samples working in a test dungeon, but it's not for public viewing for quite some time yet...
User avatar
linflas
My other avatar is gay
Posts: 2445
Joined: Tue Nov 04, 2003 9:58 pm
Location: Lille, France
Contact:

Post by linflas »

this tool is made to gain some time. i think all bitmaps can/should/must be remodified manually : for example, a completely flat grass textured floor won't be very realistic.

i'm thinking of adding a 'custom mesh' option for wall decorations such as key locks, torch holder,... you place it where you want in the scene and move the camera to the correct positions for grabbing.

but at the moment, i must recalculate tiles width and depth for RTC perspective... in RTC, you see further than in CSBwin.
User avatar
Wismerhill
Apprentice
Posts: 52
Joined: Tue Jan 04, 2005 5:51 pm
Location: Paris 11e, France.

Post by Wismerhill »

linflas wrote:
Tom wrote:So that "cube" looks more like a 5x5x4 box. Is that about right?
you're right, it's not a cube. it's a 5x3.4x2 box !!! :shock:
in fact the whole scene is not possible in 3D, but it works perfectly to make 2D bitmaps :)
Hi Linflas,
Could you elaborate on that ? I don't understand the issue at hand. Do you mean the boxed walls are not perfect cubes ? Is it that the boxes' dimensions are relative to the camera position ? Thanks for any insight on this.
Wismerhill.
User avatar
linflas
My other avatar is gay
Posts: 2445
Joined: Tue Nov 04, 2003 9:58 pm
Location: Lille, France
Contact:

Post by linflas »

i don't know if what i made is correct or not, i found the values by experimentation :
- i place floor plane at height 0 and camera at 2.6 (a clever guy told me it was the correct value... probably a real coder...)
- make a 1,1,1 cube, scaled it to a big height
- created a roof and searched its height by moving it by hand and comparing the top of the 'cube' to Zyx's 2D zones bitmap : found 3.4
- scale my cube to 3.4x3.4x3.4 : too large, too deep = not correct with 2D bitmap
- scale cube to 5x2 and it fits !

but definitely not in RTC perspective...

Image
User avatar
George Gilbert
Dungeon Master
Posts: 3022
Joined: Mon Sep 25, 2000 11:04 am
Location: London, England
Contact:

Post by George Gilbert »

That's interesting. RTC takes its perspective from DM (all the wall bitmaps line up exactly - a screenshot of DM and a screen shot of RTC are identical).

CSBWin obviously takes its perspective from CSB. Given that we know that the pits are different and the floor bitmap doesn't go as far back either, it looks like there is a genuine difference between the two original games!

From a more practical point of view - which should be "correct".
User avatar
linflas
My other avatar is gay
Posts: 2445
Joined: Tue Nov 04, 2003 9:58 pm
Location: Lille, France
Contact:

Post by linflas »

that is weird, i always thought CSB and DM had exactly the same game display !
btw George, i did this RTC schema from screenshots, pasting on them bitmaps from the 'SAND' example and i have to stop my development for now : DM perspective seems impossible to reproduce in 3D, while CSB's does it well.
and my tool was made for RTC...
User avatar
Wismerhill
Apprentice
Posts: 52
Joined: Tue Jan 04, 2005 5:51 pm
Location: Paris 11e, France.

Post by Wismerhill »

By 5x3.4x2, do you mean width x height x length ? If yes, I understand that the cubes are sized according to the camera position, which makes sense.

I was about to start a 3d renderer prototype to later replace the DMJava original 2d one, you just made me save a lot of time on this perspective stuff ;) Also, I think I prefer the RTC perspective which seems to extend farther.

Linflas, do you plan to model some meshes ? Could you be interested in some kind of collaboration between us ? You seem to be quite versed in gfx stuff, unlike me *cough*.
Wismerhill.
User avatar
Gambit37
Should eat more pies
Posts: 13720
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Post by Gambit37 »

I distinctly remember an interview with the FTL team from an Amiga mag, where they stated that for CSB "the view has been widened".

I've just had a quick look at some of the versions of the graphics to see what's going on.

The Amiga and ST version of CSB share the same wall images as the PC version of DM. They work very diferently from the original DM images in the ST/Amiga versions.

The original DM/ST images seem the same in most early versions. They all have the 'lip' graphic on the pits.

There are lots of other variations betwene versions. I have to be off now, but I'll investigate this more and post back with my results.
User avatar
linflas
My other avatar is gay
Posts: 2445
Joined: Tue Nov 04, 2003 9:58 pm
Location: Lille, France
Contact:

Post by linflas »

Wismerhill wrote:By 5x3.4x2, do you mean width x height x length ?
yes... les cases par terre font 5 de longueur sur 2 de profondeur ;)
Wismerhill wrote:I was about to start a 3d renderer prototype to later replace the DMJava original 2d one
i had the same idea when i started coding my tool and i reproduced the classic DM movement to check if the rendered scene would fit correctly.
i think your 3d rendered engine is quite easy to do in theory : camera should stay in place and 3d objects will replace 2D bitmaps in front of it.
Wismerhill wrote:Linflas, do you plan to model some meshes ? Could you be interested in some kind of collaboration between us ?
of course i'm ok for collaboration, but about 3d stuff i think i can make small things like swords but that's all i know ! :(
ok i admit i made some modeling with zbrush2 but i don't think those meshes can be used in a realtime 3D engine...
User avatar
ChristopheF
Encyclopedist
Posts: 1544
Joined: Sun Oct 24, 1999 2:36 pm
Location: France
Contact:

Post by ChristopheF »

An additional information: if you extract the content of the graphics.dat file of DM for Atari ST v1.2 and DM for PC v3.4, there are differences in the wall images.
For example, in the ST version, there are 4 masks (items 0069 to 0072) and in the PC version, there are 6 masks (0070 to 0075).
Some images have been "split" in newer versions: the equivalent of image 0086 in the ST version (showing a wall at distance 0 with both sides) is made of 3 images in the PC version (0095 to 0097).

This clearly shows there were some changes in the way walls are managed. It would be interesting to compare this in ALL versions of DM /CSB.
User avatar
Wismerhill
Apprentice
Posts: 52
Joined: Tue Jan 04, 2005 5:51 pm
Location: Paris 11e, France.

Post by Wismerhill »

Thanks Linflas, I'll get back to you later about that (still a lot of low level code to do...).

I really didn't know that DM/CSB have been so tweaked regarding the graphic rendering.
Wismerhill.
User avatar
Adamo
Italodance spammer
Posts: 1534
Joined: Fri Apr 22, 2005 11:59 am
Location: Poland
Contact:

Post by Adamo »

strange. Sorry for my ignorance: are the wallset bitmaps identical in DM and CSB, but used in a bit different way?
If you would use CSB system of displaying wallsets in RTC (instead of DM system), then the wiewport would be different?
If so, should I paint wallsets in a bit different way for CSBwin and for RTC?
Spoiler
(\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/)
Spoiler
(@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@)
Spoiler
(>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<)
User avatar
linflas
My other avatar is gay
Posts: 2445
Joined: Tue Nov 04, 2003 9:58 pm
Location: Lille, France
Contact:

Post by linflas »

same question for me, but i think -most of- bitmaps are common to both games and placement seems to be the same for first and second rows.
that's also why i think RTC/DM's perspective isn't possible in a 3D environment while CSB's persective seems realistic.. but i must investigate a bit more with my tool.
User avatar
George Gilbert
Dungeon Master
Posts: 3022
Joined: Mon Sep 25, 2000 11:04 am
Location: London, England
Contact:

Post by George Gilbert »

I've been looking at this some more, and it seems that the complete set of wall graphics have been redrawn.

For example, if you have a look at even the wall directly infront of the party, in the top row of "bricks", in DM there are two whole ones, but in CSB its a half / whole / half combination...
User avatar
linflas
My other avatar is gay
Posts: 2445
Joined: Tue Nov 04, 2003 9:58 pm
Location: Lille, France
Contact:

Post by linflas »

thanks for the info, but the fact is DM perspective is technically impossible to reproduce in 3D. i tried many combinations between camera height, floor and roof, 3D walls positions but nothing worked.
i guess my tool (if i can finish it) will only be able to create CSB perspective wallsets and so, offsets values won't be the same as in RTC... and i don't know if pits, stairs, monsters and items will be correctly positionned when you play the game.
User avatar
George Gilbert
Dungeon Master
Posts: 3022
Joined: Mon Sep 25, 2000 11:04 am
Location: London, England
Contact:

Post by George Gilbert »

I'm currently in the process of converting RTC to use the CSB perspective - so this should be in V0.35.
User avatar
linflas
My other avatar is gay
Posts: 2445
Joined: Tue Nov 04, 2003 9:58 pm
Location: Lille, France
Contact:

Post by linflas »

halleluyah ! gloria to GG ! :D :D :D
User avatar
George Gilbert
Dungeon Master
Posts: 3022
Joined: Mon Sep 25, 2000 11:04 am
Location: London, England
Contact:

Post by George Gilbert »

OK - this is now done for V0.35.
User avatar
Gambit37
Should eat more pies
Posts: 13720
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Post by Gambit37 »

Did you change the main walls to match the CSB arrangement?
Post Reply