drawInfo not working
drawInfo not working
Hello,
I made normal box on Blender and then I put it in .bzw, I look for code drawInfo and found it, one is at BZWiki. I put it at .bzw there where is normal box.
It says many errors... When I try examples from internet then it works great, but I would like to make one alone not copy.
Can someone help me, please?
I made normal box on Blender and then I put it in .bzw, I look for code drawInfo and found it, one is at BZWiki. I put it at .bzw there where is normal box.
It says many errors... When I try examples from internet then it works great, but I would like to make one alone not copy.
Can someone help me, please?
Re: drawInfo not working
We can't if we don't know what you're doing or what errors you received.
Re: drawInfo not working
Here is my mapfile.bzw:
define box
mesh #
# vertices: 8
# normals: 0
# texcoords: 0
# faces: 6
vertex -3.820217 -3.820216 7.640434
vertex -3.820217 3.820217 7.640434
vertex 3.820217 3.820216 7.640434
vertex 3.820215 -3.820218 7.640434
vertex -3.820219 -3.820215 0.000000
vertex 3.820216 -3.820217 0.000000
vertex 3.820218 3.820215 0.000000
vertex -3.820214 3.820219 0.000000
face
vertices 0 1 2 3
endface
face
vertices 4 5 6 7
endface
face
vertices 0 4 7 1
endface
face
vertices 1 7 6 2
endface
face
vertices 2 6 5 3
endface
face
vertices 4 0 3 5
endface
end
drawInfo
dlist
# extents -1 -1 0 1 1 1
# sphere 0 0 0.5 2.25
angvel 70
corner 0 0 0
corner 1 1 1
corner 2 2 2
corner 4 4 4
lod # 0
dlist
lengthPerPixel 0
# tristrip 2 3 4 0 1 3 2 4
# tristrip 0 1 3 2 4 1
end # material -1
end # lod 0
end # drawInfo
enddef
group box
scale 1 1 1
shift 0 0 0
end
I don't know what's problem with it.
define box
mesh #
# vertices: 8
# normals: 0
# texcoords: 0
# faces: 6
vertex -3.820217 -3.820216 7.640434
vertex -3.820217 3.820217 7.640434
vertex 3.820217 3.820216 7.640434
vertex 3.820215 -3.820218 7.640434
vertex -3.820219 -3.820215 0.000000
vertex 3.820216 -3.820217 0.000000
vertex 3.820218 3.820215 0.000000
vertex -3.820214 3.820219 0.000000
face
vertices 0 1 2 3
endface
face
vertices 4 5 6 7
endface
face
vertices 0 4 7 1
endface
face
vertices 1 7 6 2
endface
face
vertices 2 6 5 3
endface
face
vertices 4 0 3 5
endface
end
drawInfo
dlist
# extents -1 -1 0 1 1 1
# sphere 0 0 0.5 2.25
angvel 70
corner 0 0 0
corner 1 1 1
corner 2 2 2
corner 4 4 4
lod # 0
dlist
lengthPerPixel 0
# tristrip 2 3 4 0 1 3 2 4
# tristrip 0 1 3 2 4 1
end # material -1
end # lod 0
end # drawInfo
enddef
group box
scale 1 1 1
shift 0 0 0
end
I don't know what's problem with it.
Re: drawInfo not working
And what are the errors you receive? The error usually points to the area where the problem is...
There is nothing worse than aggressive stupidity. -- Johann Wolfgang von Goethe
"How many legs does a dog have if you call his tail a leg? Four. Calling a tail a leg doesn't make it a leg." -- Abraham Lincoln
"How many legs does a dog have if you call his tail a leg? Four. Calling a tail a leg doesn't make it a leg." -- Abraham Lincoln
Re: drawInfo not working
I guess this is that what do you want:
drawinfotest.bzw: warning (line 37): invalid object type "drawInfo" - skipping
drawinfotest.bzw: warning (line 38): invalid object type "dlist" - skipping
drawinfotest.bzw: warning (line 41): invalid object type "angvel" - skipping
drawinfotest.bzw: warning (line 42): invalid object type "corner" - skipping
drawinfotest.bzw: warning (line 43): invalid object type "corner" - skipping
drawinfotest.bzw: warning (line 44): invalid object type "corner" - skipping
drawinfotest.bzw: warning (line 45): invalid object type "corner" - skipping
drawinfotest.bzw: warning (line 47): invalid object type "lod" - skipping
drawinfotest.bzw: warning (line 48): invalid object type "dlist" - skipping
drawinfotest.bzw: warning (line 49): invalid object type "lengthPerPixel" - skipping
drawinfotest.bzw: error (line 53): unexpected "end" token
drawinfotest.bzw: error: world file failed to load.
ERROR: A world was not specified
:/
drawinfotest.bzw: warning (line 37): invalid object type "drawInfo" - skipping
drawinfotest.bzw: warning (line 38): invalid object type "dlist" - skipping
drawinfotest.bzw: warning (line 41): invalid object type "angvel" - skipping
drawinfotest.bzw: warning (line 42): invalid object type "corner" - skipping
drawinfotest.bzw: warning (line 43): invalid object type "corner" - skipping
drawinfotest.bzw: warning (line 44): invalid object type "corner" - skipping
drawinfotest.bzw: warning (line 45): invalid object type "corner" - skipping
drawinfotest.bzw: warning (line 47): invalid object type "lod" - skipping
drawinfotest.bzw: warning (line 48): invalid object type "dlist" - skipping
drawinfotest.bzw: warning (line 49): invalid object type "lengthPerPixel" - skipping
drawinfotest.bzw: error (line 53): unexpected "end" token
drawinfotest.bzw: error: world file failed to load.
ERROR: A world was not specified
:/
Re: drawInfo not working
The drawInfo should be part of the mesh. You are ending your mesh too early. Remove the 'end' after your last 'endface' in your mesh definition and see if it works better.
Re: drawInfo not working
The draw info is not an object itself, it is part of the mesh, you put the draw info outside the mesh so that's why it did not work. Put it before the end of the box.
also you have an extra end for a matref you did not define.
also you have an extra end for a matref you did not define.
Code: Select all
define box
mesh #
# vertices: 8
# normals: 0
# texcoords: 0
# faces: 6
vertex -3.820217 -3.820216 7.640434
vertex -3.820217 3.820217 7.640434
vertex 3.820217 3.820216 7.640434
vertex 3.820215 -3.820218 7.640434
vertex -3.820219 -3.820215 0.000000
vertex 3.820216 -3.820217 0.000000
vertex 3.820218 3.820215 0.000000
vertex -3.820214 3.820219 0.000000
face
vertices 0 1 2 3
endface
face
vertices 4 5 6 7
endface
face
vertices 0 4 7 1
endface
face
vertices 1 7 6 2
endface
face
vertices 2 6 5 3
endface
face
vertices 4 0 3 5
endface
drawInfo
dlist
# extents -1 -1 0 1 1 1
# sphere 0 0 0.5 2.25
angvel 70
corner 0 0 0
corner 1 1 1
corner 2 2 2
corner 4 4 4
lod # 0
lengthPerPixel 0
# tristrip 2 3 4 0 1 3 2 4
# tristrip 0 1 3 2 4 1
end # lod 0
end # drawInfo
end
enddef
group box
scale 1 1 1
shift 0 0 0
end
JeffM
Re: drawInfo not working
Thanks blast and JeffM for telling me to delete one "end" which I fail. 2nd problem, I've done all as you said, but the box hasn't got texture (it's invisible) O.o
Maybe I fail something again
Here it is:
define box
material
name example
alphathresh 0.9
noradar
noshadow
noculling
nosorting
addtexture http://images.bzflag.org/-shadow-/-shadow-_stone.PNG
end
mesh
vertex -10 -10 0
vertex 10 -10 0
vertex 10 10 0
vertex -10 10 0
vertex -10 -10 10
vertex 10 -10 10
vertex 10 10 10
vertex -10 10 10
face #south
matref example
vertices 0 1 5 4
endface
face #east
vertices 1 2 6 5
matref example
endface
face #north
vertices 2 3 7 6
matref example
endface
face #west
vertices 3 0 4 7
matref example
endface
face #bottom
vertices 0 1 2 3
matref example
endface
face #top
vertices 4 5 6 7
matref example
endface
drawInfo
dlist
# extents -1 -1 0 1 1 1
# sphere 0 0 0.5 2.25
angvel 50
lod # 0
lengthPerPixel 0
matref -1
dlist
#tristrip 0 1 4 2 4 3 0 2 1
#tristrip 2 3 4 0 1 3 2 4
#tristrip 0 1 3 2 4 1
end # material -1
end # lod 0
end # drawInfo
end
enddef
group box
matref example
scale 1 1 1
shift 0 0 0
end
What's wrong D:
Maybe I fail something again
Here it is:
define box
material
name example
alphathresh 0.9
noradar
noshadow
noculling
nosorting
addtexture http://images.bzflag.org/-shadow-/-shadow-_stone.PNG
end
mesh
vertex -10 -10 0
vertex 10 -10 0
vertex 10 10 0
vertex -10 10 0
vertex -10 -10 10
vertex 10 -10 10
vertex 10 10 10
vertex -10 10 10
face #south
matref example
vertices 0 1 5 4
endface
face #east
vertices 1 2 6 5
matref example
endface
face #north
vertices 2 3 7 6
matref example
endface
face #west
vertices 3 0 4 7
matref example
endface
face #bottom
vertices 0 1 2 3
matref example
endface
face #top
vertices 4 5 6 7
matref example
endface
drawInfo
dlist
# extents -1 -1 0 1 1 1
# sphere 0 0 0.5 2.25
angvel 50
lod # 0
lengthPerPixel 0
matref -1
dlist
#tristrip 0 1 4 2 4 3 0 2 1
#tristrip 2 3 4 0 1 3 2 4
#tristrip 0 1 3 2 4 1
end # material -1
end # lod 0
end # drawInfo
end
enddef
group box
matref example
scale 1 1 1
shift 0 0 0
end
What's wrong D:
Re: drawInfo not working
You did not define any coordinates for your draw info, and no material, so it won't show anything. You commented out the tristrip.
I'm not sure you know what you are doing. DrawInfo is SUPER complex, so I would recommend that you understand what it does before you decide to use it.
With draw info you have to define ALL of the information for the faces, that means UVs and normals.
You may be better off using a modeling application and export as OBJ and convert to draw info with modeltool.
I'm not sure you know what you are doing. DrawInfo is SUPER complex, so I would recommend that you understand what it does before you decide to use it.
With draw info you have to define ALL of the information for the faces, that means UVs and normals.
You may be better off using a modeling application and export as OBJ and convert to draw info with modeltool.
JeffM
Re: drawInfo not working
Sorry if I don't understand some things. I will try to make all to be perfect. Thanks for help!
Re: drawInfo not working
I'm trying to do some object which is flying, on blender I can modle. It can be normal box too. Just I want it to fly, example look planes on map by Jefenry Stalingrad or on Planet MoFo
one space ship from film "Star Wars". They are moving. (we can say they are flying)
one space ship from film "Star Wars". They are moving. (we can say they are flying)
Re: drawInfo not working
There is a draw info option for modeltool that will convert an obj into a non-colliding object that will spin. That sounds like what you want.
Remember, DrawInfo is not a generic animation system, so it is very limited in what it can do.
Remember, DrawInfo is not a generic animation system, so it is very limited in what it can do.
JeffM
Re: drawInfo not working
Thanks for your help. I've made DrawInfo, I mean I made much thing with it... Now I know how to make it. If you are interested, go at: altix.silicon.hr:5552 on BZFlag.