Jump to content

Direct3D


Authenticity
 Share

Recommended Posts

Yes, not perfect, and would ofcourse like to get rid of those irregularities you mentioned, I'll will be playing around with it some more, trying the stuff you suggested.

My original heightmaps are perfect though, 16bit pgm's, no "ricefield" effect, though this is inside the state of the art 3D engine they are intended for, and where they work perfectly.

Maybe it's all the conversions that screws things up, original the maps are 2048x2048 16bit pgm, which are then converted to 8bit bmp, and again from bmp to raw, to make them compatible with your example d3d code, but something is not right as we both can see. ;)

Some guy's script + some other guy's script = my script!

Link to comment
Share on other sites

With a little twinking you can load 16 bit heightmap. The only requirement is that no header sections should exist in file.

The file can be 32bits, big-endianess, little-e, or 4bits. This is why the scalar factor is there. If you want to load a

16bit heightmap you can change the following line in Terrain.au3:

StringRegExp(StringTrimLeft($xData, 2), "..", 3)
; to
StringRegExp(StringTrimLeft($xData, 2), ".{4}", 3)

Then the VertsPerRow and VertsPerCol will be Sqrt($iFileSize/2)

Edit: It's divide by 2 not 4. Anyway, I've found a mistake in the

file that need a fix and upload.

Edited by Authenticity
Link to comment
Share on other sites

Your next task is to implement a per-pixel lighting shader. It'll increase the realism

of the terrain dramatically.

Yea, and a water surface, animated ofcourse ;) I got alot of reading to do.

First though I need to figure out movement, I need the mouse cursor released and unhidden, I gotten to unhiding it, but qouting out the setpos doesnt seem to have any effect, the cursor is still stuck midscreen.

I want the mouse only to move the view (look up/down, side to side) when I press and hold the right mouse button, when the button is not pressed only the wasd keys would move the view.

Sort of a 3D freespace movement, where when I press W for forward it should move towards the point I'm looking at, so there's prolly some angles and PI involved to get that working.

This is my main concern right now.

Would also like something like this...

http://www.alpix.com/3d/TerrainViewer/

..if you look down the page at the pics, he got sides on his terrain, which can be changed inside his app, (C# source included btw) making it look like a carved box instead of a plane, that would be awesome :shocked:

Btw, I got my maps working fine, no artifacts or wierd stuff, looks great ;) couldnt get 16bit to work though, but that's not important atm, as I only need it for draft preview of my hires maps. :)

(notice I didnt ask any questions :) )

Some guy's script + some other guy's script = my script!

Link to comment
Share on other sites

It's important, but if you haven't experienced a severe crash then I guess it can

be on hold for now.

I'm working on enhancing the effects examples to illustrate: animation, lighting,

particle systems, and more. As well, I've rewrote the examples because I've changed

some functions prototypes and returned values. In the next update, most functions

that build an intrinsic type (such as a matrix) require a reference to a variable

and return the new structure pointer. This is so the return value can be an argument

for another function. Following Direct3D programming conventions.

Link to comment
Share on other sites

Thanks, I'll download it, before making too many modifications to the old.

I'm reading alot on the subject, especially that "riemers" dude tutorials.

http://www.riemers.net/

But my "just finished!" app mentioned earlier, is gonna get postponed a couple of months because of this, there is quite a learning curve for a n00b ;)

Feel free to use this thread as a worklog so I can keep track of what you are doing :)

Some guy's script + some other guy's script = my script!

Link to comment
Share on other sites

  • 3 weeks later...
  • 2 years later...
  • 2 weeks later...
  • 3 years later...

I and my friend tried running compiled version of this, but using NVidia graphics card didn't work, but worked fine with Intel HD Graphics.

Compiled /w AutoIt 3.3.14.2 x86.

 

Why it didn't work??

Edited by algiuxas

After switching years ago to Linux, sadly I don't use AutoIt anymore.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...