Duke4.net Forums: Scale - Duke4.net Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Scale

User is offline   Big Bene 

  • Youngloov

#1

A problem that I faced when restarting mapping, and that, according to the forum, many other mappers have, is scaling.

So I started to do some research and put together a few guidelines.

Warning! This is a work in progress. Most of it is what Wiki calls "original research" by myself, and I'm all but perfect. If you find errors, please tell me!

Units

Duke lives in a virtual world. There are no real feet or meters that translate directly to their real world counterparts.
One could, e. g., assume that Duke is around 6'3'' tall put everything in relation to his sprite, but this would be
1) an assumption from the beginning,
2) very inaccurate, given the resolution of the original sprite, and
3) totally artificial, as one would take a two-dimensional representation of a fictional character inside a 2.5-dimensional representation of a fictive world for real.

So we use units that are built into the game engine itself (occasionally giving some comparsion to reallife measurements).

Units of height
A central unit of high is the amount a sector rises up or sinks down when pressing the PageUp or PageDown keys in the editor 3D view. This is mostly referred to as "pu/pd unit" in this forum, I will use the even further abbrievated form "pud".
As a normal desk in the original game is 6 pud high and around 70 to 75 cm in real life, 1 pud equals roughly 12.5 cm or 5''.


Units of horizontal measurement (width and length)
A central unit of width is the grid in the 2D view window of the editor.
There are 6 grid scales in Build and 8 grid scales in Mapster32, plus 1 "Auto grid" mode.
I refer to the grid scales of Mapster32 (I assume that the build grid is the same, but I did not check).
Every grid size is half the size of the number before it, e. g. grid 5 has squares half the size of grid 4. Each grid size has a value in "units" which is displayed in Mapster32, Grid size 1 is 1024 units, grid size 5 is 64 units and grid size 8 is 8 units. These may be the basic units of the game engine, i. e. the "coordinates" of the sectors would be stored in computer memory in full numbers of these units (but I really dunno).
Grid size 3 (256 units) seems to have been used in the construction of many architectural features in the original game.


Units of texture measurement

with sprites and textures, the graphic pixels are a natural measurement.


Relations of units
All of the above is readily seen in the editor. Now to the really interesting questions. How do these units relate to each other and how should they be used in a map.

1 pud in height equals 1 grid square in grid size 5 (64 units) in width.

You can measure this by putting the same sprite on the floor and at a wall:
Posted Image
The pool table is 6 pud high. Behind the sprite on the floor, the same texture is used for a small sector with texure expansion bit on.


I. e. if you want to constuct a square shaped crate, and make it 10 by 10 grid units in grid size 6, it should be 10 pud high.

This also means 1 grid unit in grid size 6 translates roughly to 5'' in real life.


1 pixel = 1 square grid size 7 (16 units) when the texture expansion bit is off.
This means 1 pixel = 1 square in grid size 8 (8 units) when this bit is on.

I'm talking about floor or ceiling patterns here, because sprite and wall patterns can be scaled.
Most standard floor patterns are 64x64 pixels, equaling one grid square in grid size 2 (512 units) and 8 grid squares in grid size 6. This would mean a floor tile is 2.5 foot wide (4 floor tiles = 10'), which feels natural and fits the impression when viewing them in the game.


Measurements in the game

If we roughly equal 1 pud = 1 square grid size 5 with 12.5 cm, we can xxx

Normal doors in buildings are 16 pud high, same for elevator doors..

A normal room is 24 pud high (e. g. the rather rugged up flat in E1L2), a high room (e. G. the toilet in E1L1) is 32 pud high

A normal desk or table is six pud high (the desk in the cinema foyer in E1L1, the pool table in E1L2).
A fairly big table would be 2 or 3 squares wide and 4 or 5 squares long in grid size 3. The billiard table is actually 5 by 8 squares big, making it as big as many of the smaller rooms. Perhaps this was necessary to archive the billiard ingame effect.

The bed in the the abovementioned flat is 4 pud high.
The same bed is 3 by 5 squares in grid size 3.


Window sill 6 pud

The dustbin sprite as used in the original game equals 6 pud in high

The toilet sprite as used in the game equals 5 pud in high (the bowl), respectively 8 pud with the fittings.

This post has been edited by Big Bene: 07 July 2017 - 02:42 AM

0

User is offline   Daedolon 

  • Ancient Blood God

#2

I just stick with 1024 build units being 1 meter for a nice rough scale.
0

User is offline   Big Bene 

  • Youngloov

#3

Even this would have been a good advice for beginners to put into the manuals / tutorials.
Will include it into the first post.

This post has been edited by Big Bene: 05 July 2017 - 10:46 AM

0

User is offline   Big Bene 

  • Youngloov

#4

Umm...
rechecked...
are you sure you didn't mean 512 units = 1 meter?
0

User is offline   Hank 

#5

Here is an exhaustive scale approximation essay in Build mapping.

This post has been edited by Hank: 05 July 2017 - 02:59 PM

0

User is offline   Big Bene 

  • Youngloov

#6

 Hank, on 05 July 2017 - 02:58 PM, said:

Here is an exhaustive scale approximation essay in Build mapping.

That's a great source of info.
Somewhat different approach than mine, so I will continue.
Will include some data from Corvin where it fits, giving due credits.
1

#7

According to my experience, consistent scaling to about 400 units per meter gives fairly authentic level geometry (resulting in default texel size of 4 cm and one 'pud' being 16 cm). The only drawback is that Duke's collision box is a bit too wide as compared with his height.

This post has been edited by Jan Satcitananda: 07 July 2017 - 10:18 PM

0

User is offline   Mblackwell 

  • Evil Overlord

#8

x,y = px << 4
z = px << 8

carry on
1

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic


All copyrights and trademarks not owned by Voidpoint, LLC are the sole property of their respective owners. Play Ion Fury! ;) © Voidpoint, LLC

Enter your sign in name and password


Sign in options