Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Author
Message
Juggernaut
14
Years of Service
User Offline
Joined: 12th Mar 2012
Location:
Posted: 28th Mar 2012 20:32
Hello,

Is there a decal system present in Dark Basic Pro ?

If yes, how do I access it ?

If no, how can I create my own ?

Thanks,
Brendy boy
20
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 28th Mar 2012 21:44
Quote: "Is there a decal system present in Dark Basic Pro ?"

yes, but you ned to use static geometry command for which, i believe, tutorials don't exist, you'll have to look at fpsc source code to see how these commands are used

Quote: "how can I create my own ?"

Decals are usualy created with transparent plains

TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 28th Mar 2012 22:23
Quote: "Decals are usualy created with transparent plains"


Nope, the texture is projected onto the 3D object at a certain angle. That's how the decal is able to wrap around the entire object like so:



Has anyone written a shader?

Brendy boy
20
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 28th Mar 2012 23:41
[email]
Nope, the texture is projected onto the 3D object at a certain angle. That's how the decal is able to wrap around the entire object like so/email]
in some cases yes but that projection consumes 1 texture layer, so 1 decal = 1 layer, 2 decals = 2 layers. Object can have max 8 layers. Ever seen a game with only 8 bullet holes?

mr Handy
18
Years of Service
User Offline
Joined: 7th Sep 2007
Location: out of TGC
Posted: 29th Mar 2012 09:49 Edited at: 29th Mar 2012 09:49
@Brendy boy
Screen-space decals shader. Anyway it needs boxes. 1 decal = 1 box
Sasuke
20
Years of Service
User Offline
Joined: 2nd Dec 2005
Location: Milton Keynes UK
Posted: 29th Mar 2012 14:21
Kind of depends on the complexity of the decal, simple = triangles or quads. Wrapping decals = subdivided quad or shaders. Not sure why you'd use a box since you'll only see one face. So go with Quads (plains).
mr Handy
18
Years of Service
User Offline
Joined: 7th Sep 2007
Location: out of TGC
Posted: 29th Mar 2012 15:00
box is easier to use for projection. you don'n need to calculate plain rotation and size to fit your texture.
TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 29th Mar 2012 15:24
Quote: "in some cases yes but that projection consumes 1 texture layer, so 1 decal = 1 layer, 2 decals = 2 layers. Object can have max 8 layers. Ever seen a game with only 8 bullet holes?"


Good point, the easiest way to do bullets are just transparent plains.

It requires exactly one texture layer though. The shader blends the overlapping images together in order to save layers.

TheComet

Sasuke
20
Years of Service
User Offline
Joined: 2nd Dec 2005
Location: Milton Keynes UK
Posted: 29th Mar 2012 16:53
Quote: "box is easier to use for projection. you don'n need to calculate plain rotation and size to fit your texture."


Wait, when did we get on to projections?
mr Handy
18
Years of Service
User Offline
Joined: 7th Sep 2007
Location: out of TGC
Posted: 29th Mar 2012 17:23
3rd post
Juggernaut
14
Years of Service
User Offline
Joined: 12th Mar 2012
Location:
Posted: 29th Mar 2012 20:40
Bullet holes are static things and can be shown I guess either using multi texturing at runtime but how do we implement something dynamic like blood flowing out of a wounded body and engulfing part of the floor ?
Brendy boy
20
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 29th Mar 2012 21:46
Quote: "but how do we implement something dynamic like blood flowing out of a wounded body"

If you mean blood flowing on the body then you'll have to modify character texture in real time (paint the blood texture on it). If you mean blood flying through the air out of the body, that can be done with plains too

Quote: "engulfing part of the floor "

plains or real time texture painting

Juggernaut
14
Years of Service
User Offline
Joined: 12th Mar 2012
Location:
Posted: 29th Mar 2012 22:57
@Brendy boy: Thank you for your advice.

Is multitexturing (currently one of the feature of dark basic pro) the same thing as real time texture painting ? Or is it just just using the texturing command at runtime ?

@mrHandy: Thank you for your comments.

Quote: "Screen-space decals shader."


Are you referring that decals can be done using shaders alone ?

Thanks,
Brendy boy
20
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 29th Mar 2012 23:13
Quote: "Is multitexturing (currently one of the feature of dark basic pro) the same thing as real time texture painting ?"

no

Quote: "Or is it just just using the texturing command at runtime ?"

No

If you want a flowing blood you'll need to paint it on the texture ->convert the image to memblock, modify the needed pixels and convert it back to image, i think that's the only way for doing that in dbpro, depending on the blood size it could be quite slow

Juggernaut
14
Years of Service
User Offline
Joined: 12th Mar 2012
Location:
Posted: 29th Mar 2012 23:57
@Brendy boy: Thank you for clarifying.
mr Handy
18
Years of Service
User Offline
Joined: 7th Sep 2007
Location: out of TGC
Posted: 30th Mar 2012 09:55 Edited at: 30th Mar 2012 09:56
Quote: "Are you referring that decals can be done using shaders alone"

Yes. The only way [in DBP] to make volume decal from exploded handgrenade is a texture projection.
Quote: "how do we implement something dynamic like blood flowing out of a wounded body and engulfing part of the floor ? "

particles for blood squirting and shader animation for floor plain, like using controlled lerp command.
Juggernaut
14
Years of Service
User Offline
Joined: 12th Mar 2012
Location:
Posted: 31st Mar 2012 09:45
@mrHandy: Thank you for the explanation.

Login to post a reply

Server time is: 2026-07-10 00:43:31
Your offset time is: 2026-07-10 00:43:31