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 / T.ED Terrain Loading, And, Normal Map.

Author
Message
GreenDixy
17
Years of Service
User Offline
Joined: 24th Jul 2008
Location: Toronto
Posted: 11th Aug 2014 04:50
When I load a terrain from T.ED There is already, A texture on it.
My question is, How do I load the model without it loading the textures, So when I start doing a normal map on it. The texture wont get messed up or would someone know how to solve this.

Note: When doing the stages, The texture all merges and is a dark green "No Detail".

.:: Http://DeanWorks.Ca ::.
My software never has bugs. It just develops random features.
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 11th Aug 2014 13:24
Quote: "So when I start doing a normal map on it."


What do you mean?

If the object already has a texture then that is usually applied to stage 0. To apply a normal map you would usually apply it to stage 1. Then you need a shader to produce the final result. Alternatively you could try the set bump mapping on command which is simpler but gives less satisfactory results.

Quote: "Note: When doing the stages, The texture all merges and is a dark green "No Detail"."


Unless you use the set blend mapping on command or a shader DBPro will just use the default blending modes (whatever they are ) to combine the result. You really need to post some runnable short code so we can see what you're actually doing.



Powered by Free Banners
GreenDixy
17
Years of Service
User Offline
Joined: 24th Jul 2008
Location: Toronto
Posted: 12th Aug 2014 02:42
Thank you for the info, I will let you know.

.:: Http://DeanWorks.Ca ::.
My software never has bugs. It just develops random features.
smerf
21
Years of Service
User Offline
Joined: 24th Feb 2005
Location: nm usa
Posted: 18th Aug 2014 09:13
green not sure what file type your using, but pretty sure you can just remove the materials from the folder where your terrain is loaded and it will solve the problem,or edit the material list in the .x or dbo.

A child's dream never dies.
GreenDixy
17
Years of Service
User Offline
Joined: 24th Jul 2008
Location: Toronto
Posted: 20th Aug 2014 18:29
Sorry I did not upload some code sooner.

Note: what you see in the code, May not be close to what it should be. I tried every combination, I could think of.

Media: Normal Map Shader, Was something I got on the forum.

The terrain was made in T.ED, And the basic texture that comes with it. Licensed to me before they stopped selling it. You may use it in your projects.

Uploaded a example code did not add camera controls, As you can see the terrain.

.:: Http://DeanWorks.Ca ::.
My software never has bugs. It just develops random features.
GreenDixy
17
Years of Service
User Offline
Joined: 24th Jul 2008
Location: Toronto
Posted: 20th Aug 2014 18:30 Edited at: 20th Aug 2014 18:35


.:: Http://DeanWorks.Ca ::.
My software never has bugs. It just develops random features.
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 20th Aug 2014 21:05 Edited at: 20th Aug 2014 21:06
Thanks for posting that.

Several problems there:

1. Your terrain seems to have very strange texture coordinate values. I had to change them to get anything sensible (see attached X file).

2. The shader only requires two textures so your DBPro code should be



(and note that the first two texture stages are numbered 0 and 1).
The other texture will be ignored.

3. The shader should be loaded with texture flag equal to 0:



4. The light direction specified in the shader is pointing up in the air (i.e. positive y) so the terrain is unaffected by the light.

With those fixes (plus possibly others I've already forgotten ) your terrain shows up - but I've no idea how it should look.

Screenshot:





Powered by Free Banners
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 20th Aug 2014 21:06
Screenshot for previous post.



Powered by Free Banners
GreenDixy
17
Years of Service
User Offline
Joined: 24th Jul 2008
Location: Toronto
Posted: 21st Aug 2014 01:07 Edited at: 21st Aug 2014 01:10
That is one of the problems, I had when I tried a different shader. All the textures merged and did not show correct, Looked washed out big time.

Forgot to mention The reason I did not post it with stage 0 in the texture, Is I was in the middle of changing it around and forgot to add it back in. Moved the textures into its own folders.

.:: Http://DeanWorks.Ca ::.
My software never has bugs. It just develops random features.
GreenDixy
17
Years of Service
User Offline
Joined: 24th Jul 2008
Location: Toronto
Posted: 22nd Aug 2014 20:49
Still have not, Been able to get it working. So i decided, I will look into another method.

.:: Http://DeanWorks.Ca ::.
My software never has bugs. It just develops random features.
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 23rd Aug 2014 01:03
Quote: "Still have not, Been able to get it working."


Why not? I got it working so what did you do?



Powered by Free Banners
GreenDixy
17
Years of Service
User Offline
Joined: 24th Jul 2008
Location: Toronto
Posted: 26th Aug 2014 00:57
The way you have it setup works, Well kinda the texture looks like your pic. Washed out, And not even close to what the texture actually is. I thought normal mapping, Was suppose to make the texture pop, So to speak.

.:: Http://DeanWorks.Ca ::.
My software never has bugs. It just develops random features.
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 26th Aug 2014 01:36 Edited at: 26th Aug 2014 01:46
You probably need to adjust various things like light position/direction, specular level, texture tiling, and so on.

It would be easier if I could see what you thought it should look like.

Edit Experiment with the scale object texture command - that could be your problem.

Also, what values did you give the texture coordinates of the terrain?



Powered by Free Banners
GreenDixy
17
Years of Service
User Offline
Joined: 24th Jul 2008
Location: Toronto
Posted: 26th Aug 2014 02:18 Edited at: 26th Aug 2014 02:18
Here is a screenshot, Of what it, Should look like.



.:: Http://DeanWorks.Ca ::.
My software never has bugs. It just develops random features.
GreenDixy
17
Years of Service
User Offline
Joined: 24th Jul 2008
Location: Toronto
Posted: 26th Aug 2014 02:19
As you can see, It is just a basic texture.

.:: Http://DeanWorks.Ca ::.
My software never has bugs. It just develops random features.
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 26th Aug 2014 15:30
Quote: "It would be easier if I could see what you thought it should look like."


I meant how it should look, not how it looks at the moment.



Powered by Free Banners
GreenDixy
17
Years of Service
User Offline
Joined: 24th Jul 2008
Location: Toronto
Posted: 27th Aug 2014 04:58
The picture above, Is what it should look like. And with a normal map, Add deeper looking grass.

.:: Http://DeanWorks.Ca ::.
My software never has bugs. It just develops random features.
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 27th Aug 2014 14:55
OK, thanks.



Powered by Free Banners

Login to post a reply

Server time is: 2026-07-05 17:32:41
Your offset time is: 2026-07-05 17:32:41