rotating mesh, how?

Questions and answers about the how and why of making maps.
User avatar
Tedius
Sergeant First Class
Sergeant First Class
Posts: 142
Joined: Tue Sep 19, 2006 6:10 pm
Contact:

Post by Tedius »

I expect if you put the following in the correct place it will not disappear:

Code: Select all

lod #3
         lengthPerPixel 0 
            matref wtf 
               trifan 0 1 8 7 6 5 4 3 2 1 
            end 
      end #lod 3
this signature intentionally left blank
anomaly
Private First Class
Private First Class
Posts: 220
Joined: Tue Jul 26, 2005 10:32 pm
Location: Gainesville Florida

Post by anomaly »

from my previous post, trepan said

Code: Select all

angvel specifies the dynamic angular velocity
(degres per second).
z[h]ero
Private First Class
Private First Class
Posts: 204
Joined: Mon Jan 31, 2005 12:00 am
Location: hiding behind box...a real Bz coward :/

Post by z[h]ero »

Code: Select all

lod #3
         lengthPerPixel 0 
            matref wtf 
               trifan 0 1 8 7 6 5 4 3 2 1 
            end 
      end #lod 3
I copied this code -without thinking- direct after the end of lod2-code.
So now the object didnt disappear when driving under it. But when i was jumping over it, it disappeared!
Wirth's law: "Software is getting slower more rapidly than hardware becomes faster."
User avatar
Tedius
Sergeant First Class
Sergeant First Class
Posts: 142
Joined: Tue Sep 19, 2006 6:10 pm
Contact:

Post by Tedius »

Bumping a week old post for this:
The order of vertices(corners) in tristrips and quadstrips are the same, you begin your face counterclockwise and zigzag along the adjacent faces.
The corners would be ordered like so:

1 _____ 3 _____ 5 _____ 7
| . . . . . | . . . . . .| . . . . .|
| . . . . . | . . . . . .| . . . . .|
| . . . . . | . . . . . .| . . . . .|
2 ____ 4 _____ 6 ___ etcetera etcetera

Code: Select all

lod
    lengthPerPixel 0
    matref material
      dlist
      quadstrip 1 2 3 4 5 6 7 etcetera
    end #material
end #lod
If the above were triangles instead of squares, the corner order would be exactly the same:
1 _____ 3 _____ 5 _____ 7
| . . . . / | . . . . ./.| . . . ./ .|
| . ./ . . | . . ./. . .| . . / . .|
| / . . . . | . / . . . .| . /. . . .|
2 ____ 4 _____ 6 ___ etcetera etcetera

Code: Select all

tristrip 1 2 3 4 5 6 7 etcetera
I added a quadstripped fringe to my parasol, if anyone would like to see the code for it, I'll post it here.

EDIT: oops, my code was wrong, tris are for normal triangle faces, tristrip and quadstrip are for strips.
Last edited by Tedius on Sat Sep 15, 2007 4:53 pm, edited 1 time in total.
this signature intentionally left blank
User avatar
Macrosoft
Private First Class
Private First Class
Posts: 142
Joined: Fri May 04, 2007 2:21 am

Post by Macrosoft »

DrawInfo documentation was added to the wiki: http://my.bzflag.org/w/DrawInfo
gazz: A bullet may have your name on it, but shrapnel is addressed "to whom it may concern".
http://bash.org/?785529
User avatar
optic delusion
Special Forces
Special Forces
Posts: 1052
Joined: Sat Sep 25, 2004 2:29 pm
Location: Planet MoFo
Contact:

Post by optic delusion »

Let me tell you, that I had completely given up on ever getting any real drawinfo THREE TIMES, and was about to post something like, "Drawinfo, Don't waste your time."

But today i made two drawinfo objects, relatively easily!

We have made some serious progress with an obj-to-drawinfo.bzw converter

I wanted to put it on the new mapatorium, but that wouldn't accept a file of 5.5MB, as it just opened today...
http://mybzflag.net/mapatorium/index.php

so i placed it at the old mapatorium, for now. Expect more about drawinfo soon.
http://www.garrettsites.net/bzmaps/inde ... ail&id=226
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
gnu-sense
Private First Class
Private First Class
Posts: 78
Joined: Wed Nov 22, 2006 1:21 am

Post by gnu-sense »

anomaly reposted the informative but cryptic post of trepan; I'd like to understand what's going on in the following excerpt, regarding the example drawInfo map on the mapatorium:
anomaly wrote:

Code: Select all

P.S.
The figure eight animation of the ball was done using two copies
of a group definition containing a mesh that uses a drawInfo block.
It also uses two dynamic colors and a texture matrix to invert on
one side of the figure eight.
I loooked at the map code, and I believe the "two copies of a group definition" are the instances of group s at the bottom of the map. I recognise the meshes defining the toroids, spheres and gears, but beyond that *ow* my head hurts. Can anyone explain how the figure-8 effect is accomplished? I'm trying to interpret whether it is something reproducible and extendable to other kinds of complex paths, or whether it is just way too clever and wont usefully generalize.

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

Post by optic delusion »

it's two spheres both traveling in a circle. only one is visible at any time, looks like a figure 8, but it's really two seperate circles.
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
optic delusion
Special Forces
Special Forces
Posts: 1052
Joined: Sat Sep 25, 2004 2:29 pm
Location: Planet MoFo
Contact:

Post by optic delusion »

z[h]ero, here is the answer to your original question.
http://my.bzflag.org/bb/viewtopic.php?p=115310#115310
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.
Post Reply