Page 6 of 9
Posted: Mon Mar 06, 2006 11:11 am
by Arexack_Heretic
I suggest looking at how the things in the hud are rendered.
Posted: Mon Mar 06, 2006 8:15 pm
by milinks
I've been playing about with the idea of using the Model method of projecting images onto the screen, due to images or splash screens not showing in Windows at present. Ive put together an OXP using images grabbed from the web at present. One representation is to have a spinning cube with images on each face, each image representing a facet of the planet, such as government, tech, economy, population, radius.
I am trying to reduce the size of the model on the screen, so as to include other features such as text etc. I have changed the size in Wings etc but the image is represented the same size in Oolite. Can i alter the size using code similar to that of the hud, which A_H mentioned earlier, if so, how would i incorporate it? Is there a simple command such as "reduce" or "resize" that can be used? if this is possible then i take it that it would be possible to move the image around the screen to where i wanted it using a hud type plist? I was kinda hoping to reduce it and put it in a corner to free up the remainder of the screen, if folks thought it a worthy idea?
Posted: Mon Mar 06, 2006 9:40 pm
by Rxke
Wow!
Novel idea!
is it really spinning?
I really like this, I know it will be too revolutionary, style-wise, for certain peeps around here, but there's always Oolite strict, isn't there?
re: placement... (just guesstimating here, never used Wings)
could you place the cube off center, in some (black or transparant )rectangle? now it's probably a model, centered, and Oolite automatically 'blows' it up to fit the screen... that way it'd probably show up in a corner...
I mean:
*************************
*<> *
* *
* *
* *
*************************
(On second thought: won't work, it would show a 'drifting' cube, because it will spin the whole rectangle...)
(EDIT: hmmm: reperesentation fscked up, imagine rectangle with cube lefthand corner)
Posted: Mon Mar 06, 2006 10:11 pm
by aegidian
Nice idea!
milinks wrote:I am trying to reduce the size of the model on the screen, so as to include other features such as text etc. I have changed the size in Wings etc but the image is represented the same size in Oolite.
Heh. Oolite moves the model so it always takes up the same size on-screen (to show different sized ships without say, the missile, being tiny!).
You might be able get around it by adding some geometry to the model that won't show (frex some extra unconnected vertices in the .dat file), these should push out the size that Oolite calculates for the model and hence reduce its size on-screen.
Posted: Tue Mar 07, 2006 1:46 am
by milinks
@ Giles,
You might be able get around it by adding some geometry to the model that won't show (frex some extra unconnected vertices in the .dat file),
thanks, it worked a treat!
Now, my next step, is to be able to move it on the screen to where i want / need it. Does anyone have any ideas about how to map this onto the screen? I've been having a look at, instead of a cube shape, using a sphere shape, and making a "mini" planet rep of where youve landed if you see what i mean. Does anyone have any thoughts on this? i.e, is it in keeping with Oolite or stretching it a bit, i think it could add a bit of atmosphere to things
Posted: Tue Mar 07, 2006 10:23 am
by flap
!! Good !!
Posted: Tue Mar 07, 2006 10:55 am
by Selezen
Hot damn, give that man a trumble! That is one hell of an idea, and so simple to execute...
It's going to involve a lot of drawing though. Is it possible to have a cuboid showing the vital stats plus a sphere representing the planet? will the Oolite renderer separate the two entities and rotate them separately?
Posted: Tue Mar 07, 2006 11:00 am
by milinks
Hi, Thanks Selezen, it will put as many Models on the screen as you want, the only thing that i can't fathom at the mo, is moving them around the screen, so at the mo i have a mass of spinning objects in the middle. I lie your idea of one being a planet and one being a kinda info screen. just gotta get my head round how to move them, and then I'l be cracking on with the coding.
Posted: Tue Mar 07, 2006 11:24 am
by neilplus
Hi - just wanted to say that I really like the idea of these spinning planet-stats cubes. They look good.
Posted: Tue Mar 07, 2006 1:08 pm
by TGHC
Selezen wrote:Is it possible to have a cuboid showing the vital stats plus a sphere representing the planet?
Would it be possible to put a picture of the mother-in-law on there, so that I can blast it with a plasma gun?
Posted: Tue Mar 07, 2006 1:18 pm
by milinks
Thanks for that neilplus. I have been trying to use the x y code from huds etc to place the models on the screen with no success. I have even gone down the addships route!
@ Giles, when you originally coded the game, how did you place the text etc on the GUI screens? I have been scouring all the source code to try to understand the placing on the GUI screens, but i have had no success, is there any pointers anyone could give me?
Posted: Tue Mar 07, 2006 1:20 pm
by Cmdr. Wombat
TGHC wrote:Would it be possible to put a picture of the mother-in-law on there, so that I can blast it with a plasma gun?
Maybe someone could make a new ship called Mother-In-Law. The sales pitch would be "Butt ugly, tough as nails, annoying as all get go, and plenty of cargo space in the rear". It would quickly become a favored target.
Posted: Tue Mar 07, 2006 5:00 pm
by Rxke
aegidian wrote:Heh. Oolite moves the model so it always takes up the same size on-screen .
But how to represent them off-center? Like in the ShipYard?
Posted: Tue Mar 07, 2006 10:18 pm
by aegidian
Rxke wrote:aegidian wrote:Heh. Oolite moves the model so it always takes up the same size on-screen .
But how to represent them off-center? Like in the ShipYard?
It's all hard-coded at the moment, so the ships presented by missions always appear at the center of the screen, and ships on the shipyard screen always in the correct place.
In fact the center of the model is positioned in 3d space relative to the player's viewpoint. It could be possible to write a bit of code so that you can set and reset where they appear, but I'm a little tied up with other stuff ATM. I'll make a todo.
Posted: Wed Mar 08, 2006 4:05 am
by Cyberian Tiger
aegidian wrote:It's all hard-coded at the moment, so the ships presented by missions always appear at the center of the screen, and ships on the shipyard screen always in the correct place.
In fact the center of the model is positioned in 3d space relative to the player's viewpoint. It could be possible to write a bit of code so that you can set and reset where they appear, but I'm a little tied up with other stuff ATM. I'll make a todo.
Could you add some lighting for the 3D models when they're shown here, I think this just uses ambient light which makes some models look extremely flat, even if they look fine in the actual game ? (or add it to the TODO)
-CT