« first day (18 days earlier)      last day (86 days later) » 

user4704
2:57 AM
 
5:03 PM
Oh you created a meta?
 
5:16 PM
And you pinned it, great!
 
5:46 PM
@Aracthor you about?
 
5:58 PM
@KevinvanderVelden can I edit the description? Do you know?
 
@AlecTeal you're a room owner, yes you can
 
Do you know where it is?
 
Pfff, I think via info?
Or maybe the room dropdown under the description
I've only been a roomowner for some tiny, 1 session rooms so can't quite recall
 
room topic changed to Game Tech & Internals: All branches of combinatorial optimisation AND AI, Lighting, Scene graph, data structures - you name it. Here [game-design]
Thanks
 
6:25 PM
@Wardy have you ever read any of the "Game Programming Gems" books, or "AI Programming Wisdom" and co?
room topic changed to Game Tech & Internals: (UNOFFICIAL CHAT) All branches of combinatorial optimisation AND AI, Lighting, Scene graph, data structures - you name it. Here - This chat is not "the official gamedev.stackexchange chat" [game-design]
 
@AlecTeal They aren't the sort of book you can just sit and read IMO, I have leaned on them for certain topics though
 
@Wardy I like them because I never know what to expect. Like you don't go into them expecting to learn what you learn.
 
I have found that most books / technical articles that explain rendering are making an assumption of a level of math knowledge that is ahead of me (extremely good trig at the very least)
My issue I guess is the lack of strength in my Math not the books per say
I would like to see the same topics discussed / covered somewhere but targetted at someone with little more than basic algebra understanding
that would be my new programming bible (should someone write it)
 
@Wardy not sure what you mean by "rendering" I find the openGL book to be a pretty good reference (as are online tutorials for getting data to it - this was years ago though) coupled with songho.ca/opengl/gl_projectionmatrix.html to be great.
That songho.ca stuff is brilliant.
 
6:41 PM
yeh that has the same problem looking at a glance
Its mathmatically complex
 
THIS IS NOT THE MAIN CHAT, see chat.stackexchange.com/rooms/19/game-development for the gamedev chat
 
any moron (like me) won't easily get it and will have to spend hours to just read and comprehend the math
@AlecTeal yeh i know ... lol
 
Hmm.... I guess I'm just... I've seen matrices since I was 16.
I posted that message in good faith, I think a mod thinks I am trying to use the word "game" in a chat title to bait users or something.
 
Yeh if you're comfy with matrix math that kinda thing is great
like in gpu gems 3 theres that bit on generating complex 3d terrain on the gpu
 
Anyway @Wardy I can help with getting comfortable with linear maps? (I've written some things already, I've been wanting to get into teaching)
 
6:43 PM
it talks about a density function but doesn't really explain what one is
so its assuming a level of knowledge
I'm cool for now ... spent a long time getting my head round it
just managed to get a voxel planet generator working after a long time of working out the math
 
When you get a moment @Wardy I'd love to know what you think of maths.kisogo.com/index.php?title=Basis_and_coordinates - it might be slightly above you though
 
user4704
@AlecTeal It's not the description of the room, it's the name (and more recently the constant bumping).
 
@JoshPetrie please PLEASE do not bring that up here.
 
user4704
Then keep talking about it where you first started talking about it, please. Don't claim to abandon the discussion and then make snide comments about it elsewhere.
 
@JoshPetrie Please do not do this in this room, or now.
As a rule of thumb BTW @Wardy (people use density function and your mind just sorta figures out the abstract meaning of density function) basically it describes what the function outputs, per the input.
@TheMuffinCoder please keep it serious in here though. I have no doubt you will, just saying. There is a "start chat with user" button after all :)
 
6:57 PM
:( I haven't even said anything
 
@AlecTeal yeh the gpu gems thing just says "a density function" now it took me a few weeks of looking in to the various uses of and understanding them to determine that usually a density function is "a function that returns weight values for the volume being represented within the volume of space given"
without some prior knowledge that's a hard conclusion to come to
 
Well "density" is usually the clue as it's the best word to describe it. But I do see what you mean. I was reading something today "density of memory regions" and I just sorta knew that they meant "useful allocations / total size"
 
@AlecTeal Seems reasonable to understand to me ... I've spent quite a long time trying to do 3D math now though so it makes sense ... that said when I started game programming I suspect I might have found that fairly complex too
 
@Wardy on a serious note, one of the things I come here for is to give users a good bump in the right direction (maybe not tutor them, you know it is my time and all) if you ever get stuck I am happy to type a paragraph setting you on the right course.
You can reach me at [first letter first name] dot [last name] at warwick.ac.uk
 
@AlecTeal goodto know thx :)
 
7:03 PM
NP, I hope it actually helps.
 
I never went to uni
I guess thats why I get stuck
I did do A level in math though
but I found it extremely complex
but I didn't get on with my math tutor
 
@Wardy we're very different.
 
very
 
I did MEI maths, but my school only went as far as offering AS further, I self taught A2 further, AND AS advanced and A2 advanced (so 3 alevels in maths) then went on to do a maths degree :P
ALL OF THE MODULES - I did them.
 
Hey do you guys happen to know how I might generate a normal on the edge of a mesh that presents part of an object
I used unity's built in mesh.recalcnormals() call but that's horrifically bad in this scenario
 
7:11 PM
@Wardy lots of unity devs in the main room, if that fails though, show me screenshots of the problems and stuff and I'll apply some maths!
 
In this case its a planet and I basically just want to gen a normal that points out for each vert as the mesh in this instance is just a perfect sphere portion
 
I can calculate the normal for you given two angles? But I don't know unity.
 
i have 2 points
the center of my planet and the surface point
i basically just want a normal that follows that line out from the surface point
 
Yeah that's how I'd get the normal :P
 
so in dumbass terms how does that work (mathematically speaking)?
 
7:14 PM
If you've already got that line, the surface normal is just $\frac{c-r}{\Vert c-r\Vert}$
 
uh ...
 
Okay, if c is the centre, and r is the point on the rim, c-r is your direction.
All you do is make it so the magnitude of c-r is 1. Then it is a normal.
 
ah that's the bit i don't get
 
magnitude of c-r is just the radius. Sorry for LaTeX, used to maths room
 
how do i make the magnitude 1
 
7:15 PM
You divide it by the magnitude it is.
 
hmm ok
 
So if I give you a vector of magnitude 10 and you divide each component of it by 10, the result has magnitude 1.
@Wardy click that link and drag start-chatjax to your bookmark bar, then click it in this chat. You'll see my formula then.
$k\left(\begin{array}{lr}a \\b \\ c\end{array}\right)=\left(\begin{array}{lr}ka\\kb\\kc\end{array}\right)$
 
yeah ... i don't speak math
lol
Probably a dumb math question but ... if i divide a vector by its magnitude i should get a vector of magnitude 1 right?
 
Your vector is $$\frac{r-c}{\Vert r-c\Vert}=\frac{1}{\Vert r-c\Vert}(r-c)=\frac{1}{\text{radius}}\left(\begin{array}{lr}(r-c)_x \\ (r-c)_y \\ (r-c)_z \end{array}\right)$$
You should be able to see that now?
Yes.
So the length of a vector (the magnitude) is written as $$\Vert v\Vert=\sqrt{\sum^n_{i=1}v_i^2}$$ @Wardy
And if $n=3$ we see $\Vert v\Vert =\sqrt{v_x^2+v_y^2+v_z^2}$ which you should recognise as pythag.
@KevinvanderVelden so another use (although the maths wasn't 'hardcore') is the mathematics of on topic stuff.
What brings you here @ArtOfCode
 
7:32 PM
Lurking.
 
Well feel free to participate. @Wardy I've given you the formula there. Would be good to go over the formals of what you can/can't do with vectors.
 
void SetNormals(Mesh mesh, Vector3 planetPos, int planetSize)
{
    float r = (float)planetSize;
    mesh.normals = new Vector3[mesh.vertexCount];

    for (int i = 0; i < mesh.vertexCount; i++)
        mesh.normals[i] = (planetPos - new Vector3(r, r, r)).normalized;
}
i'm not sure i got it right
 
No. Think about it in two dimensions @Wardy a vector of the form $\left(\begin{array}{lr}x\\ y\end{array}\right)$ goes $x$ across and $y$ down.
 
you're losing me with all that math stuff
 
Click the start chatjax button and you can see it.
 
7:36 PM
yeh i did
 
You don't know vectors?
 
just shows me a load more math i don't really understand
 
Wait, so you don't know what (x,y) is and stuff?
 
I don't know how to read math
I have a working mesh gen so I like to htink I have a basic understanding of verts
 
I don't want to sound nasty but if you don't know what a vector is.... we're supposed to learn this in year 4, that's like 8 year olds I think.
 
7:38 PM
I understand the concepts, it's your syntax I don't get
 
@Wardy I assume you know how graphs work? A vector $\left(\begin{array}{lr}x\\ y\end{array}\right)$ is basically a set of additive co-ordinates (x, y). You use those co-ordinates to define a position or a movement.
 
Did you actually click "start chatjax"
 
yes and yes guys
I'm not brain dead
Like I said I get code just not math
 
What direction does the vector $\left(\begin{array}{lr}6\\ 6\\ 6\end{array}\right)$ go in?
 
@Wardy so when Alec starts talking vectors, think co-ordinates instead.
 
7:40 PM
Think about it, in your head.
 
^ that is co-ordinates (x, y, z) = (6, 6, 6)
If that's a position, it's 6, 6, 6 from the origin. If it's a direction, it's north-east, 45 degrees pitched up.
 
if a vector is defined as ..
v = {x,y,z}
... I have a point in cartesian space
 
Yeah right, so your vector $(r,r,r)^T$ is not on the surface of a sphere.
 
@Wardy Yep.
 
^T ... is that "to the power of T" ?
 
7:42 PM
:24630613 yeah
 
No it means "transpose". "power of" makes no sense for vectors
 
a point at {r,r,r} is a point on the surface of a perfect sphere (which is what I have at this point
 
It means "rotate the vector so it's a column one" so $(x,y,z)^T=\left(\begin{array}{lr}x\\ y\\ z\end{array}\right)$ - it's easier for me to write.
 
@AlecTeal where transpose is to power x,y,z
hmm
 
No it isn't. Think about $(r,r)^T$ in 2 dimensions, where is that vector.
 
7:44 PM
So, @Wardy, it makes no difference. Ignore it, think of it as co-ordinates {r, r, r}
 
yeh thats what ive been doing
i have 2 points
point of origin for the planet
and a surface point
if I draw a line between the two
 
Anyway, I'm missing context here: what are you guys trying to achieve?
 
I want a vector of magnitude 1 from the surface point
 
@ArtOfCode he thinks that the point $(r,r,r)^T$ is on the surface of a sphere of radius $r$.
 
to use as a normal
 
7:45 PM
@AlecTeal It can be.
 
@AlecTeal no i dont
 
Only when $r=1$ @ArtOfCode
 
It's not always, but it can be.
 
I think a point {r,r,r} is on my spheres surface
not sure what the ^T was
which is why i asked
 
@AlecTeal Aye, that's what I mean
 
7:46 PM
@Wardy it really isn't.
 
@Wardy Ignore it. You don't need to worry about it :)
 
Think about where (r,r,r) is in your head.
 
ah i c what you mean
it would be (r,r,r) offset by origin
if planet is at (0,0,0) then its true
otherwise its not
 
No, I need to go AFK now. But no, (r,r,r) is NEVER on the surface of a sphere of radius r, except when r=1. That's just luck.
 
Ah, I see the misunderstanding. @AlecTeal what I think me means is that he has a point {x, x, x} on the surface of a sphere radius r.
 
7:47 PM
but the points I have are a vertex (which is on my planets surface) and the planet center
 
14 mins ago, by Wardy
void SetNormals(Mesh mesh, Vector3 planetPos, int planetSize)
{
    float r = (float)planetSize;
    mesh.normals = new Vector3[mesh.vertexCount];

    for (int i = 0; i < mesh.vertexCount; i++)
        mesh.normals[i] = (planetPos - new Vector3(r, r, r)).normalized;
}
 
Yeh i have something wrong for sure
 
Hey @PhiNotPi
 
ah thats what i got wrong
for (int i = 0; i < mesh.vertexCount; i++)
    mesh.normals[i] = (planetPos - mesh.vertices[i]).normalized;
ok not what i was thinking
but that feels better :)
 
Hi. I'm just visiting because I thought the room's topic was interesting. (I wouldn't consider myself a game dev by any means.)
 
7:50 PM
Yeah, because mesh.verticies[i] is actually on the sphere.
@PhiNotPi welcome, don't forget there's a main room, and please forgive the current topic.
 
@AlecTeal yeh taking that conversation in to account i thought that would do it
apparently not
did this room just die?
 
No no.
I just.... that was one for the other room that's all
 
hmmm ok ... pretty much every question i have is like this
 
It's more for the other room, but the email offer still stands
 
well, nice meeting you all, think I'll go back to the other room
 
8:02 PM
@Wardy what calculation are you trying to make?
 
41 mins ago, by Alec Teal
Your vector is $$\frac{r-c}{\Vert r-c\Vert}=\frac{1}{\Vert r-c\Vert}(r-c)=\frac{1}{\text{radius}}\left(\begin{array}{lr}(r-c)_x \\ (r-c)_y \\ (r-c)_z \end{array}\right)$$
@ArtOfCode to find the normal to a point on the surface of the sphere, given the centre and a point on it.
 
@AlecTeal So you want a vector representing the direction of the normal line?
 
@ArtOfCode yes. but his initial code... (r,r,r) is not a point on the surface of a sphere.
 
@AlecTeal Only if r is actually the radius, and not simply a variable.
I don't know that
 
$r$ is a point on the sphere in this case.
So one of the things I'm working on ATM is using Markov chains to model probable of players through deathmatch maps....
 
8:13 PM
public Vector3 GetNormal(Vector3 centerPoint, Vector3 surfacePoint)
{
	return new Vector3(centerPoint.X - surfacePoint.X,
	                   centerPoint.Y - surfacePoint.Y,
	                   centerPoint.Z - surfacePoint.Z);
}
no?
(assuming C# and Unity)
 
That wont return a normal (you need to divide that by the radius) but it will return something in the same direction as the normal. Given "radius point" is actually a point on the surface.
@ArtOfCode
 
If you only want a vector that points in the direction of the normal, that'll do you nicely though.
 
Yup.
I don't understand how he couldn't see that the vector (r,r,r) wasn't on the surface of the sphere.
 
It is, no? @Alec
Why not?
What is r?
 
@ArtOfCode $r$ when used like that must be a scalar.
 
8:25 PM
And what is it?
 
As in a number. If I write $r_x$, $r_y$, $r_z$ you can deduce that $r$ is some sort of vector.
Traditionally $r$ is radius.
 
Traditionally, sure, but what is it for him?
 
Radius
To quote me quoting him @ArtOfCode
37 mins ago, by Alec Teal
14 mins ago, by Wardy
void SetNormals(Mesh mesh, Vector3 planetPos, int planetSize)
{
    float r = (float)planetSize;
    mesh.normals = new Vector3[mesh.vertexCount];

    for (int i = 0; i < mesh.vertexCount; i++)
        mesh.normals[i] = (planetPos - new Vector3(r, r, r)).normalized;
}
 
Ah. In that case, sure. Unless $r=1$
 
Notice $r$ is the planet size.
Yes @ArtOfCode we've established that.
 
8:26 PM
@AlecTeal ;)
 
I just don't see how he couldn't see that his normals were all the same for example
Nothing in the expression varies with $i$
 
So it doesn't.
Question is, why are the normals required?
 
8:45 PM
@ArtOfCode lighting.
See........ hold a sec please @ArtOfCode
 
@AlecTeal Um. What about lighting?
 
@ArtOfCode emailing it to myself.
 
You've stopped making sense.
 
Pip
:P
 
@ArtOfCode nearly done
 
8:51 PM
Hey @Pip
 
So @ArtOfCode there's this thing called the "dot product", given two vectors, $u$ and $v$ we define:

$$u\cdot v=\sum^n_{i=1}u_iv_i=\Vert u\Vert \Vert v\Vert \cos(\theta)$$
 
Yeah you're gonna lose me soon. I can do some maths, but I'm only A-level rather than university maths.
 
That is A-level
 
Specifically, I never did get summations.
 
You know what a for-loop is?
You can do sums.
It means for(i=1,i != n,i++)
So if $\theta=90^\circ$ then $\cos(\theta)=0$ - so if the dot product is 0, the vectors are perpendicular (and if they're in the same direction, this is maximised)
 
8:55 PM
@AlecTeal That might actually be a really good way of remembering it. So is the i++ condition implied by the $ \Sigma $?
 
Yeah. Unless some other notation is used that's what it means.
Like I might say for example $i=1,\ i\text{ is odd}$ at the bottom, that means i=1, 3, 5,...
 
Cool. That's that done then. And what are the double lines around $u$ and $v$? Is it just weird modulus notation?
 
(I live in Wales, I forgot I can't just email myself a picture)
That means "magnitude" of vector.
Because "absolute value" isnot defined for vectors.
 
Right-o. So the magnitude of a vector is?
 
Pythag? You should know how to find the distance between two points
$$\Vert v\Vert = \sqrt{\sum^n_{i=1} v_i^2}$$
So when you hold the torch at a shallow angle to the surface, the light is spread out over a larger area and thus not as strong, as you're stretching some fixed number of photons over a larger area.
However as you approach the normal to the surface intensity increases because those photons are not being spread out (this is also why regions near the equator are warmer - AMONG other things)
So given two unit-length vectors (so their $\Vert\cdot\Vert=1$) the dot product of them is the intensity of the light.
 
9:01 PM
Right. I can get the physics of that easily.
The maths is a bit more shaky, but the principles of angles and light I can get.
Hang about, this is a GD.SE chatroom, isn't it?
 
You may find this hard to believe right but maths is not disjoint from everything
Physics and computer science have large chunks of it.
 
Maths is in basically everything, I know that. There's just plenty of it I don't get.
But - let me interject with official things again.
Are you not suspended on GD?
 
THIS IS NOT THE MAIN CHAT, see chat.stackexchange.com/rooms/19/game-development for the gamedev chat
2
@ArtOfCode please, drama and not gamedev things, not here.
 
@AlecTeal Sorry, this needs to be addressed. If you're suspended on GD, you shouldn't technically be chatting in GD rooms. Mods don't tend to do anything about it, but if a CM finds you, you'll have a large CM-boot-shaped dent in your backside.
 
@ArtOfCode a community mod knows and encouraged me to talk on GD chats, soooo....
Grace Note if you want to follow that up.
@ArtOfCode it'd also be nice to get a "thanks for explaining the fundamentals of lighting" rather than "shouldn't you be banned?" BTW.
 
9:09 PM
@AlecTeal Dude. Let me point out that you don't know everything and everyone else knows nothing. I noticed something that as a mod I have a duty to query, so I queried it.
 
@ArtOfCode you should really use the "invite user to chat" stuff with that. You know, show some class, especially when I'm innocent.
 
And you're not making sense again. Invite who to chat, where, why, with what?
 
To ask me stuff like that.
 
You're "innocent" of what?
You were here. It's perfectly reasonable to chat to you about it where you are. If you didn't want to engage, don't reply.
 
Now please try and keep this on topic, if you want to remove those (and this) message I'd be grateful. Provided it shows up as one message removed, not like 8.
 
9:11 PM
It don't.
 
Nope.
If you're suspended on a site, you're suspended on that site - including that site's chatrooms.
There's some wiggle-room there due to how the SE chat system is set up, but flaunting privileges that are at best accidental is not cool.
So now you're suspended in chat for the duration of your time in the box on GD.SE.
Good day.
 
Pip
That turned sour quickly :P
 

« first day (18 days earlier)      last day (86 days later) »