UVW Mapping

Blitz3D Forums/Blitz3D Beginners Area/UVW Mapping

Toasty(Posted 2004) [#1]
Hi guys, I'm really new to this but I need to create an interactive environment created in 3DS Max. My classmates are all rendering camera movements then importing them into flash but to me it sounds kind of a waste of a good 3d environment to be stuck with a camera animation, so I wan to run around mine.

How do you go about applying a texture you've created in 3DS Max? Anybody got any good tuts? All I seem to find are heightmaps and texturing cubes with jpgs but I have transparency maps and all sorts.


Thanks


PetBom(Posted 2004) [#2]
The material and mapping and mapping methods you are using in Max are not applicable in Blitz3D (or any real-time rendering application). They are designed to be used for production rendering. What you need to do is to generate a single bitmap containing your (perhaps complex) texture, that can be used in Blitz3D. The kye to do this is using the "Render to texture" function in Max to 'bake' your texture.

Read this article to get an overview of the process:

Static Meshes: From 3DS Max 5

Especially chapter 9 describes what you are asking for.

Texture Baking (Creating Skins with 3DS Max)

The target of this tutorial is Unreal, but the concepts are the same for exporting to any real-time application.

Should set you on the right track...

//PetBom


Toasty(Posted 2004) [#3]
HAH! that's exactly what I needed, thanks heaps


Toasty(Posted 2004) [#4]
hmm ok I've done that and I have my ASE file now what function do I use to load it up?


jhocking(Posted 2004) [#5]
ASE file? No no, get B3D Pipeline and export to b3d file format. Click on 'Specs and Utils' at the top of this page to get the exporter.


AdrianT(Posted 2004) [#6]
um yeah like the Hocking monster says, if your using 3dsmax you really ought to be using B3d pipeline for export. Its by far the best exporter to to blitz from any 3D app and just happens to be for 3dsmax.


Toasty(Posted 2004) [#7]
woah!! I'm not quite sure what it's doing but it looks kickass!


Toasty(Posted 2004) [#8]
ok thats sorted I need a more fps feel to it now, what's a good collision script or even an fps script thingy? If that is what one would call it. Also how do I find out the exact location of the camera?


jfk EO-11110(Posted 2004) [#9]
There are several examples in the code archives. exact location of the camera? Well in Blitz you can check any entities location by ENtityX(), EntityY() amd EntityZ(). If you were talking about a camera that was exported in MAX, so I guess you need to know its entity name. THere are several Examples in the archive that will list all children of an entity, so you can find the name of the camera. Well, I guess it would be "Camera 1" anyway.


Toasty(Posted 2004) [#10]
hmm ok thats great thanks. This is going slightly off topic but this is my code so far, I want the camera to always be on the mesh, like a person walking along it but the camera just falls straight through the floor and I don't get the collision message. What's wrong with this?

Graphics3D 800,600

Const map_COL=1
Const camera_COL=2

SetBuffer BackBuffer()

camera=CreateCamera()
CameraViewport camera,0,0,800,600
PositionEntity Camera,0,6,0
EntityType camera,camera_COL


light=CreateLight()

map=LoadMesh( "terrain.b3d" )
EntityType map,map_COL



PositionEntity map,0,-20,900

Collisions camera_COL,map_COL,3,1

While Not KeyHit(1)

;Down
If KeyDown(208) Then
MoveEntity camera,0,0,-2
EndIf

;Up
If KeyDown(200) Then
MoveEntity camera,0,0,2
EndIf
;Left
If KeyDown(203) Then
TurnEntity camera,0,2,0
EndIf
;Right
If KeyDown(205) Then
TurnEntity camera,0,-2,0
EndIf

MoveEntity camera,0,-2,0

If EntityCollided(camera,map_COL) Then
Text 370,80,"Collided !!!"
EndIf

UpdateWorld
RenderWorld

Flip

Wend
End


Toasty(Posted 2004) [#11]
weeeeeeeeeeeeeeee I did it! Now I need the camera to look like a person so it has to be 1.8 meters or so above the ground. Would I somehow link a small cube to the camera and apply the collisions the cube which is 1.8 metres below the camera?


jhocking(Posted 2004) [#12]
"the Hocking monster"

Hm, has a nice ring to it. I might do a drawing.


BlackD(Posted 2004) [#13]
Toasty - every loop, after the collisions, just set the camera Y to +1.8 of its current position


jfk EO-11110(Posted 2004) [#14]
I'd suggest to use a player pivot

player=createviot()
camera=createcamera(player)
translateentity camera,0,1.0,0
entityradius player,0.8

Now when you move the cam, move the player instead. When you rotate it, turn the cameras pitch to look up and down and turn the players yaw to turn left and right. THis way the walking speed will remain always the same, not matter if you look up or down .