|
2 registered members (clint000, TipmyPip),
4,101
guests, and 13
spiders. |
|
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: [Plugin] Import von 2. UVMap / Import of 2nd U
[Re: ulf]
#119548
03/31/07 11:15
03/31/07 11:15
|
Joined: May 2002
Posts: 7,441
ventilator
Senior Expert
|
Senior Expert
Joined: May 2002
Posts: 7,441
|
i thought some more about it... loading the uvs from an asc file probably wouldn't work that well. it would be better and easier to create a simple custom format which supports two uv-sets and contains the whole mesh in the way direct3d needs it. the 3dgs plugin could be quite simple then since it only would have to replace the mesh of an entity. the majority of the work could be handled by a blender (for example) export script then. Quote:
Though is this necessary with the new ABT tree scene manager system and arbitrary level geometry? I am still not entirely clear on what the difference would be.
I guess perhaps if the MDL's are dynamic entities that move around, though then the lightmapping would not really change with the movement??
i think such a plugin still could be useful then. for example you can't use lod with level geometry. so maybe models which can have light maps would make it possible to build bigger levels since you could use a kind of "chunked lod".
|
|
|
Re: [Plugin] Import von 2. UVMap / Import of 2nd U
[Re: ulf]
#119549
03/31/07 11:25
03/31/07 11:25
|
Joined: Nov 2004
Posts: 7,121 Potsdam, Brandenburg, Germany
Machinery_Frank
Senior Expert
|
Senior Expert
Joined: Nov 2004
Posts: 7,121
Potsdam, Brandenburg, Germany
|
Here is an explanation: The goal is something like that (or more complicated):  I made this scene only with models and rendered the light and shadows in Lightwave. After that I created a fixed function effect (some kind of a shader) to blend the shadows with the color textures. You can find the 3dgs-scene here: http://www.firma-geppert.de/Gamedev/Images/shadowmap.zipBut this is complicated. Every object needs an specific material and you cannot tile textures. The goal of the second uv-set is: 1) you can use the first texture with texture-tiling. So you can use a wood-texture for the chairs and you can map the top and bottom sides of the seat-plate to the same texture space. You can create very detailled color uv-mapping. 2) the shadow map gets another uv-map. Here is no tiling / no repetitions. So it can contain the shadows for every surface of the object. It has not a very high resolution but that is okay for shadows. I hope this makes it a bit more clear.
Models, Textures and Games from Dexsoft
|
|
|
Re: [Plugin] Import von 2. UVMap / Import of 2nd U
[Re: Wicht]
#119551
03/31/07 13:40
03/31/07 13:40
|
Joined: Feb 2006
Posts: 324 Germany
maybenew
OP
Senior Member
|
OP
Senior Member
Joined: Feb 2006
Posts: 324
Germany
|
Franks explanation of the goal of this hole thing is very good! This plugin would make things a lot easier! Here is another example how the plugin will be used or what it can do: the light-mapped scene in the second screenshot is achieved by creating a second model with the lightmap UV coordinates and the lightmap texture, placing it in the excact location of the texture model and using a shader to blend both models together... it is awfully complicated and any game programmer will kill you the for doing this in the same way this method kills the performance! With the plugin it will simply be: one model with 2 uv maps + texture + light map. concerning the approach of actually saving the second UV map my idea is the same as Wichts: You have a second copy of the model imported to MED which uses the Lightmap-UVs and you use the export function to export the UV coords to a file! now you can use the plugin to append this second set of UV coordinates to the first model. I think ventilators idea is not that bad! The models with lightmaps would most likely be used to replace level geometry, therefore the models won't need to have animations or bones! A own model format therefore only has to include mesh and UV coordinates, skins can be loaded from external sources! I would make it an even 250 Euros! Ventilator, willing to give it a try?
Last edited by maybenew; 03/31/07 14:14.
|
|
|
Re: [Plugin] Import von 2. UVMap / Import of 2nd U
[Re: ventilator]
#119552
03/31/07 14:48
03/31/07 14:48
|
Joined: Nov 2003
Posts: 1,659 San Francisco
JetpackMonkey
Serious User
|
Serious User
Joined: Nov 2003
Posts: 1,659
San Francisco
|
Quote:
geometry. so maybe models which can have light maps would make it possible to build bigger levels since you could use a kind of "chunked lod".
Ah! Fantastic then.. I know that the GTA III series used polymesh pieces with LOD and lightmaps like that, instead of BSP or Octree.
Wow. I will pitch in at least 20 euros if anyone develops this plugin as well and more if I can afford it. Maybe some other people here can also offer to pitch in towards such a tool development.
So would the lightmaps would then be generated in giles/lightwave/max/maya etc?
|
|
|
Re: [Plugin] Import von 2. UVMap / Import of 2nd U
[Re: JetpackMonkey]
#119553
03/31/07 16:23
03/31/07 16:23
|
Joined: Jan 2004
Posts: 2,013 The Netherlands
Excessus
Expert
|
Expert
Joined: Jan 2004
Posts: 2,013
The Netherlands
|
Quote:
not that it is extremely hard but i think it isn't just a matter of loading the second uv-set. if you want to use the second uv-set for light mapping then the whole mesh has to be restructured since the two uv-sets will have different seams and vertices will have to be duplicated where the seams are different.
I'm curious about this, but I know very little about the way meshes are stored.. Why would the mesh be affected in any way by the UV map? Wouldn't it just be a matter of saving 3 more skin points for every triangle declaration?
Also, does the mdl7 format support multiple UV maps at all, or is it just the engine? In other words, could the second UV map be stored in the mdl file, or should it be loaded at runtime? I looked at the mdl7 SDK and the function for saving a triangle looks like this: Code:
bool Triangle(int v1, int v2, int v3, int sp1, int sp2, int sp3, int material = -1);
3 vertex indices and 3 skin point indices. This looks like you can only save 1 texcoord for every vertex in a .mdl file..
|
|
|
Re: [Plugin] Import von 2. UVMap / Import of 2nd U
[Re: Excessus]
#119554
03/31/07 16:57
03/31/07 16:57
|
Joined: May 2002
Posts: 7,441
ventilator
Senior Expert
|
Senior Expert
Joined: May 2002
Posts: 7,441
|
direct3d meshes don't work like the mdl7 format. the reason the mesh gets affected is because uvs get stored with a vertex in the vertex struct and not separately. in a modeling program a vertex can have several different uvs if it is at an uv-seam. in the direct3d vertex buffer such vertices have to be stored multiple times so that each uv is there. this duplication will affect the triangle indices of course. so you have to write an algorithm which finds out which vertices have to be duplicated and then generate the proper vertex and triangle lists. if i did this in python like i talked about in my previous post this wouldn't be the hard part anymore.  now the hard part for me is all the direct3d buffer stuff since i have no experience with that and i find it a bit confusing. i will try to experiment a little in the next days. ... the mdl7 format doesn't support a second uv-set.
|
|
|
|