.b3d Help!

Blitz3D Forums/Blitz3D Beginners Area/.b3d Help!

Ben(t)(Posted 2007) [#1]
I have a program that creates trees called TreeCreator_jfkmod_jan07
but the problem is that I don't know how to import the
.b3d model into blitz3d
can someone help me?


GfK(Posted 2007) [#2]
tree = LoadAnimMesh("tree.b3d")



Ben(t)(Posted 2007) [#3]
I tried that but blitz3d says the entity does not exist


ingenium(Posted 2007) [#4]
because the entity doesn't exist! Maybe your mesh has:
-another name
-a problem (isn't a real .b3d)


bradford6(Posted 2007) [#5]
check your path. is tree.b3d in the same dir as your program?

is it in "\models\tree.b3d" ?


Yo! Wazzup?(Posted 2007) [#6]
Did you rename it before you tried to import it? That would mess it up.


Ben(t)(Posted 2007) [#7]
I made a program just to test the mesh out in the same directory as the mesh was and I did the loadanimmesh but it said it doesn't exist.


Ben(t)(Posted 2007) [#8]
allow me to apologize sincerely I had version 1.64 instead of the new version I'm used to auto update software
sorry about that various users!


Ben(t)(Posted 2007) [#9]
on a different note I have a 3d mesh that has all its animation in one long animation is there a way I can split it up or tell blitz to set it to a certain frame?


Matty(Posted 2007) [#10]
Yes you can use the commands extractanimseq to extract a series of frames and store it as a sequence which can be called later, or you can use setanimtime directly to specify which frame of animation you want displayed at any time.


Ben(t)(Posted 2007) [#11]
here's a good question how do I get different texts into blitz?


Blitz123(Posted 2007) [#12]
If you mean different fonts for 2D text, there are Load font, and SetFont() commands.Look in the manual under 2d>Text.
However, stick to common fonts, because if the user does not have the font you are trying to use, it will crash.Unless your installer installs the right fonts. But, if you want exotic font, look at Juicy Fonts instead.


Beaker(Posted 2007) [#13]
Or Fontext


Ben(t)(Posted 2007) [#14]
what I mean is that I have a certain sort of font that I like and I want to put it in the program and not worry if a computer will have it or not


Blitz123(Posted 2007) [#15]
You will need to automaticley run an installer that moves the font to the correct folder. Do this at the very start of the program.Check to see if it is there already. If it is , skip installing it.


Beaker(Posted 2007) [#16]
With most fonts you can put them in the same directory as your app, then load from there. But, you must make sure you use its filename rather than its internal name (or vice-versa, can't remember which).


GfK(Posted 2007) [#17]
Never EVER install stuff directly into the Windows folder!

All the resources your game needs, be it graphics or fonts or whatever, should be located in the same folder as (or a subfolder of) the same place your EXE is.

People generally don't thank you for mucking about with their system files and folders.


Ben(t)(Posted 2007) [#18]
Okay that's what I want to do Beaker how do I load the font in? what do I type in to get the font loaded?


b32(Posted 2007) [#19]
You could use the LoadFont command:
Graphics 800, 600, 0, 2
font = LoadFont("Arial.ttf", 20)
SetFont font
Text 0, 0, "Hello"
WaitKey()



Ben(t)(Posted 2007) [#20]
I thought that blitz went to the computer's C drive and got the text out of somplace in there


b32(Posted 2007) [#21]
Yes, the fonts are placed in c:\windows\fonts
You could also use LoadFont("Arial") to load this one. It is one of the fonts that is installed by default.
However, if you want to use a custom font, you should copy the file in your program directory, to ensure your user can load it.
For my program, I used JuicyFonts. It is a very nice software.


Ben(t)(Posted 2007) [#22]
where can I find that?


Yo! Wazzup?(Posted 2007) [#23]
here


jfk EO-11110(Posted 2007) [#24]
Additional note:
When you use a font that is distributed with your game in your exe folder, make sure that:

the filename matches the internal name. Doubleclicking the font file should open a font viewer that also displays the internal/official name of it. If the filename doesn't match, rename the file.

Also note: you have to store it in the same directory. A path like "..\My Font.ttf" won't work.


Ben(t)(Posted 2007) [#25]
I tried to get the loadfont command to load my .ttf file but it just ignores it and loads the base font.


b32(Posted 2007) [#26]
Maybe the font is not compatible with Blitzbasic ? If that is the case, use Juicyfonts.


Ben(t)(Posted 2007) [#27]
oh I'm not using blitzbasic I'm using blitz3d


b32(Posted 2007) [#28]
well, maybe it is not compatible with blitz3d then :)


bradford6(Posted 2007) [#29]
I have the answers to all these questions and more:

http://www.lulu.com/content/388950


Ben(t)(Posted 2007) [#30]
sounds like a good idea for me