Matref zone_ground

Questions and answers about the how and why of making maps.
Post Reply
User avatar
fox in the fog
Private First Class
Private First Class
Posts: 231
Joined: Fri Aug 06, 2010 7:21 am
Location: Italy

Matref zone_ground

Post 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
Attachments
bzfi0060_modificata.png
(771.09 KiB) Not downloaded yet
no, there's nothing here. nope.
User avatar
optic delusion
Special Forces
Special Forces
Posts: 1018
Joined: Sat Sep 25, 2004 2:29 pm
Location: Planet MoFo
Contact:

Re: Matref zone_ground

Post by optic delusion »

I suggest a textureMatrix using fixedscale
Take a look at my Defender game mode concept.

Thinking is not an automatic process. A man can choose to think or to let his mind stagnate, or he can choose actively to turn against his intelligence, to evade his knowledge, to subvert his reason. If he refuses to think, he courts disaster: he cannot with impunity reject his means of perceiving reality.
User avatar
fox in the fog
Private First Class
Private First Class
Posts: 231
Joined: Fri Aug 06, 2010 7:21 am
Location: Italy

Re: Matref zone_ground

Post 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.
no, there's nothing here. nope.
User avatar
optic delusion
Special Forces
Special Forces
Posts: 1018
Joined: Sat Sep 25, 2004 2:29 pm
Location: Planet MoFo
Contact:

Re: Matref zone_ground

Post 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

Take a look at my Defender game mode concept.

Thinking is not an automatic process. A man can choose to think or to let his mind stagnate, or he can choose actively to turn against his intelligence, to evade his knowledge, to subvert his reason. If he refuses to think, he courts disaster: he cannot with impunity reject his means of perceiving reality.
User avatar
fox in the fog
Private First Class
Private First Class
Posts: 231
Joined: Fri Aug 06, 2010 7:21 am
Location: Italy

Re: Matref zone_ground

Post 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
no, there's nothing here. nope.
User avatar
zaphod
Sergeant
Sergeant
Posts: 352
Joined: Sun Jan 23, 2005 3:20 pm
Location: beteigeuze-system
Contact:

Re: Matref zone_ground

Post by zaphod »

i guess you have to play around with:
texsize

check out this wiki-link:
http://my.bzflag.org/w/Texturing_how_to
.
.
.
Image
User avatar
fox in the fog
Private First Class
Private First Class
Posts: 231
Joined: Fri Aug 06, 2010 7:21 am
Location: Italy

Re: Matref zone_ground

Post by fox in the fog »

Hmmm yes, I think i need this :) but don't know how use it, my tentatives are ridiculous
no, there's nothing here. nope.
User avatar
blast
General
General
Posts: 4805
Joined: Fri Mar 21, 2003 3:49 pm
Location: playing.cxx
Contact:

Re: Matref zone_ground

Post by blast »

http://my.bzflag.org/w/Box#Appearance

Note the different texsize defaults for the various types of boxes.
"In addition to knowing the secrets of the Universe, I can assure you that I am also quite potty trained." -Koenma (Yu Yu Hakusho)

Image
User avatar
fox in the fog
Private First Class
Private First Class
Posts: 231
Joined: Fri Aug 06, 2010 7:21 am
Location: Italy

Re: Matref zone_ground

Post by fox in the fog »

Hmm... For my is Chinese :P nothing worked fine :(
no, there's nothing here. nope.
Post Reply