Completely new beginner to 3D

Blitz3D Forums/Blitz3D Beginners Area/Completely new beginner to 3D

gerald(Posted 2012) [#1]
I am just trying the code examples in the book. I can't get the cyilinder to show up on sreen? What is the position for the upper left corner of the screen? A 2d background shows up but only the top left corner of it.


I would like to use .bmp for backgrounds and axess and targets and stuff. I have seen the .3ds stuff in the book. Must art in 3d be .3ds?


How do you use a .bmp for an entity? How do you code it in, name etc.? They seem to open for backgrounds when using BP 2D code.


The book is sketchy on this general beginner stuff and it looks like the tutorial area is over my head.


Is there a know help for these basic loading and art questions?


Yasha(Posted 2012) [#2]
Well the first question would be "which book?" (There's a B3D book?)

The 3D system used by B3D is completely different from the 2D system. Whereas the 2D system has you drawing to a blank canvas once every screen refresh, the 3D system is conceived as a window onto a persistent world: you don't manually "draw" objects, they just sit there and appear when the camera is pointed at them. (You do have to "draw" the camera viewport, but there's a dedicated command - RenderWorld - for that.) So asking about the top left of the screen doesn't make any sense: 3D objects are not drawn using 2D screen coordinates. They have a position in space, complete with depth and rotation.

I would like to use .bmp for backgrounds and axess and targets and stuff.


BMP is an image. You can use it as a background; you cannot use it as an axis or target (that doesn't even make sense). BMP is just a way to store image data.

I have seen the .3ds stuff in the book. Must art in 3d be .3ds?


No. 3DS is just a (bad) way to store 3D scene data. In fact, you're best advised to ignore it and use B3D (the .b3d file format, that is) or MD2: 3DS is a terrible format and if it appears in your book, it probably means the book was written with an old version of B3D that didn't support newer formats.

The best way to create custom models is with a modelling application. Wings3D and Blender are both pretty good - if you've never used one before, start with Blender as it does everything B3D needs. Tutorials for the modelling application will probably help you understand 3D better before you come to try programming in it, and there will be more of them for Blender than for B3D.

Is there a know help for these basic loading and art questions?


This is the place. Once you have a handle on the way 3D works and how scene media is stored, asking specific questions about the way to do in in B3D will become easier!

Last edited 2012


RemiD(Posted 2012) [#3]
You can start by watching the Blitz3d tutorials on youtube.com
For example this one :
http://youtube.com/watch?v=xWRpRgv3lbw


Here is a really simple code example in Blitz3d :
;Sets the parameters of the window
Graphics3D(800,600,32,2)
;Draws on the back buffer
SetBuffer(BackBuffer())

;Creates and positions a camera
Camera = CreateCamera()
PositionEntity(Camera,0,1.7,-5)

;Creates and positions a cylinder
CylinderMesh = CreateCylinder(8)
ScaleMesh(CylinderMesh,1.0/2,1.0/2,1.0/2)
PositionMesh(CylinderMesh,0,1.0/2,0)
EntityColor(CylinderMesh,000,000,255)

;Creates an image
SmileyImage = CreateImage(100,100)
;Draws on the image buffer
SetBuffer(ImageBuffer(SmileyImage))
ClsColor(000,000,000)
Cls()
Color(255,255,000)
Oval(0,0,100,100,1)
Color(010,010,010)
Oval(19,19,20,30,1)
Color(010,010,010)
Oval(59,19,20,30,1)
Color(010,010,010)
Line(34,74,64,74)
Line(34,74,14,54)
Line(64,74,84,54)
;Draws on the back buffer
SetBuffer(BackBuffer())

;Creates a light
SunLight = CreateLight(1)
RotateEntity(SunLight,45,-45,0)
PositionEntity(SunLight,-1024,1024,-1024)
LightColor(SunLight,255,255,255)
AmbientLight(125,125,125)

;MainLoop
Repeat
 
 Cls()

 ;Turns the Cylinder
 TurnEntity(CylinderMesh,0,1,0)

 If(KeyDown(2)=True)
  Wireframe True
 ElseIf(KeyDown(2)=False)
  Wireframe False
 EndIf

 ;Renders the scene
 RenderWorld()

 ;Draws some text infos
 Color(255,255,255)
 Text(0,0,"Triangles = "+TrisRendered())

 ;Draws the smiley
 DrawImage(SmileyImage,399-50,199-50)
 
 ;Shows all that has been drawn in the backbuffer on the frontbuffer
 Flip(True)

Until(KeyDown(1)=True)

End 


Last edited 2012


gerald(Posted 2012) [#4]
To Yasha:

That is supposed to be axes, battle axes, sorry.

I have the disk for the book and used chapter 13 program help to do the world and cylinder. It works fine. Progress!

I am still hung up on art. I want to do "entities" for actors and targets but have only 2d art programs.

Can any of the 3d art programs import a 2d image and just call it 3d by changing the file extension? My 2d, I Photo Plus 4, changes all 2d file extension with a click?

This would be a big help. I will search net for blender and wings 3d art stuff.

Thanks,
Gerald


gerald(Posted 2012) [#5]
yasha:

I downloaded blender it would not open in spite of many files copying. I had more luck with wings. It downloaded, opened and I was able to use it and save files as .x that opened in b3d.

Thanks for the tip on that one.

Now I need to figure out the code style differences from b2d.


gerald(Posted 2012) [#6]
Is blender 64 bit? i am still xp 32 bit nividia 5200. a little out of date. I got the 32 bit wings like the 32 bit 7zip. Thanks again. Gerald


Yasha(Posted 2012) [#7]
Blender definitely works on 32-bit, 'cause it works here and my machine is 32-bit XP as well. Did you get the installer or the archive? If one didn't work, try the other?


gerald(Posted 2012) [#8]
Hi,

I will try to download blender again. I spotted a password window when I tried to install it. Where do you get the install password if it is needed?

My system is only 1.5 ghz with 512 mb ram. Is this the problem?

What is a good (free) height map generator? Is there one?

Gerald


Yasha(Posted 2012) [#9]
? There is no password. Did you download it from [ahttp://www.blender.org/]the blender website[/a], or somewhere else?

The system isn't great but it should work for the kind of things you'll be likely to want to make.

As for heightmaps... there will be plugins for various editors, and it can also be done directly in B3D. As usual it depends on what you want to do, and what kind of heightmap you want.


gerald(Posted 2012) [#10]
I found one program free on the net for heightmaps. It is L3DT. It downloads and opens and I think it works. I have not got a map that I can convert with it yet.

Blender will not open for me. I downloaded it a second time. Still nothing. I think a donation is required to get the missing file or password.


Yasha(Posted 2012) [#11]
L3DT is a great program, but it's intended for generating heightmaps more or less from scratch rather than converting anything. You can enforce your will upon the generated terrain to an extent, but it's not the most convenient thing in the world. If you already have an image you want to use... you arguably already have your heightmap.

Using the link on the left (Windows, 32-bit, installer), Blender downloads, installs and runs without complaint on my system. No donations, no passwords, just tested it myself. I don't know what you're downloading, but it can't be the official installer if it requires a password - and if it demands a donation, it is a scam and your download has most definitely been hijacked at some point in the process.


gerald(Posted 2012) [#12]
Hi: afterthought,

I lucked on to a copy of jasc photo shop at the goodwill. It has a greyscale button to convert any picture to a greyscale for use as a hight map.

Another lucky thing, I photo plus 4 also has a greyscale click button and I had it all along but never noticed it or used it as I had no use for it. It's there though.

With these features any geometric drawing becomes a hghtmap. A black line becomes a valley and after deleating a black line the white line/hole becomes a ridge or mountain. Basic highs and lows. Fill a low with a plane and you have a lake or river.

Beginners stuff but helpful.


gerald(Posted 2012) [#13]
With wings if I make a horse with a rider and use it for a camera character/entitiy the horses head appears behing the rider. Also, a plane or helicopter tail is offset and can appear ahead of the main wing like the horse's rider.

How is this perspective problem handled. I switched to a centaur so the rider and horse are the same. Any input on this front rear perspective problem?

Gerald


gerald(Posted 2012) [#14]
my projectiles/bullets seem to need to be made in the z plane or I can't get them positioned right. Any help?