Author Topic: (FIXED)Why does one layer have missing texture when other layers are visible?  (Read 1128 times)

Offline FlyingGrass

  • ~🛠 The avant-garde doctor of mechanical beings. 🔧 🔬
  • Elder Grey Pelt
  • ****
  • Posts: 2,516
  • Country: 00
  • Floof-O-Meter: 121
  • Avatar=Me|Signature=Me
    • FlyingGrass
    • channel/UCA7RfqQ1KLl4s8JhxIXNs_Q
    • View Profile
    • Mechanicafeles Discord link
I'm putting a new code in Gui's preset, but the layer I'm coding is only yellow-black stripes.

Below is part of the body's code. The code for the layer that should move with the view is at the top of this code.

Code: [Select]
material preset_1_bodyMatL
{
        receive_shadows on
        technique
                {
                pass
                {
                         ambient 0.5 0.5 0.5
                         specular 1.0 1.0 1.0 128
                         emissive 1.0 1.0 1.0
                         cull_hardware none
                         cull_software none
                         scene_blend alpha_blend
                         alpha_rejection greater_equal 128
                         texture_unit
                         {
                                env_map spherical
                                texture cursortex.jpg
                         }
                }
                pass
                {
                         ambient 0.5 0.5 0.5
                         diffuse 1.000000 1.000000 1.000000 1.000000
                         specular 0.010000 0.010000 0.010000 1.000000
                         emissive 0.000000 0.000000 0.000000 1.000000
                         texture_unit
                         {
                                 texture presetGuibodyLTFT.png
                                 tex_address_mode wrap
                                 filtering trilinear
                                 colour_op alpha_blend
                         }

                }
The yellow-black stripes are happening on both sides, but that code works perfectly on the tail, it must be the code for the body layer.
I did remove the scrolling texture from the body.
The cursortex is being used to test the code before I create a texture for that layer.
There are no uppercase letters in the image name, and the image is a jpg.
The yellow-black stripes move with the view.

Screenshot:The tail and body share the exact same layer, and the tail is working.

I've tried typing .jpeg as well, it didn't solve the problem.
I checked the spelling of everything.
« Last Edit: September 08, 2017, 02:32:15 pm by FlyingGrass »

My presets.

Good things take time, so I'll take an eternity and create something so good that the human brain can't handle the sheer goodness of it.

Lucius

  • Guest
Re: Why is one layer texture missing?
« Reply #1 on: September 08, 2017, 02:05:39 pm »
You're missing the two last closing brackets. Try this code:
Code: [Select]
material preset_1_bodyMatL
{
        receive_shadows on
        technique
                {
                pass
                {
                         ambient 0.5 0.5 0.5
                         specular 1.0 1.0 1.0 128
                         emissive 1.0 1.0 1.0
                         cull_hardware none
                         cull_software none
                         scene_blend alpha_blend
                         alpha_rejection greater_equal 128
                         texture_unit
                         {
                                env_map spherical
                                texture cursortex.jpg
                         }
                }
                pass
                {
                         ambient 0.5 0.5 0.5
                         diffuse 1.000000 1.000000 1.000000 1.000000
                         specular 0.010000 0.010000 0.010000 1.000000
                         emissive 0.000000 0.000000 0.000000 1.000000
                         texture_unit
                         {
                                 texture presetGuibodyLTFT.png
                                 tex_address_mode wrap
                                 filtering trilinear
                                 colour_op alpha_blend
                         }
                }
}
}
Remember, for every opening bracket ({), you need a closing one (}). Otherwise the game expects more lines and never registers that the section is finished.

Offline FlyingGrass

  • ~🛠 The avant-garde doctor of mechanical beings. 🔧 🔬
  • Elder Grey Pelt
  • ****
  • Posts: 2,516
  • Country: 00
  • Floof-O-Meter: 121
  • Avatar=Me|Signature=Me
    • FlyingGrass
    • channel/UCA7RfqQ1KLl4s8JhxIXNs_Q
    • View Profile
    • Mechanicafeles Discord link
Re: Why is one layer texture missing?
« Reply #2 on: September 08, 2017, 02:15:32 pm »
You're missing the two last closing brackets. Try this code:
Code: [Select]
material preset_1_bodyMatL
{
        receive_shadows on
        technique
                {
                pass
                {
                         ambient 0.5 0.5 0.5
                         specular 1.0 1.0 1.0 128
                         emissive 1.0 1.0 1.0
                         cull_hardware none
                         cull_software none
                         scene_blend alpha_blend
                         alpha_rejection greater_equal 128
                         texture_unit
                         {
                                env_map spherical
                                texture cursortex.jpg
                         }
                }
                pass
                {
                         ambient 0.5 0.5 0.5
                         diffuse 1.000000 1.000000 1.000000 1.000000
                         specular 0.010000 0.010000 0.010000 1.000000
                         emissive 0.000000 0.000000 0.000000 1.000000
                         texture_unit
                         {
                                 texture presetGuibodyLTFT.png
                                 tex_address_mode wrap
                                 filtering trilinear
                                 colour_op alpha_blend
                         }
                }
}
}
Remember, for every opening bracket ({), you need a closing one (}). Otherwise the game expects more lines and never registers that the section is finished.
Those two closing brackets didn't fix the problem, the other layers have this same bracket setup until the end of the section.
I forgot to post the "Pass" line in the code. there are more layers below that have worked fine with the layers above them. If the brackets were a problem then I would be seeing a white blob instead of the preset's body.

I've posted a screenshot. The tail works with the moving layer code,. yet the body code might be obstructing the bottom layer somehow. I did just remove a code from the body layer that adds a scrolling texture under the body layer.
« Last Edit: September 08, 2017, 02:23:41 pm by FlyingGrass »

My presets.

Good things take time, so I'll take an eternity and create something so good that the human brain can't handle the sheer goodness of it.

Lucius

  • Guest
Re: Why is one layer texture missing?
« Reply #3 on: September 08, 2017, 02:21:12 pm »
Apologies, my reply was posted before you added your screenshot, so I assumed that you saw the entire thing as yellow and black.

I can't help you much then, other than maybe suggesting you copy the cursortex into your preset folder if it's not there already.

Offline FlyingGrass

  • ~🛠 The avant-garde doctor of mechanical beings. 🔧 🔬
  • Elder Grey Pelt
  • ****
  • Posts: 2,516
  • Country: 00
  • Floof-O-Meter: 121
  • Avatar=Me|Signature=Me
    • FlyingGrass
    • channel/UCA7RfqQ1KLl4s8JhxIXNs_Q
    • View Profile
    • Mechanicafeles Discord link
Re: Why is one layer texture missing?
« Reply #4 on: September 08, 2017, 02:26:40 pm »
Apologies, my reply was posted before you added your screenshot, so I assumed that you saw the entire thing as yellow and black.

I can't help you much then, other than maybe suggesting you copy the cursortex into your preset folder if it's not there already.

It is in the preset folder, the layer is working on the tail but the body is not showing the texture.

I apologise for editing my posts in this topic so much, I keep wondering if I've been specific enough.

My presets.

Good things take time, so I'll take an eternity and create something so good that the human brain can't handle the sheer goodness of it.

Offline FlyingGrass

  • ~🛠 The avant-garde doctor of mechanical beings. 🔧 🔬
  • Elder Grey Pelt
  • ****
  • Posts: 2,516
  • Country: 00
  • Floof-O-Meter: 121
  • Avatar=Me|Signature=Me
    • FlyingGrass
    • channel/UCA7RfqQ1KLl4s8JhxIXNs_Q
    • View Profile
    • Mechanicafeles Discord link
Re: Why is one layer texture missing?
« Reply #5 on: September 08, 2017, 02:31:23 pm »
I have fixed it by adding the transparency lines to the body code. The spherical env-map applied to the yellow-black stripes made me think it wasn't the lack of transparency lines.

Let this be a reminder to everyone, that adding the transparency lines is a must for adding a layer below what was once the scrolling code.

This can be locked, sorry if I bothered anyone.
« Last Edit: September 08, 2017, 02:34:20 pm by FlyingGrass »

My presets.

Good things take time, so I'll take an eternity and create something so good that the human brain can't handle the sheer goodness of it.

Offline Kynvuu

  • #Grimstagram
  • Elder Grey Pelt
  • ****
  • Posts: 2,538
  • Country: us
  • Floof-O-Meter: 212
  • I'm not saying that it was aliens but...
    • View Profile
Locking this as the issue has been solved c:
On a temporary leave. Please contact other members of staff if you need assistance.