6 registered members (AndrewAMD, Ayumi, degenerate_762, 7th_zorro, VoroneTZ, HoopyDerFrood),
1,268
guests, and 6
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
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
Expert
|
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
OP
Member
|
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
|
|
|
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
Expert
|
Expert
Joined: Feb 2008
Posts: 3,232
Australia
|
No need to migrate, just perform the c_trace after the c_move HITS the target. ...
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
OP
Member
|
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?
|
|
|
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
Expert
|
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
testDummy
Serious User
|
Serious User
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 threadNot 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
Expert
|
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: DestroyTheRunner]
#256740
03/18/09 18:12
03/18/09 18:12
|
Joined: Feb 2008
Posts: 3,232 Australia
EvilSOB
Expert
|
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
|
|
|
|