Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » W3D Blender  () 3 Votes
W3D Blender [message #467704] Tue, 22 May 2012 12:08 Go to next message
yesfish is currently offline  yesfish
Messages: 16
Registered: May 2012
Karma: 0
Recruit
I'm making a W3D blender suite that should enable Blender to become a legit way to author renegade content. This addon is planned to both import and export w3d files as well as render the materials in a way that's similar to the game engine.

Get "Revision A" import preview, and first code release!
https://github.com/huwpascoe/w3d_blender

canyon
index.php?t=getfile&id=14177&private=0

glacier_flying
index.php?t=getfile&id=14176&private=0
  • Attachment: w3d1.JPG
    (Size: 231.75KB, Downloaded 210 times)
  • Attachment: w3d2.JPG
    (Size: 213.38KB, Downloaded 210 times)
  • Attachment: w3d3.JPG
    (Size: 264.00KB, Downloaded 444 times)
  • Attachment: w3d4.JPG
    (Size: 27.45KB, Downloaded 222 times)
  • Attachment: w3d5.PNG
    (Size: 735.89KB, Downloaded 324 times)
  • Attachment: w3d6.PNG
    (Size: 407.13KB, Downloaded 1370 times)
  • Attachment: canyon.JPG
    (Size: 176.05KB, Downloaded 1555 times)

[Updated on: Sun, 03 June 2012 07:10]

Report message to a moderator

Re: W3D Blender [message #467705 is a reply to message #467704] Tue, 22 May 2012 12:33 Go to previous messageGo to next message
Omar007 is currently offline  Omar007
Messages: 1711
Registered: December 2007
Location: Amsterdam
Karma: 0
General (1 Star)
I can't really help you here but I just have to say that that is really awesome!

I hope you get this working Big Ups

Now someone please help this guy Thumbs Up


http://tiberiumredux.omarpakker.nl/Old Unused Parts/Plaatjes/PromoteBanner_Hades_small.jpg

[Updated on: Tue, 22 May 2012 12:34]

Report message to a moderator

Re: W3D Blender [message #467717 is a reply to message #467704] Tue, 22 May 2012 14:22 Go to previous messageGo to next message
Aircraftkiller is currently offline  Aircraftkiller
Messages: 8213
Registered: February 2003
Karma: 0
General (5 Stars)
What benefits would Blender have over a pirated copy of 3DS Max 8? Blender's interface has always been annoying.
Re: W3D Blender [message #467722 is a reply to message #467704] Tue, 22 May 2012 15:23 Go to previous messageGo to next message
yesfish is currently offline  yesfish
Messages: 16
Registered: May 2012
Karma: 0
Recruit
Both blender and max are annoying in different ways IMO. I'm doing this because it's fun. Maybe I'll make a 3dsmax9+ kit in future if it works out. : p



Progress tonight: Materials can have multiple textures. Material vertices don't blend - so they're actually per face, duplicating vertices at borders.

Looked into the duplicate materials. They seem to be perfect duplicates. My favourite test subject, the airstrip, has: concrete, tarmac, cement, lightmap, concrete, tarmac, cement, lightmap.

What's still not clear is why. I thought, maybe it duplicated for every shader, but then you have other models which have varying numbers of material pieces...perhaps it could even be RenX weirdness?

Something interesting though. Ignoring the duplicates, materials don't overlap... except for the lightmap, which blankets everything. Lightmaps could well be a special feature that they've just shoved in there, if that turns out to be the case then it can be treated as such.
Re: W3D Blender [message #467725 is a reply to message #467705] Tue, 22 May 2012 15:39 Go to previous messageGo to next message
Gen_Blacky is currently offline  Gen_Blacky
Messages: 3250
Registered: September 2006
Karma: 1
General (3 Stars)
Omar007 wrote on Tue, 22 May 2012 12:33

I can't really help you here but I just have to say that that is really awesome!

I hope you get this working Big Ups

Now someone please help this guy Thumbs Up


^

very cool yesfish I hope you see this project through. Do it for the lulz.


http://s18.postimage.org/jc6qbn4k9/bricks3.png

[Updated on: Tue, 22 May 2012 15:40]

Report message to a moderator

Re: W3D Blender [message #467743 is a reply to message #467717] Tue, 22 May 2012 17:14 Go to previous messageGo to next message
Mad Ivan is currently offline  Mad Ivan
Messages: 513
Registered: February 2003
Location: United Kingdom
Karma: 0
Colonel
Good luck with with this yesfish and keep us updated! I think jonwil and Saberhawk are the best people to talk with, when it comes to W3D Smile

Aircraftkiller wrote on Tue, 22 May 2012 14:22

What benefits would Blender have over a pirated copy of 3DS Max 8? Blender's interface has always been annoying.


IIRC, 3DS Max 8 uses MaxScript *only* for scripting. Blender and newer versions of Max (and Maya) support Python, which (apart from being a very lovely language and by what I can tell what yesfish is writing the W3D suite in) is widely used and easy to learn, so people making W3D content would have access to a pretty big database of free scripts (and could make some of their own, tbh).

I personally haven't tried Blender yet, and I'm not sure how it's features will interact with the W3D stuff, but depending on how yesfish pulls it off you could make use of the built-in game engine (which, I've been told, is the feature that makes it stick out, when compared to other modeling packages).


Re: W3D Blender [message #467750 is a reply to message #467704] Tue, 22 May 2012 20:49 Go to previous messageGo to next message
Mauler
Messages: 448
Registered: May 2003
Location: Alberta, Canada
Karma: 0
Commander
Cool stuff man! I would be very interested in a newer version of W3D tools for recent versions of Max. Keep up the good work
Re: W3D Blender [message #467850 is a reply to message #467704] Wed, 23 May 2012 19:04 Go to previous messageGo to next message
yesfish is currently offline  yesfish
Messages: 16
Registered: May 2012
Karma: 0
Recruit
Latest update.

99% sure the duplicate VERTEX_MATERIALS are an exporter quirk and can be ignored.

Here's the theory: Mesh is broken into triangle patches by duplicating vertices. Each patch gets its own custom layering.

every patch:
every pass:
vertex material link
shader link
texture link
uv map

All those links there are mix and match, you get a large sandwich of information. Which is great, if you're a game engine.

So I think the best way to get anything meaningful is to treat each uniquely layered patch as a separate material, on export, re-combine and sandwich everything. It seems this is how RenX works.

Will post further updates when I have something new to show. Probably by early next week.
Re: W3D Blender [message #467872 is a reply to message #467717] Thu, 24 May 2012 07:13 Go to previous messageGo to next message
Jerad2142 is currently offline  Jerad2142
Messages: 3805
Registered: July 2006
Location: USA
Karma: 6
General (3 Stars)
Aircraftkiller wrote on Tue, 22 May 2012 15:22

What benefits would Blender have over a pirated copy of 3DS Max 8? Blender's interface has always been annoying.

I have yet to find a copy of 3DS Max 8 (legal) as they upgrade only seem to sell the most recent release. And all the pirated torrents seem to contain viruses.

This will allow people who have things against pirating and aren't rich, or just don't want to risk getting a virus, to mod for renegade in something outside of RenX.

Plus I'm sure there are plenty of people that just hate 3DS Max's GUI.

And you never know, better import tools might come out of this in the end (ones that actually assign imported materials); and god knows that'd be nice.


Re: W3D Blender [message #468142 is a reply to message #467704] Tue, 29 May 2012 02:35 Go to previous messageGo to next message
yesfish is currently offline  yesfish
Messages: 16
Registered: May 2012
Karma: 0
Recruit
Seems that I lied, no images this time. It turned out to be a little more difficult and also life suddenly got busy but since last time I've managed to create a function that transforms all those layers into materials.

There are three rendering options which are simultaneously present to support different quality modes. Vertex Lit, multi-pass, multi-texture. Anyone know which is considered the 'best'? My instincts say multi-pass as it matches directly with RenX material editor. But multi-texture looks like it was added after multi-pass. Multi-texture is also a little weird, it could be an issue.

Plan of development from here:
processed materials to blender materials
uvmaps and vertex colors to blender
clean up code and make it a module
release first source preview

Second version should have object hierarchy, w3d exporting and hopefully some full GLSL previews of those w3d materials.

From there it's lights, all those other nodes and attributes and the final boss: vertex weights and animation.
Re: W3D Blender [message #468143 is a reply to message #467704] Tue, 29 May 2012 02:41 Go to previous messageGo to next message
iRANian is currently offline  iRANian
Messages: 4299
Registered: April 2011
Karma: 0
General (4 Stars)
What documentation are you using?

Long time and well respected Renegade community member, programmer, modder and tester.

Scripts 4.0 private beta tester since May 2011.

My Renegade server plugins releases
Re: W3D Blender [message #468155 is a reply to message #467704] Tue, 29 May 2012 11:00 Go to previous messageGo to next message
Mad Ivan is currently offline  Mad Ivan
Messages: 513
Registered: February 2003
Location: United Kingdom
Karma: 0
Colonel
Awesome stuff so far, yesfish!

Might I suggest using github (if it's not too much)? I haven't done any 3D stuff myself, but maybe people in general could contribute or fork from the project that way? Smile


Re: W3D Blender [message #468163 is a reply to message #467704] Tue, 29 May 2012 14:23 Go to previous messageGo to next message
reborn is currently offline  reborn
Messages: 3231
Registered: September 2004
Location: uk - london
Karma: 0
General (3 Stars)
Really very interesting stuff. I'm surprised I've not seen @saberhawk sniffing round this thread... Smile


Re: W3D Blender [message #468167 is a reply to message #467704] Tue, 29 May 2012 15:21 Go to previous messageGo to next message
yesfish is currently offline  yesfish
Messages: 16
Registered: May 2012
Karma: 0
Recruit
My documentation is this source code by Jonathan Wilson:

http://sourceforge.net/projects/rentools/files/w3dview/

After studying the source for a few hours, I'd got 3D models loaded. Then I started on the materials and 2 weeks later, same place, lol. Figuring out Blender has taken the majority of the time of course as this gleaming open source API has worse documentation than a dead proprietary format.

Github is the hip place to be so yeah that's probably the best place.
Re: W3D Blender [message #468262 is a reply to message #467704] Fri, 01 June 2012 09:47 Go to previous messageGo to next message
yesfish is currently offline  yesfish
Messages: 16
Registered: May 2012
Karma: 0
Recruit
First preview will be ready next week I think.
See original post for latest screens.

Now samples passes into materials, UVMaps, vertex color maps, vertex alpha maps (not sure what to do with them so set white = transparent, black = opaque. might swap them in future), optionally ignore lightmaps, sorts hidden / VIS objects into layers and is a proper addon.
Re: W3D Blender [message #468278 is a reply to message #467704] Fri, 01 June 2012 23:31 Go to previous messageGo to next message
reborn is currently offline  reborn
Messages: 3231
Registered: September 2004
Location: uk - london
Karma: 0
General (3 Stars)
You don't just come along on May 22nd 2012 after a game has been around for so long, and just suddenly be so awesome and knowledgable.
Who are you?



[Updated on: Fri, 01 June 2012 23:32]

Report message to a moderator

Re: W3D Blender [message #468291 is a reply to message #467704] Sat, 02 June 2012 01:57 Go to previous messageGo to next message
Distrbd21 is currently offline  Distrbd21
Messages: 743
Registered: September 2008
Karma: 0
Colonel

What does it matter if he is, adding more stuff to the game that is so old???

Live Your Life Not Some one Else's.| Sharing Is Caring

http://dsgaming.us/distrbd21/Distrbd21%20siggy.png

Cookie Jar

Suicide
Re: W3D Blender [message #468307 is a reply to message #468291] Sat, 02 June 2012 10:50 Go to previous messageGo to next message
Ethenal is currently offline  Ethenal
Messages: 2532
Registered: January 2007
Location: US of A
Karma: 0
General (2 Stars)

DistrbdSt0rm21 wrote on Sat, 02 June 2012 03:57

What does it matter if he is, adding more stuff to the game that is so old???

He's obviously praising him, not putting him down...


-TLS-DJ-EYE-K wrote on Mon, 18 March 2013 07:29

Instead of showing us that u aren't more inteligent than a Toast, maybe you should start becomming good in renegade Thumbs Up

Re: W3D Blender [message #468317 is a reply to message #468142] Sat, 02 June 2012 20:10 Go to previous messageGo to next message
saberhawk
Messages: 1068
Registered: January 2006
Location: ::1
Karma: 0
General (1 Star)
yesfish wrote on Tue, 29 May 2012 02:35


There are three rendering options which are simultaneously present to support different quality modes. Vertex Lit, multi-pass, multi-texture. Anyone know which is considered the 'best'? My instincts say multi-pass as it matches directly with RenX material editor. But multi-texture looks like it was added after multi-pass. Multi-texture is also a little weird, it could be an issue.



They are actually lighting modes and not exported from RenX. The WW workflow was to export something from "RenX" and bring it into a lightmapping tool (which wasn't released), calculate the lighting for the level and transform the bare material/shader/etc chunks into copies configured for each lighting type.
Re: W3D Blender [message #468334 is a reply to message #468278] Sun, 03 June 2012 07:31 Go to previous messageGo to next message
yesfish is currently offline  yesfish
Messages: 16
Registered: May 2012
Karma: 0
Recruit
Now available for download. If you want to play with it and point out all the problems, you can find it at the start of the topic.

Thanks saberhawk. In light of that information, I think the best way to go is to ignore multitexture, try to load multipass and fall back to vertexlit. Some meshes seem to have materials missing so I'm thinking perhaps they don't support PRELIT_MULTIPASS.

(I bet I'll end up having to parse MULTITEXTURE though Sarcasm )

reborn wrote on Fri, 01 June 2012 23:31

You don't just come along on May 22nd 2012 after a game has been around for so long, and just suddenly be so awesome and knowledgable.
Who are you?

Why I'm yesfish! You may remember me from jelly in such scenarios as. "Shotgun triumphs over ramjet yet again" and "flaaametaaaank~"
Re: W3D Blender [message #468645 is a reply to message #467704] Fri, 08 June 2012 10:16 Go to previous messageGo to next message
yesfish is currently offline  yesfish
Messages: 16
Registered: May 2012
Karma: 0
Recruit
Things are getting a little weird now
index.php?t=getfile&id=14185&private=0

The goal is in sight now yet some things are very mysterious. meshes pulling bone data from other files without any reference to them other than making wild guesses about filenames, level of detail meshes that reference the same hierarchy, there's no differentation between matrices or bones and aggregates that give dr moebius exchangable heads. It's like a taco inside a taco inside a Taco Bell inside a KFC inside a mall inside your dream.

The big picture is just out of reach. Could it be some super hierarchy of models that transcends .w3d and .mix files? Will keep slugging it, but any more info is appreciated.
  • Attachment: w3dclown.JPG
    (Size: 32.82KB, Downloaded 1190 times)
Re: W3D Blender [message #468776 is a reply to message #468645] Fri, 08 June 2012 23:20 Go to previous messageGo to next message
saberhawk
Messages: 1068
Registered: January 2006
Location: ::1
Karma: 0
General (1 Star)
yesfish wrote on Fri, 08 June 2012 10:16

It's like a taco inside a taco inside a Taco Bell inside a KFC inside a mall inside your dream.


Welcome to Renegade Wink

C_AG_GDI_MOBO explicitly pulls in C_GDI_MOBI_ which explicitly brings in the hierarchy from S_A_HUMAN and implicitly brings in the 4 LOD meshes C_GDI_MOBI_L0 to L3 (the HLOD from these is ignored). It also explicitly pulls in C_GDI_MOBI_HEAD and attaches it's HLOD to "C HEAD" from S_A_HUMAN. One convention to note is that the file name of a W3D file needs to be the name of the primary object inside it, and that other files can be brought in using the dotted names (ie C_GDI_MOBI_L3.BODY3 loads c_gdi_mobi_l3.w3d and grabs the BODY3 mesh.) Renegade itself handles this by having an "Asset Manager" which can load things on demand if they haven't already been loaded, otherwise it just makes a copy.
Re: W3D Blender [message #468803 is a reply to message #467704] Sat, 09 June 2012 11:06 Go to previous messageGo to next message
yesfish is currently offline  yesfish
Messages: 16
Registered: May 2012
Karma: 0
Recruit
Aha! So the HLOD is basically some magical botched resource puller. Mix that with aggregates and that's the complete picture...
Re: W3D Blender [message #469721 is a reply to message #467704] Sun, 24 June 2012 13:58 Go to previous messageGo to next message
yesfish is currently offline  yesfish
Messages: 16
Registered: May 2012
Karma: 0
Recruit
Stuck.

Importing, fine. Still need to do the object attributes and some material shader values. But you get a complete picture of the scene.

Exporting, even though wdump reveals a structure that's as standard as any mesh and even though you can then reimport the exported mesh into blender and it works FINE, open it in w3dviewer and watch the materials disappear.

And I'm sick of Blender's shitty API. Features you'd expect are missing, features that are there are hidden or undocumented or don't work the way they should. e.g. BMESH the new n-gons structure has a whole neat set of polygon splicing features, but can't even triangulate a mesh. And I'm going to have to add all this missing functionality myself if I want to finish this thing - but at this point I'm sick of the whole attempt. Getting Blender to work has been far worse than trying to get my head round W3D.
Re: W3D Blender [message #469764 is a reply to message #467704] Sun, 24 June 2012 15:50 Go to previous messageGo to previous message
Omar007 is currently offline  Omar007
Messages: 1711
Registered: December 2007
Location: Amsterdam
Karma: 0
General (1 Star)
Awww Sad
You where making such progress Dont Get It

Guess we have to hope for the Blender API to improve.


http://tiberiumredux.omarpakker.nl/Old Unused Parts/Plaatjes/PromoteBanner_Hades_small.jpg

[Updated on: Sun, 24 June 2012 15:51]

Report message to a moderator

Previous Topic: Is anyone still producing maps/etc for this game?
Next Topic: White Smoke Effect
Goto Forum:
  


Current Time: Thu May 16 20:29:26 MST 2024

Total time taken to generate the page: 0.01186 seconds