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 / Terrain Texture problem , pls help if you can.

Author
Message
haliop
User Banned
Posted: 3rd Jun 2010 14:12 Edited at: 3rd Jun 2010 14:14
im trying to Resize a Terrain Texture after painting colors on it.
i will show you 2 pictures and i think you will understand what the problem is.

before resizing , the textured applied to the terrain that acts as a mask texture which i paint on is set to 512x512

after painting , i want a higher resulotion for the final result
so i resize the ImageId using 2 new Bitmaps
sorry for the DarkGDK example as i use DarkGDK and not DarkBasicPro but the commands are the same in everyway so dont feel ohh its DarkGDK, the commands are the same.



so after resizing it to 1024x1024 and texturing using
dbTextureObject(terrain,ResizedImage);
it only covers quarter of the terrain.. is there anyway to fix this?
if you can help it will be very kind of you.

ty for your time, Nadav.
Van B
Moderator
23
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 3rd Jun 2010 17:19 Edited at: 3rd Jun 2010 17:20
You should try a different converter - any art packages should resize and be able to save in a supported format. It looks to me like it's corrupted somehow, maybe it tries to be too clever with compacting the data.

Anyhoo, with any texture, resizing should not give those results, you should be able to resize to 32x32 or 3200x3200 and the terrain will still be full of colourmap texture. Texturing does not rely on texture resolutions beyond the common sense stuff which your doing anyway (power of 2 sized textures). The texture is applied based on UV coordinates which tend to be in a 0.0 to 1.0 range, so are resolution independant.

In other words, it's probably your art pacakge, or however you converted that image.

EDIT: One thing, make sure you are resizing the image, rather than resizing the canvas...


Health, Ammo, and bacon and eggs!
haliop
User Banned
Posted: 3rd Jun 2010 17:52
gotcha
i see what the problem is now
when i copied
Bitmap B to Bitmap C i didnt take the measures in value.
however now ive streached it using the same command but with the other flags.
old ->




so now it looks sharper which is good altough i was aiming at a very high resulotion of 32768 X 32768 and using the semi new approach of ClipMapping im aiming at a very exclusive high res texture that will cover an induvidual object.

however dbGetImage dosent let me go above 8000x8000 and sometimes is crushes i think i should use a memblock to hold the entire huge texture and using ClipMap exctract only what i see in the 3D camera and "plant" it on the object i have no idea on how to do it, can someone think of a way to handle it? i would love anything there is to read about clipMapping i have about 3 pdf in my favorites but most are mathematical and its like chines to me.

however , ty Very Much Van B as always you are very helpfull. ty again and again and again.

Login to post a reply

Server time is: 2026-07-25 16:20:20
Your offset time is: 2026-07-25 16:20:20