Transparency, rotation, and material issues
- anarchogeek
- Private First Class
- Posts: 36
- Joined: Fri Jan 07, 2005 9:09 pm
Transparency, rotation, and material issues
I have several map issues. I have recently been designing a C++ library for making BZFlag maps, and have encountered these problems in the raw code output. I was wondernig if anyone could give me clues to what I might be leaving out or messing up.
A) The spinning disks (on the other side of the big white drivethrough Arc wall) apparently do not have the center or rotation in the correct spot, but I can't see the error.
B) The big white drivethrough Arc walls are supposed to be transparent. I have absolutely no idea how I messed up on this one, but they aren't.
C) BZFS claims that the material "matcarouselRoof" cannot be found, but I can see it defined rights above it.
Any help would be greatly appreciated.
-Happy Tanker
A) The spinning disks (on the other side of the big white drivethrough Arc wall) apparently do not have the center or rotation in the correct spot, but I can't see the error.
B) The big white drivethrough Arc walls are supposed to be transparent. I have absolutely no idea how I messed up on this one, but they aren't.
C) BZFS claims that the material "matcarouselRoof" cannot be found, but I can see it defined rights above it.
Any help would be greatly appreciated.
-Happy Tanker
- Attachments
-
- map.bzw
- (2.58 KiB) Downloaded 404 times
- RPG
- Lieutenant, Junior Grade
- Posts: 2015
- Joined: Fri Sep 17, 2004 2:37 am
- Location: Chicago, Illinois
- Contact:
B) To make the arc transparent, you have to define the transparency in the material object, and not the arc object. That means move color 1 1 1 .5 from underneath arc to underneath material. It works that way.
C) Try replacing matref matcarouselRoof with matref matcarouselWalls (EDIT: in your arc object), since they are the same texture. It seemed to work for me.
Good luck! Inform us when you finish!
C) Try replacing matref matcarouselRoof with matref matcarouselWalls (EDIT: in your arc object), since they are the same texture. It seemed to work for me.
Good luck! Inform us when you finish!
Last edited by RPG on Sun Feb 20, 2005 2:28 am, edited 1 time in total.
B) move your "color" keyword under the "matref" keyword.
using "matref" copies all the properties from the named
material into the curent object. you can change properties
within the object after the "matref". Order matters.
(you could also stick the transparency into a material block,
as RPG sugested)
C) you can't have 2 identical named materials. the CVS
version of bzfs will complain about this fact, I don't believe
that the 2.0.0 does.
using "matref" copies all the properties from the named
material into the curent object. you can change properties
within the object after the "matref". Order matters.
(you could also stick the transparency into a material block,
as RPG sugested)
C) you can't have 2 identical named materials. the CVS
version of bzfs will complain about this fact, I don't believe
that the 2.0.0 does.
- anarchogeek
- Private First Class
- Posts: 36
- Joined: Fri Jan 07, 2005 9:09 pm
Thanks for all the help. All colors are now set to go into "materials", rather then into the objects themselves. I also set the walls and roof to use the same material, which cleared up that issue.
However, I would like to know why it told me that the texture didn't exist, so that I don't cause that problem again by accident.
However, I would like to know why it told me that the texture didn't exist, so that I don't cause that problem again by accident.
- anarchogeek
- Private First Class
- Posts: 36
- Joined: Fri Jan 07, 2005 9:09 pm
OK. I've completely redone my material method. I now use the number instead of the names, and make sure to do it in the right order, but NOW I get this message:
Once again, I include the map that turns up these errors. For reference, I'm using the BZFS 2.0 released on 1/17, and am on a Windows machine.
-Happy Tanker
Code: Select all
couldn't find reference material: 12 bottom
C:\Documents and Settings\Alexander Peppe\My Documents\Visual Studio Projects\Ne
twork Messenger\bzmap\map.bzw: warning (line 307): unknown object parameter "top
" - skipping
couldn't find reference material: 12 outside
C:\Documents and Settings\Alexander Peppe\My Documents\Visual Studio Projects\Ne
twork Messenger\bzmap\map.bzw: warning (line 308): unknown object parameter "ins
ide" - skipping
couldn't find reference material: 12 endside
C:\Documents and Settings\Alexander Peppe\My Documents\Visual Studio Projects\Ne
twork Messenger\bzmap\map.bzw: warning (line 309): unknown object parameter "sta
rtside" - skipping
couldn't find reference material: 13 bottom
C:\Documents and Settings\Alexander Peppe\My Documents\Visual Studio Projects\Ne
twork Messenger\bzmap\map.bzw: warning (line 330): unknown object parameter "top
" - skipping
couldn't find reference material: 13 outside
C:\Documents and Settings\Alexander Peppe\My Documents\Visual Studio Projects\Ne
twork Messenger\bzmap\map.bzw: warning (line 331): unknown object parameter "ins
ide" - skipping
couldn't find reference material: 13 endside
C:\Documents and Settings\Alexander Peppe\My Documents\Visual Studio Projects\Ne
twork Messenger\bzmap\map.bzw: warning (line 332): unknown object parameter "sta
rtside" - skipping
couldn't find reference material: 14 bottom
C:\Documents and Settings\Alexander Peppe\My Documents\Visual Studio Projects\Ne
twork Messenger\bzmap\map.bzw: warning (line 347): unknown object parameter "top
" - skipping
-Happy Tanker
- anarchogeek
- Private First Class
- Posts: 36
- Joined: Fri Jan 07, 2005 9:09 pm
Looking at Trepan's various maps, adding a name isn't necessary...
He then refers to them using the following format..
With the numbers representing (I think) the order in which they were created, starting with 0 for the first texture (I gather). I've cleaned up the map code to make the difficulty more obvious. I've also included Trepan's physics map, and a file containing the entire error output when I try to run mine.
Code: Select all
material
diffuse 0.3 0.9 0.3 1
addtexture wall
end
material
addtexture boxwall
end
material
addtexture wall
end
material
diffuse 0.1 0.1 0.1 1
addtexture roof
end
Code: Select all
arc
position 275 -275 0
size 100 100 8
rotation 45
angle 360
ratio 1
divisions 4
texsize -8 -8 -8 -8
top matref 23
bottom matref 23
inside matref 24
outside matref 24
startside matref 25
endside matref 25
phydrv nojumping
flatshading
end
arc
position 275 -275 8
size 5 5 4
rotation 0
angle 360
ratio 1
divisions 20
texsize 2 1 1 1
top matref 26
bottom matref 26
inside matref 26
outside matref 27
startside matref 26
endside matref 26
end
- Attachments
-
- map.bzw
- (6.43 KiB) Downloaded 366 times
-
- physics.bzw
- (14.1 KiB) Downloaded 386 times
-
- error.txt
- (3.96 KiB) Downloaded 366 times
- anarchogeek
- Private First Class
- Posts: 36
- Joined: Fri Jan 07, 2005 9:09 pm
Yes, but I'm doing it with C++. indexNum++ is much easier than giving things a unique name.Valoche wrote:A name, indeed, isn't necessary.
But it's far more easy to reference textures with a name rather than with a number. Just use names, your maps will be easier to make and modify.
Valoche
Also, I did it. The issue: the materials had the same contents. Trepan mentioned this above, though apparently I didn't comprehend. Now, to me, I don't think that that should be an issue. But that's what it was. If you notice, the errors start when you get to the carousel materials, which all are the same. Anyway, issue cleared up.
Thanks for all the help!