Duke4.net Forums: EDuke32 2.0 and Polymer! - Duke4.net Forums

Jump to content

  • 213 Pages +
  • « First
  • 103
  • 104
  • 105
  • 106
  • 107
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

EDuke32 2.0 and Polymer!  "talk about the wonders of EDuke32 and the new renderer"

User is offline   Plagman 

  • Former VP of Media Operations

#3121

View PostDiaz, on 21 October 2012 - 05:03 AM, said:

Very interesting Plagman, the negative lights indeed seem to be a great shading tool, I'll make sure to get some good use out of them. And thanks for the shadow-less spotlights! As you mentioned in the changelog, if we had a usecase where we needed no shadows but actual texture projections (if that's what lightmaps means) we should let you know... well, I have to say that's exactly the primary use I was going to give them! :D I'm using spotlights with projections to simulate water caustics, and those are the ones that should not cast shadows; but they do need to project a texture.


Yeah, OK; I'll fix it then.
0

User is offline   Fox 

  • Fraka kaka kaka kaka-kow!

#3122

View PostPlagman, on 21 October 2012 - 08:40 AM, said:

View PostFox, on 20 October 2012 - 10:03 PM, said:

That's an interesting effect.

But I always felt that some game sprites and HUD sprites shouldn't be affected by Polymer lights, and these negative lights only reinforces it.
Particle kind of sprites, sure; most of them should be fullbright no matter what, I agree with that. Why HUD models though? They looked very off before while they weren't affected by surrounding lights and pretty much everyone was complaining about that.

I meant just some HUD sprites, specifically muzzle flashes and shrinker crystal.

I suppose some sprites shouldn't suffer from both "positive" or "negative" lights. Perhaps just checking if the sprites is affected by the sector shade could work out. On top of that sprites shouldn't be affected by their own light source.

This post has been edited by Fox: 21 October 2012 - 09:14 AM

0

User is offline   Diaz 

#3123

Thanks Plagman! :D

BTW, I had to add fixes to some light effects on my mod that relied on changing a special sprite to a SECTOREFFECTOR in CON code; flickering lights in DukePlus use the same kind of code, namely:

....


        espawn SMALLSMOKE

        setactor[RETURN].lotag 49
        setactor[RETURN].hitag LE_RADIUS
        setactor[RETURN].xvel VR
        setactor[RETURN].yvel VG
        setactor[RETURN].zvel VB

        ifvare KILLINDEX 0 setvarvar LE_ID1 RETURN
        else ifvare KILLINDEX 1 setvarvar LE_ID2 RETURN

        setactor[RETURN].picnum SECTOREFFECTOR
        setactor[RETURN].cstat 32768
        changespritestat RETURN 3
.....


As you can see I had to add a line to manually set the cstat of the SECTOREFFECTOR to 32768, otherwise the light would be a negative light by defalult. I don't know if it's been broken in Duke Plus too, probably so, as this code was based off it.

This post has been edited by Diaz: 21 October 2012 - 10:05 AM

0

User is offline   Plagman 

  • Former VP of Media Operations

#3124

That's because SMALLSMOKE has cstat 128 by default, I think.
0

User is offline   Plagman 

  • Former VP of Media Operations

#3125

Diaz, the emitshadow flag shouldn't affect lightmaps anymore; I also fixed a bug where it could make some smotlights disappear under obscure circumstances.
0

User is offline   Diaz 

#3126

Works like a charm. Thanks A LOT. This will improve performance on my maps by a huge deal :D
0

#3127

View PostPlagman, on 20 October 2012 - 09:42 PM, said:

I also implemented support for negative lights; they remove light from the scene instead of contributing more to it. To activate it, just set the half-submerged bit on any light SE ('C' in mapster) and it will become negative. The color components work as usual, except they're substracted from the scene.

Awesome... thanks! Being able to do it per color component is extra bonus!

This post has been edited by Wieder: 21 October 2012 - 01:50 PM

0

User is offline   Micky C 

  • Honored Donor

#3128

View PostMarked, on 21 October 2012 - 05:03 AM, said:

It would be cool to have that negative light attached to an enemy so darkness surrounds him wherever he goes. And it would drain health just being near him. A soul sucker.


That would indeed be very cool!

I think my first use for it will be a pit with a black light in it to make the hole fade to black over a smooth transition, as opposed to just black fog which can move around a lot depending on where you look. I haven't tried it out yet, but it should work fairly well. I'm a bit busy to sink my teeth into it deeply at the moment, but I'm sure Diaz will discover some pretty amazing things to do with it.

Also a warning to all polymer mappers: there's a good chance that some extra features will be added to lights at some point in the future, and that they might use extra bits such as flipping or wall alignment. If you use any of these and then these features are added, they will then occur in your old maps with undesirable consequences.

Basically, avoid using extra bits at all costs.
0

User is offline   Hendricks266 

  • Weaponized Autism

  #3129

Micky, there was debate on IRC whether Plagman should use cstat bits like 8192, but the consensus was that mappers would prefer bits being togglable via keys Mapster32 provides, like '1' and 'C' which Plagman used. The other option would be to use out of range bits to avoid conflicts but require mappers to use the 2D mode sprite properties editor to add the bits, or else make a small M32script to make their own hotkey.

View PostFox, on 20 October 2012 - 10:03 PM, said:

But I always felt that some game sprites and HUD sprites shouldn't be affected by Polymer lights, and these negative lights only reinforces it.

Can't that be done by setting specularity to 0 or something along those lines in the defs?

Also, do glow maps get affected? If they do, they should not.
0

User is offline   Micky C 

  • Honored Donor

#3130

I agree, it makes things much easier. I just said that in case some people made their SEs wall aligned to make it easier to see which way the spot light is pointing or something.
0

User is offline   Micky C 

  • Honored Donor

#3131

Wow.

Check out how vibrant this red is on the right using negative lights, as opposed to a normal red light on the left.
Posted Image

This green is amazing, normally you'd have to make a texture like this pitch black to get any kind of green out of it.
Posted Image

And it's a fantastic transition between black fog and other fog (and most likely other fogs too). Using TROR, we now have fog depth Posted Image
Posted Image
0

User is offline   Fox 

  • Fraka kaka kaka kaka-kow!

#3132

View PostHendricks266, on 21 October 2012 - 04:56 PM, said:

Can't that be done by setting specularity to 0 or something along those lines in the defs?

For HRP perhaps that could work, but I am thinking of how it display regular sprites.
0

User is offline   Hendricks266 

  • Weaponized Autism

  #3133

Maybe it's because I'm up past my bedtime, but does that even happen? Could you show an example?
0

User is offline   Jblade 

#3134

I definitely disagree, they look far far better being affected by the lights than they ever did remaining flat-shaded. It's a huge positive reason to use 3D models rather than 2D sprites.

EDIT: whoops didn't see there was a whole page of discussion past the talk about lights affecting models :D

This post has been edited by James: 21 October 2012 - 11:58 PM

0

User is offline   Fox 

  • Fraka kaka kaka kaka-kow!

#3135

View PostHendricks266, on 21 October 2012 - 11:53 PM, said:

Maybe it's because I'm up past my bedtime, but does that even happen? Could you show an example?

Well, these are examples of what should not happen:

Posted Image Posted Image Posted Image


===//===//===


I am experiencing a bug with ifvar commands.

Basically, I am trying to add some code in EVENT_DISPLAYROOMS, but for some reason this
  ifvarand sector[SECT].ceilingstat 1
    do something

is not working, and instead I must use this
  getsector[SECT].ceilingstat TEMP
  ifvarand TEMP 1
    do something


I remember that for quite a while I avoided using "sector[id].member" as a variable, and now I know why.

This post has been edited by Fox: 22 October 2012 - 12:34 AM

1

User is offline   Hendricks266 

  • Weaponized Autism

  #3136

View PostFox, on 22 October 2012 - 12:33 AM, said:

Well, these are examples of what should not happen:

Posted Image Posted Image Posted Image

Ah, I understand now and I agree completely. Since the SHRINKSPARK and GROWSPARK lights are hardcoded, they should be modified so that they do not apply to the sprite casting them. Other hardcoded light sources, such as RPG, are debatable. Such functionality (cast a light but don't also be affected) should be expanded to CON usability, such as a new cstat or htflags bit that ignores Polymer lights.

Your other problem is a job for TX.
0

User is offline   Fox 

  • Fraka kaka kaka kaka-kow!

#3137

I believe it may not even be debatable, and it should apply to all hard-coded spritenoshade sprites.

This post has been edited by Fox: 22 October 2012 - 10:13 AM

0

User is offline   Tea Monster 

  • Polymancer

#3138

Just out of curiosity, is there any kind of roadmap for Polymer? New shader types, optimisation etc.?
0

User is offline   Fox 

  • Fraka kaka kaka kaka-kow!

#3139

Is it possible to add a resize function to tilefromtexture? It would use nearest filter, of course.

Technically I could use a resized image instead, but that would affect the linear filter in OpenGL mode. I could define a highres image with normal size, but an highres textures behaves differently...
0

User is offline   Hendricks266 

  • Weaponized Autism

  #3140

I think what you are looking for is along the lines of assigning a non-square pixel ratio to your image, though you also want a specific size. Correct?
0

User is offline   Fox 

  • Fraka kaka kaka kaka-kow!

#3141

Not necessarily. I want something as simple as what you can do by resizing an image, but without the need of a resized image.
0

User is offline   Plagman 

  • Former VP of Media Operations

#3142

I think just resize your images... free tools like XnView, IrfanView, GIMP all have batch resize capabilities if you need to resize lots of them in one go.
0

User is offline   Micky C 

  • Honored Donor

#3143

So any word on making the polymer draw distance adjustable in con? I'm making a lot of progress on my Serious Sam WGR2 episode and the draw distance pretty much makes it unplayable as it's a huge distraction, and you can't admire the large scale scenery to its fullest.
0

User is offline   Plagman 

  • Former VP of Media Operations

#3144

I don't think it'll ever be adjustable in CON because that doesn't make much sense, but it's a bug that it's currently fixed the way it is:

http://sourceforge.n...duke32/bugs/26/

It was just a quick and dirty way of getting it up and running, but it needs to adjust dynamically depending on the scene contents and above a threshold, toggle into a slightly more expensive mode where you get increased depth precision. I'm unsure what you can do before that work is done, though; if I just naively bump the far clip plane distance you'll start to get more depth aliasing elsewhere in the scene. Maybe add fog as a workaround until that's fixed? Sorry I don't have a better solution and for generally dropping the ball on Polymer work.
0

User is offline   Fox 

  • Fraka kaka kaka kaka-kow!

#3145

View PostPlagman, on 26 October 2012 - 03:00 PM, said:

I think just resize your images... free tools like XnView, IrfanView, GIMP all have batch resize capabilities if you need to resize lots of them in one go.

I could do that. But that would have side-effects, and more important I don't want to. The same way I could batch recolor images, but that doesn't means tints or palmaps are not necessary, right?

The problem here is that there are things you can't do depending on the technical scale (art file data) of the image.
0

User is offline   Plagman 

  • Former VP of Media Operations

#3146

The point of tints or highpal is that they apply at runtime such that the texture doesn't have to be duplicated; palmaps were removed because they had no value over doing the processing work on the image on disk, which is the whole problem here.

Can you explain exactly what you're trying to do and what the side-effects you're trying to avoid are? Maybe another solution will start making more sense then.
0

User is offline   Fox 

  • Fraka kaka kaka kaka-kow!

#3147

Right now the problem I am facing is with the wall stretching... for example, I want a 28px wide texture to fit a 448 build units wall, which should make a perfect match. The problem is that the wall is stretched, and I must choose beetween it displaying 24px or 32px, and it never goes for 28px...

I asked in the past if TX could add a cstat to bypass wall xrepeat, but his answer was that nobody is qualified enough to mess with Ken Silverman code (although I am starting to question to that).
0

User is offline   Micky C 

  • Honored Donor

#3148

View PostPlagman, on 26 October 2012 - 03:47 PM, said:

I don't think it'll ever be adjustable in CON because that doesn't make much sense, but it's a bug that it's currently fixed the way it is:

http://sourceforge.n...duke32/bugs/26/

It was just a quick and dirty way of getting it up and running, but it needs to adjust dynamically depending on the scene contents and above a threshold, toggle into a slightly more expensive mode where you get increased depth precision. I'm unsure what you can do before that work is done, though; if I just naively bump the far clip plane distance you'll start to get more depth aliasing elsewhere in the scene. Maybe add fog as a workaround until that's fixed? Sorry I don't have a better solution and for generally dropping the ball on Polymer work.


Oh I get where your coming from now. The problem is it's impossible to mask or hide. The way it works now is that everything beyond a line perpendicular to the direction the player's facing at a certain distance just stops getting drawn, revealing the skybox. Fog, sectors, sprites all drop drawing so you get kind of a big hole of skybox in the map. I'll keep mapping and assume that it'll get fixed some point in the future I guess.
1

User is offline   Plagman 

  • Former VP of Media Operations

#3149

Yeah, if you can just forgo your sky and make it the same color as your fog and have a very far fog then you might be OK, but I realize all the alternatives suck here.
0

User is offline   Plagman 

  • Former VP of Media Operations

#3150

View PostFox, on 26 October 2012 - 04:57 PM, said:

Right now the problem I am facing is with the wall stretching... for example, I want a 28px wide texture to fit a 448 build units wall, which should make a perfect match. The problem is that the wall is stretched, and I must choose beetween it displaying 24px or 32px, and it never goes for 28px...

I asked in the past if TX could add a cstat to bypass wall xrepeat, but his answer was that nobody is qualified enough to mess with Ken Silverman code (although I am starting to question to that).


So a resizing tilefromtexture wouldn't help at all then, you really do need some custom classic mode rendering code? If you're using one of the GL modes you can set the exact scale through DEF to make your wall fit perfectly.
0

Share this topic:


  • 213 Pages +
  • « First
  • 103
  • 104
  • 105
  • 106
  • 107
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic


All copyrights and trademarks not owned by Voidpoint, LLC are the sole property of their respective owners. Play Ion Fury! ;) © Voidpoint, LLC

Enter your sign in name and password


Sign in options