Gamestudio Links
Zorro Links
Newest Posts
Free Live Data for Zorro with Paper Trading?
by dr_panther. 05/18/24 11:01
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (dr_panther, Ayumi), 702 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Texture blending idea #93939
10/11/06 13:50
10/11/06 13:50
Joined: Jun 2003
Posts: 1,017
Germany
T
Thomas_Nitschke Offline OP
Senior Developer
Thomas_Nitschke  Offline OP
Senior Developer
T

Joined: Jun 2003
Posts: 1,017
Germany
Supposing I got that correctly, 3DGS currently renders each group of a model in a seperate pass. That said, I thought probably you could make A6 render the geometrical edges of a group with decreasing opacity (from in- to outside), giving it a smooth-edge effect? This would allow for automated texture blending since two groups with different textures and the suggested "fadeout" effect on their edges would then more or less blend into each other.
As you might have noticed, I don't really know much about those D3D internals, but nevertheless I thought I could as well at least share my idea. Any thoughts, anyone?


Formerly known as The Matrix - ICQ 170408644 I've been here for much longer than most people think. So where's my "Expert" status?
Re: Texture blending idea [Re: Thomas_Nitschke] #93940
10/16/06 10:18
10/16/06 10:18
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
Rendering groups with decreasing opacity can be done with a shader; glow shaders use this method. However I am not sure that I understand what fadeout or texture blending effect you want to achieve?

Re: Texture blending idea [Re: jcl] #93941
10/16/06 21:03
10/16/06 21:03
Joined: Jun 2003
Posts: 1,017
Germany
T
Thomas_Nitschke Offline OP
Senior Developer
Thomas_Nitschke  Offline OP
Senior Developer
T

Joined: Jun 2003
Posts: 1,017
Germany
Well, suppose you've got a simple plane of 5x5 faces, and another one the same size. Suppose these two planes are aligned next to each othere, just they slightly overlap. Now if each plane has a different group assigned, you could have the edges of each group render with decreasing opcaity, just as described in my previous post. Since the groups are overlapping each other, a decreasing opacity on the edges would result in the two groups smoothly blending into each other. Suppose the two groups have different textures, these would then blend into each other as well.
If this can be done with a shader, I'll ask in the shader forum since I wouldn't know how. Anyway, I thought as the engine is rendering each group in a separate pass anyway, you could probably integrate such a routine into the engine directly.
Does that make any sense?


Formerly known as The Matrix - ICQ 170408644 I've been here for much longer than most people think. So where's my "Expert" status?
Re: Texture blending idea [Re: Thomas_Nitschke] #93942
10/17/06 07:25
10/17/06 07:25
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
Yes, but I think this is a very special purpose that most users won't need, and thus not suited for being hardwired in the engine.

Re: Texture blending idea [Re: jcl] #93943
10/17/06 09:32
10/17/06 09:32
Joined: Jun 2003
Posts: 1,017
Germany
T
Thomas_Nitschke Offline OP
Senior Developer
Thomas_Nitschke  Offline OP
Senior Developer
T

Joined: Jun 2003
Posts: 1,017
Germany
Probably. However, the only two ways to achieve blended textures in 3DGS, currently, are either using transition textures or a multitex-shader with blendmap, and I think there should be an easier method. Simply the strange one I posted was the only way I could think of, but I'm sure there are other methods for texture blending.
In concrete: An easy texture blending option, if possible one that even applies to blocks, would be great. And I think others would definitely like that, too.


Formerly known as The Matrix - ICQ 170408644 I've been here for much longer than most people think. So where's my "Expert" status?
Re: Texture blending idea [Re: Thomas_Nitschke] #93944
10/30/06 18:38
10/30/06 18:38
Joined: Jun 2003
Posts: 1,017
Germany
T
Thomas_Nitschke Offline OP
Senior Developer
Thomas_Nitschke  Offline OP
Senior Developer
T

Joined: Jun 2003
Posts: 1,017
Germany
*BUMP*
Any thoughts anyone?


Formerly known as The Matrix - ICQ 170408644 I've been here for much longer than most people think. So where's my "Expert" status?
Re: Texture blending idea [Re: Thomas_Nitschke] #93945
10/31/06 17:53
10/31/06 17:53
Joined: Oct 2003
Posts: 4,131
M
Matt_Aufderheide Offline
Expert
Matt_Aufderheide  Offline
Expert
M

Joined: Oct 2003
Posts: 4,131
Quote:

the only two ways to achieve blended textures in 3DGS, currently, are either using transition textures or a multitex-shader with blendmap,




Incorrect.. in a shader you have other options, such as blending by height, slope, location, etc.

However, what would be helpful in this regard is the ability to arbitrarily set vertex data, such as by using vec_to_uv, but to additional texture coord sets and vertex colors.

Currently, unless im mistaken, vec_to_uv only affects texcoord0 .. you ought to be able to set any of the sets. Additional you could set vertex color as well.

This way you can store a per-vertex color for blending, without the need for additional blend maps in the shader, and you can precalculate slope and hieght values for efficiency.


Sphere Engine--the premier A6 graphics plugin.
Re: Texture blending idea [Re: Matt_Aufderheide] #93946
11/01/06 22:17
11/01/06 22:17
Joined: Jun 2003
Posts: 1,017
Germany
T
Thomas_Nitschke Offline OP
Senior Developer
Thomas_Nitschke  Offline OP
Senior Developer
T

Joined: Jun 2003
Posts: 1,017
Germany
Matt, I appreciate your explanations. I'm glad that finally somebody seems to be interested in this, other than me myself.
However I'm afraid I simply lack knowledge to be able to follow you - could you probably try and explain the thought about vec_to_uv in a way that's more made for the idiots among us?

Thanks in advance!


Formerly known as The Matrix - ICQ 170408644 I've been here for much longer than most people think. So where's my "Expert" status?
Re: Texture blending idea [Re: Thomas_Nitschke] #93947
11/02/06 04:15
11/02/06 04:15
Joined: Oct 2003
Posts: 4,131
M
Matt_Aufderheide Offline
Expert
Matt_Aufderheide  Offline
Expert
M

Joined: Oct 2003
Posts: 4,131
Simply that it would be useful if you could set vertex atributes other than texcoord0 in script (it may already be possible, I really dont know).

A D3DXMesh has a number of vertex attributes, defined in the mesh declaration or vertex format. This can include a given number of texture coords, colors, etc.

In d3d you can chnage the data in the mesh by locking the vertex buffer and writing to it, this is how vec_to_vertex and vec_to_uv work.

It would be helpful if more of this functionality from D3D was exposed in script. You can store lots of useful data in vertex attributes, and in relation to this topic, you can store colors that can be used to blend textures per-vertex, without the need for additional textures in the blending shader.


Sphere Engine--the premier A6 graphics plugin.
Re: Texture blending idea [Re: Matt_Aufderheide] #93948
11/02/06 09:20
11/02/06 09:20
Joined: Jun 2003
Posts: 1,017
Germany
T
Thomas_Nitschke Offline OP
Senior Developer
Thomas_Nitschke  Offline OP
Senior Developer
T

Joined: Jun 2003
Posts: 1,017
Germany
That sure sounds really interesting!
I think I'm slowly getting the idea - However one thing I still can't imagine: In case you could blend textures on a per-vertex basis, what would that probably look like to the user? How would you proceed in defining which texture would be visible at which places?

Cheers


Formerly known as The Matrix - ICQ 170408644 I've been here for much longer than most people think. So where's my "Expert" status?
Page 1 of 2 1 2

Moderated by  aztec, Spirit 

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