Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (AndrewAMD, Quad, M_D), 1,217 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rating: 5
Page 8 of 10 1 2 6 7 8 9 10
Re: use a second uv-set on your models [Re: DavidLancaster] #131554
10/04/07 15:20
10/04/07 15:20
Joined: Sep 2007
Posts: 63
J
JackShephard Offline
Junior Member
JackShephard  Offline
Junior Member
J

Joined: Sep 2007
Posts: 63
STRING* meshfilename = "landscape_lm.mesh";

.mesh in 3dgs? O.o

Re: use a second uv-set on your models [Re: JackShephard] #131555
10/16/07 07:13
10/16/07 07:13
Joined: May 2002
Posts: 7,441
ventilator Offline OP
Senior Expert
ventilator  Offline OP
Senior Expert

Joined: May 2002
Posts: 7,441
here is the demo of the plugin for a7 (and lite-c): mesh_plugin_demo_a7.zip
it's important that you use this one for a7 and the one from the first post of this thread for a6! the reason is that the vertex format is different in a7 and so two different plugin versions are needed.

start examples_litec.c from SED. the c-script example currently doesn't work in a7 since there seems to be a strange problem with the function for showing messages. this doesn't affect the full version of the plugin though.



...and i decided to reduce the price to 10€!

Re: use a second uv-set on your models [Re: ventilator] #131556
10/16/07 14:44
10/16/07 14:44
Joined: Nov 2000
Posts: 1,534
hamburg
Samb Offline
Serious User
Samb  Offline
Serious User

Joined: Nov 2000
Posts: 1,534
hamburg
Quote:


...and i decided to reduce the price to 10€!




SOLD!!!
well.. first I need money on my bankaccount.
but then SOLD!!!!

Re: use a second uv-set on your models [Re: Samb] #131557
10/17/07 00:56
10/17/07 00:56
Joined: May 2005
Posts: 2,713
Lübeck
Slin Offline
Expert
Slin  Offline
Expert

Joined: May 2005
Posts: 2,713
Lübeck
When I used the old demo version for this: http://www.coniserver.net/ubbthreads/showflat.php/Cat/0/Number/793529/Main/793085/#Post793529
it worked perfectly fine with A7.
Thanks for reducing the price and for the great plugin, now I only need to know how to have blender generating the lightmap for me and I will buy it as soon as I can find a use for it

Re: use a second uv-set on your models [Re: Slin] #131558
10/17/07 05:30
10/17/07 05:30
Joined: May 2002
Posts: 7,441
ventilator Offline OP
Senior Expert
ventilator  Offline OP
Senior Expert

Joined: May 2002
Posts: 7,441
the first (beta?) versions of a7 still had the same vertex format as a6 but now it's different. it changed with 7.05.1 because of this:
Quote:

The handedness of the binormal is now stored in the 4th tangent coordinate of every vertex. This avoids shader problems with mirrored coordinates.




you could ask about baking light maps on the blender forum. i think someone there made a tutorial about it.

Re: use a second uv-set on your models [Re: ventilator] #131559
11/07/07 13:12
11/07/07 13:12
Joined: May 2002
Posts: 7,441
ventilator Offline OP
Senior Expert
ventilator  Offline OP
Senior Expert

Joined: May 2002
Posts: 7,441
the tangent flag can mess up a replaced mesh. i guess the engine still uses some data from the old mesh for tangent calculation and there is nothing i can do about it. if this happens this trick should help:

Code:
material mtl_normalmapping
{
// flags = tangent; // don't set the tangent flag here if you use a replaced mesh!
effect = "normalmapping.fx";
}

[...]

you = ent_create("model.mdl", nullvector, 0); // load model with texture uv-set
you.material = mtl_normalmapping;
mtl_normalmapping.tangent = on; // set the tangent flag only for one frame
wait(1);
mtl_normalmapping.tangent = off;

// load the second uv-set after disabling the tangent flag
// the tangents still are in the mesh

tempentity = ent_create("model_lm.mdl", nullvector, 0); // load model with light map uv-set
ent_loadseconduvset(you, tempentity); // generate and assign a new mesh with both uv-sets
ent_remove(tempentity); // tempentity isn't needed anymore





...
and another tip: you don't really have to use ent_exportmesh()/ent_importmesh(). these functions are only meant for the case when ent_loadseconduvset() is too slow (and i need them for the demo) but it usually shouldn't be too slow. before the release of the plugin i used a slow brute force algorithm for a while but i made it much faster for the release.

Re: use a second uv-set on your models [Re: ventilator] #131560
12/16/07 16:23
12/16/07 16:23
Joined: Sep 2003
Posts: 271
Germany
Chris3D Offline
Member
Chris3D  Offline
Member

Joined: Sep 2003
Posts: 271
Germany
Hi ventilator!

How can I get an updated full version of the mesh plugin, I already bought the first version for 20 Euro, but now it doesn't work anymore with the new A7.06!

Greetings,
Chris

Re: use a second uv-set on your models [Re: Chris3D] #131561
12/17/07 13:33
12/17/07 13:33
Joined: May 2002
Posts: 7,441
ventilator Offline OP
Senior Expert
ventilator  Offline OP
Senior Expert

Joined: May 2002
Posts: 7,441
i have sent you the a7 version...

Re: use a second uv-set on your models [Re: ventilator] #131562
12/29/07 14:12
12/29/07 14:12
Joined: Jul 2001
Posts: 6,904
H
HeelX Offline
Senior Expert
HeelX  Offline
Senior Expert
H

Joined: Jul 2001
Posts: 6,904
Is there an easy way to combine an arbitrary shader with the lightmapping? E.g. after everything has been calculated I simply but the color of the lightmap over it?

Cheers,
Christian

Re: use a second uv-set on your models [Re: HeelX] #131563
12/29/07 14:37
12/29/07 14:37
Joined: May 2002
Posts: 7,441
ventilator Offline OP
Senior Expert
ventilator  Offline OP
Senior Expert

Joined: May 2002
Posts: 7,441
yes, it is easy. you just have to pass the uvs of the second uv-set into the pixelshader, sample the light map and then apply it however you want. if your shader uses the tangent you have to use the trick above.

Page 8 of 10 1 2 6 7 8 9 10

Moderated by  aztec, Blink, HeelX 

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