Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Nanomachine Son
Jan 11, 2007

!

Rocko Bonaparte posted:

What kind of padding and fudging do I have to do in order to align textures well? I was working on my off-by-one problems with that level editor. My texture atlas is using a 256x256 texture, and the tiles inside are each getting a 32x32 region. Part of my problem was the UV mapping was assuming using a 0,0 -> 32,32 mapping instead of 0,0 -> 31, 31. However, that actually did not completely fix things. It looked like I had to do some some further fudging. It looks like I'm clear with something like 1,1 -> 31,31, but I'm losing a whole texture's pixel that way. I'm assuming I really need to do something like 0.1, 0.1 -> 30.9, 30.9, but I wanted to ask for pointers before just toying with it a bunch.

I also noticed in Unity that I get into issues with faces hitting each other. Currently, my walls are three-dimensional and have edges on all sides. When I put two wall pieces next to each other, the leftmost wall's right side is touching the rightmost wall's left side. It looks like this causes some artifacting. I guess in the long term that I should just get rid of these surfaces, but I wondered if there was a mode or something I could toggle to reduce the artifacting.

Might be tied to Anisotropic filtering, but you might not want to disable that unless it's pixel art. I'd probably say like 2px should be good enough but I don't know if it causes issue with keeping the total texture size a power of 2.

For the other thing it just might be if you're off by a decimal point, like if it's 1.2342 or something rather than 1. It's something we had to do with our game jam project since we just had tile prefabs that fit in 1x1 increments. I just wrote a script to round the transform values and that mostly seemed to work?

Adbot
ADBOT LOVES YOU

ToxicSlurpee
Nov 5, 2003

-=SEND HELP=-


Pillbug

Bel Monte posted:

Basically, I have too many separate arrays for my liking.

In order to modify one small value, I have to run through several ID matching between the arrays to make sure I'm on the correct value to change. So instead of just matching an ID number once, I need to do it multiple times for multiple arrays just to do anything simple, let alone complex.

And I don't know if there's a faster way to find an ID number in an array other than to loop through the entire thing. So I loop through multiple arrays every time I want to find anything.

To me, this is a recipe for major slowdown and unnecessarily large code for simple tasks. It may just be faster if the arrays are larger and a little cluttered than to cleanly separate values into categories of arrays.

Edit: I originally did this because it looked nice and simple (an array for population, product stats, product sales, etc), until I started to try and have the program modify these arrays. So I really do think I went overboard... Unless there's a faster method I'm not aware of?

After rereading stuff it sounds like you want more advanced data structures than arrays. Read up on hash tables. The basic idea is that you have an array of slots where you store everything but which slot stuff ends up going to depends on what it is you're looking for. Basically you'll have a function that turns the query into an address within the array. The array should stay the same size and the function will pick a slot for every possible input. Similarly the hash function will always send the same query to the same slot.

Now, if you're using arrays, what you want to do is never change the array's size. You can change the size of stuff like lists but really what data structure you use depends on what you're doing. If you study CS in a college setting you'll typically spend at least one semester doing nothing but going over data structures because wow is this crap complex.

Anyway, back to hash tables...in this case what you could do is have something like each location having its own array and you send it an ID number or a name for something you want to know the price of there. Instead of shuffling crap around all the time you'll say "I want to know the price of Farts in Assville" and the hash function will go "Farts? Oh, OK that means you want slot #49" and then send back whatever is in slot #49. Then later if you say "OK, now I want the price of Farts in Penisberg" the function would instead consult the Penisberg array and send back slot #49.

Another advantage of hash tables is that you can have like an array of lists instead of individual objects. Then instead of iterating through an entire array you'll go to one particular slot and only go through a much shorter list. So if your hash function sends Farts and Bags of Vomit to the same slot for some reason instead of checking the whole array now you only need to visit two slots in the list. So if you ask for Farts but there is only a slot for Bags of Vomit you can have it say "Farts have no value here take that somewhere else" or whatever fits what you're doing. In any event it sounds like hash tables are what you want.

You're right though; generally speaking you really don't want to be iterating through and resizing arrays all the time. That causes a lot of overhead. More complex data structures makes it easier to organize those things as well as less computationally expensive.

The other thing about arrays and lists and whatnot is don't necessarily assume you have to delete an object and rearrange an array just because you're no longer using one particular object. Also read about object pooling, nulling, and references.

ToxicSlurpee fucked around with this message at 21:23 on Aug 22, 2015

Dongsturm
Feb 17, 2012

Bel Monte posted:

Basically, I have too many separate arrays for my liking.

In order to modify one small value, I have to run through several ID matching between the arrays to make sure I'm on the correct value to change. So instead of just matching an ID number once, I need to do it multiple times for multiple arrays just to do anything simple, let alone complex.

And I don't know if there's a faster way to find an ID number in an array other than to loop through the entire thing. So I loop through multiple arrays every time I want to find anything.

To me, this is a recipe for major slowdown and unnecessarily large code for simple tasks. It may just be faster if the arrays are larger and a little cluttered than to cleanly separate values into categories of arrays.

Edit: I originally did this because it looked nice and simple (an array for population, product stats, product sales, etc), until I started to try and have the program modify these arrays. So I really do think I went overboard... Unless there's a faster method I'm not aware of?

Hashtables(dictionaries) will let you look up other structures by id, or you can build your own indexes for fast lookup (not trivial).

But it sounds like you might want an embedded SQL database like SQLite. I don't know what platform you are on but there are lots of similar libraries, so you probably have some kind of SQL library available.

E:me no spell gud

Dongsturm fucked around with this message at 21:39 on Aug 22, 2015

Rocko Bonaparte
Mar 12, 2002

Every day is Friday!

TheOrange posted:

Might be tied to Anisotropic filtering, but you might not want to disable that unless it's pixel art. I'd probably say like 2px should be good enough but I don't know if it causes issue with keeping the total texture size a power of 2.

For the other thing it just might be if you're off by a decimal point, like if it's 1.2342 or something rather than 1. It's something we had to do with our game jam project since we just had tile prefabs that fit in 1x1 increments. I just wrote a script to round the transform values and that mostly seemed to work?

2 pixels? In a 32x32 texture?

Edit: How do people repeat textures seamlessly then?

Rocko Bonaparte fucked around with this message at 23:51 on Aug 22, 2015

Nanomachine Son
Jan 11, 2007

!

Rocko Bonaparte posted:

2 pixels? In a 32x32 texture?

Edit: How do people repeat textures seamlessly then?

I just meant for packing them all into one image you would have them separated by a couple pixels to avoid them bleeding into each other. When I was using OpenFL I'd have to separate the sprites by at least 1px or turn off the anti-aliasing to fix a similar problem.

E: Are you doing it where you're drawing one big mesh and setting all the UVs yourself to correspond to the different textures in a single material? I think in retrospect I might of been assuming something else which could be adding to some of the confusion.

Nanomachine Son fucked around with this message at 00:29 on Aug 23, 2015

Rocko Bonaparte
Mar 12, 2002

Every day is Friday!

TheOrange posted:

E: Are you doing it where you're drawing one big mesh and setting all the UVs yourself to correspond to the different textures in a single material? I think in retrospect I might of been assuming something else which could be adding to some of the confusion.
Yeap, this. I am doing all the operations against a big sack of vertices for a single mesh. Each wall starts as its own mesh, and I transform it and cram it in. One big deal is transforming a wall segment's UV coordinates to match the atlas. The wall segment will map from the range (0, 0) to (1, 1). I have to transform that to wherever the segment's texture is in the atlas.

Omi no Kami
Feb 19, 2014


So I think I either had a really smart idea, or a really dumb one: I know that a realtime time-management game is a bad idea, especially when I want the player to carefully weigh the importance of every action without always being stressed, but the complaint I have with literal Persona chunks of time is that it feels very janky to constantly jump forward in time.

What I'm thinking is, instead of 3 chunks per day and n stamina-bounded actions per chunk, what if I make a 24-hour clock, and make every single action from pooping to talking chew up time? (Interviewing a witness advances the clock 30 minutes, typing up that report back at the office will take 90). Add to that a stamina gauge that takes, say, 12 hours to drain (after which the only actions you can take are nap-related), and let you eat and drink stimulants with diminishing returns to pad your day beyond that in return for stat nerfs down the line (because your circadian rythmns are out of whack and you're chain-smoking cigarettes with one hand and guzzling crappy station coffee with the other).

I have a gut feeling that sticking with "You can do 3 things per day" is still the better decision, since it's much easier to understand a time economy with a single unit of measure ("The ME needs 5 chunks to finish his report, and your subordinates can each give you one chunk of help this week"), but I think the idea of the clock always running is super-compelling if you can make it work.

Rocko Bonaparte
Mar 12, 2002

Every day is Friday!
I might have been making a bunch of noise about my UV mapping for nothing. I have realized I am seeing some goofy behavior in Unity just moving around my generated mesh a little bit.

Linked due to 2.4MB .gif file

The texturing is goofy on purpose. Instead of a 32x32 texture, it's just a 4x4. The center is green, and I colored all the edges so I could tell how they were mapping. Despite this, I'm getting a whole lot of white. But then I panned and I saw it all black out. So looking at the mesh one way, it's saturating, and looking at it another way, it blacks out. I'm using Unity's diffuse shader. What does this mean?

Edit: It looks like this is Unity's intended behavior with its light model. Like, why. I guess to figure out my UV mapping stuff and level editing, I'll have to make my own shader that basically ignores lighting, or something.

Rocko Bonaparte fucked around with this message at 07:45 on Aug 23, 2015

Bongo Bill
Jan 17, 2012

Omi no Kami posted:

So I think I either had a really smart idea, or a really dumb one: I know that a realtime time-management game is a bad idea, especially when I want the player to carefully weigh the importance of every action without always being stressed, but the complaint I have with literal Persona chunks of time is that it feels very janky to constantly jump forward in time.

What I'm thinking is, instead of 3 chunks per day and n stamina-bounded actions per chunk, what if I make a 24-hour clock, and make every single action from pooping to talking chew up time? (Interviewing a witness advances the clock 30 minutes, typing up that report back at the office will take 90). Add to that a stamina gauge that takes, say, 12 hours to drain (after which the only actions you can take are nap-related), and let you eat and drink stimulants with diminishing returns to pad your day beyond that in return for stat nerfs down the line (because your circadian rythmns are out of whack and you're chain-smoking cigarettes with one hand and guzzling crappy station coffee with the other).

I have a gut feeling that sticking with "You can do 3 things per day" is still the better decision, since it's much easier to understand a time economy with a single unit of measure ("The ME needs 5 chunks to finish his report, and your subordinates can each give you one chunk of help this week"), but I think the idea of the clock always running is super-compelling if you can make it work.

Implement the fine-grained time-cost system and prototype it, then just change everything to take 8 hours if it doesn't work out.

FraudulentEconomics
Oct 14, 2007

Pst...

Omi no Kami posted:

So I think I either had a really smart idea, or a really dumb one: I know that a realtime time-management game is a bad idea, especially when I want the player to carefully weigh the importance of every action without always being stressed, but the complaint I have with literal Persona chunks of time is that it feels very janky to constantly jump forward in time.

What I'm thinking is, instead of 3 chunks per day and n stamina-bounded actions per chunk, what if I make a 24-hour clock, and make every single action from pooping to talking chew up time? (Interviewing a witness advances the clock 30 minutes, typing up that report back at the office will take 90). Add to that a stamina gauge that takes, say, 12 hours to drain (after which the only actions you can take are nap-related), and let you eat and drink stimulants with diminishing returns to pad your day beyond that in return for stat nerfs down the line (because your circadian rythmns are out of whack and you're chain-smoking cigarettes with one hand and guzzling crappy station coffee with the other).

I have a gut feeling that sticking with "You can do 3 things per day" is still the better decision, since it's much easier to understand a time economy with a single unit of measure ("The ME needs 5 chunks to finish his report, and your subordinates can each give you one chunk of help this week"), but I think the idea of the clock always running is super-compelling if you can make it work.

Why not a hybrid of both? You pick a location to go to in order to gain information or perform tasks. Each of these actions within the area takes up an amount of time. It doesn't make sense to just lose 8 hours taking a nap (that's called sleeping), but it totally makes sense that if you opted to go to your apartment, refresh your notes, take a nap, get a sandwich, that you'd be more effective the next time you go interrogate someone.

Going back to an older example you provided, let's say you have your morning location that you can pick. You go to the Barman's Hangout tavern. Ordering a drink takes 15 minutes but lowers your suspicion or whatever. Ordering food calms you down and takes 30 minutes. Talking to Joey Two Toes takes hypothetically 5 minutes per speech selection. You can spend 2 hours grilling Joey or you can grill him for 20, get info you need, grill his buddy at the other table, and so on.

This way you have your solid "chunks" of time but also have more acute control of what you do during that time and your actions still have weight while still being a "chunk" game.

Omi no Kami
Feb 19, 2014


The hybrid is a really good idea... I'll have to experiment with different models, but something else that appeals to me is the idea of making it literally real-time: one in-game minute lasts one real-world minute, as the purpose isn't to provide technical challenge but add just the tiniest amount of realism. It's slow enough that it'll never pose a balance problem, but I really think that the notion of time passing can be really magical if carefully framed.

ToxicSlurpee
Nov 5, 2003

-=SEND HELP=-


Pillbug
Have you played Papers, Please? It actually does time management extremely well but doesn't have a stress mechanic in the game. Your shift is only so long but you need to process enough people to make enough money to pay your rent. However you need to process increasingly insane paperwork and it gets stressful as hell but still fun.

You can definitely do real time time management if you do it right.

Omi no Kami
Feb 19, 2014


Papers, Please stressed the heck out of me :)

I think the main balance problem, which the hybrid idea addresses, is that combining time pressure and exploration is downright evil. ^^

Rocko Bonaparte
Mar 12, 2002

Every day is Friday!
I thought I'd try getting rid of those artifacts again. It just seems like this should be a really basic thing that is catching me.

It looks like Unity's default diffuse shader does something like edge lighting. I'm not entirely sure exactly what it is though, but it was doing that saturation when I added a light. While methodically playing around with texturing, I figured out I was not actually off-by-one in my original texturing; having a 32x32 texture's upper corner map to (32, 32) looks correct. My final test for that was adding bars in first just the horizontal, then just the vertical directions, and finding that going to 31, 31 cut off that single-pixel boundary. I then clobbered a shader to try to remove that saturation, which I think is helping me visualize all this. Having that lighting saturation on top of all the other doubts was confusing me.

Now the problem is I still see some goofiness. In this picture, I have set the bottom line of pixels (0,0 to 31,0) in my green texture to cyan and my top row (0, 31 to 31, 31) to yellow. So it should have two horizontal stripes. There is a red texture above it in the tile map, and magenta in the dead zones. So to its left and right is magenta, and if you loop around under it, it's also magenta. So this is what I get:


I see some of the magenta pop through, and a lot of white around the edges. I've been able to do super zoom in, and I can see the top row's pixels end crisply, but the bottom row's pixels start from white at the edge before blending into cyan. The vertical edges are also white. The red above this texture in my tile map does not come through.

Here I should mention I'm not using tiling in the material. I just have separate surfaces each time I want to repeat a wall segment. I did not know that was even a thing until I started searching around. Should I be using that instead? I somehow want to tell it to exclusively use the pixel data inside my UV coordinates and nothing more. If I start using less of the texture's boundaries--say 0.5, 0.5 to 31.5 to 31.5, I can reduce some of this, but it's still there until I've gone at least a full pixel in. So I can think of a few things to try:
1. When setting up the texture atlas, clone the outer perimeter's pixels one time, so a 32x32 texture is a 34x34 in the atlas, with the outside pixels repeated in a ring. I'd do some voodoo for the corners.
2. Figure out how to turn on tiling so that it only tiles once, but it has been told that it would continue tiling regardless.

What is the normal course of action here?

Finally, how can I get these individual wall segments to work with the edge lighting or whatever it is Unity uses by default? The problem was that it was saturating each wall segment independently, which looked really strange.

If you are curious, here is the shader I butchered:
code:
Shader "Custom/SimpleTextureDiffuse" {
    Properties {
        _MainTex ("Texture", 2D) = "white" {}
    }
    SubShader {
    Tags { "RenderType" = "Opaque" }
    CGPROGRAM
      #pragma surface surf SimpleLambert

		half4 LightingSimpleLambert (SurfaceOutput s, half3 lightDir, half atten) {
//        	half NdotL = dot (s.Normal, lightDir);
//          	half4 c;
//          	c.rgb = s.Albedo * _LightColor0.rgb * (NdotL * atten * 2);
//          	c.a = s.Alpha;
//          	return c;
			half4 c;
			c.rgb = s.Albedo * _LightColor0.rgb * 4;
          	c.a = s.Alpha;
          	return c;
      	}
  
	    struct Input {
	        float2 uv_MainTex;
	    };
        
    	sampler2D _MainTex;
    
    	void surf (Input IN, inout SurfaceOutput o) {
        	o.Albedo = tex2D (_MainTex, IN.uv_MainTex).rgb;
    	}
    	ENDCG
	}
	// Just want to make sure I don't get nailed by diffuse somehow while doing this, so I excluded it.
    // Fallback "Diffuse"
}

Edit: Gaaaah I found some knobs to turn on the texture that really improved things:

code:
Atlas.wrapMode = TextureWrapMode.Clamp;
Atlas.filterMode = FilterMode.Point;
I don't need any fudge factors doing this, although I expect other consequences from point filtering in particular. I have yet to see if this withstands Unity's diffuse lighting.

Rocko Bonaparte fucked around with this message at 20:08 on Aug 23, 2015

Omi no Kami
Feb 19, 2014


Simple data organization question: I want to give each NPC a handful of spawning rules in the format of locations and times, e.g. "From 9am-5pm, spawn in office 1, at 7pm spawn in any bar, at 2am spawn in this seedy alley," and let them spawn anywhere during a time period they don't have a rule for. This needs two levels of organization- look-up by spawner, and look-up by time. If it was a single dimension of data I'd just do something like TMap<location, person>, but is it acceptable practice to use nested dicts and go TMap<location, TMap<time, person>>? I reaaaally don't like nesting data structures like that, it feels sloppy.

TooMuchAbstraction
Oct 14, 2012

I spent four years making
Waves of Steel
Hell yes I'm going to turn my avatar into an ad for it.
Fun Shoe

Omi no Kami posted:

Simple data organization question: I want to give each NPC a handful of spawning rules in the format of locations and times, e.g. "From 9am-5pm, spawn in office 1, at 7pm spawn in any bar, at 2am spawn in this seedy alley," and let them spawn anywhere during a time period they don't have a rule for. This needs two levels of organization- look-up by spawner, and look-up by time. If it was a single dimension of data I'd just do something like TMap<location, person>, but is it acceptable practice to use nested dicts and go TMap<location, TMap<time, person>>? I reaaaally don't like nesting data structures like that, it feels sloppy.

What's sloppy about it? The worst thing I can say about it is that it's a bit verbose, but sometimes you just need a nested data structure.

Omi no Kami
Feb 19, 2014


I know this is premature optimization of the worst kind, but I have this horrible habit of sloughing every single iota of data into arrays/dicts, so whenever I find myself leaning in that direction I try to take a second look. ^^

FraudulentEconomics
Oct 14, 2007

Pst...

Omi no Kami posted:

The hybrid is a really good idea... I'll have to experiment with different models, but something else that appeals to me is the idea of making it literally real-time: one in-game minute lasts one real-world minute, as the purpose isn't to provide technical challenge but add just the tiniest amount of realism. It's slow enough that it'll never pose a balance problem, but I really think that the notion of time passing can be really magical if carefully framed.

I like where you're getting at actually. You have your "passive" time passing by in real time. So actions go along according to real time. You'd have to find enough ways to superficially advance time (searching takes 15 minutes, eating takes 15, etc.) to replenish resources and expend resources. Driving distance is a fairly good way to go about it. Adding in choices as you go (say for a police report) that let you feel like you're still working in real time, yet once you're done with all of the choices say 2 hours have passed. This way you're still using the relevant information and gameplay BUT advancing the time in a non-stupid way. You'd only add the important info to the report, and you can just say that the other time is spent loving around with protocol.

FuzzySlippers
Feb 6, 2009


I don't have anything useful to add except have you tried comparing a model manually built in a 3d modeler similar to your procedural with the same UV space setup to a procedural example? Unity has a few differences between the two that might reveal some of the problems.

KRILLIN IN THE NAME
Mar 25, 2006

:ssj:goku i won't do what u tell me:ssj:


hello gamedev thread here are more bad video games



"increasingly-large dog tries not to cause too much trouble"





"an idiot tries not to tweet"





"try to keep the cat from running out the front door when yr leaving late to work"





you constantly have to do big gross raspy coughs while talking to a girl that's cute





steppe warlord dating sim





french dip





the player has to escape a Reuben sandwich before it is consumed by guy fieri





president cat goes to mars

Somfin
Oct 25, 2010

In my🦚 experience🛠️ the big things🌑 don't teach you anything🤷‍♀️.

Nap Ghost
Speaking of bad video games...

So this was my first ever Ludum Dare, and it was amazing to be part of it, and I really don't even care how well my game does because I got it done and it's not totally awful.

http://ludumdare.com/compo/ludum-dare-33/?action=preview&uid=55138
http://gamejolt.com/games/dread-god/88200

Play as a god, search a seaside town for isolated people, make a cult large enough that you can do the isolating, try to keep your cultists from killing the people you need to convert, and try to hit the mystical 30 cultist mark- end the world.

My art, my music, Unity engine.

Omi no Kami
Feb 19, 2014


Somfin posted:

Play as a god, search a seaside town for isolated people, make a cult large enough that you can do the isolating, try to keep your cultists from killing the people you need to convert, and try to hit the mystical 30 cultist mark- end the world.

Rated teen? To heck with that, it should be rated E for eldritch!


FraudulentEconomics posted:

I like where you're getting at actually. You have your "passive" time passing by in real time...

Exactly. For all intents and purposes, it's still persona, but the slow passage of time gives real living feeling to the whole thing, and it simultaneously retains the ticking clock, but takes away all of the stress. I'll still probably end up with some de-facto unit of time that lots of things work in, like 30 or 60-minute intervals, but I think the intent alone will be enough to settle it into a much more even feeling than "Do five things at 9am, then it jumps to 2pm".

Somfin
Oct 25, 2010

In my🦚 experience🛠️ the big things🌑 don't teach you anything🤷‍♀️.

Nap Ghost

Omi no Kami posted:

Rated teen? To heck with that, it should be rated E for eldritch!

More like rated M for :mediocre:

But LD was a really good excuse to break the "there's no way anyone will like this" barrier in my brain

Mordiceius
Nov 10, 2007

If you think calling me names is gonna get a rise out me, think again. I like my life as an idiot!
Would Game Maker work well at all for an FMV game? And when I say FMV game, I mean something more along the lines of Contradiction than a game like Tex Murphy: Tesla Effect.

So it would be more choose-your-own-adventure-ish but even that's not a great description for something like Contradiction. But if I was wanting to make something stylistically similar to that (where it is basically only video and then UI elements, no three dimensional elements), could Game Maker do that? Or would I be better served elsewhere? Someone mentioned Unity a while back in the thread, but I'm not sure if Unity would be overkill.

retro sexual
Mar 14, 2005

Jeez. Well done on being so super productive! What engine do you use? Presuming you also do your own art? Impressed!

Omi no Kami
Feb 19, 2014


When it comes to equippable clothing that needs to conform to skeletal animations across multiple bones, am I correct that it's generally preferable to break the model into modular segments (torso/legs/hands/feet/etc) that get swapped out instead of having a single naked/barbie doll model with additional clothing models rendered over it and somehow slaved to the body's animation?

Hidden Asbestos
Nov 24, 2003
[placeholder]

Omi no Kami posted:

When it comes to equippable clothing that needs to conform to skeletal animations across multiple bones, am I correct that it's generally preferable to break the model into modular segments (torso/legs/hands/feet/etc) that get swapped out instead of having a single naked/barbie doll model with additional clothing models rendered over it and somehow slaved to the body's animation?

Yeah, there's no point having tris used on skin that's covered up and you'll get z-fighting and intersections at the joints for no good reason, plus you're wasting time weight painting for no reason. Same with an open jacket over a shirt -- the shirt just needs to be a bib.

The waist, neckline (below the collar) and ankles are good places for joins that can be hidden well and give you the flexibility for swapping out clothing / equipment.

edit: One thing you might like to try is have a look around for art rips from games, you'll be able to dissect how the pros make the most out of console hardware. There's, as usual, a lot of smoke&mirrors with character models.

Hidden Asbestos fucked around with this message at 14:05 on Aug 24, 2015

Omi no Kami
Feb 19, 2014


Awesome, thanks for clarifying... speaking of seams, the big problem I'm predicting is going to be the head: I need lots and lots of people, so the workflow I'm playing with is using MakeHuman to make a bunch of rough (bald) heads, so I only need to pay an artist to do the texturing and model clothes and hair. That being said, is there any particular trick to hiding the head-body seam besides ensuring that you have a super, super clean edge loop on both meshes?

Hidden Asbestos
Nov 24, 2003
[placeholder]

Omi no Kami posted:

Awesome, thanks for clarifying... speaking of seams, the big problem I'm predicting is going to be the head: I need lots and lots of people, so the workflow I'm playing with is using MakeHuman to make a bunch of rough (bald) heads, so I only need to pay an artist to do the texturing and model clothes and hair. That being said, is there any particular trick to hiding the head-body seam besides ensuring that you have a super, super clean edge loop on both meshes?

Not sure really - I'm no expert but in my experience you basically make what Arnie takes of his head in this clip:

http://www.youtube.com/watch?v=V17duGlHEYY&t=52

See how the neck comes down and out in a smooth curve? imagine loops of (roughly) horizontal edges at the bottom of that running up to the jaw.

You weight it all to the head/neck bone, then blend in weighting to the chest bone around those loops with a decreasing amount as you go up. Then tweak the weights in the context of clothing and probably you'll apply more weight to pull the bottom of the head part away from the shirt.

You want some overlap of the neck 'tucked in' under the shirt, but you'll need to test with animations to see what fixing will need doing to hide the seams. If you want a lot of range of head motion you might need to extend the neck curves down further.

Another thing to note from that clip is the woman is wearing a big scarf, I'm sure lots of games use tricks like this to hide the seams and any flicking from co-planar triangles. It's not a major problem though. I spent a bit of time looking at a 'Romeo' model from Lollipop Chainsaw and he just has a t-shirt so it can be done.

Hidden Asbestos fucked around with this message at 14:35 on Aug 24, 2015

StickFigs
Sep 5, 2004

"It's time to choose."
Does anyone have any experience with either of these Unity store assets for enemy path movement/camera movement:

https://www.assetstore.unity3d.com/en/#!/content/2506
https://www.assetstore.unity3d.com/en/#!/content/617

I'm looking to use one of these suites to design paths for my player ship to travel along for my on-rails shooter and more importantly, a way to visually design enemy movement patterns since doing it programatically sucks!

I'm leaning towards the first one, Simple Waypoint System, because the designer UI looks less clunky but honestly it's hard to judge based off of their screenshots because it doesn't actually show the controls.

StickFigs fucked around with this message at 15:29 on Aug 24, 2015

Omi no Kami
Feb 19, 2014


Hidden Asbestos posted:

Not sure really - I'm no expert but in my experience you basically make what Arnie takes of his head in this clip:

http://www.youtube.com/watch?v=V17duGlHEYY&t=52

See how the neck comes down and out in a smooth curve? imagine loops of (roughly) horizontal edges at the bottom of that running up to the jaw.

You weight it all to the head/neck bone, then blend in weighting to the chest bone around those loops with a decreasing amount as you go up. Then tweak the weights in the context of clothing and probably you'll apply more weight to pull the bottom of the head part away from the shirt.

You want some overlap of the neck 'tucked in' under the shirt, but you'll need to test with animations to see what fixing will need doing to hide the seams. If you want a lot of range of head motion you might need to extend the neck curves down further.

Another thing to note from that clip is the woman is wearing a big scarf, I'm sure lots of games use tricks like this to hide the seams and any flicking from co-planar triangles. It's not a major problem though. I spent a bit of time looking at a 'Romeo' model from Lollipop Chainsaw and he just has a t-shirt so it can be done.

This is superbly useful, thank you for the run-through... I hadn't thought of the long neck with the weighting, I was picturing exactly matching the seams for some reason. In my case we're sticking to pretty simple models, so I might even be able to get away with nothing more than lower body/upper body/head- the main utility we get from modular parts is the ability to play mix & match with NPC wardrobes to milk as much variety out of a handful of assets as possible.

KRILLIN IN THE NAME
Mar 25, 2006

:ssj:goku i won't do what u tell me:ssj:


retro sexual posted:

Jeez. Well done on being so super productive! What engine do you use? Presuming you also do your own art? Impressed!

Thanks! I'm using Clickteam fusion 2.5 (using it for SWYD sim and my gamejam game as well) - easy enough for little projects. The art I'm also making but I'll admit for the guy fieri bit i traced over an existing image

Rocko Bonaparte
Mar 12, 2002

Every day is Friday!
Time for me to step back and ask about walled tile level representation. I think I was putting code-heavy stuff in this thread, when maybe I should have put that in the CoC thread, but I think this is more up everybody's alley.

The level data I'm trying to do is a tile map with "thin walls." That is, rather than having walls be full-sized tiles some units above the action, each tile has data to have a thin bit of wall wrap around it. This means there can be a wall separating adjacent tiles.

Things were okay. Life was good. The pathfinder resolves all this. I can now slap them out in a level editor . . .

I did not factor walls overlapping! Consider this view of a tile in a grid with walls all around it. Vertical directions are being shown as yellow and horizontal as red. The corners end up wrapping over each other, which creates ugly artifacting due to surfaces rubbing against each other.


Orange shows where they run into each other.

I was thinking that maybe I could just have the sides of the thick walls have no surfaces, and I might dodge the bullet, but I still run into a situation if I have outside walls like this:



This could come up if I wanted, say, an exterior building wall and a separate series of interior walls with different properties. Or something. The big problem is these exterior walls don't meet up. Now I have to figure out if I want have a separate little corner chunk to link them. With solid colors, it's fine, but I expect it to be ugly as sin when texturing.

I was wondering if I am doing too much with separate walls for inside and outside, when I have two sides to the surface already. And if I'm making an exterior wall, I have an interior one by default. I can just set the interior side to zero or something if I never want it shown. And maybe if I just have the walls go between tiles and overlap a little, and have one end of each jut out, I can get this:



This seems mostly reasonable, but I am wondering about texturing around the corners. Imagine it's a brick building and I want it to look seamless going around the corner. Is there a way to do this with self-contained wall segments per grid square? Or do I have to start following the wall and adjusting UV coordinates accordingly? Does anybody know any tricks where I can get away with it and have it look right too? Can somebody think of other gotchas?

Nanomachine Son
Jan 11, 2007

!

Rocko Bonaparte posted:

Time for me to step back and ask about walled tile level representation. I think I was putting code-heavy stuff in this thread, when maybe I should have put that in the CoC thread, but I think this is more up everybody's alley.

The level data I'm trying to do is a tile map with "thin walls." That is, rather than having walls be full-sized tiles some units above the action, each tile has data to have a thin bit of wall wrap around it. This means there can be a wall separating adjacent tiles.

Things were okay. Life was good. The pathfinder resolves all this. I can now slap them out in a level editor . . .

I did not factor walls overlapping! Consider this view of a tile in a grid with walls all around it. Vertical directions are being shown as yellow and horizontal as red. The corners end up wrapping over each other, which creates ugly artifacting due to surfaces rubbing against each other.


Orange shows where they run into each other.

I'd wonder if you could just write something to combine two or more meshes into a single unit to avoid the overlap problem in the first image or just shorten / chop vertices on one end to avoid the overlap problem. I'd guess for the UVs you could shorten them to compensate with an adjustment in the meshes size.

Unormal
Nov 16, 2004

Mod sass? This evening?! But the cakes aren't ready! THE CAKES!
Fun Shoe
Oh man, check this out. With a procedural flourish to automatically place seeds on the basis of an approach like http://www.redblobgames.com/pathfinding/distance-to-any/

I have random caves being procedurally divided into encounter placement regions.

Rocko Bonaparte
Mar 12, 2002

Every day is Friday!

TheOrange posted:

I'd wonder if you could just write something to combine two or more meshes into a single unit to avoid the overlap problem in the first image or just shorten / chop vertices on one end to avoid the overlap problem. I'd guess for the UVs you could shorten them to compensate with an adjustment in the meshes size.

I was about to get into that with the 1st image since I'm already combining all of those segments into a single mesh procedurally. It winds up being quite a few combinations to have to generate for, and I'm not sure if it's worth it. There is still the issue of handing the UV values. If I'm shortening a surface, I can just pull back the UV values and prevent it from looking compressed, but I'll wind up stretching it out if I overextend the vertices; I'll run out of texture data to stretch. I suppose I could just normally not use the whole texture and then resort to the extra bit of texture data when I have to extend the surface, but that also doesn't jibe well with me.

dreamless
Dec 18, 2013



Rocko Bonaparte posted:



This seems mostly reasonable, but I am wondering about texturing around the corners. Imagine it's a brick building and I want it to look seamless going around the corner. Is there a way to do this with self-contained wall segments per grid square? Or do I have to start following the wall and adjusting UV coordinates accordingly? Does anybody know any tricks where I can get away with it and have it look right too? Can somebody think of other gotchas?

This one feels the cleverest, and will handle any enclosed shape, though interior walls and T-junctions will still cause problems. My guess is that in the end you're going to wind up making all the combinations just as if you were making a 2d tileset, and just like a 2d tileset it's probably easiest to build all the various combinations of wall + corner in your 3d package and then slice it up. (Even if you're doing it in code, first get it looking right, then figure out what goes in what "tile".) On the bright side, this would let you do rounded corners or whatever other fanciness you want.

shimmy
Apr 20, 2011
This is how we have it:

Every mesh split and contained inside its tile, clean but lots of edge cases to consider. In this example there are 3 meshes because ofcourse you rotate existing ones when you can.
We cut down on permutations by eg not allowing single tile wide corridors (they would be too narrow anyway) because that would take at least 6 or 7 extra meshes just to have walls, as it is we have all possible walls including T junctions etc with just these 3. It gets worse when you add stuff like doors because that's 3 extra meshes by default, a ton more if single wide corridors were allowed.
It's clean in code too, I mean it's a lot of lines to detect which mesh a tile needs to use but it's not complicated code, eg no trouble with having a wall's interior different from its exterior (you probably want this!), no trouble with the walls not strictly adhering to tiles..

shimmy fucked around with this message at 11:53 on Aug 25, 2015

Zaphod42
Sep 13, 2012

If there's anything more important than my ego around, I want it caught and shot now.

Your art here kinda reminds me of Hotline Miami and I really love it.
I guess its mostly the low resolution face slowly rotating and rocking and the pixels wigging out.

Now I want a Guy Fieri mod for HM2.

Adbot
ADBOT LOVES YOU

Shalinor
Jun 10, 2002

Can I buy you a rootbeer?

Unormal posted:

Oh man, check this out. With a procedural flourish to automatically place seeds on the basis of an approach like http://www.redblobgames.com/pathfinding/distance-to-any/

I have random caves being procedurally divided into encounter placement regions.


That's pretty badass. I expect you could use that to generate loot, too, to solve the problem Oblivion had with "I just got to the end of the dungeon, and the chest had a loving steel sword?!".

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply