Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / positioning the center of a 3d screen

Author
Message
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 27th Aug 2004 21:56
Hi All

i am trying to get the center of my 3d screen to move to one 1/4 of the screen like so.
------------------------------------------
| 3d | |
| bit | 2d |
| centred | part |
| | |
| | |
| | |
|----------------------| |
| |
| |
| |
------------------------------------------

think that explains what i am saying,I want it so that if i put a 3d cube in the center of that part of the screen it will look flat, move it up or down a bit and it becomes 3d.

Using the pong demo bit two bat and the ball, I can move it around the screen but can't get the flat look like when it's in the center of the screen.

Or did I miss a command in the book help files?

In Space No One can Hear You Scream! (When your comm Line is cut?)
GameKit
21
Years of Service
User Offline
Joined: 6th Mar 2003
Location: USA, Staring Blankly at a Computer
Posted: 27th Aug 2004 23:22
Ummm... I'm not completely sure what you are asking, but if you want the Sphere to look flat why don't you just scale it so it is...

Scale Object 3,100,100,1

This should "Flatten" the ball so it appears two dimensional...

Well... I hope I helped...

The computer isn't an addiction, its more of a mental and social dependancy.
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 28th Aug 2004 01:02
opps just looked at me post didn't come out how I wanted.

*=a spaces

--------------------------------------
|*******************|****************|
|*******************|****************|
|*******************|****************|
|******====*********|****************|
|******====*********|****************|
|******====*********|****************|
|-------------------|****************|
|************************************|
|************************************|
|************************************|
|************************************|
--------------------------------------

Top left part of screen is say a window looking at the outside world rest of the screen is my control planel.

If I put a cube on the screen in the center its flat, now i would like to move it to the center of the window and still have it look flat.

dose this help explain what I am trying to do.

In Space No One can Hear You Scream! (When your comm Line is cut?)
SandraD
20
Years of Service
User Offline
Joined: 30th May 2004
Location: Down on the corner, out in the street.
Posted: 28th Aug 2004 01:06
Are you perhaps speaking of the object screen x() and object screen y() commands?

Any truly great code should be indisguishable from magic.
SandraD
20
Years of Service
User Offline
Joined: 30th May 2004
Location: Down on the corner, out in the street.
Posted: 28th Aug 2004 01:10
Oh wait a minute! I think I get it now...

You're trying to shift the center of projection from the center of the screen to the center of your window!

Alas, I don't have a clue as to how to do this, but perhaps that statement will allow someone else to understand and help.

good luck!
S.

Any truly great code should be indisguishable from magic.
Philip
21
Years of Service
User Offline
Joined: 15th Jun 2003
Location: United Kingdom
Posted: 28th Aug 2004 01:24
HowDo, one way to achieve this is to change the area of the monitor screen to which the default camera (camera number 0) draws. Have a look in your manual at the section on Camera commands. I believe the relevant command is a set camera command.

The problem with this method is that all 3d objects are only drawn to that section of the screen. The result is that if you want to use 3d objects on the rest of the screen (the control panel area), you won't be able to do so.

If you do want to achieve this, the answer is slightly more complex. You will need to create a second camera and tell it to only draw in that top left section of the screen. The main default camera can be left to continue to draw to the whole screen (the second camera will overwrite the default camera for the top left hand corner of the screen). To achieve this you will need to use the make camera command to create the second camera and the set camera commands to set up the second camera to only draw to the relevant area of the screen.

Hope this is helpful.

Philip

What do you mean, bears aren't supposed to wear hats and a tie? P3.2ghz / 1 gig / GeForce FX 5900 128meg / WinXP home
SandraD
20
Years of Service
User Offline
Joined: 30th May 2004
Location: Down on the corner, out in the street.
Posted: 28th Aug 2004 01:45
Thanks Philip... I just looked up the same command.

In my DBC it's "set camera view left, top, right, bottom" where you specify the window where all 3D drawing takes place in screen coordinates.

S.

Any truly great code should be indisguishable from magic.
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 28th Aug 2004 01:48
sweet.

(keeps this in mind )


DBP_NETLIB_v1.4.3 DarkTOPIA - September 2004
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 28th Aug 2004 20:45
Cheers to all who answered above, yep right use of wording gets what I was asking for.

Now to spend the weekend making it do the job

In Space No One can Hear You Scream! (When your comm Line is cut?)
Radio Check
20
Years of Service
User Offline
Joined: 18th Aug 2004
Location:
Posted: 29th Aug 2004 00:00
OK, that's cool... now, can you do two cameras?

Making a cool sig is just too much pressure for me right now.
David T
Retired Moderator
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 29th Aug 2004 00:36


in pro.

Get 15 new commands, all the date / time commands left out of DBPro for free!
DOWNLOAD PLUGINS HERE: http://www.davidtattersall.me.uk/ and select "DarkBasic"
Philip
21
Years of Service
User Offline
Joined: 15th Jun 2003
Location: United Kingdom
Posted: 29th Aug 2004 09:24
I regard the multiple camera functionality as being considerably more useful since Lee fixed the bugs with it in v5.5. It would still be nice to have the facility to only render certain objects for certain cameras though.

Philip

What do you mean, bears aren't supposed to wear hats and a tie? P3.2ghz / 1 gig / GeForce FX 5900 128meg / WinXP home
Mentor
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 29th Aug 2004 21:12
heres a little example of having more than one view of the same scene, you could alter it to have several views of different scenes, hope that helps you understand things better.



cheers.


Mentor

PC1: P4 3ghz, 1gig mem, 2x160gig hd`s, Radeon 9800pro w cooler (3rd gfx card), 6 way speakers.
PC2: AMD 2ghz, 512mb ram, FX5200 ultra, 16 bit SB.
Mini ATX cases suck.
Mentor
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 29th Aug 2004 23:58
and heres another snippet that does exactly what you ask (just to make things realy clear)



cheers.

Mentor.

PC1: P4 3ghz, 1gig mem, 2x160gig hd`s, Radeon 9800pro w cooler (3rd gfx card), 6 way speakers.
PC2: AMD 2ghz, 512mb ram, FX5200 ultra, 16 bit SB.
Mini ATX cases suck.
Philip
21
Years of Service
User Offline
Joined: 15th Jun 2003
Location: United Kingdom
Posted: 30th Aug 2004 02:17
@Mentor, you are STORMING today.

Are you coming to the Convention? If not, whats your excuse mate?

@Cattle

In due course maybe multiple cameras could be added to DarkTOPIA? I'm thinking a couple of cameras at the top of the screen giving you the equivalent of a 360 surround view? One would be pointing directly behind, with the other two pointing to each side?

Philip

What do you mean, bears aren't supposed to wear hats and a tie? P3.2ghz / 1 gig / GeForce FX 5900 128meg / WinXP home
Mentor
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 30th Aug 2004 03:42
LOL excuses are poverty, work, nothing to show, nothing to say, wouldn`t understand half of what was said to me, I only seem to be storming, actualy I only reply to posts I am sure of, most of the time I have no idea, just got stuck on glueing objects together, can`t make it work, so back to the newbies forum for me .

Mentor.

PC1: P4 3ghz, 1gig mem, 2x160gig hd`s, Radeon 9800pro w cooler (3rd gfx card), 6 way speakers.
PC2: AMD 2ghz, 512mb ram, FX5200 ultra, 16 bit SB.
Mini ATX cases suck.
Peter H
20
Years of Service
User Offline
Joined: 20th Feb 2004
Location: Witness Protection Program
Posted: 30th Aug 2004 06:07
well the rest of this post is pretty useless to me but i just fuond two new(VERY usefull) commands!!!

Quote: "Are you perhaps speaking of the object screen x() and object screen y() commands?"


"We make the worst games in the universe."
Philip
21
Years of Service
User Offline
Joined: 15th Jun 2003
Location: United Kingdom
Posted: 30th Aug 2004 08:23
Really? Mentor, I thought you were a teacher. I thought teachers were loaded.

Philip

What do you mean, bears aren't supposed to wear hats and a tie? P3.2ghz / 1 gig / GeForce FX 5900 128meg / WinXP home
Mentor
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 30th Aug 2004 18:12
erm! nope!, thats probably just an impression given by my "handle", my name is my old CB handle from my teens, taken from an alien character in the E.E.Doc Smith Lensman series, I just re-used it when I started using the net, Mentor was (apparently) a huge brain in a tank who aided the humans in their war against Boskone (drug dealers, pirates, evil multinationals and terrorists controled by Boskone and undermining human values to destroy humanity), my real world nick was Brains, so I decided to be Mentor , some people think I am an actual Mentor because of the sig (guardian, guide and protector to a child or children), actualy I`m a guy who pretends to be an engineer by day and pretends to be a computer programmer by night, just havent worked out what I ACTUALY am yet (don`t answer that ), engineers in this part of the UK are just above minimum wage, and I just had to replace my aged Susuki Swift, so cash is somewhat short (my overdraft is impressive though)

Mentor.

PC1: P4 3ghz, 1gig mem, 2x160gig hd`s, Radeon 9800pro w cooler (3rd gfx card), 6 way speakers.
PC2: AMD 2ghz, 512mb ram, FX5200 ultra, 16 bit SB.
Mini ATX cases suck.

Login to post a reply

Server time is: 2024-09-22 22:35:54
Your offset time is: 2024-09-22 22:35:54