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 / Help with code convert for NORMALIZATOR filter.

Author
Message
Bored of the Rings
User Banned
Posted: 31st Aug 2018 01:32 Edited at: 31st Aug 2018 10:00
@OldPman-a bit more tweaking with values and code in general, see 2 pics below, the left pic is the original Gimp plugin produced heightmap image and the right pic is the heightmap produced by the DBPro code.
Still playing with values and contrast. Looking at the pic, it looks like it needs inverting maybe. 3rd pic added is where I've changed the contrast to extreme value of 100. Some interesting results and can also produce curves and weird effects.

[update-added a 4th pic which after swapping 2 values over , have produced 99.9% accurate replication of the Gimp Plugin image (pic 1). Still needs to be darker I think. Other than that, pretty much there. Experimenting with values has been fun and addictive. Loads more I can do with this.]

[update 2]
Here is a preview screenshot showing the results in GameGuru with the newly recreated HeightMap being applied:

Of course , you could just use Gimp's Normalmap plugin, but I wanted to be able to do it all in my own app, so converted the C source code to DBPRo code.
Professional Programmer, languages: SAS, C++, SQL, PL-SQL, DBPro, Purebasic, JavaScript, others

Attachments

Login to view attachments
OldPMan
TGC Store Seller
15
Years of Service
User Offline
Joined: 10th Aug 2008
Location:
Posted: 31st Aug 2018 18:25
@Bored of the Rings, WOW! At you all the same it has turned out! Congratulations ! I am very happy. Yes, I still need this code. I'll really wait when you can send it to me. I do not very often visited the forum in the last few days in connection with the preparation of my son for the new school year.
Thank you very much for finding time to convert the code to DBPro.
You, Great man!
The secret to creativity is knowing how to hide your sources.
Bored of the Rings
User Banned
Posted: 31st Aug 2018 18:56 Edited at: 1st Sep 2018 21:22
@OldPman- no problem at all. I've sent you a PM and will email you the code shortly. I will be updating the code to be more efficient. It runs very fast on my machine. I originally wrote the code peeking/poking around allocated memory but ended rewriting to use arrays. I will revisit the memory / FFTW version again at some point. all the best .
Professional Programmer, languages: SAS, C++, SQL, PL-SQL, DBPro, Purebasic, JavaScript, others
DannyD
6
Years of Service
User Offline
Joined: 29th Aug 2017
Location:
Posted: 29th Sep 2018 07:28
No Messages displayed
Bored of the Rings
User Banned
Posted: 3rd Oct 2018 16:36
if anyone wants a copy of the source code for this normal map to height map conversion program, drop me a PM.
Professional Programmer, languages: SAS, C++, SQL, PL-SQL, DBPro, Purebasic, JavaScript, others
Bored of the Rings
User Banned
Posted: 1st Nov 2018 10:05
bumped this just to get rid of annoying spam post. who are these idiots?
Professional Programmer, languages: SAS, C++, SQL, PL-SQL, DBPro, Purebasic, JavaScript, others

Login to post a reply

Server time is: 2024-03-29 00:12:45
Your offset time is: 2024-03-29 00:12:45