Author Topic: Preset Cel Shading Help [Solved]  (Read 1223 times)

Offline sanrio

  • Grumpy Overlord
  • Elder Grey Pelt
  • ****
  • Posts: 2,820
  • Country: gb
  • Floof-O-Meter: 108
    • kiyatii
    • View Profile
Preset Cel Shading Help [Solved]
« on: October 07, 2017, 10:00:28 pm »
I hope this is okay for me to post this here as I don't want to clump up >this< thread with questions

As the title states, I need a bit of help with the Cel Shading effects shown in >this< thread, it's only the coding that I need help with (I think)

I was going through the instructions one by one, and I got confused as I added all the 3 pieces of code given, but when I looked at the "Your mat file should look like this", I got very confused.
It looked COMPLETELY different to mine, even though I followed every step.

SoftMoon's Mat File (Apparently)
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
}
}
}
}
My Mat File
Code: [Select]
import * from "CelShading.material"
pass : CelShadingDecal
material preset_11_bodyMatL
{
technique
{
pass
{
texture_unit
{
texture preset_11body.jpg
}
}
}
}
material preset_11_bodyMatR
{
technique
{
pass
{
texture_unit
{
texture preset_11body.jpg
}
}
}
}
material preset_11_headMatL
{
technique
{
pass
{
texture_unit
{
texture preset_11head.jpg
}
}
}
}
material preset_11_headMatR
{
technique
{
pass
{
texture_unit
{
texture preset_11head.jpg
}
}
}
}
material preset_11_eyeMatL
{
technique
{
pass
{
cull_hardware none
cull_software none
texture_unit
{
texture preset_11eye.jpg
}
}
}
}
material preset_11_eyeMatR
{
technique
{
pass
{
cull_hardware none
cull_software none
texture_unit
{
texture preset_11eye.jpg
}
}
}
}
material preset_11_tailMat
{
technique
{
pass
{
texture_unit
{
texture preset_11tail.jpg
}
}
}
}
    material preset_11_maneMat
    {
            technique
            {
                    pass
                    {
                            cull_hardware none
                            cull_software none
                            alpha_rejection greater_equal 128
                            texture_unit
                            {
                                    texture preset_11mane.png
                            }
                    }
            }
    }


material preset_11_equipMatL
{
technique
{
pass
{
texture_unit
{
texture preset_11equip.jpg
}
}
}
}
material preset_11_equipMatR
{
technique
{
pass
{
texture_unit
{
texture preset_11equip.jpg
}
}
}
}

I feel as if I'm missing code, which I probably am, but none is given?
I've also tried to figure out a way to add SoftMoon's already made mat file into mine but I just can't get my head around it.
If someone can help or just give me the code then that would be absolutely amazing and I would be so grateful.
I also apologize if this is worded in a weird way, I'm just unsure on how to fully explain my problem.
« Last Edit: October 08, 2017, 12:01:09 am by lvgic »

Avatar by byambyy | Signature by rykerclawss

Offline teanovai

  • Dedicated Supporter
  • ***
  • Posts: 306
  • Country: ie
  • Floof-O-Meter: 24
  • . care for a spot of tea?
    • teanovai
    • View Profile
Re: Preset Cel Shading Help
« Reply #1 on: October 07, 2017, 11:12:17 pm »
when i was testing it out a few weeks back, i got awfully confused by the instructions as well.

what i found to work was to just delete the original material file and replace it entirely with the code that was given in the example. so your material file should look exactly like softmoon's example, just of course with the different parts of the preset added in and not just the body.

here is an example of mine:
Code: [Select]
import * from "CelShading.material"
material preset_4_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_4body.jpg
tex_address_mode wrap
filtering trilinear
}
}
}
}
import * from "CelShading.material"
material preset_4_bodyMatR
{
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_4body.jpg
tex_address_mode wrap
filtering trilinear
}
}
}
}
import * from "CelShading.material"
material preset_4_headMatL
{
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_4head.jpg
tex_address_mode wrap
filtering trilinear
}
}
}
}
import * from "CelShading.material"
material preset_4_headMatR
{
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_4head.jpg
tex_address_mode wrap
filtering trilinear
}
}
}
}
import * from "CelShading.material"
material preset_4_eyeMatL
{
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_4eye.jpg
tex_address_mode wrap
filtering trilinear
}
}
}
}
import * from "CelShading.material"
material preset_4_eyeMatR
{
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_4eye.jpg
tex_address_mode wrap
filtering trilinear
}
}
}
}
import * from "CelShading.material"
material preset_4_tailMatL
{
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_4tail.jpg
tex_address_mode wrap
filtering trilinear
}
}
}
}
import * from "CelShading.material"
material preset_4_tailMatR
{
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_4tail.jpg
tex_address_mode wrap
filtering trilinear
}
}
}
}

also, make sure you have the required files downloaded and installed that's provided for you on the original thread!

signature by me | icon by raspbearies
my preset!

Offline sanrio

  • Grumpy Overlord
  • Elder Grey Pelt
  • ****
  • Posts: 2,820
  • Country: gb
  • Floof-O-Meter: 108
    • kiyatii
    • View Profile
Re: Preset Cel Shading Help
« Reply #2 on: October 07, 2017, 11:29:44 pm »
Thank you so much! I'm glad I wasn't the only one that wasn't confused.

I've put into the coding, everything works perfectly except for the tail, and I don't know why.


Here's what my code looks like:
Code: [Select]
import * from "CelShading.material"
material preset_11_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_11body.jpg
tex_address_mode wrap
filtering trilinear
}
}
}
}
import * from "CelShading.material"
material preset_11_bodyMatR
{
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_11body.jpg
tex_address_mode wrap
filtering trilinear
}
}
}
}
import * from "CelShading.material"
material preset_11_headMatL
{
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_11head.jpg
tex_address_mode wrap
filtering trilinear
}
}
}
}
import * from "CelShading.material"
material preset_11_headMatR
{
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_11head.jpg
tex_address_mode wrap
filtering trilinear
}
}
}
}
import * from "CelShading.material"
material preset_11_eyeMatL
{
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_11eye.jpg
tex_address_mode wrap
filtering trilinear
}
}
}
}
import * from "CelShading.material"
material preset_11_eyeMatR
{
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_11eye.jpg
tex_address_mode wrap
filtering trilinear
}
}
}
}
import * from "CelShading.material"
material preset_4_tailMatL
{
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_4tail.jpg
tex_address_mode wrap
filtering trilinear
}
}
}
}
import * from "CelShading.material"
material preset_4_tailMatR
{
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_4tail.jpg
tex_address_mode wrap
filtering trilinear
}
}
}
}


    material preset_11_maneMat
    {
            technique
            {
                    pass
                    {
                            cull_hardware none
                            cull_software none
                            alpha_rejection greater_equal 128
                            texture_unit
                            {
                                    texture preset_11mane.png
                            }
                    }
            }
    }


material preset_11_equipMatL
{
technique
{
pass
{
texture_unit
{
texture preset_11equip.jpg
}
}
}
}
material preset_11_equipMatR
{
technique
{
pass
{
texture_unit
{
texture preset_11equip.jpg
}
}
}
}

Avatar by byambyy | Signature by rykerclawss

Offline teanovai

  • Dedicated Supporter
  • ***
  • Posts: 306
  • Country: ie
  • Floof-O-Meter: 24
  • . care for a spot of tea?
    • teanovai
    • View Profile
Re: Preset Cel Shading Help
« Reply #3 on: October 07, 2017, 11:32:05 pm »
i'm glad it helped! and it seems you forgot to change it from preset_4tail to preset_11tail.
« Last Edit: October 07, 2017, 11:35:46 pm by teanovai »

signature by me | icon by raspbearies
my preset!

Offline sanrio

  • Grumpy Overlord
  • Elder Grey Pelt
  • ****
  • Posts: 2,820
  • Country: gb
  • Floof-O-Meter: 108
    • kiyatii
    • View Profile
Re: Preset Cel Shading Help
« Reply #4 on: October 07, 2017, 11:36:19 pm »
I swear I could've changed it, hm.
Anyway, I changed it and it's still not working.

Code: [Select]
import * from "CelShading.material"
material preset_11_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_11body.jpg
tex_address_mode wrap
filtering trilinear
}
}
}
}
import * from "CelShading.material"
material preset_11_bodyMatR
{
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_11body.jpg
tex_address_mode wrap
filtering trilinear
}
}
}
}
import * from "CelShading.material"
material preset_11_headMatL
{
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_11head.jpg
tex_address_mode wrap
filtering trilinear
}
}
}
}
import * from "CelShading.material"
material preset_11_headMatR
{
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_11head.jpg
tex_address_mode wrap
filtering trilinear
}
}
}
}
import * from "CelShading.material"
material preset_11_eyeMatL
{
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_11eye.jpg
tex_address_mode wrap
filtering trilinear
}
}
}
}
import * from "CelShading.material"
material preset_11_eyeMatR
{
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_11eye.jpg
tex_address_mode wrap
filtering trilinear
}
}
}
}
import * from "CelShading.material"
material preset_11_tailMatL
{
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_11tail.jpg
tex_address_mode wrap
filtering trilinear
}
}
}
}
import * from "CelShading.material"
material preset_11_tailMatR
{
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_11tail.jpg
tex_address_mode wrap
filtering trilinear
}
}
}
}


    material preset_11_maneMat
    {
            technique
            {
                    pass
                    {
                            cull_hardware none
                            cull_software none
                            alpha_rejection greater_equal 128
                            texture_unit
                            {
                                    texture preset_11mane.png
                            }
                    }
            }
    }


material preset_11_equipMatL
{
technique
{
pass
{
texture_unit
{
texture preset_11equip.jpg
}
}
}
}
material preset_11_equipMatR
{
technique
{
pass
{
texture_unit
{
texture preset_11equip.jpg
}
}
}
}

Avatar by byambyy | Signature by rykerclawss

Offline teanovai

  • Dedicated Supporter
  • ***
  • Posts: 306
  • Country: ie
  • Floof-O-Meter: 24
  • . care for a spot of tea?
    • teanovai
    • View Profile
Re: Preset Cel Shading Help
« Reply #5 on: October 07, 2017, 11:48:34 pm »
oh, whoops. just noticed it wasn't working on my half, either. i've figured it out now.

delete this part entirely:
Code: [Select]
import * from "CelShading.material"
material preset_11_tailMatL
{
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_11tail.jpg
tex_address_mode wrap
filtering trilinear
}
}
}
}
import * from "CelShading.material"
material preset_11_tailMatR
{
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_11tail.jpg
tex_address_mode wrap
filtering trilinear
}
}
}
}

and in its place, paste in:
Code: [Select]
import * from "CelShading.material"
material preset_11_tailMat
{
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_11tail.jpg
tex_address_mode wrap
filtering trilinear
}
}
}
}
just remembered that you can't have an L or an R version of the tail, lol.

signature by me | icon by raspbearies
my preset!

Offline sanrio

  • Grumpy Overlord
  • Elder Grey Pelt
  • ****
  • Posts: 2,820
  • Country: gb
  • Floof-O-Meter: 108
    • kiyatii
    • View Profile
Re: Preset Cel Shading Help
« Reply #6 on: October 08, 2017, 12:00:57 am »
Ah, I'm surprised I didn't realize that earlier, lol.
Thank you very much for your help!

Avatar by byambyy | Signature by rykerclawss

Offline Warriorstrike

  • . "The truth is often what we make of it; you heard what you wanted to hear, believed what you wanted to believe."
  • Ancient Silver Mane
  • *****
  • Posts: 4,221
  • Country: us
  • Floof-O-Meter: 346
  • . Remember… the Force will be with you. Always.
    • warriorstrike
    • warriorstrike
    • View Profile
    • My Tumblr
Re: Preset Cel Shading Help [Solved]
« Reply #7 on: October 08, 2017, 12:06:01 am »
I'll lock this up for you as the issue seems to have been fixed. c:

If you define yourself by the power to take life, the desire to dominate, to possess… then you have nothing.