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: 227
Joined: Fri Aug 06, 2010 7:21 am
Location: Planet Earth
Contact:

Matref zone_ground

Post by Fox in the Fog » Sun Jun 19, 2011 12:13 pm

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
Image

User avatar
optic delusion
Special Forces
Special Forces
Posts: 958
Joined: Sat Sep 25, 2004 2:29 pm
Location: Planet MoFo
Contact:

Re: Matref zone_ground

Post by optic delusion » Sun Jun 19, 2011 10:27 pm

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: 227
Joined: Fri Aug 06, 2010 7:21 am
Location: Planet Earth
Contact:

Re: Matref zone_ground

Post by Fox in the Fog » Mon Jun 20, 2011 12:14 pm

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.
Image

User avatar
optic delusion
Special Forces
Special Forces
Posts: 958
Joined: Sat Sep 25, 2004 2:29 pm
Location: Planet MoFo
Contact:

Re: Matref zone_ground

Post by optic delusion » Mon Jun 20, 2011 9:49 pm

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: 227
Joined: Fri Aug 06, 2010 7:21 am
Location: Planet Earth
Contact:

Re: Matref zone_ground

Post by Fox in the Fog » Tue Jun 21, 2011 6:41 am

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
Image

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 » Tue Jun 21, 2011 7:44 am

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: 227
Joined: Fri Aug 06, 2010 7:21 am
Location: Planet Earth
Contact:

Re: Matref zone_ground

Post by Fox in the Fog » Tue Jun 21, 2011 8:27 am

Hmmm yes, I think i need this :) but don't know how use it, my tentatives are ridiculous
Image

User avatar
blast
General
General
Posts: 4639
Joined: Fri Mar 21, 2003 3:49 pm
Location: playing.cxx
Contact:

Re: Matref zone_ground

Post by blast » Tue Jun 21, 2011 2:22 pm

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: 227
Joined: Fri Aug 06, 2010 7:21 am
Location: Planet Earth
Contact:

Re: Matref zone_ground

Post by Fox in the Fog » Tue Jun 21, 2011 5:06 pm

Hmm... For my is Chinese :P nothing worked fine :(
Image

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest