|
-
Oct 15th, 2000, 12:17 AM
#1
Thread Starter
Frenzied Member
Does anyone here know some math or where I could get the math for making pictures looking like they had a perspective?
(little bit like texturing, but only in an own graphics program?)
Sanity is a full time job
Puh das war harter Stoff!
-
Oct 15th, 2000, 08:30 AM
#2
Frenzied Member
I don't understand what you mean. Do you mean like drawing a cube with lines so that it has some perspective? Only with more complicated stuff.
Harry.
"From one thing, know ten thousand things."
-
Oct 15th, 2000, 09:40 AM
#3
Thread Starter
Frenzied Member
No, not more complicated at all!
I only want to have pictures between the lines, like texturing, but I want to know how to calculate how I can give perspective to the pictures.
Sanity is a full time job
Puh das war harter Stoff!
-
Oct 15th, 2000, 10:10 AM
#4
Hyperactive Member
Does the bitmap need to be altered?
With respect to distance from point of origin I mean.
I think I have a good book that will help in either case.
But with your knowledge of DirectX, I presume you only need
help in working out the modified shape of the region you
want to stretch a texture over?
I'll see what I can find in a couple of hours when I get to work.
Cheers
-
Oct 15th, 2000, 01:28 PM
#5
transcendental analytic
Hey, it's ok, he got my 3disotiler project for sloped tiles
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Oct 15th, 2000, 03:24 PM
#6
Hyperactive Member
Ok...saves me looking it up then
-
Oct 15th, 2000, 06:08 PM
#7
Thread Starter
Frenzied Member
NO! I still need some other stuff! PAUL!!! The tiler is a nice piece of programming, I want want some more stuff in my program. So I still need advice!
Thanks!
Sanity is a full time job
Puh das war harter Stoff!
-
Oct 16th, 2000, 03:42 AM
#8
transcendental analytic
Aye, theres a problem with my tiler too, when i tried to extrapolate it to work for all size tiles, then something screwed up, it works only for 32*32 -> 64*32 tiles.
Hehe, paul look it up for me too
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Oct 16th, 2000, 03:44 AM
#9
transcendental analytic
Another thing
BTW, if you find something about smooth slopes, like you have in the elevations in Settlers2 or 3, i would be interested in that too
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Oct 16th, 2000, 04:54 AM
#10
Hyperactive Member
How many points of perspective?
and how many dimensions is the object? From the fact that it is a tile game I assume 2-D tiles and 1 or 2 points of perspective?
Regards
-
Oct 16th, 2000, 08:43 AM
#11
transcendental analytic
I'm not sure how to interpret your qwestion so i'll tell you instead what i'm doing (yeah, and Misantrop needs it too)
Each tiles can be elevated one step, that means we have two digit tiles, one level of slope. There are 4 corners so we need 2^4 = 16 different slopes for each tile, here's an example:
http://www.geocities.com/kedasu/isotiler.jpg
Then when the horizontal corners are in a different elevation, the stretch will be done by left and right part independently, creating a line in the middle
And when the vertical corners are in a different elevation, the top and bottom are stretched independently.
WEll that's the kind of elevation you have in TRansport tycoon or Tiberian Sun, In settlers you will have 4 levels of elevations and the last and first one starts a slope up or down. That means 2*3^4 = 162 types of slope (yeah they are hexagonal so you have two types of triangles)
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Oct 16th, 2000, 09:45 AM
#12
Thread Starter
Frenzied Member
Hey Paul
Hm sorry, but I really got some Problems with understanding your question. In general I want the same thing like kedaman.
Except I want something more. On a normal Slope-tile in ISO I also want the hmmm Triangle that is also visible if there is nothing in front of it. When I'm home again, I'll send you an email with a handdrawn Paintbrush graphic, that will show to you what I mean.
Let us say every tile is cut of a 3D cube. So if you see the slopething you should also see two side, that were already on the cube.
Hope you understood this
CU
Sanity is a full time job
Puh das war harter Stoff!
-
Oct 16th, 2000, 04:09 PM
#13
Hyperactive Member
Errr...
Yeah, guys I think I was looking at it rather more methematically and not so functionally. What I mean is, I was thinking of how to draw an object on paper in perspective. You guys are far more switched into the application of the drawn tiles into a game. You both know far more about it than I probably ever will.
I think my question should be ignored because I was definitely thinking in terms of a 3D model being projected onto a plane with 1, 2 or 3 vanishing points.
From the example you gave kedaman, I now understand the term ISO (isometric right?) and in the context of the topic, I don't know if perspective is the right term for the technique used to generate the tiles. What you are actually doing it seems to me is translating one of the corners by a preset elevation (plus and minus). The same effect can be generated using 2 vanishing points and a perspective projection but I admit I have not done this personally in an application. I have a very good book here that might help so I can send some sample code soon if you like.
I fear though, that it will not help a great deal...
Regards
-
Oct 16th, 2000, 05:25 PM
#14
Thread Starter
Frenzied Member
Would be nice if you'd give it a try!
I have really some troubles doing this stuff!
Man where dou you have all those books from!!!
Thanks
Sanity is a full time job
Puh das war harter Stoff!
-
Oct 16th, 2000, 05:48 PM
#15
transcendental analytic
Yeah, look it up and see if you find something!
WEll it wasn't my word either, that perspective, but isometric is kind of a perspective. But that's not the point, the point is to generate the smooth elevation,like calculated by a generic formula or something.
Thanks
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Oct 16th, 2000, 05:57 PM
#16
Monday Morning Lunatic
I saw this somewhere:
x_screen = x_obj / z_obj
y_screen = y_obj / z_obj
where the object coordinates have already been transformed into eye coordinates.
[Edited by parksie on 10-16-2000 at 07:00 PM]
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Oct 16th, 2000, 06:06 PM
#17
Member
"Perspective" is incredibly vague
There are way too many perspectives to just say "perspective" in a question like that! Some examples:
-Tile, z ignored (2D)
Examples: Mario Brothers
Code:
screenx = x
screeny = y
-Isometric 3/4 view.
Examples: X-COM, Sim City 2000
Code:
screenx = (x - y) * half_of_width
screeny = (x + y) * half_of_height_minus_one - z * zheight
-Isometric slanted z view
Examples: X-COM bases, Battle Tech: The Crescent Hawks' Inception / The Crescent Hawks' Revenge (ancient games, both!)
Code:
screenx = x - z
screeny = y - z
-Isometric z vertical
Examples: Early Final Fantasy games, EMail XCOM
Code:
screenx = x
screeny = y - z
-3D perspective view
Code:
'Assuming about 90 degree FOV
'Note that y * halfofviewwidth is *not* a typo
screenx = (x * halfofviewwidth) / z + halfofviewwidth
screeny = (y * halfofviewwidth) / z + halfofviewheight
There are way more, but ...
-
Oct 17th, 2000, 07:23 AM
#18
transcendental analytic
I thought Early Final Fantasy versions were top-down
I'm looking for Settler2/3 slopes you know, they are curved with a math formula like Bezier or something.
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Oct 17th, 2000, 01:23 PM
#19
Hyperactive Member
I'm trying
I'm trying to do up a test app to allow you to easily
experiment with transformation code on wireframe grids.
I'll be happy when I can get the simple spherical elevation
model up and running. then I might actually try and make
the elevation look realistic..
I would probably go for a stretched sine wave (or cosine
depends on the direction). But if there is already an
agreed standard to get "realistic" looking slopes then let
me know.
Cheers
-
Oct 17th, 2000, 05:24 PM
#20
Thread Starter
Frenzied Member
Paul! You are so far beyond me! I was thinking a just a little bit perspective, and you do realistic slopes! If you get it really to work. I mean it connects to other tiles, ti would be just great!!
I was looking for a possibility to make something that gives me tiles like used in Sim city 2000 or Transport or Rollercoaster Tycoon.
Thanks
Sanity is a full time job
Puh das war harter Stoff!
-
Oct 17th, 2000, 05:51 PM
#21
Hyperactive Member
hehe
Wait till you see the sample I sent you. You won't be
thinking I'm advanced after that. I am struggling to
understand how the tiles will match up. At present, my
sample doesn't care about the edges matching up because I
only give you a wireframe view of a single matrix of points
(connected by lines). It should give you an idea I hope of
how to (or not to) render the tiles in order to give the 3-
D effect.
Oh, and my sample is not in isometric view either - it's
merely a square shape 
I'll wait to see how you get on.
Regards
-
Oct 17th, 2000, 06:19 PM
#22
Thread Starter
Frenzied Member
Hehe I already saw your mail!!! That's why I wrote that you are ahead of me!!!!!
Cu
Sanity is a full time job
Puh das war harter Stoff!
-
May 12th, 2001, 06:12 AM
#23
Hyperactive Member
Wire Frame
If you want fast simple 3-D, goto the thread CHeap 3-D and download the file
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|