Gamestudio Links
Zorro Links
Newest Posts
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Trading Journey
by 7th_zorro. 04/27/24 04:42
Help with plotting multiple ZigZag
by M_D. 04/26/24 20:03
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
M1 Oversampling
by jcl. 04/26/24 11:12
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
Eigenwerbung
by jcl. 04/26/24 11:08
MT5 bridge not working on MT5 v. 5 build 4160
by EternallyCurious. 04/25/24 20:49
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (TipmyPip, Ayumi), 773 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
wandaluciaia, Mega_Rod, EternallyCurious, howardR, 11honza11
19049 Registered Users
Previous Thread
Next Thread
Print Thread
Rating: 5
Page 9 of 14 1 2 7 8 9 10 11 13 14
Re: [Plugin] Import von 2. UVMap / Import of 2nd U [Re: fogman] #119605
05/01/07 14:02
05/01/07 14:02
Joined: Nov 2004
Posts: 7,121
Potsdam, Brandenburg, Germany
Machinery_Frank Offline
Senior Expert
Machinery_Frank  Offline
Senior Expert

Joined: Nov 2004
Posts: 7,121
Potsdam, Brandenburg, Germany
I am also excited.

Will this also work with shaders? I would like to re-create something like this:



or this:




I already tried something like that with the sphere plug-in:



The advantage of this method over sphere is: We could use a scene-management therefore it should be possible to create bigger worlds.

If I could blend a shadowmap over a scene with normal-mapping then it would be fantastic. We could even fake static lights with this method. Visuals as seen in games like Riddick, Doom3, Quake4 (and so on) could be possible.

If someone is willing to help me with scripting and shaders then we could make a little techdemo together.


Models, Textures and Games from Dexsoft
Re: [Plugin] Import von 2. UVMap / Import of 2nd U [Re: Machinery_Frank] #119606
05/01/07 15:00
05/01/07 15:00
Joined: Mar 2006
Posts: 2,503
SC, United States
xXxGuitar511 Offline
Expert
xXxGuitar511  Offline
Expert

Joined: Mar 2006
Posts: 2,503
SC, United States
I could easily adapt my normal-mapping shader to work with lightmaps.

The only problem would be "baking" the shadows for the models.


I'm planning on buying sphere soon...


xXxGuitar511
- Programmer
Re: [Plugin] Import von 2. UVMap / Import of 2nd U [Re: xXxGuitar511] #119607
05/01/07 15:05
05/01/07 15:05
Joined: Nov 2004
Posts: 7,121
Potsdam, Brandenburg, Germany
Machinery_Frank Offline
Senior Expert
Machinery_Frank  Offline
Senior Expert

Joined: Nov 2004
Posts: 7,121
Potsdam, Brandenburg, Germany
Shadow-baking will be done in Lightwave. That is no problem. The problem is:

Blending 2 uv-sets over each other. The first one contains normal-mapping or parallax shader (with tileable textues) and the second one contains a lightmap (non-tileable). The lightmap can even contain colors to simulate static lights.

A simple multiplication of the lightmap should do the job. But it must take a different uv-map into consideration.

Maybe Ventilator already has a solution for that.


Models, Textures and Games from Dexsoft
Re: [Plugin] Import von 2. UVMap / Import of 2nd U [Re: Machinery_Frank] #119608
05/01/07 15:16
05/01/07 15:16
Joined: May 2005
Posts: 2,713
Lübeck
Slin Offline
Expert
Slin  Offline
Expert

Joined: May 2005
Posts: 2,713
Lübeck
I tried around with Steempipes parallaxmapping shader a few days ago. I´ve got it working with levelgeometrie and blending the lightmap. What I wanted to say is, that it´s very easy to blend them together as far as the texturecoordinates are passed to the shader.

Slin

Re: [Plugin] Import von 2. UVMap / Import of 2nd U [Re: Machinery_Frank] #119609
05/01/07 15:17
05/01/07 15:17
Joined: May 2002
Posts: 7,441
ventilator Offline
Senior Expert
ventilator  Offline
Senior Expert

Joined: May 2002
Posts: 7,441
a solution for what?

you can apply materials and shaders and use the light map (or any other texture which uses the second uv-set) in any way you want. i am not sure though how well mixing per pixel lighting with a static light map works or how it looks like since i have never tried that.

@william: yes. it's like ent_morph().

...
there still is one problem. if ent_setmesh() gets used in my plugin then the engine crashes once it gets closed. i think either i do something wrong with compiling and linking or it's a problem on jcl's side.

and maybe i will try to make ent_loadseconduvset() faster. first i wanted to use c only so that it will also work with lite-c but i think by using some c++ stuff it could be much faster.

Re: [Plugin] Import von 2. UVMap / Import of 2nd U [Re: ventilator] #119610
05/01/07 18:50
05/01/07 18:50
Joined: May 2002
Posts: 7,441
ventilator Offline
Senior Expert
ventilator  Offline
Senior Expert

Joined: May 2002
Posts: 7,441
here is a beta version of the plugin: mesh.zip ~3.8mb
try it at your own risk!

it will only work with the latest a6/a7 beta!

ent_loadseconduvset() is so fast now that the import/export functions probably won't be needed anymore. i didn't test the new algorithm very thoroughly but it seems to work at a first glance.

my example model isn't that great. it has a poor light map resolution and seams at some areas.

the beta only works for meshes up to 2500 faces.

known issue: the engine will crash if you close it!

some screenshots of your tests would be nice!

Re: [Plugin] Import von 2. UVMap / Import of 2nd U [Re: ventilator] #119611
05/01/07 19:42
05/01/07 19:42
Joined: Nov 2003
Posts: 1,659
San Francisco
JetpackMonkey Offline
Serious User
JetpackMonkey  Offline
Serious User

Joined: Nov 2003
Posts: 1,659
San Francisco
Vent you are my hero!

I can't open the file up in WED tho, there is only the wmb.. is the wmp missing, or can I run it another way?

Thanks!
JPM

Re: [Plugin] Import von 2. UVMap / Import of 2nd U [Re: JetpackMonkey] #119612
05/01/07 20:07
05/01/07 20:07
Joined: May 2002
Posts: 7,441
ventilator Offline
Senior Expert
ventilator  Offline
Senior Expert

Joined: May 2002
Posts: 7,441
to start the example you have to run main.wdl from the script editor. if you press [0] you can fly around.

Re: [Plugin] Import von 2. UVMap / Import of 2nd U [Re: ventilator] #119613
05/01/07 22:23
05/01/07 22:23
Joined: Nov 2003
Posts: 1,659
San Francisco
JetpackMonkey Offline
Serious User
JetpackMonkey  Offline
Serious User

Joined: Nov 2003
Posts: 1,659
San Francisco
awesome it is just awesome!

screenshots a'comin

Re: [Plugin] Import von 2. UVMap / Import of 2nd U [Re: ventilator] #119614
05/02/07 10:30
05/02/07 10:30
Joined: Aug 2001
Posts: 2,320
Alberta, Canada
William Offline
Expert
William  Offline
Expert

Joined: Aug 2001
Posts: 2,320
Alberta, Canada
Brilliant Ventilator!

Let me work with it a bit more, then I can provide an analysis(already got my ps/vs detailmapping shader with lightmap applied). Collision seems good all around too(c_trace/c_move, ect.)! Thanks for the demo.

@Frank -

Quote:


A simple multiplication of the lightmap should do the job. But it must take a different uv-map into consideration.




Looks like this shouldn't be a problem. Heres what I had to do in my shader:

put a shadowmap sampler:


sampler shadowmap = sampler_state
{ Texture = (mtlSkin3);
MINFILTER = LINEAR; MIPFILTER = LINEAR; MAGFILTER = LINEAR; };

Then, in the structs, I put a second set of texture coordinates. I think all shaders use "texCoord0". For having a lightmap, it looks like it's texCoord1.

struct VS_INPUT0
{
float4 pos: POSITION;
float2 texCoord0: TEXCOORD0; //1st uvmap coordinate set
float2 texCoord1: TEXCOORD1; //2nd uvmap coordinate set
float4 normal: NORMAL;
};

struct VS_OUTPUT0
{
float4 pos: POSITION;
float2 texCoord0: TEXCOORD0; //Used for colormap
float2 texCoord1: TEXCOORD1; //Used for detail1
float2 texCoord2: TEXCOORD2; //Used for detail2
float2 texCoord3: TEXCOORD3; //Used for shadowmap
float4 diffuse: COLOR;
float fog: FOG;
};

struct VS_OUTPUT2
{
float4 pos: POSITION;
float4 diffuse: COLOR;
};

struct PS_INPUT0
{
float2 texCoord0: TEXCOORD0; //Used for colormap
float2 texCoord1: TEXCOORD1; //Used for detail1
float2 texCoord2: TEXCOORD2; //Used for detail2
float2 texCoord3: TEXCOORD3; //Used for shadowmap
float4 diffuse: COLOR;
};

Put this in your vs_output():

Out.texCoord3 = In.texCoord1;

And simply in the ps_main:

float4 color = tex2D(colorMap,In.texCoord0);
float3 texture0 = tex2D(detail0, In.texCoord1);
float3 texture1 = tex2D(detail1, In.texCoord2);
float4 shadow = tex2D(shadowmap, In.texCoord3);

return (color*vecAmbient+(color * In.diffuse))*shadow;

I don't know if your supposed to multiply by the shadow, as I'm no shader programmer(and admit, took a few minutes to even figure this out). But it works, and also colored lighting on the light maps work too!

Page 9 of 14 1 2 7 8 9 10 11 13 14

Moderated by  checkbutton, Inestical, 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