Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/20/24 01:28
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
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
1 registered members (AndrewAMD), 636 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rating: 5
Page 5 of 14 1 2 3 4 5 6 7 13 14
Re: [Plugin] Import von 2. UVMap / Import of 2nd U [Re: Excessus] #119565
04/03/07 14:47
04/03/07 14:47
Joined: May 2002
Posts: 7,441
ventilator Offline
Senior Expert
ventilator  Offline
Senior Expert

Joined: May 2002
Posts: 7,441
Quote:

Have you tried to copy/paste my code in lite-c? I don't know what the problem could be as I've not used lite-c extensively yet. My code doesn't use any C++ specific constructs, so you should be able to use it in lite-c aswell (maybe remove the type conversion macros).


yes, i tried your version. my version and your version seem to give me the same wrong results in lite-c.

how does your VERTEX struct look like?

Quote:

Do you need this for your newton plugin, or for this plugin?


it's needed for both. printing out the mesh will be helpful for debugging and almost the same code will be usable for feeding the geometry to newton for collision detection.

(and i have another idea where this would come in handy. for machinima projects i always wanted to create a plugin which allows you to record gameplay and then render a high quality version from it using a renderer like yafray or gelato. )

Quote:

Are you planning on doing this plugin, once you get the hang of d3d? I've given the algorithm some thought and I must admit it hurts my brain.


i would do it if i got this d3d stuff working but i am not sure when and if this will happen. maybe i should better try to use a c++ compiler but i can't download the huge directx sdk with my crappy internet connection.

the algorithm isn't tricky. basically you just have to iterate through all triangles and put each vertex (with its position, normal, uv1, uv2 data) of a triangle into a python dictionary (called hash table or map in other languages i think?). to build the index list you can lookup the vertices in the dictionary then.

...

i think simply loading the second uv-set from an exported med txt file won't work since with that format you won't know which uvs and which vertices belong together for light maps.

so like i already said i would do a complete mesh loader which replaces the mesh of an entity. another problem came to my mind now though. such a mesh loader would also have to care about loading textures which makes it more complicated. or the entity which gets the mesh replaced would already need to have the correct textures applied but this would be a kind of ugly solution since there always would be the need for two versions of the model (mdl7 + custom format) then.

Re: [Plugin] Import von 2. UVMap / Import of 2nd U [Re: ventilator] #119566
04/03/07 15:39
04/03/07 15:39
Joined: Feb 2006
Posts: 324
Germany
M
maybenew Offline OP
Senior Member
maybenew  Offline OP
Senior Member
M

Joined: Feb 2006
Posts: 324
Germany
Sounds complicated! Perhaps you can JCLs input on the matter. According to him it should not be this difficult to achieve the function we all need.

Re: [Plugin] Import von 2. UVMap / Import of 2nd U [Re: maybenew] #119567
04/03/07 15:57
04/03/07 15:57
Joined: May 2002
Posts: 7,441
ventilator Offline
Senior Expert
ventilator  Offline
Senior Expert

Joined: May 2002
Posts: 7,441
it isn't simpler than i described it. i have discussed this with jcl (in a future forum thread from august). his very simple solution he always comes up with is useless with "real world" models and he admits that it is more complicated later in the thread.

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

Joined: Aug 2001
Posts: 2,320
Alberta, Canada
Before I knew of the FBX importing/Arbitrary Geometry of 3dgs future, I looked into this a fair amount. I was always told mostly that it would require a new model format for 3dgs(and would cost a fair amount due to that).

Though, if someone manages to get this working, then I'm willing to chip in 150 euros. I'm using Max, and prolly have a similar max2mdl workflow as mabyenew. I'll probably end up using the new FBX importer(I'm waiting for JCL to first add the ability to place models in WED with it too) and WED lighting anyways, but more options never hurt. I think those with projects demanding realistic lighting would really find it useful though.


Check out Silas. www.kartsilas.com

Hear my band Finding Fire - www.myspace.com/findingfire

Daily dev updates - http://kartsilas.blogspot.com/
Re: [Plugin] Import von 2. UVMap / Import of 2nd U [Re: William] #119569
04/04/07 21:57
04/04/07 21:57
Joined: May 2002
Posts: 7,441
ventilator Offline
Senior Expert
ventilator  Offline
Senior Expert

Joined: May 2002
Posts: 7,441
it was a stupid lite-c quirk. i am a bit further now. i also have some new ideas and if i didn't overlook anything i think i will be able to do it. probably i will need some help from jcl though once he is back.

some example mdl7 models would be helpful. once with normal uvs and once with light map uvs.

Re: [Plugin] Import von 2. UVMap / Import of 2nd U [Re: ventilator] #119570
04/05/07 03:08
04/05/07 03:08
Joined: Aug 2001
Posts: 2,320
Alberta, Canada
William Offline
Expert
William  Offline
Expert

Joined: Aug 2001
Posts: 2,320
Alberta, Canada
How is this gonna work for a 80-100 model scene? Is the user going to have to export 2 models for every model in the scene? Afterwards, would the code just be able to red the uvcoords thru a script? I think the workflow would be very hampered if you have to go into MED to get the uvcoordinates for every model... maybe have the models used for retrieving uv coords have a special tag in front of them, like "uv_chair.mdl". When the script runs it takes "chair.mdl" for the base, grabs the extra coords from a model with "uv_" in front of the original model name, then applies it. If the "uv_" model doesn't exist, then it just uses the original uv parameters for both texture 1 and 2.

I ask this question because workflow is one of the most important aspects of developing a game. The typical workflow I use for a level goes something like this:

Create scene in Max.

Export Scenes models into a folder with Max2MDL.

Export models positions via Max2GS.

Build in WED.

If one were to use a second uv set. Mabye like this:

Create scene in Max. Bake lighting into a separate Map Channel.

Export Scenes models into a folder with Max2MDL using map channel #1.

Export Scenes models into a folder meant to hold uv models only, only this time using map channel #2.

Export models positions via Max2GS.

Build in WED.

Let the script do the rest of the work, without having to use MED.

I'm not sure how mabyenew would go about this, i'm interested if theres anyway to speed up the changing everything to map channel #2 in max part?


Check out Silas. www.kartsilas.com

Hear my band Finding Fire - www.myspace.com/findingfire

Daily dev updates - http://kartsilas.blogspot.com/
Re: [Plugin] Import von 2. UVMap / Import of 2nd U [Re: William] #119571
04/05/07 04:06
04/05/07 04:06
Joined: May 2002
Posts: 7,441
ventilator Offline
Senior Expert
ventilator  Offline
Senior Expert

Joined: May 2002
Posts: 7,441
using med uv-export like maybenew suggested wouldn't work anyway.

if everything works out i will create a c-script+python tool which reads the two model files and generates the txt file the plugin will require. so you could script your own batch job in any way you want.

before i continue i will probably have to wait for jcl though since i have some questions...

does anyone know if the directx9 sdk from summer 2004 will still be useable? i will have to switch from lite-c to c/c++ sooner or later.

Re: [Plugin] Import von 2. UVMap / Import of 2nd U [Re: ventilator] #119572
04/06/07 14:03
04/06/07 14:03
Joined: Jan 2004
Posts: 2,013
The Netherlands
E
Excessus Offline
Expert
Excessus  Offline
Expert
E

Joined: Jan 2004
Posts: 2,013
The Netherlands
Quote:

does anyone know if the directx9 sdk from summer 2004 will still be useable? i will have to switch from lite-c to c/c++ sooner or later.



I just checked, and it contains DirectX9.0c, so I guess it should work. Do you have a copy of it lying around? If you have to download it anyway, why not download the latest SDK (february 2007)?

BTW, wouldn't it be easyer to use an already existing format that supports 2 UV maps to load the models from? So instead of exporting to mdl, you'd just export to something else. That way the workflow would be optimal. Does .x allow multiple UVs? What about .fbx?

Re: [Plugin] Import von 2. UVMap / Import of 2nd U [Re: Excessus] #119573
04/06/07 15:05
04/06/07 15:05
Joined: May 2002
Posts: 7,441
ventilator Offline
Senior Expert
ventilator  Offline
Senior Expert

Joined: May 2002
Posts: 7,441
the summer 2004 sdk worked! i have a monthly bandwidth limit and downloading 500mb packages can be kind of problematic.

i think i am almost done with the plugin part. i just have to know how to replace the mesh of an entity (any idea?) and some other small details i have to ask jcl next week.

supporting other formats would be more work (but maybe this can be done later). i think x supports two uv-sets and it could be loaded automatically but in my experience most x exporters are really crappy and i think this would lead to more trouble than it is worth.



my plugin will contain 2 simple functions:

export_mesh

this exports the mesh of an entity to a text file. the file directly contains the buffer contents direct3d needs.

import_mesh

this imports such a text file, creates a new mesh from it and assigns it to an entity. (this functions isn't fully completed yet.)



the workflow will be like that:

there will be a tool which uses the plugin. it will export both model versions (model1/uv-set1, model2/uv-set2). then a python script will be started which merges the two files into one file which contains a mesh with both uv-sets.

in your game you just will have to use ent_create() with the normal model and then import_mesh() to load the mesh with both uv-sets.



i could also extend my blender exporter to export this format directly.

Re: [Plugin] Import von 2. UVMap / Import of 2nd U [Re: ventilator] #119574
04/06/07 22:25
04/06/07 22:25
Joined: Apr 2005
Posts: 4,506
Germany
F
fogman Offline
Expert
fogman  Offline
Expert
F

Joined: Apr 2005
Posts: 4,506
Germany

+20 = 260 €

Go, vent, go...!


no science involved
Page 5 of 14 1 2 3 4 5 6 7 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