TerraEd2 and BlitzTrees work together!?!?
Blitz3D Forums/Blitz3D Programming/TerraEd2 and BlitzTrees work together!?!?
| ||
Ok, i am taking the TerraEd2 sample code and trying to place trees in it using BlitzTrees. TerraEd2 says it supports the maps so i used that feature to get the placements right, but when it comes down to coding them to work together, i cant seem to find a handle for the terrain created by the TerraEd2 rutines. Has anyone else had this problem and/or can some one help me fix it? I thought i found the handle as Terra_Map but that just causes Blitz3d to come up whith a runtime error of "Memory Access Violation"... what on earth is going on? |
| ||
First, create your camera, say "Cam". Then, use the following sequence: Tree_Cam = Cam ; give Blitztree the camera handle Ter_LoadTerraMap() ; Standard TerraEd setup Ter_CreateGround() ; Standard TerraEd setup Ter_CreateWater() ; Standard TerraEd setup Ter_UpdateTerra(Cam) ; Important to do this now! Then, you can use "Terra_Map" as your terrain handle and proceed with BlitzTree stuff. |
| ||
I would like to say that worked but... errr... that code combined with my code somehow screwed up my display drivers and crashed windows. Now thats a first. Is there anywhere that has a list of commands, in english, that load up terraed because i think that i need to build my project from scratch. I have tried looking in the include file for TerraEd but the comments are in... well not english so it doesnt really help me. Other than that is there a sample somewhere that shows how to intergrate TerraEd and BlitzTrees together using a displacement map for the placement of trees. Thanks martonic for your help tho. |
| ||
Hi :) TerraEd can use blitztree map (green plot) for placing object but i have not blitztree, i can cannot test with it. But some of my customer have made easily the integration between the two software without problem. I have send an email to my customer's with the link of this post I hope somebody help you. Regars. |
| ||
Hi Icecap, I was working with Filax (TerraEd) and Alienhead (BlitzTree). Did you have the full version of BlitzTree ? If yes you have all things you need for using your trees with TerraED. In the last Update of BlitzTree you have the good include file for TerraEd. Regards, Stephanie |
| ||
Yes i have bought blitztrees and terraed but how on earth do i get the most up to date version of blitztrees? I bought it a while ago now, about 4 to 5 months ago. Am i still able to get the most up to date version? I have looked at the version i have and it says nothing about TerraEd. |
| ||
Hi ICECAP, Version 1.42 released ** Thanks to PinkCherry and Filax - BlitzTree3D is now supported by TerraED. ** This update adds a new function to load TerraED tree_color_maps. ** Improved the treecolormap reading speed ** Changed the makeup of the colormap list file. ** You can now assign rgbs to the mytreelist.txt Regards, Stephanie |
| ||
Icecap, You need to supply the correct parameters in those function calls - I was just explaining the order of events. Also, I left something out (sorry) - you have to do "Ter_InitTerraMap(Cam,0)" Here is a fully-fledged example, but you will need to use parameters that match the world you're loading. Include "TerraEdLoader.bb" Include "bt3d_include.bb" Cam = CreateCamera() CameraViewport Cam, 0, 0, GraphicsWidth(), GraphicsHeight() Tree_Cam = Cam ; give Blitztree the camera handle Ter_InitTerraMap(Cam,0) ; Sorry, not in original example Ter_LoadTerraMap(Your_World.ted) ; Standard TerraEd setup Ter_CreateGround(GroundHeight,"ColorMap.bmp",GroundTextureSize,"Detail1.jpg",GroundTextureSize) Ter_CreateWater(WaterLevel,WaterAlpha#) Ter_UpdateTerra(Cam) ; Important to do this now! Then, use "Terra_Map" as your terrain handle and proceed with BlitzTree stuff. It works for me - hope you get it right! |
| ||
Well, i have tried with this small example and the same "Memory Access Violation" error pops up. It is based almost exactly on your code martonic. Is my version of blitz3d screwed or something? Graphics3D 640,480,32,1 SetBuffer BackBuffer() Include "Inc_TerraEdLoader.bb" Include "bt3d_include.bb" Cam = CreateCamera() CameraViewport Cam, 0, 0, GraphicsWidth(), GraphicsHeight() Tree_Cam = Cam ; give Blitztree the camera handle Ter_InitTerraMap(Cam,0) ; Sorry, not in original example Ter_LoadTerraMap("map.ted") ; Standard TerraEd setup Ter_CreateGround(GroundHeight,"ColorMap.bmp",GroundTextureSize,"Detail1.jpg",GroundTextureSize) Ter_CreateWater(WaterLevel,WaterAlpha#) Ter_UpdateTerra(Cam) ; Important to do this now! While Not KeyDown( 1 ) RenderWorld Flip Wend End |
| ||
Ok... if anyone else gets a problem where every error in your code just brings up a box saying "Memory Access Violation"... REINSTALL BLITZ3D! I found that out the hard way. After the fresh install, all the code worked perfectly... thanks guys. |