Go Back   AC3D Forums > General > AC3D General
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 4th September 2009, 11:12 AM   #1
Box5
Member
Advanced member
 
Join Date: Apr 2009
Location: NW
Posts: 48
Default Bas Relief from texture (not enough)

Hi, I was wondering if anyone knew a way to import a .raw or similar hieghtmap gray scale terrain image. The Bas relief does exactly this, but only 256x256, and doesn't leave me with enough terrain detail to make my roads fit well.

I tried 3ds, and it can do up to 1000x1000 pixels, but converting to ac3d the scaling was off slightly and that didn't help with making the roads either. If I make it in 3ds, what scale converts between 3ds and ac3d? I tried 0.25 % in the scale boxes in ac3d, and it was really close, but ended up being off by enough to ruin my roads.
Box5 is offline   Reply With Quote
Old 4th September 2009, 02:03 PM   #2
Dennis
Senior Member
Professional user
 
Dennis's Avatar
 
Join Date: Jul 2003
Posts: 899
Default Re: Bas Relief from texture (not enough)

You can increase the maximum size of the Bas Relief by editing the basrelief.tcl file in your plugins directory (usually "C:\Program Files\AC3D\plugins\basrelief.tcl" or something similar).

Edit this file with a standard text editor, and scroll down to almost the bottom of the file. You'll see these lines:

Code:
   # MAXIMUM SIZE OF AN IMAGE (width * height)
   # This is the maximum number of vertices that will be created from a texture.
   # Change at your own risk.
   set ddhbasrelief_maxsiz 65536
You can change the number from 65536 (which equates to a 256x256 texture) to whatever you wish. So, if you wanted to have a texture up to 1024x1024, for example, you could change the 65536 to 1048576. Note, though, that an object with this many vertices can bring even higher-end systems to a crawl.

HTH
Dennis is offline   Reply With Quote
Old 4th September 2009, 02:28 PM   #3
Box5
Member
Advanced member
 
Join Date: Apr 2009
Location: NW
Posts: 48
Default Re: Bas Relief from texture (not enough)

Thanks alot, I didn't know you could change that number.

Although, after its imported, the terrain is pretty bumpy compared to what it is normally. You can see the main road that goes up the hill looks like a motocross whoops section when it should be smooth. Any idea why?
Attached Thumbnails
Click image for larger version

Name:	axle1.JPG
Views:	242
Size:	109.9 KB
ID:	1649  

Box5 is offline   Reply With Quote
Old 5th September 2009, 02:21 AM   #4
Dennis
Senior Member
Professional user
 
Dennis's Avatar
 
Join Date: Jul 2003
Posts: 899
Default Re: Bas Relief from texture (not enough)

Unfortunately, this is a by-product of the limitations of using RGB color to calculate a heightmap.

The bas relief converts the specified texture to grayscale before creating the heightmap. This means there are only 256 possible values for the Y axis.

Most images do not have a very smooth transition from one pixel to another, so you end up getting a "stepping" between pixels.

One fix for this would be to convert your original image to greyscale (if it isn't already), then use an image editor to smooth/blur the image so the differences between pixels isn't so great.

The problem with this is you lose details between lines (in your case the roads would merge with the surrounding landscape). If you have an image editor that can selectively blur areas, that may be a workaround.

Not the most ideal solution, but aside from adding a smart smoothing algorithm to the bas relief, I'm not sure what any other options would be...

Edit: If you end up going the image editing route, you can get a free image editor at www.gimp.org

Last edited by Dennis; 5th September 2009 at 02:23 AM. Reason: Added gimp link
Dennis is offline   Reply With Quote
Old 6th September 2009, 12:05 AM   #5
Box5
Member
Advanced member
 
Join Date: Apr 2009
Location: NW
Posts: 48
Default Re: Bas Relief from texture (not enough)

Thanks for the fast reply. I think I have to give up on the bas relief technique and go with a displace modifier in 3ds. I got it spot on with that, now i'm having a hell of a time importing it to ac3d in the correct scale. I need it spot on, otherwise the roads I make will be way off. 3ds meters turn out to be gigantic in ac3d.... I guess i'll just do trial and error with my current roads and find a number that seems right. Thanks again for the help.
Attached Thumbnails
Click image for larger version

Name:	axle.JPG
Views:	292
Size:	93.3 KB
ID:	1650  

Box5 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT -4. The time now is 11:16 PM.


AC3D Forum
(C) Inivis Limited 2020