RadogoR Posted September 7, 2012 Posted September 7, 2012 Hi guys, I'm stuck in the middle of creating a mod of BDSM nature, and now I want to create some after-whipping bruises textures. I wanted them to work as tattoos and add them on the body via an easy script after the main action. But the problem is that AFAIK none of the tattoo mods available can create transparent textures that fit every possible body model (I want it to work this way for more compatibility). But looking at the LoversSpermSplash mod I realized, that there is some way to do it. I digged this whole damn esp file to find out, how is this done and still don't get it. Could someone give me a hint? Is the sperm showing on the body a sort of aura or what?
ZaZ Posted September 7, 2012 Posted September 7, 2012 Its an Effect Shader Unfortunately I have No clue about how this is done And Good luck With your Project Cheers
RadogoR Posted September 10, 2012 Author Posted September 10, 2012 Hi Masterchris, Thank you for your reply! Yep, you're right, this is waaay too complicated. And besides, if i'm not mistaken, this effect shader applies to the whole body, we can't select where to apply it. Then I suppose, I will need to look through the whole SetBody mod, create separate textures for all the body types and do some scripting for the game itself to choose appropriate texture to each possible body when it's needed to apply it. Dammit, that's a lot of work actually ) Or are there any other ideas? Anyone? (
gerra6 Posted September 12, 2012 Posted September 12, 2012 Hi Masterchris' date=' Thank you for your reply! Yep, you're right, this is waaay too complicated. And besides, if i'm not mistaken, this effect shader applies to the whole body, we can't select where to apply it. Then I suppose, I will need to look through the whole SetBody mod, create separate textures for all the body types and do some scripting for the game itself to choose appropriate texture to each possible body when it's needed to apply it. Dammit, that's a lot of work actually ) Or are there any other ideas? Anyone? ( [/quote'] If all you are looking to do is overlay a texture over a a mesh, a membrane - skin only effect shader is probably your best bet. Play with the settings, in particular the source blend mode and dest blend mode, but definitely set the U and the V animation to zero if you want the tattoos to stay in place. http://cs.elderscrolls.com/index.php/Effect_Shader You want the effect to be applied only to a portion of the body. Don't worry about that. Instead, create a texture that is 100% transparent anywhere you don't want it to be. The trick will be figuring out which parts of the texture are being wrapped to which parts of the body. I don't know how Oblivion goes about wrapping effect shader textures over meshes, but if it does it in a consistent way, then you might want to create a test dds file that labels different regions. Use that to figure out which parts of the texture map to which parts of the mesh. At least, that's how I would start.
Uriel Posted November 3, 2012 Posted November 3, 2012 BUMP. Trying to do nearly same thing, the only difference is i want it for a tattoo effect(not really a difference technically). I figured out the "skin only" and "membrane" part myself, but looks like the texture are applied in some strange way. At least one tattoo appears on the head, and i can't get rid of it. Experimenting right now.
Symon Posted November 11, 2012 Posted November 11, 2012 I seem to recall that to all intents and purposes, you cannot have decent UVmapping of these shaders (I did a different marble effect for the Player statue in Bruma). I'd look at equipping non-playable (invisible in the inventory) necklace, ring or tail objects via script.
Uriel Posted November 11, 2012 Posted November 11, 2012 Yah, that's what i did already, The problem here it is only compatible with a part of currently available body types. I hoped to use effect shaders to create universal equippable tattoos.
Symon Posted November 11, 2012 Posted November 11, 2012 Multiple items for all the body types you want to support and scripting to apply the correct one. A pain but it will do the job. I don't think shaders have the UV-wrapping capabilities needed. If they have, I can't find them in the CS.
Uriel Posted November 11, 2012 Posted November 11, 2012 How can i detect wich body is installed? It's pretty simple while SetBody is in action, but if the default body is replaced i can't find out the body type. Maybe i can try finding a way to get the upperbody file size and build a database to compare it with, but that's a LOT of pain, and not worth it. Might be possible to do it using NifSE, but that's a lot of NifSE learning, bugs and mod compatibility problems.
Symon Posted November 12, 2012 Posted November 12, 2012 I honestly don't think you can reliably detect that. After all, the Nif must have the canonical name for that body part. Nif byte sizes would be unreliable. Bodypart A with incorrect specular properties would detect as different from part A with normal specular and regenerated tangent space. If someone goes for gloss skin, that will also change the Nif size by a byte or so. If this was my project, I'd decide what bodies to support, clearly state that in the documentation (confident many would ignore it, but hey) and leave it at that.
gerra6 Posted November 12, 2012 Posted November 12, 2012 I'm curious...has anyone tried using the OBSE function SetTexturePath to modify clothing textures on the fly? If that works (and I have no idea if it would), then it should be possible to create a plug-in that dynamically modifies the textures used by the setbody clothing items (which look like naked bodies) to create the effects that you're looking for.
Uriel Posted November 12, 2012 Posted November 12, 2012 Yep, i also thought about this. But all the races needs different textures with applied tattoos, so i'll end up with a damn lot of textures, and a crappy script that will try to find out wich texture to use. That's no different from filesize stuff. Also, tattoos applied in "setbody way" will only work on a nude character. Not happy with that. I think i'll try my luck posting in OBGE's thread. Those who did godrays/water/parallax mapping for oblivion will be able to find a solution for such a problem. A custom shader or something.
rad87 Posted November 13, 2012 Posted November 13, 2012 Yep' date=' i also thought about this. But all the races needs different textures with applied tattoos, so i'll end up with a damn lot of textures, and a crappy script that will try to find out wich texture to use. That's no different from filesize stuff. Also, tattoos applied in "setbody way" will only work on a nude character. Not happy with that. I think i'll try my luck posting in OBGE's thread. Those who did godrays/water/parallax mapping for oblivion will be able to find a solution for such a problem. A custom shader or something. [/quote'] If they provide you with a soulution be sure to share it with us. That would be a valuable information. I thought about making a stockings system that would be independent of body type and the clothes, like applying a stocking texture over legs skin texture. Also with knowledge how to do stuff like that someone would be able to drasticly improve sperm splash effects
Symon Posted November 13, 2012 Posted November 13, 2012 People are talking about decals, which the engine does support. However, they are just another way of mapping textures to parts of a mesh. Not sure how useful the technique would be as this would still require a mesh piece for a body part.
rad87 Posted November 13, 2012 Posted November 13, 2012 googling oblivion decals or oblivion construction set decal gave only results about blood decals, nothing about creating or using custom ones
Symon Posted November 13, 2012 Posted November 13, 2012 There was a modest amount of info in the 'MAXImmerse Artist’s Manual', released back in the days of version 4.0.0.2 (Morrowind - but the details were handed out by another company that was rather more supportive of its modders and seemed to understand the uses of the Nif engine rather more than Beth). This documentation seems harder to find than it used to be. My understanding is that the use of decals isn't much different in 20.x.x.x (Oblivion). The fifth sub-panel of the “NetImmerse Shader” is the “Apply Mode” sub-panel. This sub-panel allows the user to specify how textures interact with the lighting and vertex colors. There are three possible modes: REPLACE, DECAL and MODULATE. In REPLACE mode the lighting and vertex colors are ignored and the texture is just placed on the surface. This mode is appropriate if all lighting effects have been rolled into the texture or no lighting effects are desired. The DECAL mode acts like REPLACE mode wherever the texture is opaque but uses the lights and vertex colors in the transparent regions. This mode is useful when a textured decal will be placed over an untextured surface but its utility is limited since the opaque part of the decal will not be lit. Finally, the MODULATE mode causes the texture to be lit by both the dynamic lights and vertex colors and is the default apply mode. The “Common Usages” demonstrates how some of these modes are used in practice. The “Decal” map field holds a texture that will be alpha-blended on top of the base texture. If multiple decals are desired a “Composite” material can be placed in the “Decal” field. Each texture listed in the “Composite” material will be translated into a decal texture by MAXImmerse. Decal maps are usually used to add local detail to a base texture, common examples being bullet holes and scorch marks. Note that multiple decals specified in a “Composite” material will be added onto the base map in order – creating a layering effect Decal maps are used to place localized detail in a scene and are demonstrated in Decal.max. This testcase adds two new materials to the Detail.max test case: “One Decal” and “Two Decals”. “One Decal” demonstrates how a NetImmerse Shader can be set up to include a single decal map while “Two Decals” shows how multiple decal maps are handled. “One Decal” adds a crack to the wall by using the “decal.tga” texture map. The first explicit UV channel is reused since this decal should only tile once across the entire polygon. “Two Decals” has a “Composite” shader in the Decal slot to hold the two decal maps. The “decal.tga” file from “One Decal” is reused but a new decal map (bullets.tga) is used to place some non-repeating bullets marks on the wall. A fourth “UVW Map Modifier” was needed on the bullet-ridden wall to provide Uvs for the second decal map. This is because the Uvs needed to position the bullet marks correctly do not correspond to any of the previously defined UV channels. As in the case of the two prior examples, unhiding Omni01 and “Light Marker” and changing all the “Apply Mode” fields to MODULATE will demonstrate dynamic lighting interacting with all the multitexture layers.
rad87 Posted November 13, 2012 Posted November 13, 2012 There was a modest amount of info in the 'MAXImmerse Artist’s Manual'' date=' released back in the days of version 4.0.0.2 (Morrowind - but the details were handed out by another company that was rather more supportive of its modders and seemed to understand the uses of the Nif engine rather more than Beth). This documentation seems harder to find than it used to be. My understanding is that the use of decals isn't much different in 20.x.x.x (Oblivion). The fifth sub-panel of the “NetImmerse Shader” is the “Apply Mode” sub-panel. This sub-panel allows the user to specify how textures interact with the lighting and vertex colors. There are three possible modes: REPLACE, DECAL and MODULATE. In REPLACE mode the lighting and vertex colors are ignored and the texture is just placed on the surface. This mode is appropriate if all lighting effects have been rolled into the texture or no lighting effects are desired. The DECAL mode acts like REPLACE mode wherever the texture is opaque but uses the lights and vertex colors in the transparent regions. This mode is useful when a textured decal will be placed over an untextured surface but its utility is limited since the opaque part of the decal will not be lit. Finally, the MODULATE mode causes the texture to be lit by both the dynamic lights and vertex colors and is the default apply mode. The “Common Usages” demonstrates how some of these modes are used in practice. The “Decal” map field holds a texture that will be alpha-blended on top of the base texture. If multiple decals are desired a “Composite” material can be placed in the “Decal” field. Each texture listed in the “Composite” material will be translated into a decal texture by MAXImmerse. Decal maps are usually used to add local detail to a base texture, common examples being bullet holes and scorch marks. Note that multiple decals specified in a “Composite” material will be added onto the base map in order – creating a layering effect Decal maps are used to place localized detail in a scene and are demonstrated in Decal.max. This testcase adds two new materials to the Detail.max test case: “One Decal” and “Two Decals”. “One Decal” demonstrates how a NetImmerse Shader can be set up to include a single decal map while “Two Decals” shows how multiple decal maps are handled. “One Decal” adds a crack to the wall by using the “decal.tga” texture map. The first explicit UV channel is reused since this decal should only tile once across the entire polygon. “Two Decals” has a “Composite” shader in the Decal slot to hold the two decal maps. The “decal.tga” file from “One Decal” is reused but a new decal map (bullets.tga) is used to place some non-repeating bullets marks on the wall. A fourth “UVW Map Modifier” was needed on the bullet-ridden wall to provide Uvs for the second decal map. This is because the Uvs needed to position the bullet marks correctly do not correspond to any of the previously defined UV channels. As in the case of the two prior examples, unhiding Omni01 and “Light Marker” and changing all the “Apply Mode” fields to MODULATE will demonstrate dynamic lighting interacting with all the multitexture layers. [/quote'] Well I found something. There can be 4 decal textures inside a nif, and with NifSe plugin for OBSE it is possible to modify nifs on the fly (without making a permanent change in the file). That could maybe solve our problems as those decal textures should have proper uv mapping right? Another question is if Oblivion supports those 4 decal textures and which ones if not every one are used for blood decals
Symon Posted November 13, 2012 Posted November 13, 2012 Actually, you can have more than four. The NifXML defines four as a reasonable maximum, but a Nif seems to be able to have any number as far as I know. Oblivion ought to support them but it wouldn't be the first time Beth decided not to implement part of the Nif specification. (Morrowind and gloss maps spring to mind - they actively culled one if they found one!)
rad87 Posted November 13, 2012 Posted November 13, 2012 Actually' date=' you can have more than four. The NifXML defines four as a reasonable maximum, but a Nif seems to be able to have any number as far as I know. Oblivion ought to support them but it wouldn't be the first time Beth decided not to implement part of the Nif specification. (Morrowind and gloss maps spring to mind - they actively culled one if they found one!) [/quote'] So in theory all mods using this technique could be compatible with eachother. One would just need to find the first empty decal texture and use it so the mod doesn't override any other ones
Uriel Posted November 14, 2012 Posted November 14, 2012 I'll try it today. Body independent stockings is on my todo list. They were actually first in the list, but i decided to start with tattoos cause they are simplier to map. [prophet]expecting problems with the fingers if this will work [/prophet]
Uriel Posted November 14, 2012 Posted November 14, 2012 Failed for now, also found an info that a mesh can only have one texture.
rad87 Posted November 14, 2012 Posted November 14, 2012 Failed for now' date=' also found an info that a mesh can only have one texture. [/quote'] Decals not working?
gregathit Posted November 14, 2012 Posted November 14, 2012 Failed for now' date=' also found an info that a mesh can only have one texture. [/quote'] That is not entirely correct. A mesh can have a large number of textures. Now a NiTriStrip can only have 1 primary (along with an alpha and one other "effect" texture - generally a "_g" designation) as far as I am aware.
Uriel Posted November 14, 2012 Posted November 14, 2012 Stop trollin, we're working on serious things here. I doubt i can use normal or glow maps to draw stuff. I'll try glow map though. I've tried additional NiSourceTexture as a shader texture, as a detail texture and as a decal texture. Nifscope even displayed the tattoo whith additional NiSourceTexture as a decal&NiTexturingProperty's Apply Mode to APPLY_DECAL. But i still had nothing ingame.
Symon Posted November 14, 2012 Posted November 14, 2012 That's what I was afraid of. The specification supports it, but Beth's stupid implementation of the spec apparently does not. (Worth trying again though with different options. The Nif format isn't user friendly by any means) Sigh, It's what they did with Morrowind. Took the efforts of many modders culminating in the amazing executable patch to over-come Beth's limited usage of the engine.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.