Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (Nymphodora, AndrewAMD, Quad, TipmyPip), 889 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 5 1 2 3 4 5
Re: Multitex Terrain Normalmapping [Re: xxxxxxx] #361577
03/03/11 21:09
03/03/11 21:09
Joined: Jul 2001
Posts: 6,904
H
HeelX Offline
Senior Expert
HeelX  Offline
Senior Expert
H

Joined: Jul 2001
Posts: 6,904
Why don't you use then models with tiling textures for your streets?

Re: Multitex Terrain Normalmapping [Re: HeelX] #361583
03/03/11 21:32
03/03/11 21:32
Joined: Jan 2011
Posts: 797
Da wo du nicht bist! Muhahaha!
xxxxxxx Offline
User
xxxxxxx  Offline
User

Joined: Jan 2011
Posts: 797
Da wo du nicht bist! Muhahaha!
i used blocks before... i think two terrains are faster then ??? models!
xxxxxxx


Es ist immer wieder erstaunlich, dass Leute die riesen Scripte schreiben die einfachsten sachen nicht können zb. mich mit SIEBEN x zu schreiben! tongue
Re: Multitex Terrain Normalmapping [Re: xxxxxxx] #362141
03/06/11 21:01
03/06/11 21:01
Joined: Jan 2011
Posts: 797
Da wo du nicht bist! Muhahaha!
xxxxxxx Offline
User
xxxxxxx  Offline
User

Joined: Jan 2011
Posts: 797
Da wo du nicht bist! Muhahaha!
ahh... the shader splitt my terrain into parts! what's wrong?

just ignore the flying tree's grin
i asked heelX
xxxxxxx

Last edited by xxxxxxx; 03/07/11 10:06.

Es ist immer wieder erstaunlich, dass Leute die riesen Scripte schreiben die einfachsten sachen nicht können zb. mich mit SIEBEN x zu schreiben! tongue
Re: Multitex Terrain Normalmapping [Re: xxxxxxx] #362269
03/07/11 15:45
03/07/11 15:45
Joined: Jul 2001
Posts: 6,904
H
HeelX Offline
Senior Expert
HeelX  Offline
Senior Expert
H

Joined: Jul 2001
Posts: 6,904
I never tried it with chunked terrain - is the regular terraintex3 shader from the Gamestudio library causing the same artifacts?

Re: Multitex Terrain Normalmapping [Re: HeelX] #362285
03/07/11 17:11
03/07/11 17:11
Joined: Jan 2011
Posts: 797
Da wo du nicht bist! Muhahaha!
xxxxxxx Offline
User
xxxxxxx  Offline
User

Joined: Jan 2011
Posts: 797
Da wo du nicht bist! Muhahaha!
i havent got the same with the mtl_terraintex3 shader, but it doesn't looking nice witout normalmap!
xxxxxxx


Es ist immer wieder erstaunlich, dass Leute die riesen Scripte schreiben die einfachsten sachen nicht können zb. mich mit SIEBEN x zu schreiben! tongue
Re: Multitex Terrain Normalmapping [Re: xxxxxxx] #368998
04/30/11 11:16
04/30/11 11:16
Joined: Feb 2010
Posts: 68
mireazma Offline
Junior Member
mireazma  Offline
Junior Member

Joined: Feb 2010
Posts: 68
I think this is a kind of a milestone in 3DGS.
Excuse me but I don't follow: 5*3 (textures) + 5*2 (normal maps) = 25. What about the remaining 3 channels? Are they used for light mapping? Or you can use them as you like, including nothing?
As for optimization:
1. I'd only use normal mapping with some textures (small ones, if I understand correctly from HeelX that the most intensive texture "processing" is done per texel).
2. I'm saying this because I use differently sized textures for each terrain type. For grass, for example, which I think it has to be more crispy, I use a larger size, small scaling or both. And I spend a lot of time weighting the appearance/sizes balance.
3. Now it's unclear for me whether the whole terrain gets rendered (texture-wise), even if the camera only sees a corner, or it's clip space optimized (I have to dwell on the pipelines study). Cause if it were optimized, I'd consider (a little) more processing friendly to use smaller scaled textures than upscaled ones at the same texture size.


ERROR in communism.cpp, line 0:
#include<god.h>
was fatally missed.
Re: Multitex Terrain Normalmapping [Re: mireazma] #369001
04/30/11 11:34
04/30/11 11:34
Joined: Jul 2001
Posts: 6,904
H
HeelX Offline
Senior Expert
HeelX  Offline
Senior Expert
H

Joined: Jul 2001
Posts: 6,904
Hi, I have some problems understanding your concerns. Lets try it:

Quote:
Excuse me but I don't follow: 5*3 (textures) + 5*2 (normal maps) = 25. What about the remaining 3 channels? Are they used for light mapping? Or you can use them as you like, including nothing?


You can use three textures plus their respective normal maps. The first texture is tiled over the terrain as base texture, the following two are blended, according to the weights stored in the red- and green-channel of the blendmap. The blue-channel of the blendmap stores a lightmap for the terrain.

As you can see when you open one of the samples files in MED, the order of the skins have to be:

- blendmap (or "mask")
- base texture
- texture 1
- texture 2
- base normal map
- texture 1 normal map
- texture 2 normal map

If you need even more textures, this can get quite complicated, so, it would be nice to know if you need four, five or fortyfive textures wink

Quote:
I'd only use normal mapping with some textures


This could save performance, if you would know before, which textures have no normal map. So, if it is only texture 1 or only the base texture or so, this could be hardcoded and could save performance. Checking that dynamically could work, too, but I am pretty sure that the additional conditional texture samples would cause aan additional performance loss.

Quote:
Now it's unclear for me whether the whole terrain gets rendered (texture-wise), even if the camera only sees a corner, or it's clip space optimized


If the terrain is not seen at all because it is outside the view frustrum, it is likely that it is not rendered at all, which saves performance - but since terrains are always super large objects I can not imagine any real life scenario in which that could happen. Luckily, the shader is fired only for all pixels which are going to be rendered on the screen. So, if it as big a 10² pixel, it will consume less performance, than if it would cover the whole screen smile but don't be afraid, these shaders are really quick.

Quote:
I'd consider (a little) more processing friendly to use smaller scaled textures than upscaled ones at the same texture size.


Smaller texture sizes do not affect immediately the time which is consumed to render an object. But it is related to the time which is needed per frame to push all data to the GPU so that it can actually process it. So, it is not so very clever if each texture in your game is about as big as 1024² pixel. If you use e.g. only 512² pixel textures, you reduce the bandwidth needed for transferring by a factor of 75%.

Re: Multitex Terrain Normalmapping [Re: HeelX] #369030
04/30/11 20:02
04/30/11 20:02
Joined: Feb 2010
Posts: 68
mireazma Offline
Junior Member
mireazma  Offline
Junior Member

Joined: Feb 2010
Posts: 68
Thank you for showing the interest to lend a hand. I assure you that if I didn't feel this urge to know what I have in my hands, I wouldn't insist. I know I could make a fool out of myself but I don't care.
I'll probably never need more than what this shader demonstrates in the example but it's just I'd like to fully understand it's possibilities, that's why I'm asking things grin. So,
Quote:
[...] This means, assuming you use it on terrains and / or entities, you can have a multitexture normalmapping shader with 5 texture + normalmaps max!

And you said something about a total of 28 monochrome channels, if alpha channels are considered.
The example and what you just said implies 3 textures with 3 normal maps.
I'm surely missing something here confused


ERROR in communism.cpp, line 0:
#include<god.h>
was fatally missed.
Re: Multitex Terrain Normalmapping [Re: mireazma] #369043
04/30/11 22:13
04/30/11 22:13
Joined: Jul 2001
Posts: 6,904
H
HeelX Offline
Senior Expert
HeelX  Offline
Senior Expert
H

Joined: Jul 2001
Posts: 6,904
Of course you could code the R, G and B channel in the three alpha-channels of textures 1,2 and 3 - but this would require you to have all textures the same size. The same with the additional normal map. You could then code e.g. the blendmap of the new texture/normalmap in the blue channel and put the lightmap in the alpha-channel.

So, this way you could have a multitexture shader for four textures, but this requires you also to encode 4 RGB textures into 3 RGBA textures and 4 XYZ normal maps into 3 RGBA textures storing the normals. You could write a small application for that or do it by hand.

Do you need 4 textures or do you need more?

If you need exactly 4, I could consider modifying the shader to fit this requirement easily.

Best regards,
-Christian

Re: Multitex Terrain Normalmapping [Re: HeelX] #369054
05/01/11 00:39
05/01/11 00:39
Joined: Feb 2010
Posts: 68
mireazma Offline
Junior Member
mireazma  Offline
Junior Member

Joined: Feb 2010
Posts: 68
Thank you again so much. I'll remember the procedure you mentioned and I want to try to modify it myself for a little endorphin blush
I read the copyright so I'm allowed to modify and use it cool It took like a quarter of hour to figure out where in the fxModelTex3Nm.fx should I probably tamper and hopefully all I'll have to do is to play with some of entSkin<n> and smp<name>.
I don't know if I'll have to mess with .c or .h I went straight to .fx since I remember the file extension from the shader tutorial. After fully digesting the tutorial I'll make the attempt.

Anyway, at least for the time being I don't need that many textures as I'm very stingy with the resources. It is more of a matter of principle. Like having a 200 MpH car but you only drive with 100 max laugh

Last edited by mireazma; 05/01/11 00:42.

ERROR in communism.cpp, line 0:
#include<god.h>
was fatally missed.
Page 2 of 5 1 2 3 4 5

Moderated by  adoado, checkbutton, mk_1, Perro 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1