www.quadsoftware.com
FAQ  FAQ   Search  Search   Memberlist  Memberlist   Usergroups  Usergroups
Register  ::  Log in Log in to check your private messages


Post new topic  Reply to topic
 Importing a heightfield not working « View previous topic :: View next topic » 
Author Message
ldemarinis
PostPosted: Tue Mar 11, 2008 2:55 pm    Post subject: Importing a heightfield not working Reply with quote



Joined: 04 Mar 2008
Posts: 21

OK, here is my issue. I have a terrain that we are using in Torque. It was created in another program using Unique texturing. I have the heightmap from that program in a 16 bit RAW file. There was a lot of time put into the actual geometry of the terrain. So, I would really rather not spend cycles remodeling the terrain. I tried to import the heightmap the first time and all four of my viewports turned grey. Thinking this was a videocard issue I opened Grome using Maximum Compatibilty. From there I tried to reimport the map but nothing happened this time, just a blank scene. Is there something that I need to setup before just simply importing the file. A nice step by step or a point in the right direction would be great. Thanks for your time.
Back to top
View user's profile Send private message
ALicu
PostPosted: Tue Mar 11, 2008 3:10 pm    Post subject: Reply with quote



Joined: 12 Feb 2007
Posts: 1328

Hello,

I will try to guide you to have the heightmap successfully imported in Grome.

First, what is the dimension of the raw (x by x pixels)? Second, what's the distance between two vertices (tile size)?

Also, what's the height range (minimum , maximum) you want from your terrain?

How many Grome zones did you tried to create at import (Zones on X and Zones on Z)? If your heightmap is big (over 1024 for example) you should consider breaking it (at export) in multiple zones. Then at export, after editing, it is very easy to reassemble it as a continuous raw.

About the gray viewport. What operating system are you using? Is it by any chance Vista? If so, try to ALT TAB to another application and then back to Grome. There is a bug in vista related to viewport rendering.

Looking forward for more information.

Best Regards,
Adrian L.
Back to top
View user's profile Send private message
ldemarinis
PostPosted: Tue Mar 11, 2008 3:56 pm    Post subject: Reply with quote



Joined: 04 Mar 2008
Posts: 21

OK here are my details.

Size: 1024 x 1024

Tile size: 2

Min. Alt.: -250

Max Alt.: 447.92


No, I am not using vista. I am running XP. Thank you so much for the quick respnose. That is worth the cost of the product alone.
Back to top
View user's profile Send private message
ALicu
PostPosted: Tue Mar 11, 2008 4:09 pm    Post subject: Reply with quote



Joined: 12 Feb 2007
Posts: 1328

Hi,

By using the RAW importer I suggest the following parameters:

Structure:
Value size: 16 bit
Value type: unsigned (unless you know you've saved it as signed raw, try both values if undecided)
Header: 0 (unless you know you have some other information at the file start)

Terrain:
Altitude: Rage: -250, 447.92
Tile size: 2

Scene:
Zones on X: 2 (or 4)
Zones on Z: 2 (or 4)
Use the same values for both X and Z

Now, what I think is important is that you should have the heightmap size power of two + 1. So in Grome you will end up having power of two tiles after import (a tile is the distance between two vertices so you have numer of tiles = number of vertices - 1 for each zone).

So I suggest to scale the image by 1 pixel (to 1025 by 1025) before import (or just add a new row of pixels on the left-bottom etc). This can be the cause of your problems (but Grome should be able to work with non-power of two tiles number, too). Anyway, it is better to work with power of two, so please rescale the image to 1025 and see if it is working.

Regards,
Adrian L.
Back to top
View user's profile Send private message
ldemarinis
PostPosted: Tue Mar 11, 2008 4:16 pm    Post subject: Reply with quote



Joined: 04 Mar 2008
Posts: 21

Alright, followed your directions perfectly, and it still wont render the geometry. If I go to the heightmap layers and select the zones using that heightmap it selects the zones but the terrain is invisible to me. If I go to the terrain modifiers they even deform to what the terrain would be but as I said it doesn't show up. Is this a video card problem, or maybe just maybe a known problem to you.
Back to top
View user's profile Send private message
ALicu
PostPosted: Tue Mar 11, 2008 4:25 pm    Post subject: Reply with quote



Joined: 12 Feb 2007
Posts: 1328

Did you used something for the texture option inside the importer?

Also, can you add a simple color layer on the terrain? Select the zones (CONTROL + A). Goto the layers view (the second tab from left panel). Goto texture tab from Project (the one with checkers on it). Then press + button, then the > button next to the new layer and select Assign to selection. In the shown dialog, press New at texture and select a white color. At Layer Shading Configuration select Simple color and then press Ok. Do the zones appear now?

If not, can you please send me (licu at quadsoftware.com) the console.log file from <Grome folder>/Builder/Logs folder?

Also in the Grome viewports, if you select wireframe, not lit, untextured etc (from the right most icon at up corner of the viewport), do the zones are showing?

At View: (in the viewport left up corner) how many MPS (million polygons per second) and polys are written?

Regards,
Adrian L.
Back to top
View user's profile Send private message
ALicu
PostPosted: Tue Mar 11, 2008 4:30 pm    Post subject: Reply with quote



Joined: 12 Feb 2007
Posts: 1328

I've just tested the importer and it is working fine for me for a 1025 x 1025 raw file. So it either a video card problem or something related to the data in the raw. If the heightmap is not confidential you can try to send it to me (archived on the email, or a similar one that is causing you problems) and I will try to verify it on your data.

Regards,
Adrian L.
Back to top
View user's profile Send private message
ldemarinis
PostPosted: Tue Mar 11, 2008 4:33 pm    Post subject: Reply with quote



Joined: 04 Mar 2008
Posts: 21

yea thats not a problem. where do i email this to.
Back to top
View user's profile Send private message
ALicu
PostPosted: Tue Mar 11, 2008 4:38 pm    Post subject: Reply with quote



Joined: 12 Feb 2007
Posts: 1328

licu at quadsoftware.com

Also please send the console.log from Grome/Builders/Bin/Logs. It tells me what went wrong.

Thank you,
Adrian L.
Back to top
View user's profile Send private message
ALicu
PostPosted: Tue Mar 11, 2008 5:23 pm    Post subject: Reply with quote



Joined: 12 Feb 2007
Posts: 1328

Hi,

I've tested the map and it works on my nvidia card. It seems that there is a video driver issue. I've sent you an email back with the Grome saved map, maybe in this way it works for you. Otherwise we will try to find another solution. Let me know the result.

Regards,
Adrian L.
Back to top
View user's profile Send private message
ldemarinis
PostPosted: Tue Mar 11, 2008 6:50 pm    Post subject: Reply with quote



Joined: 04 Mar 2008
Posts: 21

Alright I tried to just simply open the map you gave me, and the samething happened: magical invisible geometry.
Back to top
View user's profile Send private message
ALicu
PostPosted: Tue Mar 11, 2008 6:57 pm    Post subject: Reply with quote



Joined: 12 Feb 2007
Posts: 1328

Hi, did you tried to use both "max compatibility" and normal mode?
Also do you have the latest video card drivers installed?

Can you use Grome to create any visible terrain zone (with Create Zone tool) no matter how small it is? Are other OpenGL applications working ok for your card?

Also can you try to disable the LOD setting for terrain (from Options->Preferences->Terrain-> Runtime->LOD-> Disabled?

Thank you
Adrian L.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Based on a template by Dustin Baccetti
Powered by phpBB © 2001, 2005 phpBB Group