:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::

Do you want to advertise at Project Perfect Mod. Find out how to do it HERE.

The time now is Wed Sep 23, 2020 7:50 pm
All times are UTC + 0
 Forum index » Modding Central » Media Hut
MadHQ's Graveyard
Moderators: Global Moderators, Media Hut Moderators, Red Alert 2 Moderators, Tiberian Sun Moderators
Post new topic   Reply to topic Page 6 of 12 [562 Posts] View previous topic :: View next topic
Goto page: Previous 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 Next
Author Message
Blade
Cyborg Commando


Joined: 23 Dec 2003

PostPosted: Thu Jan 21, 2016 8:57 am    Post subject: Reply with quote

I don't get why you are surprised the game uses a lookup table into the palette rather than a multiplier, it was made to run on the average pc at the time (Pentium II or something IIRC), stuff like this is just an example of the extreme optimisation to get it running on the platform at the time with sufficient performance. Your average smart phone has more processing power these days.

Back to top
View user's profile Send private message
MadHQ
Commander


Joined: 07 Nov 2003

PostPosted: Thu Jan 21, 2016 9:11 am    Post subject: Reply with quote

http://www.ppmforums.com/viewtopic.php?t=30026

This topic did pretty much come to same conclusion... I read through that topic before i started this and it didn't make since, till I looked through the file myself...

But still, it looks like there is only 32 working normal's... so then why does vxlSE use range 0-244? Dont we only need 32...
_________________
MadHQ's Graveyard - Click here!
(Permissions) - (F.A.Q.)

Back to top
View user's profile Send private message Skype Account
Graion Dilach
Defense Minister


Joined: 22 Nov 2010
Location: Iszkaszentgyorgy, Hungary

PostPosted: Thu Jan 21, 2016 9:18 am    Post subject: Reply with quote

The VPL and the normal range are two different layers of the principle.

The normal defines the VPL section index in runtime. Using strictly 32 would mean a fixed color, regardless of facing. Using more than 32 normals cause the colors to shift along with the facing.

The normal data is pretty much in-this-facing-use-section-X data. If you have only 32 that would mean all facings have to use the same VPL section X, without options to change sections depending on it.
_________________



AS Discord server: https://discord.gg/7aM7Hm2

Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID
G-E
General


Joined: 09 Feb 2015

PostPosted: Thu Jan 21, 2016 9:56 am    Post subject: Reply with quote

If you ever studied the WW voxels, you'll notice that in some spots they substitute proper normals for alternate colours... where a rounded panel should all be one colour, they use other shades to fudge normals blending. I never looked closely at the output of 3ds2vxl to compare though.
_________________
http://www.moddb.com/mods/scorched-earth-ra2-mod-with-smart-ai

Back to top
View user's profile Send private message
ViPr
Gauss Rifle Trooper


Joined: 30 Dec 2004

PostPosted: Thu Jan 21, 2016 9:58 am    Post subject: Reply with quote

I am still completely lost.

By the way, why are you using a sphere with unsmoothed normals? Isn't that going to add more confusion?

Also, you made the sphere so big that it doesn't fit in the sprite size. So, the top is chopped off. So, we can't see what some of the far side of the sphere looks like. Isn't that also going to add more confusion?

Back to top
View user's profile Send private message
ApolloTD
Commander


Joined: 19 Nov 2003

PostPosted: Fri Jan 22, 2016 4:49 am    Post subject: Reply with quote

Frankly, what would be useful is matching the voxel normal values to what VPL section each use exactly down as guide. I had hoped to do this but would be so workful for 244...
What is odd, I tried changing voxel to only use 1 normal for all, namely 0 or 244 and assuming single normal defines same vpl index for all...that did not pan out, it produced some other color too depending how voxel turned.

As for VPL workings, I've long known it starts from right side of voxel and curves around to the left side. (Kind of...)

Normals are 244 or so likely as voxel needs to account for all kinds of slopes/unevenish surfaces while VPL generally shades for the 32 facings in general.

Hmm... Interesting it seems that the grayscale voxel is also suffering from the miscoloration palette issue as well as half of the grays are green dominant by +4.

Back to top
View user's profile Send private message
Kamuix
Rocket Infantry


Joined: 02 Nov 2012
Location: Canada

PostPosted: Fri Jan 22, 2016 11:36 pm    Post subject: Reply with quote

no worries im glad you read my post MADhq don't mind me I can be a jerk

Back to top
View user's profile Send private message
MadHQ
Commander


Joined: 07 Nov 2003

PostPosted: Sat Jan 23, 2016 6:21 am    Post subject: Reply with quote

So I do feel as thought I am pretty close to figuring out the .vpl normal's...

Note** browsers with webGL required!
http://zombapro.ppmsite.com/vxlrender/normalsvxldrawsprite2.php?zipName=alliedunits.zip&fileName=sref.vxl

Now for what is happening in this link is as follows.
1st) vxl/hva/pal/vpl files are read and echoed to browser
2nd) javascript builds point-cloud for unit, from all the data
3rd) webgl renders 1 frame of point-cloud voxel units
4th) pull render from buffer, add to array
5th) goto 2nd step, 31 times (for 32 frames)
6th) build 32 frame counter canvas to show animation/unit rendered

Now what is rendered, this meant to show all 32 normal sections based on 32 unit rotation (note* unit does not rotate, just the normal section "shifts" 32 times).

This is how I am getting the RGB color for the point cloud. There is no ambient light or extra color/light multiplayer. (the "* 4" is just to get the pallet values to 255)
Which is a huge fix from my original set up, and I guess is some what the way RA2 does this.
Code:

normValue=(parseInt(parseInt(spanData[v][y + spanStartIndex + 1]) % 15)*2);//this gets the 0-31 .vpl value

redColor = parseInt( parseInt(colorData[ parseInt(holdNormalsData[ normValue ][ parseInt(spanData[v][y + spanStartIndex]) ]) ][0]) * 4);
greenColor = parseInt( parseInt(colorData[ parseInt(holdNormalsData[ normValue ][ parseInt(spanData[v][y + spanStartIndex]) ]) ][1]) * 4);
blueColor = parseInt( parseInt(colorData[ parseInt(holdNormalsData[ normValue ][ parseInt(spanData[v][y + spanStartIndex]) ]) ][2]) * 4);


Now I am still not sure how to assign each value 0-244 to a .vpl section 0-32. but I have an idea...

How I am getting to each 32 .vpl section is through % 15 (mod 15)... Why mod 15... according to this table on XCC page.
http://xhp.xwis.net/documents/normals_tables.html

If you look at any of the numbers on 3rd or 4th table, they are 15 incremental values from each other, if you look at numbers in the same column... that could be because there is 15 columns... I am not sure...

I have tried %32, however that really mess things up...

This so far is the best explanation I have... how ever its still not right...

Anyone have any ideas how this should work.
_________________
MadHQ's Graveyard - Click here!
(Permissions) - (F.A.Q.)

Last edited by MadHQ on Sat Jan 23, 2016 8:58 am; edited 3 times in total

Back to top
View user's profile Send private message Skype Account
ViPr
Gauss Rifle Trooper


Joined: 30 Dec 2004

PostPosted: Sat Jan 23, 2016 8:30 am    Post subject: Reply with quote

By the way, multiplying by 4 is just very slightly incorrect.


It should be 255/63

Back to top
View user's profile Send private message
ViPr
Gauss Rifle Trooper


Joined: 30 Dec 2004

PostPosted: Sat Jan 23, 2016 7:30 pm    Post subject: Reply with quote

I have an interesting question, I hope. What happens when a smooth sphere is tilted on a slope? Does the lighting react correctly when the voxels are tilted?

Back to top
View user's profile Send private message
MadHQ
Commander


Joined: 07 Nov 2003

PostPosted: Sat Jan 23, 2016 9:20 pm    Post subject: Reply with quote

I do not know why but neither *4 or 255/63 works in webgl... It could be that I am doing some thing wrong...

either way I do have a solution that works... I looks like it...
And that is a javascript function parseInt("10", 16) <- 16 must be for 16bit to get 0-255.

It is hard to show in just image... I am using grey scaled .vpl normal's to help show...

Sphere 1-3 are faceting south-east
#1 tilted sideways
#2 tilted down
#3 flat

Sphere 4-5 are faceting south-west
#4 tilted up
#5 flat

odd stuff about 1-3
2 Has a brighter shine to it...
while 1 does not... Oddly, I think it should have more... but oh well.

Also I do not know why these are cropping the tops off... the voxel is sized 200*200*200... It should be withing the limit of the game... And its odd that one of them is not cropped...


slopnorm.png
 Description:
 Filesize:  409.29 KB
 Viewed:  7336 Time(s)

slopnorm.png



_________________
MadHQ's Graveyard - Click here!
(Permissions) - (F.A.Q.)

Back to top
View user's profile Send private message Skype Account
G-E
General


Joined: 09 Feb 2015

PostPosted: Sat Jan 23, 2016 10:34 pm    Post subject: Reply with quote

It's the attack of the alien golf balls!
_________________
http://www.moddb.com/mods/scorched-earth-ra2-mod-with-smart-ai

Back to top
View user's profile Send private message
MadHQ
Commander


Joined: 07 Nov 2003

PostPosted: Sat Jan 23, 2016 10:35 pm    Post subject: Reply with quote

So I do feel as though I am getting really damn close!

http://zombapro.ppmsite.com/vxlrender/normalsvxldrawsprite2.php?zipName=alliedunits.zip&fileName=sref.vxl

The only issue I think I have to figure out is whats is with the top flat normals value... It seems to get to dark..

Also did improve a lot of the javascript code itself... it does allot less parseInt calculations...  Razz
_________________
MadHQ's Graveyard - Click here!
(Permissions) - (F.A.Q.)

Back to top
View user's profile Send private message Skype Account
ViPr
Gauss Rifle Trooper


Joined: 30 Dec 2004

PostPosted: Sat Jan 23, 2016 10:45 pm    Post subject: Reply with quote

What I am looking for, during all this tilting, is if the light direction appears to stay consistent. It's very difficult to tell, but it seems that maybe it doesn't, but it should.

Maybe one is not cropped because maybe the tilt of it lowers it enough to let it fit in.

Back to top
View user's profile Send private message
Mig Eater
Defense Minister


Joined: 13 Nov 2003
Location: Eindhoven

PostPosted: Sun Jan 24, 2016 11:01 am    Post subject: Reply with quote

You can make voxels as large as you want (I've made voxels up to 500) the game however has a limited rendering area which IIRC is a 255 square around the unit. Depending on the units shape, size & direction parts of it may be outside this area and thus wont be rendered. If you lower the sphere so it's center is at ground level then you wont have any cropping errors.
_________________



Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID YouTube User URL Facebook Profile URL Twitter Channel URL
ViPr
Gauss Rifle Trooper


Joined: 30 Dec 2004

PostPosted: Sun Jan 24, 2016 12:24 pm    Post subject: Reply with quote

By the way, another thing that interests me, if I remember correctly, is that some parts of the voxel palette don't work correctly, and will just show up as pink or some weird colours. Why is that? Is it because of the VPL file? Has anyone been able to correct this problem by editing the VPL file? I still cannot figure-out how that damn file works.

Back to top
View user's profile Send private message
ApolloTD
Commander


Joined: 19 Nov 2003

PostPosted: Sun Jan 24, 2016 3:50 pm    Post subject: Reply with quote

ViPr wrote:
By the way, another thing that interests me, if I remember correctly, is that some parts of the voxel palette don't work correctly, and will just show up as pink or some weird colours. Why is that? Is it because of the VPL file? Has anyone been able to correct this problem by editing the VPL file? I still cannot figure-out how that damn file works.


VPL is reason and has been fixed years ago to enable the non-working colors.

Back to top
View user's profile Send private message
ViPr
Gauss Rifle Trooper


Joined: 30 Dec 2004

PostPosted: Sun Jan 24, 2016 5:17 pm    Post subject: Reply with quote

Is it fixed for everyone?

Back to top
View user's profile Send private message
ViPr
Gauss Rifle Trooper


Joined: 30 Dec 2004

PostPosted: Sun Jan 24, 2016 5:52 pm    Post subject: Reply with quote

I think I understand how the VPL works now, thanks to reading Starkuu's explanation here:

http://www.ppmforums.com/viewtopic.php?t=30681

Back to top
View user's profile Send private message
MadHQ
Commander


Joined: 07 Nov 2003

PostPosted: Sun Jan 24, 2016 7:48 pm    Post subject: Reply with quote

It does take a minute to understand what the vpl does... It is just a look up table. Kind of an interesting idea.

Now I am trying to find out how the game use's it... There has to be some kind of simple math way to figure out what 0-244 value goes to what 32 section...

My idea of mod 15 has to many problems... I just do not think its right, as it then it is really only unseeing 15 vpl sections... per unit angle...

Now I am going to try and make some kind of look-up table for those...
http://zombapro.ppmsite.com/vxlrender/normalTable.php

But TBH I am not really sure were to start... What i have in that link is just an idea... and it does not seem that bad... link below shows what happens.

the allied units look okay-ish... however, If you look at the tank destroyer (ttnkd) I have no idea why its to dark.
http://zombapro.ppmsite.com/vxlrender/normalsvxldrawsprite3.php?zipName=alliedunits.zip&fileName=sref.vxl

the soviets... not so much...
http://zombapro.ppmsite.com/vxlrender/normalsvxldrawsprite3.php?zipName=sovietunits.zip&fileName=zep.vxl

Now the only issue is I am not sure how to shift the normal's per unit angle rotation like I did the other way... originally I just incremented the normal value per unit angle rotation. But this time if I do this method, the lighting shade's from the vpl are very drastic... So maybe I have to find out how to shift them...

maybe its not +1 for per unit angle rotation... maybe there really is only 8 of 16 unit rotation changes...

Hopefully that made since...
_________________
MadHQ's Graveyard - Click here!
(Permissions) - (F.A.Q.)

Back to top
View user's profile Send private message Skype Account
ViPr
Gauss Rifle Trooper


Joined: 30 Dec 2004

PostPosted: Sun Jan 24, 2016 9:04 pm    Post subject: Reply with quote

In the following text, when I say real-colour, I mean that colours are stated as 3 numbers which correspond to the amount of red, green, and blue. Some people may call this true-colour. The distinction between these two is not important. What is important is distinguishing it from a colour palette index which is 1 number.

My understanding of the VPL file now is that it is used simply to brighten and darken graphics according to a lighting intensity value when the colours are stated as palette index numbers instead of as real-colour. So, instead of having to convert colours from palette index to real-colour and then back to palette index, in order for proper lighting calculations to be applied, the colours go directly from index to index; no real-colour in between.

There may be another table that takes, as its inputs, each normal palette index combined with a certain number of limited compass directions, and then outputs a light intensity value which is used as an input for the VPL table. However, this table may still be undiscovered and may be hard-coded into the executable file just like the normals palettes were.

MadHQ, it seems to me that you may be conflating these 2 tables.

Back to top
View user's profile Send private message
G-E
General


Joined: 09 Feb 2015

PostPosted: Sun Jan 24, 2016 9:52 pm    Post subject: Reply with quote

ViPr wrote:
There may be another table that takes, as its inputs, each normal palette index combined with a certain number of limited compass directions, and then outputs a light intensity value which is used as an input for the VPL table. However, this table may still be undiscovered and may be hard-coded into the executable file just like the normals palettes were.

MadHQ, it seems to me that you may be conflating these 2 tables.

I doubt this is the case as you describe, the whole point of normals is to use it's relativity to the light source to decide intensity.  It's possible that there is one basic low-intensity normals/lighting schema for the ambient light on a map/level, whereupon a spotlight is added to enhance the south-west face?

Now that said, the intensity increase/decrease, and therefore which part of the vpl gets used for a pixel doesn't have to be linear, they could be biasing the highlight and shadow by a larger increment than the midtones, couldn't they? And if we consider the shadow to be a negative light source, that doesn't have to be directly opposite the highlight either.

Back to top
View user's profile Send private message
MadHQ
Commander


Joined: 07 Nov 2003

PostPosted: Sun Jan 24, 2016 10:53 pm    Post subject: Reply with quote

ViPr what you have just described is exactly what I said in the post right above yours.

And this is the code that is used in the link just above your post is this.
Code:

normValue = normalTable[ spanData[v][y + spanStartIndex + 1] ];
colorIndex = spanData[v][y + spanStartIndex];

redColor = colorData[  holdNormalsData[ normValue ][ colorIndex ] ][0];
greenColor = colorData[  holdNormalsData[ normValue ][ colorIndex ] ][1];
blueColor = colorData[  holdNormalsData[ normValue ][ colorIndex ] ][2];


normalTable is what I am very confused about... and is what I am trying to come up with...
colorData is a int[256,3] array of rgb color values.
spanData is voxel index data.
holdNormalsData is the 32 sections from vpl.

I am not doing any rgb color manipulation.
_________________
MadHQ's Graveyard - Click here!
(Permissions) - (F.A.Q.)

Back to top
View user's profile Send private message Skype Account
MadHQ
Commander


Joined: 07 Nov 2003

PostPosted: Mon Jan 25, 2016 2:33 am    Post subject: Reply with quote

I was updating my 3d point-cloud-render to use the values found by bglman here.
http://www.sleipnirstuff.com/forum/viewtopic.php?f=10&t=8048&postdays=0&postorder=asc&start=0

Instead of the weird .vpl method I was using at first. And now my 3d version renders like this... A little better I think... Do not know if I am using the values right but the values do show... So I am okay with it.

http://zombapro.ppmsite.com/vxlrender/vxlrender.php?zipName=odymhk.zip&fileName=ody.vxl

Anyways I am wondering if those values from bglman could be used to map a .vpl system... for my canvas renderer (game simulation version)...

I am going to have to play with an idea...
_________________
MadHQ's Graveyard - Click here!
(Permissions) - (F.A.Q.)

Back to top
View user's profile Send private message Skype Account
MadHQ
Commander


Joined: 07 Nov 2003

PostPosted: Mon Jan 25, 2016 9:58 am    Post subject: Reply with quote

Ya, I might be able to find some kind of vpl index with those normal values from bglman.

(webgl browser needed) (3d camera control's as expected)
http://zombapro.ppmsite.com/vxlrender/normals.html

This shows all 244 normal values as a sphere... Just like what he came up with.

The white one at the top is one I added just to show the top of sphere...
The red dot is normal 244...

The odd thing is that it seems like the normal's sphere is slanted... But I guess that could be right.

I guess I will have to try and find a way to split up the sphere like the vpl file.

I guess I could just base it off 2 of the x,y,z coordinate values...
_________________
MadHQ's Graveyard - Click here!
(Permissions) - (F.A.Q.)

Back to top
View user's profile Send private message Skype Account
Mig Eater
Defense Minister


Joined: 13 Nov 2003
Location: Eindhoven

PostPosted: Mon Jan 25, 2016 10:54 am    Post subject: Reply with quote

MadHQ wrote:
If you look at the tank destroyer (ttnkd) I have no idea why its to dark.
Its probably darker because the tank destroyer uses TS instead of RA2 normals.
_________________



Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID YouTube User URL Facebook Profile URL Twitter Channel URL
ViPr
Gauss Rifle Trooper


Joined: 30 Dec 2004

PostPosted: Mon Jan 25, 2016 12:05 pm    Post subject: Reply with quote

The red dot appears to have a larger gap around it than the other dots, or are my eyes deceiving me? I wonder if I would still notice it if that dot wasn't red.

Actually, I think I noticed this anomaly a long time ago when I first implemented bglman's discovery.

Back to top
View user's profile Send private message
ViPr
Gauss Rifle Trooper


Joined: 30 Dec 2004

PostPosted: Mon Jan 25, 2016 12:15 pm    Post subject: Reply with quote

MadHQ, can you do the lighting with and without the VPL so we can compare? We can compare the visual quality and the frame rate. You should use the grey voxel sphere in your renderer because then it's easier to see if you got the lighting working correctly.

Back to top
View user's profile Send private message
MadHQ
Commander


Joined: 07 Nov 2003

PostPosted: Mon Jan 25, 2016 11:50 pm    Post subject: Reply with quote

@Mig Eater: Crap it does use TS's normal's... I guess that means I will have to do TS's range as well.

@ViPr: Yes that red dot does show missing points...

and that because the last 4 elements in bglman normal list is this...

-0.328188 0.140251 0.934143
-0.328188 0.140251 0.934143
-0.328188 0.140251 0.934143
-0.328188 0.140251 0.934143 <- I am guessing this is the red dot that just overplays the others...


I also think that he was missing a number... as the normal values range from 0-244 = so 245 possibilities... And I did have to add a fake normal index at the end...

"MadHQ, can you do the lighting with and without the VPL so we can compare? We can compare the visual quality and the frame rate. You should use the grey voxel sphere in your render because then it's easier to see if you got the lighting working correctly."

Is this for the 3d or the canvas? if its the 3d version, there is no vpl used its just the normal's values from bglman. If its the canvas one I have added a link the the sphere...



Anyways I did make a first attempt to create a 244 vpl look up table. (text at bottom is the table)
http://zombapro.ppmsite.com/vxlrender/normals2.html

Now I have applied them to my canvas render and its does look pretty damn good. There still a few issues said bellow links...

http://zombapro.ppmsite.com/vxlrender/normalsvxldrawsprite4.php?zipName=alliedunits.zip&fileName=cmin.vxl

http://zombapro.ppmsite.com/vxlrender/normalsvxldrawsprite4.php?zipName=sovietunits.zip&fileName=zep.vxl

This is just a sphere.
http://zombapro.ppmsite.com/vxlrender/normalsvxldrawsprite4.php?zipName=shpere.zip&fileName=text2.vxl
It doesn't seem that far off... I have uploaded a image of the sphere in-game... I guess my render is the south-east facing (frame 12)... Mine seems a little darker but that could be many things... Im just looking at vpl mapping...

This sphere shows normal's vpl with the grey scale... So ya it looks like it hits all of them...
http://zombapro.ppmsite.com/vxlrender/normalsvxldrawsprite5.php?zipName=shpere.zip&fileName=text2.vxl

1st) Its still not 100% there, I think I have a few ideas why... And it has to do with how I broke up the 244 into 32 sections... I have to keep playing with it.

2nd) if you want to look at the prism tank, you will get a bunch of alert pop-ups... (after a few pop up, just check the check box and it will continue just fine.) This alert was just for me... I was using try/catch to make sure there was no index out of bounds... and well there is... The prism tank has a few normal index values of 255... I will probably just make a special case for those...

3rd) the normal's are not shifting with the rotation... I will have to figure out the right way to do that.

4th) I will have to do TS ranges as well... >_<


ball.png
 Description:
 Filesize:  165.1 KB
 Viewed:  7014 Time(s)

ball.png



_________________
MadHQ's Graveyard - Click here!
(Permissions) - (F.A.Q.)

Back to top
View user's profile Send private message Skype Account
ViPr
Gauss Rifle Trooper


Joined: 30 Dec 2004

PostPosted: Tue Jan 26, 2016 7:02 am    Post subject: Reply with quote

If bglman missed a normal then where would it fit? I don't notice any holes in your point cloud at the moment. Had you already filled it in with the fake normal? I just notice a weird gap all around the red dot but there's no good place around that to put just one normal.

By the way, you can see on the rendered sphere that there is a patch near the top that is slightly bigger. It corresponds with the red dot in your point cloud. I noticed this anomaly when I first implemented bglman's normals discovery ages ago.

Yeah, I did notice ages ago that the last few normals are identical. I don't know why.

Back to top
View user's profile Send private message
MadHQ
Commander


Joined: 07 Nov 2003

PostPosted: Wed Jan 27, 2016 6:02 am    Post subject: Reply with quote

Well I think its more then one missing normal... I think there is 4 missing.

The last 4 look like this... and there all the same.
[-0.328188,0.140251,0.934143],
[-0.328188,0.140251,0.934143],
[-0.328188,0.140251,0.934143],
[-0.328188,0.140251,0.934143],

Bellow is a ideas/proposition.


[-0.328188,0.140251,0.934143],

The one red point is one of the 4 duplicates, and it should be kept. (Should only need one of them)


[-0.328188,0.140251,0.934143 + 0.02],
[-0.328188,0.140251,0.934143 + 0.04],
[-0.328188,0.140251,0.934143 + 0.06],

The green points are the other 3 just incremented to see in the webgl render. They should be removed then replaced.


[-0.1437745,0.082358,0.966508],
[-0.3812395,-0.0279885,0.906641],
[-0.2143725,0.298699,0.9089155],
[-0.4420425,0.2627725,0.8299475]

The blue values are values I created. I took one of the 4 duplicated points, and took 4 of the outlining points and added half the difference between them. Its not perfect, but you get the idea. The interesting question is whether or not the game will recognize them... I unfortunately have no way to test this as I am not great with hand painting normal's...

With those 3 replacements and 1 extra point it, would then get up to the 0-244 index of 245 possibilities.

Another question is what order they should be in the array/list... It seems as though the red point is the highest, (so it should be index # 244)


And this is a render of them...
http://zombapro.ppmsite.com/vxlrender/normals3.html

Hopefully, all that made since... And this might explain the larger patch you are talking about ViPr.
_________________
MadHQ's Graveyard - Click here!
(Permissions) - (F.A.Q.)

Back to top
View user's profile Send private message Skype Account
ViPr
Gauss Rifle Trooper


Joined: 30 Dec 2004

PostPosted: Wed Jan 27, 2016 10:12 pm    Post subject: Reply with quote

I really don't know how this mistake could have happened. It seems really easy to make a normals sphere. Someone could just create it from a geodesic sphere in 3D Studio. Alternatively, the algorithm to make it shouldn't be too difficult for the programmers.

Back to top
View user's profile Send private message
MadHQ
Commander


Joined: 07 Nov 2003

PostPosted: Wed Jan 27, 2016 11:57 pm    Post subject: Reply with quote

I do not know if it would be as easy as just calculating new values...

http://zombapro.ppmsite.com/vxlrender/normals4.html

This link shows Ra2's (bglman) normal's (with my 4 point plugs) and a re-calculate attempt along with a point build animation for each view port.

The top one is Ra2's (bglman) normal's and the one below it is a re-construct.

If you click the play button you will see the sphere being built buy the index of each point... This is a problem, as even if we could re-calculate the whole thing, we would still have to find out how the points are positioned in the index... This is what I am working on for my canvas render... So that might help... But I am still guessing...

The re-calculate is not a geodesic sphere as I am not able to make one in 3dsmax. I did look at an alternative plug-in (add-on) for blender. However it looked like crap... it was extremely uneven.

So, I am not sure what to do... Maybe my four point plugs are not so bad...  Laughing
_________________
MadHQ's Graveyard - Click here!
(Permissions) - (F.A.Q.)

Back to top
View user's profile Send private message Skype Account
ViPr
Gauss Rifle Trooper


Joined: 30 Dec 2004

PostPosted: Thu Jan 28, 2016 5:42 am    Post subject: Reply with quote

I don't understand why you can't make a geodesic sphere in 3D Studio Max. I'm quite sure it can do it. I think I saw it many years ago.

https://knowledge.autodesk.com/support/3ds-max/learn-explore/caas/CloudHelp/cloudhelp/2015/ENU/3DSMax/files/GUID-ADCB4D06-BD52-4D0A-A367-63FCBC37A848-htm.html

Back to top
View user's profile Send private message
MadHQ
Commander


Joined: 07 Nov 2003

PostPosted: Thu Jan 28, 2016 5:14 pm    Post subject: Reply with quote

Well there not true geodesic sphere's... they are close I guess...

But I there still would be a few issues with it.

Again finding the index order...
And getting a sphere with only 245 points...

http://zombapro.ppmsite.com/vxlrender/normals5.html

This link shows Ra2's and the a Geosphere. The Geosphere is the normal data it self and not the vertex cords.


geo.png
 Description:
 Filesize:  20.22 KB
 Viewed:  6800 Time(s)

geo.png



_________________
MadHQ's Graveyard - Click here!
(Permissions) - (F.A.Q.)

Back to top
View user's profile Send private message Skype Account
G-E
General


Joined: 09 Feb 2015

PostPosted: Thu Jan 28, 2016 8:03 pm    Post subject: Reply with quote

That looks about right, there is no normal exactly "up" or "down" though, at least in my experience... the top most normal is actually tilted, meaning the whole sphere is rotated.
_________________
http://www.moddb.com/mods/scorched-earth-ra2-mod-with-smart-ai

Back to top
View user's profile Send private message
ViPr
Gauss Rifle Trooper


Joined: 30 Dec 2004

PostPosted: Thu Jan 28, 2016 10:00 pm    Post subject: Reply with quote

Why not use the vertex coordinates as the normals?

Back to top
View user's profile Send private message
tomsons26lv
Cyborg Artillery


Joined: 30 Dec 2009
Location: Latvia

PostPosted: Sat Jan 30, 2016 4:36 pm    Post subject: Reply with quote

Got bored and wanted to see what's going on with the shape.

For exception of Index 1, seems they are rotated geospheres with selectively collapsed vertexes

@Mad Think you could eventually make a new voxel exporter for Max?
Seems like you would be able to Very Happy


ra2normsphares.png
 Description:
 Filesize:  14.32 KB
 Viewed:  6678 Time(s)

ra2normsphares.png



ra2normals.3DS
 Description:

Download
 Filename:  ra2normals.3DS
 Filesize:  10.78 KB
 Downloaded:  4 Time(s)


_________________
Tiberian Dawn, Red Alert, Tiberian Sun ,Red Alert 2,Renegade, Command & Conquer 3,Tiberium and Tiberium Wars and Westwood related image & video archive
https://picasaweb.google.com/113361105083292812413?noredirect=1

Skype live:tomsons26
Don't forget to state who are you otherwise i'll ignore the invite

Back to top
View user's profile Send private message Visit poster's website
MadHQ
Commander


Joined: 07 Nov 2003

PostPosted: Sat Jan 30, 2016 11:18 pm    Post subject: Reply with quote

@ViPr - To me I do not know that its worth it to re-create the normal's... as there is only 4 missing... and TBH the 4 I made are close enough... And I have no idea how they got 245. And as for using vertex's vs normal's for values it doesn't seem to matter, other that using normal values seems to make more since...

@tomsons26lv - Yes, that is pretty much the same thing I realized, and I have no idea which ones they collapsed. So it would be lengthy trial and error to figure out. And no, I will not make a new max2vxl thing as ViPr 3ds2vxl works just fine.
_________________
MadHQ's Graveyard - Click here!
(Permissions) - (F.A.Q.)

Back to top
View user's profile Send private message Skype Account
ViPr
Gauss Rifle Trooper


Joined: 30 Dec 2004

PostPosted: Sun Jan 31, 2016 1:54 pm    Post subject: Reply with quote

They might need to collapse some of the triangles only if they ended with more than 256 vertexes when they increased the resolution of the geodesic sphere. However, then they should attempt to end with about 256 of them after that. So why did they actually end so far off with only about 245 of them? I'm confused.

It makes more sense to use the sphere vertexes as the normals, instead of the sphere normals as the normals because look how when you use the normals as the normals, then the dots are not very uniformly distributed, and instead clump into a bunch of hexagonal or pentagonal formations.

Back to top
View user's profile Send private message
G-E
General


Joined: 09 Feb 2015

PostPosted: Tue Feb 02, 2016 12:32 am    Post subject: Reply with quote

ViPr wrote:
It makes more sense to use the sphere vertexes as the normals, instead of the sphere normals as the normals because look how when you use the normals as the normals, then the dots are not very uniformly distributed, and instead clump into a bunch of hexagonal or pentagonal formations.

That does make the most sense, it solves the problem of the tilt without rotating the sphere, because the first vertex of the top face can't be straight up, and that matches the game's rendering.

Not just that but I expect they didn't want to make the sphere based on vertices, then recalculate everything based on notional tile centers.

Back to top
View user's profile Send private message
MadHQ
Commander


Joined: 07 Nov 2003

PostPosted: Fri Feb 05, 2016 9:25 am    Post subject: Reply with quote

I have to take a break from the html5 stuff for a little bit... I was getting frustrated...

Anyways released two more voxel doodad packs for fun... Some of them could have used a little more work but... bla... Do not know that to many of these actually get used, and most people seem to edit my stuff anyways...

@Kamuix - one of the vans should be close enough to a Dodge mini van...


Holly-Weird VXL pack #4


Civilian Van Pack #1



Can any one guess what the 6 holly-weird voxels are from? One of them should be pretty easy...
_________________
MadHQ's Graveyard - Click here!
(Permissions) - (F.A.Q.)

Back to top
View user's profile Send private message Skype Account
Mig Eater
Defense Minister


Joined: 13 Nov 2003
Location: Eindhoven

PostPosted: Fri Feb 05, 2016 11:43 am    Post subject: Reply with quote

Jurassic Park, A-Team, Star Wars, Blade Runner?, Dukes of Hazard & Umm..?
_________________



Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID YouTube User URL Facebook Profile URL Twitter Channel URL
4StarGeneral
General


Joined: 14 Sep 2006
Location: Constant Flux

PostPosted: Fri Feb 05, 2016 12:27 pm    Post subject: Reply with quote

Blade Runner Back to the Future, unsure what that white van is.
_________________
"Don't beg for things; Do it yourself or you'll never get anything."

Back to top
View user's profile Send private message Send e-mail YouTube User URL
ViPr
Gauss Rifle Trooper


Joined: 30 Dec 2004

PostPosted: Fri Feb 05, 2016 3:35 pm    Post subject: Reply with quote

No.

Inspector Gadget.

Back to top
View user's profile Send private message
MadHQ
Commander


Joined: 07 Nov 2003

PostPosted: Fri Feb 05, 2016 6:34 pm    Post subject: Reply with quote

I am supersized you got the Jurassic park jeep... Turned out like crap...

So far:
Jurassic Park - YUP
A-Team - YUP
Star Wars - YUP
Blade Runner - Nope
Dukes of Hazard - YUP
Back to the Future - Nope
Inspector Gadget - YUP

So still one left... Might be hard to guess this one...
_________________
MadHQ's Graveyard - Click here!
(Permissions) - (F.A.Q.)

Back to top
View user's profile Send private message Skype Account
Kamuix
Rocket Infantry


Joined: 02 Nov 2012
Location: Canada

PostPosted: Fri Feb 05, 2016 9:34 pm    Post subject: Reply with quote

Oh wow awsome thanks alot! I just threw out the request for whenever you had some time but thanks a million

EDIT: And OMG you made a cubevan that looks perfectly like the one I needed except for the color but all i think i need to do is use the 'Replace Color' Function in the voxel editor Wink

EDIT: I could only guess the one from the A-team but i only knew because of Family Guy

Also there's definitely a van there close enough i like how you made a handful of them though Smile

Back to top
View user's profile Send private message
MadHQ
Commander


Joined: 07 Nov 2003

PostPosted: Sat Feb 06, 2016 8:25 am    Post subject: Reply with quote

Okay the van is cheech and chongs van.


Anyways I have released some more civilian naval ships.

Civilian Ship Voxel Pack #2


Civilian Ship Voxel Pack #3


Civilian Ship Voxel Pack #4



_________________
MadHQ's Graveyard - Click here!
(Permissions) - (F.A.Q.)

Back to top
View user's profile Send private message Skype Account
G-E
General


Joined: 09 Feb 2015

PostPosted: Sat Feb 06, 2016 8:31 am    Post subject: Reply with quote

Hey your fishing vessel at the bottom right looks like my new shipwreck #Tongue

The steamship didn't turn out so well, and the large surveyor ship is lacking detail, but the little skiffs and speedboats came out nice.
_________________
http://www.moddb.com/mods/scorched-earth-ra2-mod-with-smart-ai

Back to top
View user's profile Send private message
Millennium
Commander


Joined: 09 Mar 2008
Location: Osaka (JP)/Hong Kong/Germany

PostPosted: Sat Feb 06, 2016 2:14 pm    Post subject: Reply with quote

The Mississippi Steamer is a great idea, but I think the brown parts don't really convey the idea very well that they are supposed to be wood. Maybe some additional detail/texture and a less sandy color?

Mad, have you thought about making a Mystery Machine voxel as part of your movie-themed vehicles? Just an idea. Smile
(Or have you maybe already made one!?)

Edit:
Yes, clear similarity there, G-E Smile
_________________
Mao Zedong wrote:

Our mission, unfinished, may take a thousand years.  

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Page 6 of 12 [562 Posts] Goto page: Previous 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 Next
View previous topic :: View next topic
 Forum index » Modding Central » Media Hut
Jump to:  
Share on TwitterShare on FacebookShare on Google+Share on DiggShare on RedditShare on PInterestShare on Del.icio.usShare on Stumble Upon
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © phpBB Group

[ Time: 0.7268s ][ Queries: 16 (0.0320s) ][ Debug on ]