PDA

View Full Version : TBGL experiments 2007



kryton9
11-01-2007, 06:06
Petr, I decided to start this thread to discuss tests we do with TBGL and all the new work you are doing on it.

I am working on hand making a terrain model in Blender to give us something to use for tests.

The goals:

Terrain that is hilly, has a high element where water can come as a waterfall into a pond. A cave tunnel combo that will twist and turn
from lower elevations to higher elevations in the mountain.

I will place a sky dome to see how it will look. Let me know of any other features you would like me to model into it so we can use it for testing.

I was thinking at the top when you come out of the cave have a transport area like Stargate, to send to another higher ice/snow mountain to test out ideas in that environment. The ice and snow area will be visible in the distance from this green water area and vice versa when over at the icy highlands.

We can add buildings, roadways, bridges etc. think of anything else you might want and I will keep modeling the terrain.

Petr, at least tonight I didn't crash Blender doing crazy operations. This is too high a poly model, so I am going to start over trying to conserve polys and put more where detail is needed.

The blender grid represents what I would consider the water level. You can see the area that will be the waterfall. Below the waterfall area would be a small opening leading to a cave tunnel that goes to the top of that peak. At the deep end of the pond, there will be another hole going into an underground pond and cave. But as i said this is going to be dropped for a new model, but something to look at and think of ideas.

I am going to read to see if I can figure out the units and scale in blender. It will be nice to make a cylinder the size of a human or rectaingle to get an idea of scale.

Petr Schreiber
11-01-2007, 13:01
Terrific idea kryton9,

please get ready for simple script preview, when night will raise in central europe :)
I have something to do now, but today I'd like to show you tiny preview. It will requiere TBGL from "brave" version.

Bye,
Petr

ErosOlmi
11-01-2007, 13:22
Kryton9,

can you please also attach a little preview JPG of your blend file?
This way also others not having Blender can see and maybe been interested.

Thanks a lot
Eros

PS: stable thinBasic 1.2.0.0 will be release by today.

Petr Schreiber
11-01-2007, 16:11
Hi,

I cannot dedicate to it more time today, I must do ... something :( So I post it here.
This is just 1-2-3 quick sample in thinBASIC we can use for improving, not much work, I have just remapped the UV maps, created texture, added light ( early morning / late afternoon setting ) and reference person ( origninaly free obj model, but thinEdge crunched it ok :) ).

If you have a while you can watch the water - it also changes it's transparency in special places when it's right time :).
It is done using "model shader" approach, which allows to change model parameters at run time.

I am sorry no waterfall is here, but I am little bit time limited :(.
Curious about your opinions how to implement water fall, I have few ideas but I must go now. Will be here in few hours I hope :).


Bye,
Petr

P.S. Eros, I have attached the original Blender model, second image is "in game" and third file should be the ZIP which will allow you to check it real time ( [F1] for help )

ErosOlmi
11-01-2007, 16:18
I've just one word: wow :o
Great discussion and many things to learn.

Thanks guy.
Eros

Petr Schreiber
11-01-2007, 21:30
;),

happy you like it, kryton created very nice mesh in Blender!

To use it in thinBASIC scripts, I needed to just load it in thinEdge, rotate to XZ plane ( Blender seems to have Z axis as up, while thinEdge and some other modelers use Y ), and play for a while with texture mapping coordinates.

The final "megatexture" was produced from textures captured using my digital camera. Then I used picture editing program to put it together and blur all details :), so it looks more like hand drawn in the script ( this is more accident than intention :D ).

Fun part was the basic water. It is again thinEdge mesh, just gently tesselated square. I put it on the places, where water should be.
To produce the animated effect, I made the water mesh texture animated using TBGL commands in real time. During this process I also reassign colors ( just tones of gray ) to vertices, which in blending mode results in variable transparency and tiny shinning, to make the water more dynamic. Finaly I put this two water patches in opposite sense over each other, which makes crosswave impression.

And the guy on the shore, almost no work!. I just used public domain model, and rotated his arms to be parallel to body. It results in little bit weird shoulders, but who knows, maybe he is ill :-[

Looking forward to the waterfall discussion :), and also impatiently waiting for low poly version of krytons terrain ( although this high poly mountains I like too, and they are not so slow! ).


Bye,
Petr

ErosOlmi
11-01-2007, 21:43
... and also impatiently waiting for low poly version of krytons terrain ( although this high poly mountains I like too, and they are not so slow! ).


More than 150 FPS on my box :D

kryton9
11-01-2007, 22:12
WOW!!

Petr you amazed me more than I could imagine today in so many ways!!!.

That looks incredible. I got 120 fps on my computer, so maybe the polys are ok.
I will work on finishing this model version tonight then after getting things done today.

Petr your texturing and brining the model in really is impressive, the scale thing you worked out great it seems
with that fellow observing the view, nice touch. I love the lighting too, really nice.

The waterfall is something we can experiment with later, particles or plane with motion of water or combo of the 2
is what I am thinking. If you notice I also made little water stream areas leading to the top pond. This is in case we get
adventurous and want to add streams.

I will model in the tunnels and cave tonight and then work on a bridge, and a cabin later in the week. Think of anything else you would like.

I also need to work on a skydome.

But your work has really inspired me Petr, thanks so much and in a busy time of the year with school too. thanks so much.

@Eros, glad you liked it, but Petr did all the magic, I didn't think we could use that model other than looking at it in blender to discuss ideas.

kryton9
12-01-2007, 03:02
Petr. can I save out bezier curve or nurbs curve as a path that tbgl could use, for instance to follow for auto camera movement along the path? Also can we parent let's say a light to a camera so as the camera moves the light moves with it? I know you could tell the light to follow the same things as the camera would in code, but I was wondering if a link to parent type structure could be used.

And of course restrain to path or move along path type commands.

I see my mistake in the model, I didn't allow enought space for the upper level ponds water plane.

I will try to go from scratch and try to keep it lower poly where not needed and subdived where it is needed to see how it works too.

Well more in about 10 hours before I got to sleep and hopefully will have something cool to share. I can't stop playing with your mountain.zip example, you made it look so nice!!

Later now, I spent about 3 hours watching more blender videos to learn the skills to do some more testing and make a better model. The rest of the time it took me a long time to make this little test. But I did learn more about blender in doing this.

Now I will start on the lower poly very controlled model development for the terrain. I will do the ponds, waterfall and streams first, then model in the tunnels and caves and then do the rest.

But here for now is the path, and tunnel test. In blender I setup multiple windows, there is a text file and object viewer which makes it very easy to select what you want in the scene. An animation control is also there, so just click play to see it play in blender. I also attached a rendered MSVideocMPG4Version2Codec.avi with a texture on it.

I don't know if you can use the path in thinBasic or not, but it is there.

The light is linked to the camera, the camera follows the path. The tunnel was made based on the path too. Hope it gives ideas for more things for tbgl in thinBasic.

The zip contains the blender file and small avi.

Petr Schreiber
12-01-2007, 10:33
Hi,

thanks for nice words, especially when read right after waking up :)

It seems you guys don't have frame rate troubles at all ;D. On my PC I get 40 to 42 FPS, doesn't matter which resolution in this sample. Fast enough for me. I was afraid of the per vertex water function to be one of the bottlenecks, but it has no impact on performance on my box. It seems somebody developed fast interpreter here :).

The water streams are nice thing, of course I noticed place for them on the model!

I have also one heretic idea - the current terrain is modeled very nice, but its borders are something hard to continue, would it be possible to make a slightly modified version, which will have look of island with some mountain / volcano in center, but borders under the water level ?

Maybe it could have similar polygon count as current model, but scaled to bigger area, for example 500x500 meters. Current terrain is about 200x200.

This would allow to place more things on the island.
Regarding new ideas for this project... as we know x, y, z coordinates of each terrain vertex, we could place here vegetation and other things specific to height. For example - in lower parts some bigger trees, in higher just bushes and so on. Placement of the vegetation separate models could follow such a rules.

Regarding the skydome, I'm not sure how do you want to create it. Terragen and similar programs can be used to produce textures for skyboxes and so on, but this stuff works good only for fixed day time and need high resolution to look good. I was thinking of making general, but very basic weather mini engine. You could pass for example time, and it would automatically set sun position and proper light properties for such a part of day. The clouds could be nice when done in some particle / pseudo volumetric way too.

kryton9, thanks for sharing the Blender animation! Problem of using it seems to be in fact, Blender does not export any geometry from the scene to OBJ. Maybe there is something in Blender which allows to convert tunnel to polygonal model? Now it seems to be general shape. Regarding beziers, not sure how to export them too. But if you could give me the "anchor" points, it would be possible to restore it. How did you created the texture, is it something procedural ?

Your idea with camera and light sync is very good. I will think about possible implementation of it. Would it be ok for you for example tbgl_SyncLightWithCam %GL_LIGHTn, on/off flag ?


Thanks again,
Petr

kryton9
12-01-2007, 22:18
Petr, the texture was procedural in Blender for the tunnel. I just wanted to see how they worked.

I will try to export the path and tunnel as obj, if I can.

In looking at my first terrain model, there is a lot that is wrong with it. So I will definitly start from scratch. I did manage to get the polycount down to 1/4 the size by using some tools in Blender, so there are many things in blender to help that way. It is just a matter of learning them :)

Blender has a limit of size you can make. I am not sure, I read somewhere 1000 blender units, that would be 500 units each half.

I will make a simple test maximum size so we can see if can go into thinEdge and how it comes out in thinBasic. I will attach that to this message as simple enough to make.

I need to figure out a few more things in Blender to do my totally custom terran with total control of the shapes. I watched the videos but watching and doing are another matter I found out before going to sleep :)

I will need to attach and make it later as I need to run errands, I tried making it huge and it crashed Blender. I will work on it when I get back home.

Love the idea of a volcano too and plants and things, forgot about them.

I will do a quick skydome test too when I get back, your idea of atmosphere engine is great, but for now while we develop all the engines, and also to see alternative ways to do things, will do skydome.

About tbgl command, could a universal link command be made, to link one object to another so transformations will apply to it too.
This way the camera could have a light, a missle for example attached to it without needing special commands. Just one parent or link command.

This way smaller rocks could be linked to a bigger rock for example and if we made it tumble the smaller rocks would tumble with it. So once command could serve many purposes.

ANyways more when I get back tonight.

kryton9
13-01-2007, 04:18
Petr, here is a size test. I had many crashes in blender and thinEdge, mainly because I went too big and ran out of memory or something.

The blender model is 500 x500 blender units. I exported the obj and imported it into thinEdge and saved the m15 file. As you can see in thinEdge we are only seeing just a very small area of this test.

These files are probably of interest only to Petr, so I don't recommend anyone else downloading them unless really curious.

Writing this part after more tests, it seems blender units and tbgl units are the same. I just made a default 2x2 plane in blender and it came into thinEdge as 2x2 also. Upon even more testing, I see that 200 x 200 is the maximum that shows partially in thinEdge, but not as much in thinBasic. These are the second attachments.

kryton9
13-01-2007, 11:33
Started the low poly terrain. This is the start of the volcano. As you can see I am being careful and will get rid of any polys that are not seen as in while building the volcano lava arch. It is lots of fun modeling in Blender. I notice there are some tools or equivalents of things in 3dMax that I haven't found or know if they exist, but the work flow with the great Blender interface is a lot faster I think.

On 3dBuzz, I had asked what modeling package they recommend to get ready to model things for the new games coming out. And I mentioned free software, they recommended Maya as they have a free PLE (personal learning edition) which has no time out. You can save your models out, but to render or do animation you have a watermark which is really annoying, but understandable that they are doing that.

This is good to use Blender though to put it through its paces and to see what is missing or harder to do. For instance I didn't find an easy way to add noise to a model as I could with 3dMax. I am sure it is in blender somewhere, just haven't found it yet.

Anyways here is a screenshot of the volcano version 1 low poly work :)

Petr Schreiber
13-01-2007, 12:26
Hi kryton9,

first to annoying things - problems in thinEdge and TBGL rendering.

As your meshes are quite big, please do following in thinEdge:
Once model is loaded, press [F12] and in "Grid" enter for example 500, to not restrict your moves. Then go to [rendering] tab and in DrawDistance enter 500 to see more far. Now all models are viewed whole and correctly.

In TBGL scripts:
Before rendering starts, use:


tbgl_SetDrawDistance 500

This will set draw distance to 500 meters / units, instead of default 150.

Also - to prevent problems in scripts, check in your script the


tbgl_m15InitModelBuffers numModels, numberofvertices

... number of vertices should not be lower than the biggest model has !
You can see number of vertices in thinEdge again on [F12] setup, in [Informations] tab.

So as you can see, no limits in terms of visibility in both tools, just need to adjust some things.
The settings are implictely on low distances as I used thinEdge to create smaller models.
But if you want to see 2 kilometers far, like in FarCry, no problem.

thinEdge is not limited to 1000 units, I have tested areas like 20 x 20 kilometers. Next versions will bring even more precision and distances. But the 1000x1000m in Blender is limit which is reasonable for most level design.

I'm very sad thinEdge crashed during your tests, it should not. How much triangles the model had ? I have tried over 500 000 triangles mesh on my box and it displayed ( speed was nothing super ) without crash.

Volcano looks very nice, maybe it could have wider base. I don't understand why the "bridge" has no polygons in upper part, but as it is work in progress, I believe you are working on it :)
It looks promising, it reminds me of some scenery from brothers favorite game Elder Scrolls : Morrowind ;)

I have tried Maya PLE on XP box, it has lot of nice tools like grass and so on, but I wasn't able to create something precise, not speaking of frequent crashes while changing camera and cryptic format is weird too. But I believe full version is good, as LucasArts use it for movie stuff.

I'm all for your work in Blender. I can see huge skill progress in it, and it is always good to master 1 tool 100% than just "be ok" with 1000 other modelers. As long as we can make it interface with m15, I have nothing against Blender.

Universal link in TBGL sounds cool, I'm writing it on wish list.

Sorry for my delayed and brief answers, it should be better not later that in month.


Thanks a lot,
Petr

kryton9
13-01-2007, 12:43
Petr, everytime you write it is with great news. I am so glad we have unlimited site and within reason big levels :)

The arch was in progress, I got rid of all the polygons in between, I was going to keep taking screenshots, but got lazy. This is just the tip of the volcano, it will be a mulit-tiered big Mama :)

Heading to bed, as you can see doing poly by poly almost for total control. Lots of fun!!

Petr Schreiber
13-01-2007, 12:48
Good night kryton :D,

wow, this version looks very very good!

Regarding OBJ import, I am prepairing separate application to provide very deep settings regarding texturing ( get from original, remap using other technique, ...), scaling and others. It is something like 3 step setup process ( select files to convert, setup conversion rules, convert and place in directory ), very easy to do.

Hope to release in Q1 2007 :)
It will give me idea of what all is needed during import process and it will open doors for thinEdge plugins hopefully.


Bye,
Petr

kryton9
13-01-2007, 12:59
Sounds very exciting Petr, will sleep well thinking of the possibilities!!

kryton9
14-01-2007, 07:08
Petr, testing skydomes tonight. Found a nice free texture on the web and made my skydome and it renders nicely in blender without seams or repeats.

I am having problems bringing it into thinEdge and getting the mapping correct. Attached is the blend file, the bmp texture, mtl and obj file exported from blender.

It will be neat to use skydomes and will quickly add to the atmosphere in the tests and games :)

http://www.kryton9.com/web/posts/games/test/blender/skydome/skydome01.zip

kryton9
14-01-2007, 09:16
Very simple test of how liquids might be handled flowing from higher level to lower level. Sounds a lot more fancy than it is.

This is how I was thinking I could model water, lava and other liquids. Make a mesh where they would be seen, instead of using a plane.
This is a test where the whole lava mesh is one model. Makes it harder to map. I will have to learn how to uvmap and unwrap in Blender :)

Anyways just some simple tests tonight. Hand modeling takes a long time, so I wanted to get the simpler things out of the way and to make sure we can make it look right before putting too much more time into it :)

Petr Schreiber
14-01-2007, 12:56
Hi kryton9!,

you surprise me every day.
Another 2 new things ... perfect ;)

I'm not on my working computer, so no chance to test the second lava sample because I don't have Blender here, just thinEdge.

Regarding skydome, on image it looks very nice. Problem in thinEdge is in fact, that Blender did not exported the UV coordinates, maybe you forgot to check them for export.
In such a case thinEdge is forced to "invent" them using very basic technique.

In OBJ, all texture definition lines start with "vt ", while your OBJ contains only "v " ( vertices ) and "f " ( faces ).

Can't wait to see lava when I'll be back on my box.


Thanks,
Petr

kryton9
14-01-2007, 22:08
The Lava is nothing more than that picture, I was just wondering if that is the way you would like to see the meshes instead of planes, This way it will be one continuous flow, but without the mapping done correctly won't be a good test.

There is a written tutorial on uvmapping that I will go through today and see if I can export it then correctly into thinEdge. If so, then a major hurdle is handled.

I will try the mapping on the skydome too. It is mapped correctly in blender, like you said must be something I missed in the export.

Added just now: I went through and the uv mapping button was selected in the export before. I selected all the buttons in different combinations related to materials, uv's and triangles and couldn't get it to come out right.

I will now work on the tough uv mapping example and see how that goes and exports when finished.

kryton9
16-01-2007, 05:13
Found this nice page with a very simple explanation of how to do ray to plane collision detection.
You need the normal vector for a plane however. Are we able to get that via tbgl at the moment?

http://www.gamespp.com/algorithms/collisionDetectionTutorial02.html

Petr Schreiber
16-01-2007, 11:58
Hi kryton9,

yes, this approach is very precise and I was ( trying to ) using it for some time.
But imagine we have terrain of thousands of triangles - little planes. Then we need to test if we are "in" any of this triangles and then setup correct position.
Precise, but it can be really slow. Also notice the test of being inside the triangle is not here too.

But I can try it, maybe it won't be that slow, I think for example "Giants:Citizen Kabuto" use this approach for collision with land.

Regarding monsters and moving objects, I would go the way of bounding elipsoids and spheres. It is quite fast with acceptable level of approximation.

I must tell you I have one mad idea regarding terrain collision :).
As you know, there are algoritms to find from few x,y points original 2D function.
( like you give: 1,1 and 3,9 and it returns y=x^2 ).

If we could discover such a algo for a 3D field of points ( feeded from terrain vertex coordinates ), then it would be quite fast solution. We could just pass x, z and it would return minimal y, based on the function approximation.
Of course, this way has its limits, like the terrain could not have "loops" or thing like the waterfall beam in first model is ( 2 y for 1 x,z ). But the waterfall could be added additionaly and collided individualy. Maybe idea for MATH module :).

Regarding exporting problems of UVs in Blender ... strange thing :(
Maybe there is newer version of their OBJ exporter available ?


Thanks a lot,
Petr

ErosOlmi
16-01-2007, 18:11
On MATH module, send me the algo you need and I will add quite soon.

Ciao
Eros

Petr Schreiber
16-01-2007, 22:00
EDITED
Hi Eros,

please scratch it :(

This idea is mad, and it would not be very fast/usable/realizable for all cases in the end.
I will try to find another way.

Sorry for confusion,
Petr

kryton9
16-01-2007, 23:42
I used this intersect method in a game I did in darkbasic pro and it was fast enough. It will be worth testing as since we know the x and z of the camera, we can just shoot a ray down to find the terrain y. No need to go through all the vertices, from the way I was thinking.

For objects your idea of boxes and ellipsoids is a good approach. With that and ray intersection we should be able to do a lot.

kryton9
17-01-2007, 02:02
Managed to get a bigger level into thinEdge and thinBasic. I am using your mountain level Petr from before, so you will see the same water you made in scale to the newer bigger land :)

The original mesh in blender was over half million faces, using this modifier called decimate, I was able to get it down to under 50000 vertices, about 17000 faces.

I am still getting about 110 frames per second with it, so very very happy with the speed results. The bmp alone was over 12 megabytes in size so I didn't attach the whole file just a screenshot. It didn't turn out like I imagined it would anyways.

Petr Schreiber
17-01-2007, 16:08
Hi kryton,

what a landscape, how big area does it cover ?

The 25 000 vertices original terrain has runs at 40 PS on my box, this one with 50 000 would run at ... ???.
But as you say it was build from BMP file - when I get the BMP->Terrain function ( you mentioned in another thread ) working, I think it could render fast even on my PC.

Why ?

m15 models are treated as general geometry, so rendered as triangles.
The terrains could be more optimized, because they are rectangular continuous areas.
I could use triangle stripes instead of classic triangles, which would result in better speed.


Thanks,
Petr

kryton9
22-01-2007, 09:54
Petr, last weeks tests with massive size terrains and the performance was a very pleasant surprise for me. I know that the speed and performance is there in thinBasic and TBGL from these tests.

Loading it up with scene objects and all their textures, I don't know about, but I am sure there is a trick out there to it. Probably some sort of grid. The player moves and as he gets near the end of this section of the grid the next section based on his direction is loaded. I know DarkBasic Pro does things like this really well, although I hadn't used them, just from looking at their demos and when you think about it, it makes sense.

I don't know how IL-2 guys do their massively huge terrains that are nicely populated with cities, roads, train tracks, rivers, buildings of all sorts and vehicles and wonderful skies. I have no idea how they do it. I would think some sort of fractal terrain, but it is based on real world geography, that is what perplexes me.

Petr Schreiber
22-01-2007, 20:32
I must say I enjoyed the terrain experiments very much too :)

Regarding very large scenes, some advanced mangement would be needed. As you say, some sort of grid or sectors is a must, if you want to make the environment detailed but yet playable on older PCs. With static things, which can be display list optimized there is not so big problem. But moving things should have some visibility distance tests.



I don't know how IL-2 guys do their massively huge terrains that are nicely populated with cities, roads, train tracks, rivers, buildings of all sorts and vehicles and wonderful skies. I have no idea how they do it. I would think some sort of fractal terrain, but it is based on real world geography, that is what perplexes me.

Yes, they are really masters. There is lot of optimization in this game. I like the trick they used for forests. Just few layers, but from high it looks so real...
I can see some level of detail corrections, when you fly too high. I think they have some huge array with heightmap, and they adjust the detail according to the distance.
Skies are beautiful, volumetric clouds also terrific...

I think they have separate terrain rendering engine, then the cities are just linked to the positions( their silhouette) , as well as detached trees, which are copies of some models, rotated slightly differently. Buildings are also individual, rendering according to distance.


Bye,
Petr

kryton9
22-01-2007, 21:15
I see you answered one of my questions I sort of asked elsewhere. Thanks. IL-2 is amazing!!
That is my goal to make something that huge with stuff everywhere, will be great!!

kryton9
27-01-2007, 08:26
Petr, I was studying and playing robot duel tonight. Amazing how you figured all of that out.
I have still never beaten the AI on easy mode :)

I was looking at the models in thinEdge and when I took out the textures I was surprised to see this?

Where is the uvmapping coming from? I don't see anything in applying something like that to the models?
It is cool to see how well corrected the mapping is.

I went through the help and menus in thinEdge and couldn't figure it out. Thanks

Petr Schreiber
27-01-2007, 16:17
Hi kryton9,

another missing thing in thinEdge docs :(

The checker texture you see is texture for special occasions :), when the source textures are missing.

In such a case you are informed about missing textures using messagebox while loading, log file is created for easier correcting of this problem ( thinEdgeProblems.txt ) and in place of missing textures this one is rendered. The link to missing textures are still maintained, so no damage is caused to the model.

Regarding UV mapping, there is quite high grade of freedom in thinEdge. UV are always created for new polys, if you use assistants you can adjust their generation a bit more. Even if you have poly created, you can shift and shrink the texture UVs on selected objects when in "Texture coords setup" mode ( key [5] ). The step of change is proportional to "cursor step".

The checker texture will be changed to another color combination in next thinEdge, because you can't see well if polygon is selected.

I can see you run thinEdge in wide screen mode, so you are quite information limited due to my fault in on screen text trouble. When I solve this problem, I will release first beta of thinEdge 1.0.0.6.


Thanks a lot,
Petr

Petr Schreiber
27-01-2007, 20:19
Hi,

thinEdge problem solved ?
Please see here (http://community.thinbasic.com/index.php?topic=507.msg2493)


Bye,
Petr

kryton9
27-01-2007, 22:52
Petr, wow that makes such a difference. Since my memory is not the greatest, it was hard for me to get passed the basics of thinEdge. Now with this online info, it will be a lot easier.

For instance the graphics modes 1-5, I had no idea what they did. Still don't but will play with it today!!

Here is a screenshot of the new Beta release view of the Robot Duel Arena.
I also really liked the change in color of the texture, a lot easier to see what is what!!!

Petr Schreiber
28-01-2007, 00:19
Hi kryton9,

[1] to [5] are more tool modes than graphical ones, you will see.
They provide various kind of help. In fact you need only:
[1] - classic vertex addition
[4] - modifiers
[5] - texture fun :)

[2] and [3] can be bypassed using right keys :)


Bye,
Petr

kryton9
15-02-2007, 08:54
Hi Petr,

I was testing texture baking and seeing if I can get it into thinEdge and then into thinBasic, but had problems.

I am attaching a zip file of the blend file and the bmp I am using. Just double click the blend file. Then press F12 to render. As you can see, the texture baked texture works fine. You can verify it is using that because there are no lights in the scene. I set the texture emit to on.

Anyways, I tried exporting to obj many times and it either opens and nothing shows up or I get a crash in thinEdge.

Hope it helps you trouble shoot. I wanted to do the test, because I was going to work on more elaborate models and wanted to make sure I can get a simple object texture baked into thinBasic, before I spent time modeling and texturing.

I know you are busy, but when you have time, take a look and let me know how it goes. Thanks.

Petr Schreiber
15-02-2007, 09:56
Hi !,

my apologies for thinEdge crash, this should never happen :(

After few tests I discovered the problem - thinEdge texture loading procedure does not like 32bit textures, 24bit is maximum now. This won't hurt the image quality. So I saved your baked texture in image editor as 24bit and it loaded properly. The BMP is also ( logically ) at 75% of size.

So please until I fix this problem, could you save the bitmaps as 24bit ?

In attachment you can find how it looks in thinEdge, and also "corrected" bitmap.
I am very curious what you'll model next !

Thanks a lot for reporting this,
Petr

kryton9
15-02-2007, 18:04
Thanks Petr for figuring that out. Now I will work on another model, one a little more complex and work my way up to something neat :)

Michael Hartlef
16-02-2007, 14:12
Hi Kent,

can you lead me to some documentation/tuts/vids about texture baking with Blender?

Michael

kryton9
16-02-2007, 20:27
It is not too easy Mike, I still have to refer to these tutorials and it is still luck of the draw to get it seems, but when it works, it is satisfying.

http://vegastrike.sourceforge.net/wiki/HowTo:Radiosity_baking_in_Blender

http://www.ogre3d.org/wiki/index.php/Radiosity_to_texture_baking

There are also tutorials for some various other plug-ins, but I was going with the one in my version of Blender.
I will share future projects I develop. I had an idea last night, but I couldn't pull it off as I saw it my head.

Look forward to seeing your tests and projects too!!

Petr Schreiber
16-02-2007, 22:17
Hi kent,

please if you have thinEdge still somewhere on your hard drive, could you backup original thinEdge.exe, and replace it with attached - it is just quick patch applicable on previous complete instalation.

It should be able to use 32bit textures directly from Blender bakery :)
And it has lot of features of forthcoming beta 2 of thinEdge 1.0.0.6
Let me know if it works, when you'll have time.


Bye,
Petr

kryton9
17-02-2007, 02:05
Just downloaded it when I got home Petr. Will write back after I have a chance to play with it, thanks for the update!

kryton9
17-02-2007, 02:45
I was rushing to find the links I had read before doing the texture baking in blender, but knew I had one better. I found it again when I got home and had time to look.

http://www.scifi-meshes.com/forums/dojo/1755-blender-faint-hearted-08-uv-texture.html

Michael Hartlef
17-02-2007, 14:55
Thank you, there are more nice blender related tutorials there.

RobertoBianchi
17-02-2007, 15:09
Wow, also a lot of Star Wars, Star Trek and ... meshes, my children are happy.

Thanks,
Roberto

kryton9
17-02-2007, 20:59
Glad it helped guys, when I have it all figured out in a way that works consistantly, I will make a video tutorial. It will also help me in the future as it is complicated and would be nice to have something to refer too for a memory refresh :)

I have been busy with my c++ studying. My video course came and I am enjoying it. It is scary but the way c and c++ syntax looks is not annoying me as much as it used too. I sort of skipped ahead to preview the opengl stuff. It is neat they show how to do a simple rotating cube in 4 different windowing api's: GLUT,Windows API, SDL and wxWidgets. Glut is the easiest but limited they said. The windows Api one took around 500 lines of code, Ouch. SDL was second easiest and wxWidgets, well that seemed complicated too, but they said it was built on top of another lesson on wxWidgets, so I will know better in the future when I get there.

So I study and for breaks play with blender. Petr, thinEdge update works fine as far as I can tell. I had no crashes. I didn't test the 32 bit bmp yet as none of my trials have gone well in blender lately. The 32 bit bmp is my fault as I converted it from tga I think and selected 32 bit instead of 24 bit. As you said you don't see the difference on textures, maybe on a huge landscape it might make a difference, I am not sure. But it is nice to have it.

Petr Schreiber
17-02-2007, 23:57
Hi,

thanks for info!
The difference between 24bit and 32bit colors is only in fact 32bit ones have alpha channel, but both provide 16 million colors ( enough :) )


Bye,
Petr

kryton9
18-02-2007, 01:01
Thanks Petr, nice to know. Does bmp 32 support alpha then?

Petr Schreiber
18-02-2007, 11:58
Hi,

it is possible, but very weird.
I didn't knew 32bit BMP can be done at all :)


Bye,
Petr

Michael Hartlef
18-02-2007, 12:37
It does??? I thought BMP can't have an alpha channel.

Petr Schreiber
18-02-2007, 12:57
;D

I am also very curious how kryton9 managed to do this, but it is true :)


Bye,
Petr

kryton9
18-02-2007, 22:04
THis post explains about 32 bit bmp.

http://lists.xcf.berkeley.edu/lists/gimp-developer/2007-January/016912.html

Petr Schreiber
19-02-2007, 10:03
Thank you,

thinEdge currently reads the alpha values.
If you don't want them, just save as 24bit.


Bye,
Petr

kryton9
19-02-2007, 19:48
thinEdge will be one of the few new apps out there to read 32 bit bmp's then, how cool is that!!