Jump to content


Photo

Epi's Many Questions Thread


142 replies to this topic

#1 Epifire

Epifire

    Member

  • Member
  • PipPip
  • 265 posts

Posted 05 August 2015 - 02:45 AM

After popping messages to many of the folks around here for various things, I decided to delegate a single thread for my various probs and proposals. Therefore avoiding the many threads I would end up creating, for a lot of the ideas and art questions as I dive into TDM more. 

 

So the first one up that sorta hit me as I was editing tonight in Dark Radiant was terrain. Now I'm fairly impressed with what the patch system can do but I have concerns with blending textures. Currently as far as I can tell, decals are limited only to actual brushes (not patches). And secondly, patches from my knowledge don't have any kind of paint mode. So I guess my other option would be modeled terrain, which actually seems easier for me. Only thing is if id 4 actually supports the method I want to use, which is vertex painting.

 

I'm assuming that you can edit vertex colors and that they're probably preserved in the engine. But what I'm wondering is if the engine supports multiple textures being painted onto the same mesh? For painted terrain and so forth. Part of me feels like you should be able to assign three different texture layers in the shader via RGB colors, (which would be awesome!) because then I could have grass, dirt and gravel properly blending on the same mesh. I know that's something I would be able to do with Unreal, and in Source you could just paint onto displacements. So now I'm just trying to figure out the best method for accomplishing that in TDM. Many thanks in advance!


  • Bikerdude likes this

Needing dem environment models?


Speak to the EPI!


Or rummage my online mesh repository instead...  https://www.mediafire.com/folder/7q1r8him1y63d/TDM%20Repository


#2 SteveL

SteveL

    Hero Coder

  • Active Developer
  • PipPipPipPip
  • 3657 posts

Posted 05 August 2015 - 05:30 AM

So the first one up that sorta hit me as I was editing tonight in Dark Radiant was terrain. Now I'm fairly impressed with what the patch system can do but I have concerns with blending textures. Currently as far as I can tell, decals are limited only to actual brushes (not patches).

You can make a decal patch for your terrain manually, by duplicating the patch then trimming away the parts you don't need. There's a patch splitter script I made for DR that makes that job easy. It's not part of the official DR distribution but you can assign the script to a hotkey in DR and the instructions are here: http://forums.thedar...9-mar/?p=340549
 

I'm assuming that you can edit vertex colors and that they're probably preserved in the engine. But what I'm wondering is if the engine supports multiple textures being painted onto the same mesh? For painted terrain and so forth.

The engine supports vertex colouring, but for two textures only. Their contributions will always sum to 1. The first texture's colour is multipled by the vertex colour, and the second texture's colour is multiplied by one-minus-the-vertex-colour. It's good for blending two textures on a model, basically.

DR doesn't have any support for vertex painting. Obsttorte came up with a method for letting people do this to terrain in DR by using brushes to mark the places where the second rextures shows up (iirc). http://forums.thedar...er/#entry318475

NB the version of Obs' script that's packaged with DR isn't the latest / correct version. The latest is linked in that thread. As a modeller though, I expect you'd always reach for your modelling program for that task.
 

Part of me feels like you should be able to assign three different texture layers in the shader via RGB colors, (which would be awesome!) because then I could have grass, dirt and gravel properly blending on the same mesh. I know that's something I would be able to do with Unreal, and in Source you could just paint onto displacements. So now I'm just trying to figure out the best method for accomplishing that in TDM. Many thanks in advance!


I agree that would be awesome, and it might not even need any engine changes. It could be possible with a tweaked interaction shader, that a modeller could package with their map. The problem would be the workflow. Without a lot of DR changes, could mappers take advantage of it? You can split your mesh to get a 3-texture blend in the meantime, although not with all 3 textures on the same spot.
  • Epifire likes this

#3 Epifire

Epifire

    Member

  • Member
  • PipPip
  • 265 posts

Posted 06 August 2015 - 12:29 AM

You can make a decal patch for your terrain manually, by duplicating the patch then trimming away the parts you don't need. There's a patch splitter script I made for DR that makes that job easy. It's not part of the official DR distribution but you can assign the script to a hotkey in DR and the instructions are here: http://forums.thedar...9-mar/?p=340549

 

Ah that sounds really useful. Since you're layering the existing patch with an identical one I think the projection should be pretty accurate too. Even if I didn't implement terrain with patches in the future, I could still see myself making use of that for roads and small select areas.

 

 

The engine supports vertex colouring, but for two textures only. Their contributions will always sum to 1. The first texture's colour is multipled by the vertex colour, and the second texture's colour is multiplied by one-minus-the-vertex-colour. It's good for blending two textures on a model, basically.
 

 

Two textures is very doable actually. I for anything with more to add or blend I could just separate the meshes into sections. Do you know of any documentation regarding how this is setup for the shader? If I can get a template to work from I have a map I'm dabbling with that I could test this in right away in.

 

 

I agree that would be awesome, and it might not even need any engine changes. It could be possible with a tweaked interaction shader, that a modeller could package with their map. The problem would be the workflow. Without a lot of DR changes, could mappers take advantage of it? You can split your mesh to get a 3-texture blend in the meantime, although not with all 3 textures on the same spot.

 

For me it would be incredibly helpful (but that's also because I basically live in XSI). The workflow is such that I would setup my main boundaries in DR and export them. Once loaded into XSI, I'd make my terrain and then it would be exported to fit in exactly that spot in the map. The control would be phenomenal, but exclusive to be used per instance. So it wouldn't be something you'd really want to upload into community content as it wouldn't make much sense to use outside of the map it was created for. As long as the shaders would be setup right, there wouldn't really be any additional file sizes to worry about since you're basically just customizing blend options for tiling textures.

 

I have some very grand ideas on how this could really make a scene pop, since an area I'm focusing on is a rundown building close to the sea. I'm taking a very different mapping approach since I want to try and get away from a lot of the city assets and start something fresh in a more rural abandoned level. The terrain is really important to be convincing since that will be the glue to what's holding a lot of it together, with far less buildings that is.


Needing dem environment models?


Speak to the EPI!


Or rummage my online mesh repository instead...  https://www.mediafire.com/folder/7q1r8him1y63d/TDM%20Repository


#4 RPGista

RPGista

    Advanced Member

  • Member
  • PipPipPip
  • 1332 posts

Posted 06 August 2015 - 06:34 AM


I have some very grand ideas on how this could really make a scene pop, since an area I'm focusing on is a rundown building close to the sea. I'm taking a very different mapping approach since I want to try and get away from a lot of the city assets and start something fresh in a more rural abandoned level. The terrain is really important to be convincing since that will be the glue to what's holding a lot of it together, with far less buildings that is.

 

I like this idea, it would be great to have work done on a more organic way, a more complex outdoors landscape, less orthogonal architecture...



#5 Epifire

Epifire

    Member

  • Member
  • PipPip
  • 265 posts

Posted 06 August 2015 - 11:26 AM

 

I like this idea, it would be great to have work done on a more organic way, a more complex outdoors landscape, less orthogonal architecture...

 

Well the big trick is how well the lighting and visibility is managed. I'm trying to figure out what's good for blocking and making walls with, and not being overly obvious with it.

 

Though I do really want to find out more how I might setup this painted shader, one other thing has sorta been nagging me with outdoors and that's moonlight. For some reason I thought we already had some kind of ortho/planar light setup, for that but I'm not finding it? The stuff I try and setup is kinda faulty because since it requires a cone for directional light, and requires a high room ceiling. I mean a map could certainly do without and just try to direct the player with more point lights, but it would just be interesting to be able to simulate decent moonlighting in an complete outdoor scenario.


Edited by Epifire, 06 August 2015 - 11:28 AM.

Needing dem environment models?


Speak to the EPI!


Or rummage my online mesh repository instead...  https://www.mediafire.com/folder/7q1r8him1y63d/TDM%20Repository


#6 Gestas

Gestas

    Member

  • Member
  • PipPip
  • 65 posts

Posted 06 August 2015 - 11:35 AM

Can't you just make a directional light and size it over the entire map.

 

 It adds a draw count to everything, but if it is a strong part of the visual theme then the performance hit should be worth it.



#7 SteveL

SteveL

    Hero Coder

  • Active Developer
  • PipPipPipPip
  • 3657 posts

Posted 06 August 2015 - 12:25 PM

Two textures is very doable actually. I for anything with more to add or blend I could just separate the meshes into sections. Do you know of any documentation regarding how this is setup for the shader? If I can get a template to work from I have a map I'm dabbling with that I could test this in right away in.

Here's an example of what the material should look like. For "yourChosenDRpath" you specify where you want to find it in DR's media tree. If you want to find it easily in a top level "Epi" folder, use "Epi".

None of this is case-sensitive.

Spoiler

 

moonlight

We have parallel lights. Select a light in DR, hit 'L' to bring up the light inspector, and there's a "parallel" checkbox. You set the direction NOT by rotating the light, but by pressing V to enter vertex editing mode, then moving the light vertex.

The bad news: Parallel lights are fiddly and glitchy. If you try to stretch them across too many visleafs, you'll get shadow errors or areas where they vanish.
The good news: Once you've got them working right, they are stable. So it's not a deal breaker.

They look ugly if you can see the edge of the light volume. That should be in an unreachable part of the map.

If you need a parallel light to stretch across many visleafs, you are better off using several and making sure there are indoor or covered regions between visleafs to hide the edge of the light. It doesn;t have to be "indoor". A natural arch of rock would do. That's not a bad idea anyway to be honest: Don't plan for huge open areas with no pinch points in TDM, it's not what our portalled engine was designed for. Feel free to dazzle us with the illusions of space that you can create though :)

 

I did some experiments with moonlight as my first ever experiment with TDM and DR. I ended up finding an overly complex method of making moonlight work through unlimited visportals and map size (although it would have a perf hit so don't think of doing this on a very large map with loads of outdoor AI). If you are interested see this thread: http://forums.thedar...amic-moonlight/

 

Random tip: The forum search facility is pretty useless, especially with our tendency to bury loads of information in umbrella threads, and the wiki search isn't great either. To search both sites well, use google instead, with a search like this:

site:thedarkmod.com blend vertexcolor

  • RPGista likes this

#8 Epifire

Epifire

    Member

  • Member
  • PipPip
  • 265 posts

Posted 14 August 2015 - 03:05 AM

Alright so after a long week I'm back at it to see how I can get this blend stuff working. So far it looks like it's loading the correct material, but I think either my vertex painting or my material (or both?) are at fault. Seeing here in this sorta dark shot, you can still see the oddly stretched textures on separate triangles...

 

requiem_2015-08-14_02.49.14_zpspuonr8mk.

 

Both cubes are triangulated but have different paint methods. One has the top half painted white and the bottom black. The other uses an actual color instead of white. Both are facing the same origin, and you can see that somehow alters this stretching effect with different paints added. Although no actual blending is occurring. Here is the material shader I'm using...

 

Spoiler

 

It's a little sloppy as I just was trying to get it working to test it in the middle of the night here. I may have missed something kind of important though too. Like I wasn't sure if the VertexColor/inverseVertexColor line was needed to be changed to something more specific to the actual color I'm defining. It's a start though, and at least it's running the material (at least halfway).


Needing dem environment models?


Speak to the EPI!


Or rummage my online mesh repository instead...  https://www.mediafire.com/folder/7q1r8him1y63d/TDM%20Repository


#9 SteveL

SteveL

    Hero Coder

  • Active Developer
  • PipPipPipPip
  • 3657 posts

Posted 14 August 2015 - 10:26 AM

The material looks ok except that you have no bumpmap. You do need a bumpmap in a material to activate the light interaction drawing. Just use
bumpmap _flat
for each stage if you don't want / have a real bumpmap. I'm not sure what bit of code is painting those cubes right now, but if you add a bumpmap it'll make sure it's the right bit.

The stretching looks like your UVs are messed up. I take it they look ok in the modelling program? The engine occasionally generates its own UVs (texgens) but it shouldn't be doing that in your material. There's a slight chance that the lack of a bumpmap is making some other part of the code that uses texgens kick into action... but that's a long shot.

#10 RPGista

RPGista

    Advanced Member

  • Member
  • PipPipPip
  • 1332 posts

Posted 14 August 2015 - 01:31 PM

Whoa, did NOT see those moonlight expriments, SteveL my friend! Incredible and fantastic. :) I believe I was the first guy to use parallel moonlight in a TDM map, so this has a nice nostalgia feel for me. Your setup woulda really come in handy back then. Are you planning on using it for your map, please do. ;)

 

As for the issue of parallel lights, I remember I wasnt able to put it work for a while, untill I came across Katsbits tutorial about them and he had a downloadable light entity that I simply imported in my map and that worked. Dont remember why I couldnt make it work manually.


  • SteveL likes this

#11 Epifire

Epifire

    Member

  • Member
  • PipPip
  • 265 posts

Posted 15 August 2015 - 01:31 AM

Alright gonna take another stab at this (why the heck I never have time during the day is beyond me!). Did a bit of looking around and there seems to be a very informative article over at katsbits in regards to this... http://www.katsbits....d-to-models.php

 

Down towards the bottom of the page I'm reading something that kinda explains this problem more...

Corrupt, Wonkey Or Stretched Textures. A UVW map problem to do with the distribution of the texture over the polygons the mesh is constructed from. Usually means reediting the UVW map on the model to correct any distortions.

My guess is that maybe there is a partial shade of something else on the mesh. But this page clarifies parts of what would otherwise be completely unexplained steps to this blending method. Definitely saved, bookmarked and maybe even something worth etching in stone as there's a ton of valuable info on this. Still though, the fact that there's still no blending going on in-game still makes me think there's something wrong with the mtr. Gonna strip it of anything unnecessary and start from there. 


Needing dem environment models?


Speak to the EPI!


Or rummage my online mesh repository instead...  https://www.mediafire.com/folder/7q1r8him1y63d/TDM%20Repository


#12 SteveL

SteveL

    Hero Coder

  • Active Developer
  • PipPipPipPip
  • 3657 posts

Posted 15 August 2015 - 04:06 AM

Feel free to PM me your test map with any materials + models needed if it's not working. Your material looks ok except for the bumpmap, and no you don't change the [inverse]vertexcolor keywords. I don't know about modfelling, but I do have a debug build of the engine and should hopefully be able to see why it's not blending.



#13 Epifire

Epifire

    Member

  • Member
  • PipPip
  • 265 posts

Posted 27 August 2015 - 12:38 PM

Alright, trying not to get too hung up on one thing right now, though it would be lovely if I could find what was wrong with those blend textures. I did send a PM your way SteveL, not sure if you ever checked that since it had been a while. Anywho, tryin something really different here for an intro video to a new project I'm working on with a friend. Basically it sets up a mission in the old fashion way, with shots of the level or even additional art for previous areas that setup the story. What I'm also doing is I'm painting over shots I'm taking from in-game shots off these (story rooms) to give them that recalled from memory "paintery look". Current one being a conversation overheard at a local pub.

 

Okay so for the questions on this one. I'm trying to get the shot as close to the end goal as possible (so that I wont have to manually paint it in). And the only thing that's getting me now is NPCs. Being that I have no idea how to script them, other then checking off patrol mode and making them sit down. I would like to be able to find out how to control the direction the NPCs are looking (with their head not just their body) and what animation they're using. In Hammer we had a special entity to control animated sequences, but I'm not sure what something like that would take in DR. For look direction we'd simply add a target entity in the world and send a command to the NPC to look at it.

 

The main NPCs I want more control over are two NPCs that are supposed to look like they're talking to eachother at a table, and a player Thief character sitting at an opposite angle that's turning his head to listen off in their direction (all inconspicuous like). I could probably get by with just the common anims that play ordinarily and just wait for the thief character to turn his head for the shot, but it wouldn't be near as convincing.


Needing dem environment models?


Speak to the EPI!


Or rummage my online mesh repository instead...  https://www.mediafire.com/folder/7q1r8him1y63d/TDM%20Repository


#14 Springheel

Springheel

    Creative Director (retired)

  • Admin
  • 35803 posts

Posted 27 August 2015 - 12:40 PM

There are pathnodes that can control which direction AI look, I believe, though I've never used them.

 

path_lookat

This does not stop the AI, but they will turn their head and look somewhere specific as they walk to their next target. For the next wait seconds, turn head to look at the entity given by the focus spawnarg (defaults to looking at the path_lookat entity itself). This is useful if you want to make sure an AI is looking at a specific spot (or away from a certain spot) during their patrol. Note the focus entity must not be obscured by monsterclip.


Posted Image

#15 VanishedOne

VanishedOne

    Advanced Member

  • Member
  • PipPipPip
  • 719 posts

Posted 27 August 2015 - 02:00 PM

There are Conversation commands LookAtActor, LookAtPosition and LookAtEntity.

Some things I'm repeatedly thinking about...

- louder scream when you're dying


#16 HMart

HMart

    Member

  • Member
  • PipPip
  • 463 posts

Posted 27 August 2015 - 02:04 PM

 I agree that would be awesome, and it might not even need any engine changes. It could be possible with a tweaked interaction shader, that a modeller could package with their map. The problem would be the workflow. Without a lot of DR changes, could mappers take advantage of it? You can split your mesh to get a 3-texture blend in the meantime, although not with all 3 textures on the same spot.

 

SteveL how hard would it be to create support on TDM for Texture splatting? Just curious.

 

http://www.gamasutra...e_Splatting.php

 

 

This could be of interest also

 

http://www.gamedev.n...rain-texturing/


Edited by HMart, 27 August 2015 - 02:06 PM.


#17 Epifire

Epifire

    Member

  • Member
  • PipPip
  • 265 posts

Posted 16 December 2015 - 09:51 PM

Back to one of my many questions! So I'm about to start texturing my arc transformer here shortly in Substance Painter and it starts with a calibration for engine type. The D3 engine is based off of OpenGL right? If so that's really all I need to know. My current setup is based for working in Unreal Engine 4 which runs with DirectX. Not sure what all the difference is on the texture but I'm trying to see what all I can do in Substance for an older (non-PBR) engine type.


  • Anderson likes this

Needing dem environment models?


Speak to the EPI!


Or rummage my online mesh repository instead...  https://www.mediafire.com/folder/7q1r8him1y63d/TDM%20Repository


#18 nbohr1more

nbohr1more

    Darkmod PR, Wordsmith

  • Development Role
  • PipPipPipPipPip
  • 7288 posts

Posted 16 December 2015 - 10:41 PM

OpenGL, yes. :)


  • Epifire likes this
Please visit TDM's IndieDB site and help promote the mod:

http://www.indiedb.c...ds/the-dark-mod

(Yeah, shameless promotion... but traffic is traffic folks...)

#19 Epifire

Epifire

    Member

  • Member
  • PipPip
  • 265 posts

Posted 28 December 2015 - 06:42 PM

Random question for the day. 

 

What is the general consensus on an in-depth animated clock? I've seen stuff with the Source engine that's driven by code to throttle an animation. Basically you'd setup the clock hands and set the position based by timer.

 

So a second hand would have 60 frames and the code would run it through that animation based off of a coded timer to run it. I'm not asking someone to build it, I'm moreless asking what it would take to make it in the technical aspect. It's simple in theory but I have absolutely no idea what this looks like from a coding aspect.


  • Anderson likes this

Needing dem environment models?


Speak to the EPI!


Or rummage my online mesh repository instead...  https://www.mediafire.com/folder/7q1r8him1y63d/TDM%20Repository


#20 Springheel

Springheel

    Creative Director (retired)

  • Admin
  • 35803 posts

Posted 28 December 2015 - 07:21 PM

What is the general consensus on an in-depth animated clock? I've seen stuff with the Source engine that's driven by code to throttle an animation. Basically you'd setup the clock hands and set the position based by timer.

 

 

We already have clock hands that keep accurate time, but they're decals rather than models.  I imagine the same thing could be achieved with models without the need for an actual animation.


  • Epifire likes this
Posted Image

#21 Epifire

Epifire

    Member

  • Member
  • PipPip
  • 265 posts

Posted 08 January 2016 - 02:37 AM

Welp time for my next question. Been finalizing more meshes recently and something has been bothering me some. And that is shadow meshes. For some reason I can't parent, merge or include the shadow mesh in any kind of way with my export lwo file. It's a Softimage problem I feel but it's one nonetheless. Collision seems to work fine but when using the listed lines (and texture resource) to add a shadow material, it just comes up missing in-game. Is there a separate way to call up a shadow mesh? Usually my more detailed meshes sit around 4-8k polys and I doubt that's efficient usage of id4's dynamic shadowing.

 

I had heard there was a way of adding a shadow mesh in some roundabout fashion (besides embedding it within the detail mesh). Any ideas or suggestions would be fabulous. I seem to have noticeable performance hits when I get several of my models in the same room. I'm feeling that's the reason.


  • Anderson likes this

Needing dem environment models?


Speak to the EPI!


Or rummage my online mesh repository instead...  https://www.mediafire.com/folder/7q1r8him1y63d/TDM%20Repository


#22 Springheel

Springheel

    Creative Director (retired)

  • Admin
  • 35803 posts

Posted 08 January 2016 - 08:41 AM

What happens when you just save the shadowmesh as a separate model file?


Posted Image

#23 Epifire

Epifire

    Member

  • Member
  • PipPip
  • 265 posts

Posted 08 January 2016 - 07:21 PM

I'll try that. Also what are the official keynames for the shadow's material to be named? It may just be a faulty name I used too (which would be an easy fix).

 

I haven't made a shadowmesh just by itself but I can look into that too.


Needing dem environment models?


Speak to the EPI!


Or rummage my online mesh repository instead...  https://www.mediafire.com/folder/7q1r8him1y63d/TDM%20Repository


#24 Springheel

Springheel

    Creative Director (retired)

  • Admin
  • 35803 posts

Posted 08 January 2016 - 07:48 PM

it's "common/texture/noshadow"

 

Though I don't know why the name of the texture would have much effect on whether it saves or not.


Posted Image

#25 Epifire

Epifire

    Member

  • Member
  • PipPip
  • 265 posts

Posted 08 January 2016 - 10:04 PM

it's "common/texture/noshadow"

 

Though I don't know why the name of the texture would have much effect on whether it saves or not.

 

Oh no I meant the material definition. Because (at least I thought) the material name assigned to the model was important for calling up the correct shader. I hadn't any clue about the actual texture, but the name applied to the model I figured was a big deal. Is noshadow what the material needs to call up then? I had been using just been naming my material shadow, assuming that was what the shadow meshes used.

 

EDIT: Great news! Found out it was a naming issue in Softimage's material naming system. The material, "common/texture/shadow" gets underscores due to the fact that Soft' replaces any \ | / symbols with an underscore. So basically it was improperly named. Made a separate mesh of pure shadow material and it rendered out beautiful in-game. So looks like I'm off to optimizing my current meshes now!  B)


Edited by Epifire, 09 January 2016 - 01:03 AM.

  • Springheel likes this

Needing dem environment models?


Speak to the EPI!


Or rummage my online mesh repository instead...  https://www.mediafire.com/folder/7q1r8him1y63d/TDM%20Repository




Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users