Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
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
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
6 registered members (AndrewAMD, Ayumi, degenerate_762, 7th_zorro, VoroneTZ, HoopyDerFrood), 1,268 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
LucasJoshua, Baklazhan, Hanky27, firatv, wandaluciaia
19053 Registered Users
Previous Thread
Next Thread
Print Thread
Rating: 5
Page 2 of 4 1 2 3 4
Re: Shotting detection in different body parts [Re: DestroyTheRunner] #255586
03/11/09 12:20
03/11/09 12:20
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
Hmm, damn.
OK, this a trial and error thing, but if you put SCAN_TEXTURE into the c-trace,
does the "tex_name" string change to a useful name of the string of the hit part?
Or does it just give the MDL-filename? If it gives the skin name, can you name
those in such a way to be able to extract the info you need?

OR
Does your textures have the alpha channel UNUSED? If it does, create alpha channels
on each skin and "paint" a specific alpha value over each body part.
That is replace our separate color-map skin with the alpha channel.
Youve just got to do it so the alpha channel never get displayed.
(never use the tranparent flag I believe...)
This will depend uon us getting different skin names from "tex_name" as the previous
paragraph tries for.

I can give more detail if this is managable.


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: Shotting detection in different body parts [Re: EvilSOB] #256362
03/16/09 11:44
03/16/09 11:44
Joined: Aug 2007
Posts: 286
DestroyTheRunner Offline OP
Member
DestroyTheRunner  Offline OP
Member

Joined: Aug 2007
Posts: 286
i understand. I think its managable, but i use as for shoot detection, a bullet using C_move and it doestn contain any scan_texture.I guess ill migrate to c_trace for shoot detection.
Ill try this at home and see if any of this 2 workarounds works!

thanks smile

Re: Shotting detection in different body parts [Re: DestroyTheRunner] #256368
03/16/09 12:21
03/16/09 12:21
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
No need to migrate, just perform the c_trace after the c_move HITS the target.
Code:
...
you=NULL;
dist = c_move(me, reldist, NULL, IGNORE_ME|IGNORE_PASSABLE|IGNORE_SPRITES);
if(you!=NULL)   
{  //hit some entity
   c_trace(me.x, you.x, IGNORE_ME|IGNORE_PASSABLE|IGNORE_SPRITES|SCAN_TEXTURE);
   //do something with the texture tex_name
}
...



"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: Shotting detection in different body parts [Re: EvilSOB] #256571
03/17/09 15:51
03/17/09 15:51
Joined: Aug 2007
Posts: 286
DestroyTheRunner Offline OP
Member
DestroyTheRunner  Offline OP
Member

Joined: Aug 2007
Posts: 286
well..
the scan_texture thing returns the mdl file name, not the skin name. so it doesnt work for me.
and i failed trying the alpha channel thing.
I tried creating an alpha channel in photoshop and painted it with purple as a test. and it paints gray! not purple...
Does alpha channel has colors or is a color? or is just a 0 to 100 grayscale color? or is just a var from 0 to 100 relative to transparency?

frown

Re: Shotting detection in different body parts [Re: DestroyTheRunner] #256582
03/17/09 16:56
03/17/09 16:56
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
var from 0 to 100 relative to transparency. 0 is transparent and 100 is solid.
The color you "paint" it in photoshop is only a reference. It has no "real" color.

Thats it Im afraid, Im out of ideas now. If I think of anything else, Ill post back.


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: Shotting detection in different body parts [Re: EvilSOB] #256595
03/17/09 17:58
03/17/09 17:58
Joined: Oct 2004
Posts: 1,655
T
testDummy Offline
Serious User
testDummy  Offline
Serious User
T

Joined: Oct 2004
Posts: 1,655
Some time ago, ShoreVietam did something similar with bones and a home-brewed trace algorithm.
precise_shot.wdl - new version thread
Not surprisingly, the downloads in that thread appear to be dead.

Re: Shotting detection in different body parts [Re: testDummy] #256597
03/17/09 18:05
03/17/09 18:05
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
And after looking through the thread, it was bones-dependant.
If you had bones I could help eventually, but without Im stuck.


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: Shotting detection in different body parts [Re: EvilSOB] #256735
03/18/09 17:22
03/18/09 17:22
Joined: Aug 2007
Posts: 286
DestroyTheRunner Offline OP
Member
DestroyTheRunner  Offline OP
Member

Joined: Aug 2007
Posts: 286
hmmm due to my version, i cant use anything related to bones.

SOB
so ill try again the alpha channel way.

if put the alpha value
eg.:
25 for arms legs
50 for body
100 for head
to be retrieve by some function that detects the alpha value of the skin..
ok
but how will i paint this values in photoshop since its RGB or CMYK?
will be something like (R=255 + G=255 + R=255) = alpha 100?

Re: Shotting detection in different body parts [Re: DestroyTheRunner] #256740
03/18/09 18:12
03/18/09 18:12
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
Nope, it is just another color ELEMENT (like Red or Green or Blue) that you cant actually see.
R=255, G=255, B=255, A= 100 = Solid White - (like a wall)
R=255, G=255, B=255, A= 50 = See-through White - (like frosted glass)
R=255, G=255, B=255, A= 0 = Invisible White - (like a clear gloss-free window)

I can describe the Photoshopping of the Alpha channel, BUT FIRST make sure
that A6 actually has a function to get the alpha info. I cant find any,
all the A7 functions that can read alpha are apparently new for A7, not in A6.

If you CAN find a function that CAN read the alpha value of a models skin,
let me know and I'll write instructions of how to set up the alpha channel and
paint your body-bits in photoshop.

FOOTNOTE: Alpha is actually 0-255, but is scaled down to 0-100 by 3DGS and photoshop.



"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: Shotting detection in different body parts [Re: EvilSOB] #256937
03/19/09 16:37
03/19/09 16:37
Joined: Aug 2007
Posts: 286
DestroyTheRunner Offline OP
Member
DestroyTheRunner  Offline OP
Member

Joined: Aug 2007
Posts: 286
i see
i think this one works

pixel_to_vec(vector,var alpha,var format,var pixel);

Im not at home right to test it, but i think it should work!

Page 2 of 4 1 2 3 4

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

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