Page 1 of 1

Matref zone_ground

Posted: Sun Jun 19, 2011 12:13 pm
by fox in the fog
I've added on my map a material and a physics

Code: Select all

material
  name zone_ground
  texture zone_ground
end

Code: Select all

physics
  name phy4
  linear 40.0 40.0 50.0
end
physics
  name phy3
  linear -40.0 -40.0 50.0
end

Code: Select all

box
  name box_bounce_sotto
  position -350.0 -390.0 0.0
  size 26.0 6.0 1.0
end
meshbox
  name box_bounce
  position -350.0 -390.0 1.0
  size 26.0 4.0 0.5
  phydrv phy4
  top matref zone_ground
  outside matref bt
end
box
  name box_bounce_sotto
  position 350.0 390.0 0.0
  size 26.0 6.0 1.0
end
meshbox
  name box_bounce
  position 350.0 390.0 1.0
  size 26.0 4.0 0.5
  phydrv phy3
  top matref zone_ground
  outside matref bt
end
And I have used it on a box, adding top matref and outside matref parameters
and now, the box is colored, but the zone ground isn't like the normal purple ground... is flattened and long.
I post a screenshot. What could I do?
Fox

Re: Matref zone_ground

Posted: Sun Jun 19, 2011 10:27 pm
by optic delusion
I suggest a textureMatrix using fixedscale

Re: Matref zone_ground

Posted: Mon Jun 20, 2011 12:14 pm
by fox in the fog
Hmm... I've done some tries, looking on the bzwiki, but in vain.

"I suggest a textureMatrix using fixedscale" How exactly? Doing this the slide of the object is oppose to before... right (I've noticed this)? Sorry for my bad English comprehension.

Re: Matref zone_ground

Posted: Mon Jun 20, 2011 9:49 pm
by optic delusion
The texture matrix is completely separate from the physics. There are many options and you can try to match the texture movement to your physics. Maybe shift will be a better option for you than fixedscale.

Code: Select all

textureMatrix
 name example_texmat
        # scale 0.0 0.0 1.0 1.0  # u/v freqs, u/v scales
         #spin 0.0               # rotation freq
         shift 0.0 0.5          # u/v freqs
         #center 0.5 0.5         # dynamic u/v center (for spin and scale)
         #fixedscale 0.5 0.5     # time invariant u/v scale
         #fixedspin 0.0          # time invariant rotation
         #fixedshift 0.0 0.0 
  end

material
  name zone_ground
  texture zone_ground
  texmat example_texmat
end


Re: Matref zone_ground

Posted: Tue Jun 21, 2011 6:41 am
by fox in the fog
Hm... Sorry, but this doesn't fix the bug. Of Course it worked, because doing this the ground was moving.... but still "flatten and long" like on the screenshot

Re: Matref zone_ground

Posted: Tue Jun 21, 2011 7:44 am
by zaphod
i guess you have to play around with:
texsize

check out this wiki-link:
http://my.bzflag.org/w/Texturing_how_to

Re: Matref zone_ground

Posted: Tue Jun 21, 2011 8:27 am
by fox in the fog
Hmmm yes, I think i need this :) but don't know how use it, my tentatives are ridiculous

Re: Matref zone_ground

Posted: Tue Jun 21, 2011 2:22 pm
by blast
http://my.bzflag.org/w/Box#Appearance

Note the different texsize defaults for the various types of boxes.

Re: Matref zone_ground

Posted: Tue Jun 21, 2011 5:06 pm
by fox in the fog
Hmm... For my is Chinese :P nothing worked fine :(