• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

View in 3D

Status
Not open for further replies.
Level 34
Joined
Sep 19, 2011
Messages
2,123
Is squirt used anywhere? in the thread you posted, a user said it means that all the particles shoot at the same time.

Squirt is used in my cannonball model once again. I don't realy understand what it does, but in the end effect become more smooth and neat:3

And your veiwer still shows tailed particles with minus in it (once again, the cannonball) wrong.

E: turns out i can't see tail particles anywhere, but in the test model, sorry for a wrong feedback:(
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
GhostWolf are you looking for a specific block in all Blizzard models? I can make a search quite quickly if you need it.

Any chunk not handled by the parser, but that requires to actually parse them (since they are track chunks that are children of other chunks).

Then again, I would imagine a simple search for 4 bytes that form the text "KP2*" (where * is a letter) would suffice.

If something other than KP2V, KP2E, KP2W, KP2L, KP2N, KP2S shows up, it can be investigated.

By the way, this isn't important at all, I am just wondering if Magos mistakenly made his UI completely wrong, or if he made it right but ended not implementing these keys.
 
Last edited:

nGy

nGy

Level 11
Joined
Apr 15, 2011
Messages
123
About Squirt:
Warcraft 3 Art Tools Documentation said:
Squirt – When the Squirt option is checked and an animated stepped Bezier controller is used on parts/sec, a large number of particles will emit simultaneously on the parts/sec keys in the amount of the key value. This is good for explosion effects.
If there is no animation in the particles/second, squirt will prevent the particles from showing.
I don't know, how frequently it's used though (I never use it myself) :/
 
Last edited:
I know WC3ME doesn't handle those keys (I looked at the source), I asked if you know about models that do have them.
But, of course, that's pretty stupid of me, because you wont know since WC3ME doesn't support them and thus you can't check if a model has them. :p
To know if they are keyed, one would need to parse all the original models from the MPQs...not worth the effort (not that it's hard, but if they can't be used by custom models, it wont matter in the first place).

I'll play some more with tails.

Thanks for your efforts!


Yeah I made a really silly mistake in the particle rendering, sizes should be correct now.

Or hack into game.dll:
attachment.php


Here's the implementation in NeoDex so you know which values are which.
Code:
writeMDXAnimateableParameter sub.speed  0.0 "KP2S" animations writeMDXFloat
			writeMDXAnimateableParameter sub.variation 0.0 "KP2R" animations writeMDXFloat
			writeMDXAnimateableParameter sub.latitude 0.0 "KP2L" animations writeMDXFloat
			writeMDXAnimateableParameter sub.gravity 0.0 "KP2G" animations writeMDXFloat
			
			writeMDXFloat sub.lifeSpan
			writeMDXAnimateableParameter sub.emissionRate 0.0 "KP2E" animations writeMDXFloat
			writeMDXAnimateableParameter sub.length 0.0 "KP2N" animations writeMDXFloat
			writeMDXAnimateableParameter sub.width 0.0 "KP2W" animations writeMDXFloat

In the modeling & animation forum there's thread with all the hidden tags.
 

Attachments

  • Part2Anims.jpg
    Part2Anims.jpg
    318.2 KB · Views: 206
Level 29
Joined
Jul 29, 2007
Messages
5,174
Thanks. There wont be any models with gravity keys, but it's nice to have it for completeness' sake.

That list lacks visibility keys by the way (KP2V).

Made quite a few behind the scenes changes. The viewer should be a little more efficient, and take less memory, in addition to the file itself being smaller (which is really not important).
Tail particles have been badly supported for some time. They show up, but not like the game displays them.
 
Level 49
Joined
Apr 18, 2008
Messages
8,442
There wont be any models with gravity keys

What does that mean?
There's a lot models with particle emitters that use gravitiy. D:

Also, will you ever implement geoset animation vertex coloring, or whatever they call it? You know, the ability for geoset animations to change the color of the model. It can also be animated and linear, btw.
 
What does that mean?
There's a lot models with particle emitters that use gravitiy. D:

Also, will you ever implement geoset animation vertex coloring, or whatever they call it? You know, the ability for geoset animations to change the color of the model. It can also be animated and linear, btw.

he's refering to animated gravity, particle emitters where their gravity starts changing after a while.

Thanks. There wont be any models with gravity keys, but it's nice to have it for completeness' sake.

That list lacks visibility keys by the way (KP2V).

Made quite a few behind the scenes changes. The viewer should be a little more efficient, and take less memory, in addition to the file itself being smaller (which is really not important).
Tail particles have been badly supported for some time. They show up, but not like the game displays them.

I noticed the viewer doesn't have capabilities for rendering the ribbon emitters, which are very used in hightech effects. I have some code for rendering them in neodex, it's not too clean, but it does the job. Maybe it could help you on implementing them.

attachment.php
 

Attachments

  • RibbonEmitters.jpg
    RibbonEmitters.jpg
    11.7 KB · Views: 526
Level 29
Joined
Jul 29, 2007
Messages
5,174
Also, will you ever implement geoset animation vertex coloring, or whatever they call it? You know, the ability for geoset animations to change the color of the model. It can also be animated and linear, btw.

Fixed.

I noticed the viewer doesn't have capabilities for rendering the ribbon emitters, which are very used in hightech effects. I have some code for rendering them in neodex, it's not too clean, but it does the job. Maybe it could help you on implementing them.

They are actually used? I thought they are non existent, like particle emitters (not 2).

Can you share that code?
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
  • Added a WIP of ribbon emitters.
  • Animation and camera names are now alphabetically sorted.
  • Added an option to view animations at different speeds (0.2, 0.5, 1, 2, 5).
    Don't expect emitters to work correctly in Fast / Very Fast. This is on purpose, since it would have required the viewer to take more memory.
  • Some arbitrary behind the scenes changes that fix some bugs and make the viewer a little more efficient.

Should I bother implementing particle emitters 1?
 
  • Like
Reactions: nGy
  • Added a WIP of ribbon emitters.
  • Animation and camera names are now alphabetically sorted.
  • Added an option to view animations at different speeds (0.2, 0.5, 1, 2, 5).
    Don't expect emitters to work correctly in Fast / Very Fast. This is on purpose, since it would have required the viewer to take more memory.
  • Some arbitrary behind the scenes changes that fix some bugs and make the viewer a little more efficient.

Nice work on the ribbon emitters.

Should I bother implementing particle emitters 1?

If you can easily refactor your viewer to be able to render extra imported models, then go on, they are pretty simple. They just work in a little different fashion to PE2 and emit models (emit TGA does not appear to work). However, few people really use them. Since only NeoDex allows you to export them and Magos sometimes erase them when saving the .mdx.
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
I know we've talked about this before, but the order of which things are rendered seems flawed to me. Nothing ever goes through the ground even though it looks like it is below it.

I have written this before, it has to do with abusing the depth buffer.

The correct solution is to sort things, but there is just no way I can think of to sort MDX geosets, since they have no positions, and every vertex can be affected by any bone.

Things go through the ground, it is just that the ground is see-through.

I don't know how Blizzard rendered models, so I don't have anything better to offer.
Rendering always gets messy with blending.
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
Blending isn't as simple as that. If you'd render the ground with the depth buffer enabled, it will overwrite pixels written by layers rendered with the depth buffer disabled, which are pretty much all blended types.
If I could correctly sort things it would all be solved (or at least be much less noticeable), but I can't think of a way to do that.

Tail particle positions and lengths are finally correct, thanks a lot to nGy. They still don't have the correct camera-facing orientation, but that's less important to me.
 
Blending isn't as simple as that. If you'd render the ground with the depth buffer enabled, it will overwrite pixels written by layers rendered with the depth buffer disabled, which are pretty much all blended types.
If I could correctly sort things it would all be solved (or at least be much less noticeable), but I can't think of a way to do that.

Tail particle positions and lengths are finally correct, thanks a lot to nGy. They still don't have the correct camera-facing orientation, but that's less important to me.

would you mind sharing the formulas for tail particles?
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
would you mind sharing the formulas for tail particles?

Code:
L' = |V| * L

Where V is the particle velocity and L is the emitter tail length, and

Code:
P' = P - (L * 0.5)

Where P is the emitter position and L is the previous calculated value.

In practice the pseudo code is as follows:
PHP:
// V is the particle velocity
L = EmitterTailLength * 0.5
Px = EmitterPx - L * Vx
Py = EmitterPy - L * Vy
Pz = EmitterPz - L * Vz

And when rendering:
PHP:
Offsetx = L * Vx
Offsety = L * Vy
Offsetz = L * Vz

P1x = Px - Offsetx
P1y = Py - Offsety
P1z = Pz - Offsetz

P2x = Px + Offsetx
P2y = Py + Offsety
P2z = Pz + Offsetz

P1 and P2 then form the particle line, over which you make a camera-space rectangle with the emitter scaling property being the width of the rectangle (and this is where my code fails).
 
Last edited:
Level 29
Joined
Jul 29, 2007
Messages
5,174
What rainbow emitters?
Do note that currently the viewer only works for models uploaded to the models section.

In an unrelated subject, can you think of any reason SuPa's abomination's stand animation bugs so badly in the viewer? I've been looking at it for quite some time and can't find a reason.
 
What rainbow emitters?
Do note that currently the viewer only works for models uploaded to the models section

hmm, you should have a debug mode for trying local files, but well let's see afterwards.

In an unrelated subject, can you think of any reason SuPa's abomination's stand animation bugs so badly in the viewer? I've been looking at it for quite some time and can't find a reason.

makes me wonder about your code in animation breaking. the answer should be in mago's source.

I know something related to quaternions but that's for 3ds max, maybe it could help. it turns out that if the dot product between 2 quaternions is not between 0 and 1, you must negate the second quaternion. Perhaps that could help.
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
hmm, you should have a debug mode for trying local files, but well let's see afterwards.

I thought the same thing, and so:
  • Added a way to view models from any MDX on the Hive.
    In the url, instead of q=ID, have p=PATH, where PATH is as follows:
    Code:
    ../PathToMdx/file.mdx
    For example:
    Code:
    http://www.hiveworkshop.com/model_viewer/?p=../forums/attachments/modeling-animation-276/127958d1375058123-mdx-secrets-discussion-parttestonribbon.mdx
Custom textures can't be viewed this way though.

makes me wonder about your code in animation breaking. the answer should be in mago's source.

I know something related to quaternions but that's for 3ds max, maybe it could help. it turns out that if the dot product between 2 quaternions is not between 0 and 1, you must negate the second quaternion. Perhaps that could help.

My code was so similar to Magos' that I just ended up copying his at the end, so I don't understand how his works and mine doesn't.
I am talking about handling keyframes and interpolations.
 
hmm the rainbow ribbon wasn't there, i'll upload it here then.

Hmm Magos uses DirectX's slerp function, while you use your own made, probably you missed something.

There's also something curious about how that file was made. He exported the model using Neodex 2, buit that model was animated using IK, the transformation into FK just creates Keys when some IK properties wouldn't be met on the FK representation. This means the generated quaternions are not necessarily Dot Safe (as I mentioned before).

I have another model with IK, perhaps you could try it:
 

Attachments

  • Fighting Villager Hero.mdx
    34.7 KB · Views: 45
  • RainbowRibbons.mdx
    2.2 KB · Views: 87
Level 29
Joined
Jul 29, 2007
Messages
5,174
well like the semi-link you left there. There's a little thing bothering me there, first the material is additive, black shouldn't show and the emitters are sepparated by 180 degrees but they apear as separated by 90°, hmm i also feel one emitter is not rendering correctly. Let's try a version with less lifespan.
 

Attachments

  • RainbowRibbons2.mdx
    2.2 KB · Views: 42
Level 29
Joined
Jul 29, 2007
Messages
5,174
Level 29
Joined
Jul 29, 2007
Messages
5,174
It's probably possible by using V8/SpiderMonkey directly in C++, but it would also probably be easier to just write the whole code in C++, which I am certainly not going to do.

I might look at Lua and see if it has decent OpenGL bindings, we'll see.

/Edit

Lua doesn't seem to have any decent GL bindings.
 
It's not that it's hard or that I need help, I just dislike C++ from the bottom of my heart.

Yeah I hear you man. The memory managing and limitations when using closures, really makes C++ a pain in the ass.

Send me the lastest build, I would like to try it on haskell when i get time.
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
This is so awesome!
How about allowing for sending a map of the BLP paths? &textures=tex1|tex2|tex3 urlencoded.

If you make a server-sided way to retrieve model/texture paths without writing the full ones, maybe.
Other wise you'd get ridiculously long urls.

  • Ribbon emitters now render with triangle strips (less memory and bandwidth).
  • Changed shader handling:
    1. Only shaders that are going to be used will be compiled.
    2. If a shader fails to compile, the things it is supposed to render just wont show, but the viewer will continue running.
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
  • Added support for particle emitters (type 1).
    But don't expect it to work with custom models (for the spawned models that is), since currently it can only load files from the WC3 MPQs.
    Here's an example (Death animation).
    I don't know if recursive particle emitters are allowed in-game (that is, particle emitters that spawn models which themselves spawn more models), but they are disabled for the viewer, since it will allow the creation of infinitely recursive models which will result in bad things happening (like driver crashes?).
  • As the link above shows, you can now show any model from the MPQs with the mpq=PATH variable in the address bar.
  • Added the option to view collision shapes.
    But only spheres and cubes so far.
  • Fixed arbitrary bugs.
 
Status
Not open for further replies.
Top