Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: LuaPineapple on November 02, 2008, 06:29:38 pm

Title: Drawing bitmaps which are NOT necessarily facing the screen.
Post by: LuaPineapple on November 02, 2008, 06:29:38 pm
And so it came to pass that DRADIS would be drawn with nice 'n shiny DDS textures.

Alpha Channel? Check.
Texture Load & Display? Check.
3D Projection? Failed.

I've tried just about anything I can think of and have been poking around view perturbations for the last few hours, trying to get a bitmap quad to draw that WOULDN'T necessarily face the camera head on. (Apply directly to the forehead!)

Any ideas?
Title: Re: Drawing bitmaps which are NOT necessarily facing the screen.
Post by: DaBrain on November 02, 2008, 06:48:19 pm
Rotating mesh + render to texture?

Instead of loading a "particle/glowoint/sprite", you could try a POF.
Title: Re: Drawing bitmaps which are NOT necessarily facing the screen.
Post by: LuaPineapple on November 02, 2008, 08:23:44 pm
 :blah:
Could work, would work. The hackz level has gone up though. I'll try that.



(Personally I still think it's silly that we can't draw sprites which aren't facing the camera.)
Title: Re: Drawing bitmaps which are NOT necessarily facing the screen.
Post by: redsniper on November 02, 2008, 09:35:10 pm
I though sprites faced the camera by definition.
Title: Re: Drawing bitmaps which are NOT necessarily facing the screen.
Post by: Topgun on November 03, 2008, 01:38:09 pm
yep, they do. it's too much processor work to distort the image to make it otherwise.
Title: Re: Drawing bitmaps which are NOT necessarily facing the screen.
Post by: redsniper on November 03, 2008, 04:33:40 pm
So you could just map your bitmap to a plane and then do whatever you want with that, right?
Title: Re: Drawing bitmaps which are NOT necessarily facing the screen.
Post by: Topgun on November 03, 2008, 04:50:51 pm
yep, that's regular games do it. or they bake the animation to a sprite.
Title: Re: Drawing bitmaps which are NOT necessarily facing the screen.
Post by: Swifty on November 04, 2008, 02:43:49 pm
Why don't you draw a simple quad with the sprite set as a texture?
Title: Re: Drawing bitmaps which are NOT necessarily facing the screen.
Post by: Nuke on November 12, 2008, 11:25:18 pm
gr.drawSprite(texture,radius,position,orientation) ?
Title: Re: Drawing bitmaps which are NOT necessarily facing the screen.
Post by: Bobboau on November 23, 2008, 11:59:26 am
I'm assumeing we are talking about scripting here?

does scripting have a basic draw polygon function? if so then what you do is have four points, we will call them a, b, c, and d (they should probably be in an array) a and b are on the 'top' c and d the 'bottom' a and d the 'right', b and c 'left'

a-b
| |
d-c

now lets give the thing a radius r

all you have to do is multiply the orientation matrix's up vector by r and negative r, this will give you the up and down vectors. do the same to the right vector to get right and left vectors.

a=up+right
b=up+left
c=down+left
d=down+right

set the texture and draw those four points as a polygon.

???

profit
Title: Re: Drawing bitmaps which are NOT necessarily facing the screen.
Post by: Nuke on November 23, 2008, 11:04:50 pm
you know you could probibly fake it with drawTechModel()

create a ship wich is just a 2 sided plane with a mostly transparent texture of yur dradis circle. then use it to draw a tech model over the radar. this should give you those pretty little dradis lines.