Author Topic: Im doing really stupid things with my preset and let me tell you its pretty wild  (Read 907 times)

Offline Ahenobarbus

  • Forum Newcomer
  • *
  • Posts: 4
  • Floof-O-Meter: 0
    • View Profile
Ayo wassup, it's me, some kid you'll probably not see on this forum for another 32 years

And here I am, thinking to myself "yeah I'm pretty good at extremely basic code let me try and add some COOL EFFECTS to my preset by just kind of copy-pasting code into my .material file because that'll make me look like a genius"
(((I'm feeling pretty dumb right now this is fORESHADOWING)))

So what I decided to do is to try and add some cel-shading to my preset, as seen here and explained what I assume is pretty well on how to make that effect right https://feral-heart.com/smf/index.php?topic=62186.0

And I follow the instructions as listed, rightT

And I get this my dudes

guess what
my character is neither half blindingly white or textureless on one side (just to clarify I only put the shader on preset_6_bodyMatL to test if the effect is working, which it clearly isn't)

And so here I am, still rational, making small adjustments to the code in hopes of the white disappearing
nothing changes
So I turn to the comments of that thread instead and find one person expressing that they have the same problem that I have, and it turns out mods can be incompatible with this stuff; so I remove the only mod that I can think of having. Guess what? Still nothing.

I have yet to find anyone else experiencing the same problem that hasn't been solved already, and my character is still sitting with half of their torso stark white and blinding my left eye because my right eye was already completely destroyed upon looking at that the first time round

So I move on to other possible threads talking about the code for cel-shading, which didn't amount to much in the end, sadly enough. THEN I started thinking about doing the whole thing by myself, in which I would turn to the OGRE page and find a means of making a similar effect; that DID come up with results, so that was cool

This is the code that they've put down that include the programs that were downloadable in the FH thread (part of it anyway):
Code: [Select]
import * from "CelShading.material"

material Ogre/Skin
{
technique
{
pass : CelShadingDecalSpec
{
//specular 0.4 0.6 0.4 32
specular 1 1 1 32

texture_unit decal {
texture GreenSkin.jpg }
texture_unit specMap {
texture GreenSkin.jpg }
}
}
}
Looks pretty damn similar to the preset .material file code, right? I put this down thinking the game will crash or something (making the appropriate adjustments of course)

It doesn't

It shows up with the shader, but the character's........ still........... half white...................................

Fellas I don't know what to do anymore I don't even know what the problem is in the first place, just please help a broski out because hOMIES, I've been looking through the help thread and no one's been recently experiencing this problem

For now though, I'm OUT, PEACE
« Last Edit: January 05, 2019, 08:47:09 am by Ahenobarbus »

Offline hungry_kevin

  • Forum Newcomer
  • *
  • Posts: 3
  • Country: 00
  • Floof-O-Meter: 0
  • yeemingi
    • View Profile
perhaps try changing the files to .png? sometimes that janks everything up. if that doesn't work, keep messing around, i guess? i've never gone wild with presets, so sorry !!

Offline yourlocalcrow

  • Dedicated Supporter
  • ***
  • Posts: 412
  • Country: us
  • Floof-O-Meter: 43
  • they/them
    • View Profile
    • my deviantArt
Hello! It appears that you're using the wrong code. Here are two that should work:

Code: [Select]
import * from "CelShading.material"
material preset_#_bodyMatL
{
 technique
 {
  pass : CelShadingDecal
  {
   texture_unit decal
   {
     texture preset_#body.png
   }
  }
 }
}

Code: [Select]
import * from "CelShading.material"
material preset_1_bodyMatL
{
receive_shadows on
technique
{
pass : CelShadingDecal
{
ambient 1.000000 1.000000 1.000000 1.000000
diffuse 1.000000 1.000000 1.000000 1.000000
specular 0.050000 0.050000 0.050000 1.000000
emissive 0.000000 0.000000 0.000000 1.000000
cull_hardware none
cull_software none
texture_unit decal
{
texture preset_1body.jpg
tex_address_mode wrap
filtering trilinear
}
}
}
}

Edit: To clarify what is wrong with the code you're using is you don't have lines to texture to your preset. The lines
Code: [Select]
specular 1 1 1 32
   
   texture_unit decal {
    texture GreenSkin.jpg }
   texture_unit specMap {
    texture GreenSkin.jpg }
are not texturing anything. You'd need a seperate grouping, as shown in the above examples, to give your preset itself the texture.
« Last Edit: January 05, 2019, 05:46:06 pm by lem0ntart »

Offline Ahenobarbus

  • Forum Newcomer
  • *
  • Posts: 4
  • Floof-O-Meter: 0
    • View Profile
oH my god my dudes, thank you for this because goddamn does it work now, feel free to lock the th read yall are a godsend