Gamestudio Links
Zorro Links
Newest Posts
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
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (Quad), 762 guests, and 4 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 1 of 10 1 2 3 9 10
use a second uv-set on your models #131484
05/24/07 13:58
05/24/07 13:58
Joined: May 2002
Posts: 7,441
ventilator Offline OP
Senior Expert
ventilator  Offline OP
Senior Expert

Joined: May 2002
Posts: 7,441
mesh_plugin_demo.zip ~ 5mb

(the demo has a 777 polygon limitation and displays a demo message at each function call. if you would like to have an unlimited version you can write me a pm or email.)

this plugin makes it possible to use two uv-sets on your models. since the mdl7 format doesn't support two uv-sets, you will need two versions of your model. one with the first uv-set and one with the second uv-set. with the ent_loadseconduvset() function you can load the uvs of the second model into the second uv-set of the first model.

* the two models must have the same triangle count
* the vertices must be at the same positions
* the triangles must have the same vertex order
(these points usually are the case if you export them from the same application)
* the plugin requires engine version 6.6 or higher
* you can't use vec_for_mesh/vec_to_mesh anymore with a replaced mesh

the most common use of two uv-sets is light mapping. the example models and the script examples show how to use a baked light map on your models.

Code:
	you = ent_create("landscape.mdl", nullvector, 0); // load model with texture uv-set
you.material = mtl_lightmap; // assign light map material

tempentity = ent_create("landscape_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





Re: use a second uv-set on your models [Re: ventilator] #131485
05/24/07 20:35
05/24/07 20:35
Joined: Mar 2003
Posts: 4,264
Wellington
Nems Offline

.
Nems  Offline

.

Joined: Mar 2003
Posts: 4,264
Wellington
Thanks Ventilator, I use a lot of terrain/model terrains at the moment so will apply this later when I need to.

Re: use a second uv-set on your models [Re: ventilator] #131486
05/24/07 22:28
05/24/07 22:28
Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
Pappenheimer Offline
Senior Expert
Pappenheimer  Offline
Senior Expert

Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
You are actually a sort of pioneer, a pioneer of shadowmapping in 3DGS.

Thank you for that effort!

Re: use a second uv-set on your models [Re: Pappenheimer] #131487
05/26/07 02:40
05/26/07 02:40
Joined: Jan 2002
Posts: 1,276
trapped in a paper bag
Drew Offline
Serious User
Drew  Offline
Serious User

Joined: Jan 2002
Posts: 1,276
trapped in a paper bag
would you happen to have a compiled exe to share?

thanks!


Drew Medina
Game Developer (Artist)
Personal & professional website
Deviant Art
My Blogspot
Re: use a second uv-set on your models [Re: Drew] #131488
05/26/07 08:29
05/26/07 08:29
Joined: May 2002
Posts: 7,441
ventilator Offline OP
Senior Expert
ventilator  Offline OP
Senior Expert

Joined: May 2002
Posts: 7,441
you could create an exe yourself for the demo. you just would need 6.6 from here. or do you not want to install 6.6 yet?

Re: use a second uv-set on your models [Re: ventilator] #131489
05/26/07 09:25
05/26/07 09:25
Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
Pappenheimer Offline
Senior Expert
Pappenheimer  Offline
Senior Expert

Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
Quote:

or do you not want to install 6.6 yet?




I guess that's it - just the same what I thought, but I didn't dare to ask for this extra effort. Although, me, myself, I will install the 6.60 soon eventually.

In case, you make an exe, can you add an fps panel? (Don't hit me!)

Re: use a second uv-set on your models [Re: Pappenheimer] #131490
05/26/07 10:11
05/26/07 10:11
Joined: May 2002
Posts: 7,441
ventilator Offline OP
Senior Expert
ventilator  Offline OP
Senior Expert

Joined: May 2002
Posts: 7,441
...i hate it that you can't edit your posts on this forum!

here is a version with exe: mesh_plugin_demo.exe ~5mb

keep in mind that it just is a quickly done test model which isn't that great. at some areas (especially the concrete borders of the road) the light map resolution is too low.

i have enabled f11. it's one 20000 polygon model. for performance it probably would be better to split it into < 5000 polygon models. with alt-enter and f5 you can try out fullscreen mode and different resolutions...

Re: use a second uv-set on your models [Re: ventilator] #131491
05/26/07 16:53
05/26/07 16:53
Joined: Jan 2002
Posts: 1,276
trapped in a paper bag
Drew Offline
Serious User
Drew  Offline
Serious User

Joined: Jan 2002
Posts: 1,276
trapped in a paper bag
Thanks! Yes, I dont want to upgrade just yet, things always tend to break between versions...Im using a bunch of addons, sphere, intenseX...


Drew Medina
Game Developer (Artist)
Personal & professional website
Deviant Art
My Blogspot
Re: use a second uv-set on your models [Re: Drew] #131492
05/27/07 01:50
05/27/07 01:50
Joined: Oct 2003
Posts: 702
Z
zazang Offline
User
zazang  Offline
User
Z

Joined: Oct 2003
Posts: 702
Pardon me for my newbiness,but why cant we bake the shadows in the skin directly
and thus use a single skin ?
I mean what is the advantage of this plugin ?
Thanks.
zazang


I like good 'views' because they have no 'strings' attached..
Re: use a second uv-set on your models [Re: zazang] #131493
05/27/07 02:36
05/27/07 02:36
Joined: Nov 2003
Posts: 1,659
San Francisco
JetpackMonkey Offline
Serious User
JetpackMonkey  Offline
Serious User

Joined: Nov 2003
Posts: 1,659
San Francisco
you can but then you cannot have multiple uv maps (e.g. one huge skin for the shadows while other textures repeat and maintain their resolution)

So you can have a 128x128 pixel grass texture repeating, so it always looks 128x128. but then a single big image on top of that for shadows. This tool is mostly important for putting shadow maps on mdl entities without the huge memory hit that u get from baking your shadows directly onto huge textures

Page 1 of 10 1 2 3 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