Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (dr_panther, 7th_zorro), 1,203 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
solid pixels covered by entity? #72602
04/30/06 13:03
04/30/06 13:03
Joined: Jul 2001
Posts: 6,904
H
HeelX Offline OP
Senior Expert
HeelX  Offline OP
Senior Expert
H

Joined: Jul 2001
Posts: 6,904
Hey,
I just want to ask wether this is possible or not.

Imagine your screensize is 800x600 pixels and you've got a bitmap allocated that fits the same resolution (800x600) and you've got a cube, a sphere or whatever as model visible on the screen, in case A covered with nothing B covered partially by another entity and C intersected by another entity.

In one or all three cases, would it be possible to draw on this bitmap, filled entirely black, each pixel white, which corresponds to a pixel covered by the entity??

Here are example pictures to demonstrate what I'm talking about:



mfG
Christian Behrenberg

Re: solid pixels covered by entity? [Re: HeelX] #72603
04/30/06 13:36
04/30/06 13:36
Joined: Oct 2000
Posts: 1,543
Germany
A
Alexander Esslinger Offline
Senior Developer
Alexander Esslinger  Offline
Senior Developer
A

Joined: Oct 2000
Posts: 1,543
Germany
Sure, that's possible (with pro) - it doubles your rendering times though.

EDIT: Oh.. and render-targets in a6 needs to be a power of 2 in size..

Re: solid pixels covered by entity? [Re: Alexander Esslinger] #72604
04/30/06 13:59
04/30/06 13:59
Joined: Jul 2001
Posts: 6,904
H
HeelX Offline OP
Senior Expert
HeelX  Offline OP
Senior Expert
H

Joined: Jul 2001
Posts: 6,904
I dont want to re-render the scene, I just want to know if one pixel is covered by an entity.. something like

pixel_for_entity(you,12,36);

Is true or false if the pixel x=12 y=36 is covered by the you entity.

Re: solid pixels covered by entity? [Re: HeelX] #72605
04/30/06 14:13
04/30/06 14:13
Joined: Oct 2000
Posts: 1,543
Germany
A
Alexander Esslinger Offline
Senior Developer
Alexander Esslinger  Offline
Senior Developer
A

Joined: Oct 2000
Posts: 1,543
Germany
I'm not sure what you want: In your first post you want to render the object on your bitmap white (render-to-texture), now you want a function? Those two approaches are quite different..

Re: solid pixels covered by entity? [Re: Alexander Esslinger] #72606
04/30/06 14:18
04/30/06 14:18
Joined: Jul 2001
Posts: 6,904
H
HeelX Offline OP
Senior Expert
HeelX  Offline OP
Senior Expert
H

Joined: Jul 2001
Posts: 6,904
well, what would be faster? rendering a second view with mutiple objects on screen whose solid pixels write a white pixel or going through a loop for each pixel and then through the entity list to check some entities to draw a pixel?

I could use the function method to increase drawing my pixels because I could focus only on a constrained part of the screen (I would take the boundingbox coordinates to determine the area which I would check). Otherwise, when I have a lot entities on the screen who should draw white pixels, I would take the second view method.

So... two considerations, what would be faster and how would I do that?

Re: solid pixels covered by entity? [Re: HeelX] #72607
04/30/06 15:49
04/30/06 15:49
Joined: Dec 2000
Posts: 4,608
mk_1 Offline

Expert
mk_1  Offline

Expert

Joined: Dec 2000
Posts: 4,608
Ich nehme mal an, es geht hier wieder um ein 2.5D Spiel a la Resident Evil...Ich denke, da gibt es einfachere Möglichkeiten. Du könntest Modelle benutzen, die dein Hintergrundbild zeichnen, ohne Abstriche. Das wäre alles, was du brauchst.

Sorry, wenn dein Spiel in eine andere Richtung geht.


Follow me on twitter
Re: solid pixels covered by entity? [Re: mk_1] #72608
05/01/06 00:56
05/01/06 00:56
Joined: Jul 2001
Posts: 6,904
H
HeelX Offline OP
Senior Expert
HeelX  Offline OP
Senior Expert
H

Joined: Jul 2001
Posts: 6,904
Nein, das hat nichts mit dem Arbeitstitel zu tun, an dem ich beteiligt bin, eher einer Idee die ich hatte, als ich folgendes Video gesehen habe:

http://www.youtube.com/watch?v=Lutlj0MlJpo&feature=Views&page=1&t=a&f=b

Ich hatte die Idee für eine Szene, wo sich halt ein 3D Objekt bewegt, dass keine uniforme Hülle hat, sagen wir mal eine Schusswaffe, die sich dreht oder irgendwas.. naja, verändert in Form, Skalierung und Rotation. Dann ändert sich auch die Außenhülle ständig, wenn man das Objekt auf eine 2D Ebene projiziert (der Screen) und die Kanten nachzeichnen würde. Das als Kollisionshülle für ein Männchen, was drauf rum läuft, springt, mit Gegner in einem flüssig bewegten Design mit hin und her shiftenden Objekte wär mal was total abgefahrenes! Und dann hab ich mir überlegt was man da fürn Ansatz nehmen könnte.

mfG
Christian

Re: solid pixels covered by entity? [Re: HeelX] #72609
05/01/06 05:15
05/01/06 05:15
Joined: Oct 2003
Posts: 4,131
M
Matt_Aufderheide Offline
Expert
Matt_Aufderheide  Offline
Expert
M

Joined: Oct 2003
Posts: 4,131
The best way to do it would be if you had access to the draw order, then you could draw the cube last and just render it to a target the same size as your backbuffer, and use the same zbuffer, with zenable=on and just clear everything on your new target to black.

So bascially to do it currently, you will need a simple dll, that uses a render event triggered by render_entities .. then just do the steps i mentioned.


Sphere Engine--the premier A6 graphics plugin.

Moderated by  Blink, Hummel, Superku 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1