Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Saving a BlitzTerrain as X?

Author
Message
Mugen Wizardry
User Banned
Posted: 22nd Aug 2011 16:38
So, if I combine the set blend mapping on, with the tile code, and the non-blur code, it would work?

CHECK OUT MY WEBSITE AT http://imageposeidon.com/ !
thenerd
17
Years of Service
User Offline
Joined: 9th Mar 2009
Location: Boston, USA
Posted: 22nd Aug 2011 18:13
Why don't you try it, and find out for yourself instead of asking for help! That's really the only way you'll truly understand things. People can only help and explain so much.

Mugen Wizardry
User Banned
Posted: 22nd Aug 2011 19:13
Ok, I tried it, and its not baking my detail map into my texture map ><

Above main loop:



Under main loop:



CHECK OUT MY WEBSITE AT http://imageposeidon.com/ !
KISTech
18
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 23rd Aug 2011 03:38
The SET BLEND MAPPING ON command "blends" textures together. The last argument in the line tells it how to blend that texture in with the rest.

From the code above, you've only blended one texture. You need to blend in the detail map and the normal map too.

Mugen Wizardry
User Banned
Posted: 23rd Aug 2011 03:57
i did...

set blend mapping on Terr(tt).objid, 0, TerrDet, 3, 22
set blend mapping on Terr(tt).objid, 1, Terr(tt).img_t, 0, 7

CHECK OUT MY WEBSITE AT http://imageposeidon.com/ !
KISTech
18
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 23rd Aug 2011 05:37
That should be,

set blend mapping on Terr(tt).objid, 0, TerrDet, 0, 22
set blend mapping on Terr(tt).objid, 1, Terr(tt).img_t, 3, 7

If that isn't working, try some of the other values you think might work in place of the 22. Try 23, or experiment with some of the other values just to see what it does.

Mugen Wizardry
User Banned
Posted: 23rd Aug 2011 15:44
The one that worked the best, was 10. the other 2 were 17 and 24, but one made it look crazy, and the other made it look.... meh.... o.o

BUT it made it too dark. and when im looking at the ground, it's still blurry even though I got rid of the mipmaps >< ....

Above main loop:

`load the heightmap
TerrHM = FreeImage()
load image "Terrain\Terrain1_HM.bmp", TerrHM, 1

`load the texturemap
TerrTX = FreeImage()
load image "Terrain\Terrain1_TX.png", TerrTX, 1

TerrDet = FreeImage()
load image "Terrain\detail.tga", TerrDet, 1

`==================================================

`In a function:

set blend mapping on Terr(tt).objid, 0, TerrDet, 0, 10 `10, 17, 24
set blend mapping on Terr(tt).objid, 1, Terr(tt).img_t, 3, 7

CHECK OUT MY WEBSITE AT http://imageposeidon.com/ !
Indicium
18
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 23rd Aug 2011 18:09
Wouldn't it be easier to just use Blitzterrain? It's already optimised for exactly this. It seems like you're reinventing the wheel a little to save it then just reload into darkbasic.

KISTech
18
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 23rd Aug 2011 21:08
I think he's still intending to use BlitzTerrain to generate terrains and save them off as objects so he can sell them on TurboSquid.

Given the time it's taken to get this far, I should be asking for a 30% cut.

@MW,
What's the size of the texture image you are starting with, and how many pieces are you splitting it up into? 4096 x 4096 split up into pieces of 256 x 256 is going to leave you with pretty low resolution texture pieces, as you can see in the Endless Terrain demo.

L3DT will let you go up to some higher resolutions, with options to split the textures for you. You'll end up with better resolution to your terrain texture that way.

Mugen Wizardry
User Banned
Posted: 23rd Aug 2011 22:43
Well see, that's just the problem. I tried L3DT, and it STILL looks bad in DBpro ><

I am using the terrain you used in the Endless Terrains demo as a test to see if I could give it the same quality, or NEAR the same quality as possible without going over board.

CHECK OUT MY WEBSITE AT http://imageposeidon.com/ !
KISTech
18
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 23rd Aug 2011 23:06
That texture was made with L3DT.

Mugen Wizardry
User Banned
Posted: 23rd Aug 2011 23:08 Edited at: 23rd Aug 2011 23:10
Yea, I could tell. BUT. Can we get it to be not blurry at all? Like instead of seeing pixels, I see ACTUAL rock, ground, grass and what not and SAVE it that way?

CHECK OUT MY WEBSITE AT http://imageposeidon.com/ !
KISTech
18
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 23rd Aug 2011 23:12
You'll have to re-generate the textures from L3DT in a higher resolution. It's the only way to get more detail out of it. A 256 x 256 texture stretched across a 2000 x 2000 unit DBPro object is going to pixelate like that. You can either scale down the object, or scale up the texture.

Mugen Wizardry
User Banned
Posted: 23rd Aug 2011 23:14
the problem is, I NEED the detail map to blend in WITH my texture map and control the tiles. ALL this would be MUCH easier if Kaedroho would have included an external parameter to save it as bloody X format ><

CHECK OUT MY WEBSITE AT http://imageposeidon.com/ !
KISTech
18
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 23rd Aug 2011 23:36
My advice is pick up Game Maker and have some fun learning about how to make games.

Then if you really want to program, learn more about how to use DBPro and all of it's abilities to make a game. That is after all what it's for, and what most people on here are doing.

You'll have more fun doing that, and you might even be able to make something that you can sell to the app stores and make some money.

That's what I'm doing. KISTech Studios - Games

I'm sorry but I can't invest any more time into this.

Mugen Wizardry
User Banned
Posted: 24th Aug 2011 00:22
Number 1. Screw Game Maker. Tried it, and the games are LIMITED. I HATE limits, and I WILL succeed with getting this quality better, whether you help or not. I'm NOT going to let you tell me how to run my life.

CHECK OUT MY WEBSITE AT http://imageposeidon.com/ !
Mugen Wizardry
User Banned
Posted: 24th Aug 2011 00:40
ANYway. Now with my rage gone, I have redone your ENTIRE code to be more easy to handle for people.

I need you to help me fix ONE thing.

WHY is the bloody camera moving by itself? ><



Thanks!

CHECK OUT MY WEBSITE AT http://imageposeidon.com/ !
Mugen Wizardry
User Banned
Posted: 24th Aug 2011 01:28
KISTech, sorry for the double post, but I HAD to get your attention ONE last time.

CHECK OUT MY WEBSITE AT http://imageposeidon.com/ !
Indicium
18
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 24th Aug 2011 01:31
Try triple post.

Mugen Wizardry
User Banned
Posted: 24th Aug 2011 01:55
Try hijacking ur OWN thread, u jerk

CHECK OUT MY WEBSITE AT http://imageposeidon.com/ !
Indicium
18
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 24th Aug 2011 13:22
Hijacking my own thread would be a little counter-productive. How many times do people have to tell you about not triple posting before you actually stop doing it?

Mugen Wizardry
User Banned
Posted: 24th Aug 2011 15:52 Edited at: 24th Aug 2011 22:59
LEAVE MY THREAD ALONE! :<

CHECK OUT MY WEBSITE AT http://imageposeidon.com/ !
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 24th Aug 2011 21:40
Mugen you are abusing the AUP again in multiple ways, mainly being offensive to people who are trying to help. Indicium is simply pointing that out, KISTech has helped a great deal too.

You've already started a new thread for the same problem and seem unwilling or unable to fix your own problem.

Since you are being offensive to people who are trying and have helped before I think it is unsurprising that the kind of posts you are now getting are people who are feeling unhelpful and frustrated themselves.

Please try to respect people as much as they are/have respected you.

Mugen Wizardry
User Banned
Posted: 24th Aug 2011 22:59
baxslash, how about u bax off, and leave my thread alone. im sorry, but this does NOT concern u

CHECK OUT MY WEBSITE AT http://imageposeidon.com/ !
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 25th Aug 2011 01:23 Edited at: 25th Aug 2011 01:24
How about I do that and console myself with the knowledge that I tried...

Good luck.

You win the "I'm not listening! Nah nah nah" award

PS. What does concern me is the knowledge that it doesn't concern you.

Mugen Wizardry
User Banned
Posted: 25th Aug 2011 01:24
yea, you have fun with that -.- 1 day, i will beat u ALL

CHECK OUT MY WEBSITE AT http://imageposeidon.com/ !
Indicium
18
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 25th Aug 2011 01:26
I... I despair.

baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 25th Aug 2011 09:23 Edited at: 25th Aug 2011 09:23
Quote: "yea, you have fun with that -.- 1 day, i will beat u ALL"

I hadn't realised you were here to 'beat' me, I thought you were here to ask my advice.

I tried to give you some rope because of your condition but you seem to be using it to whip people who are likewise trying to guide and advise you. Your condition does not excuse that kind of behaviour...

You started off very polite and being nice to people who helped (despite a number of double / triple posts but that's OK to an extent) but then when you didn't like what people said you got hostile and personal.

If a guy walked into a cafe and asked where the nearest phone box was and someone said "It's about two miles down the road, might be quicker by bus..." if that guy turned around and said "BUS what are you CRAZY! I'll walk there and I don't need your advise about which direction it's in, I'm turning right when I get outside and one day I'll OWN you!" you'd think the guy was extremely rude and a little nuts not to take the other person's advise. You might also think he was acting in a very immature manner.

Before you go on about staying "On Topic" have you tried this code for exporting to ".X"?
X exporter (new thread)

It might help with your exports... now I'm going to sit and watch some kids TV with my boys and leave you to it. Do try to be nice, I have.

Mugen Wizardry
User Banned
Posted: 25th Aug 2011 15:00
Sorry baxslash, I was having a bad night again. My parents got into a big fight, and that just drives me CRAZY. ANYways, no I havent, as it was submitted 2 days ago apparently, but I shall. Thanks, Baxslash

CHECK OUT MY WEBSITE AT http://imageposeidon.com/ !
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 25th Aug 2011 16:06
That's OK by me fella but I'm not the only one you're being rude to. Just try to leave what happens at home 'at home' for your own sake!

Mugen Wizardry
User Banned
Posted: 25th Aug 2011 17:05
I'll try.

ANYways. Will this save all the quality as well?

CHECK OUT MY WEBSITE AT http://imageposeidon.com/ !
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 25th Aug 2011 17:34
I haven't tried it yet

Mugen Wizardry
User Banned
Posted: 25th Aug 2011 20:57
Ok. I FINALLY got Endless Terrain being controlled by 1 variable. My only problem is that it only works with map_full_size = 256. Which is weird.

Here's the code:



CHECK OUT MY WEBSITE AT http://imageposeidon.com/ !
Mugen Wizardry
User Banned
Posted: 25th Aug 2011 21:14 Edited at: 25th Aug 2011 21:24
EDIT: BETTER question. Baxslash, what's the command to loop through each triangle's texture map and detail map?

CHECK OUT MY WEBSITE AT http://imageposeidon.com/ !
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 25th Aug 2011 22:46
I don't have Blitz Terrain so I'm not sure but with normal DBP terrains the detail map is applied to a different texture layer. Have you looked at the vertexdata commands? I haven't used them much myself but I have a feeling you only get one set of UV data per vertex.

I have a feeling from looking at the code in the "save as X" thread I showed you and the help files, that this is the case. Therefore you would not be able to save the other texture stage data as part of the ".X" file, it would have to be done programatically.

The only other way to do it would be to combine the images in an image editor and save a really huge texture, or provide the detail map and allow the customer to apply it (or not) however they see fit.

I just took a look at the "X" file format and it seems to allow only one texture layer per face/mesh: http://msdn.microsoft.com/en-us/library/bb173014(v=vs.85).aspx

Mugen Wizardry
User Banned
Posted: 25th Aug 2011 22:57
So what can I do?

CHECK OUT MY WEBSITE AT http://imageposeidon.com/ !
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 26th Aug 2011 12:33
Quote: "The only other way to do it would be to combine the images in an image editor and save a really huge texture, or provide the detail map and allow the customer to apply it (or not) however they see fit."


Mugen Wizardry
User Banned
Posted: 26th Aug 2011 14:42
How would I combine the images with Photoshop CS4?

CHECK OUT MY WEBSITE AT http://imageposeidon.com/ !
Mobiius
Valued Member
23
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 14th Sep 2011 12:01
Ask in the photoshop forums?

My signature is NOT a moderator plaything! Stop changing it!
chafari
Valued Member
20
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 14th Sep 2011 14:00
We can combine tow or more textures directly in Dbpro.

Cherrs.

I'm not a grumpy grandpa
Mugen Wizardry
User Banned
Posted: 14th Sep 2011 14:23
How?

CHECK OUT MY WEBSITE AT http://imageposeidon.com/ !
chafari
Valued Member
20
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 14th Sep 2011 15:44 Edited at: 14th Sep 2011 15:46
Quote: "How?"


This example use two image of 100*100 pixeles. You can guess how it works. If your image is too big, you can divide your image by four and do the whole proces four times and finally rebuild it again .



Cheers.

I'm not a grumpy grandpa

Login to post a reply

Server time is: 2026-07-10 15:07:24
Your offset time is: 2026-07-10 15:07:24