Age Verification
This website contains age-restricted material including nudity and explicit content. By entering, you confirm being at least 18 years old or the age of majority in the jurisdiction you are accessing the website from.
I am 18+ or older - Enter
I am under 18 - Exit
Our parental controls page explains how you can easily block access to this site.

Discussions for Scenes for Version 1.2.X Fullscreen Mode here

  Forum / Tout sur iStripper

Calgon
Inscrit en May 2022

355 message(s)
13 November 2022 (edited)
@Z22

Have you been watching "the art of code/feathers in the wind"? https://www.youtube.com/watch?v=68IFmCCy_AM

Edit, ah yeh, i see you have his atribution in the shader.

Yes - I've been trying to work through some of his tutorials though I haven't watched that one yet, just hacked the code around. I think I will make the attribution clearer, I was so amazed that I had actually got the code to work how I wanted it to that I rushed to post the result.

Went on the authors patreon site.... sounds like he hardly makes a bean from YouTube which is a shame because amateurs like me need Tutorials like his.

My contribution to the original code was to work out how to hack out the background and move the feathers up /down and in/out so I could create the effect I wanted but the more you do, the more you understand. I've been waiting for someone to comment on my ***** ***** code as I'm pretty sure there are more elegant solutions than this:

// Remove alpha for black
if (col.r > 0.01)
{
col.a = 1.0;
}
else
{
col.a = .0;
}

Then I spent several hours down at the nature reserve taking the background photos of birds before wrapping it all up in a zip.
TheEmu
Inscrit en Jul 2012

3309 message(s)
13 November 2022 (edited)
@calgon - you said "I'm pretty sure there are more elegant solutions than this:"

// Remove alpha for black
if (col.r > 0.01)
{
col.a = 1.0;
}
else
{
col.a = .0;
}

Try

col.a = ( col.r > 0.01 ) ? 1.0 : 0.0;

or

col.a = float ( col.r > 0.01 );

The first uses the trinary ?: operator where "a ? b : c" evalautes to b when a is true and to c when a is false (read it as "if a then evalute and use b else evaluate and use c").

The second first evaluates col.r > as a boolean value (where 1 is true and 0 is false) and then converts it to a float value.
Z22
Inscrit en Aug 2017

1166 message(s)
13 November 2022 (edited)

if(col.r != 0.0)
{
col.a = 1.0;
}

so if its not equal to zero its one.

so Emu's ones would look ike

col.a = ( col.r != 0.0 ) ? 1.0 : 0.0;

or

col.a = float ( col.r != 0.0 );

i think...
TheEmu
Inscrit en Jul 2012

3309 message(s)
13 November 2022 (edited)
@Z22

That is not equivalent to the code that @Calgon was asking about which tested col.r not col.a. He may well have what intended to test col.a but even then the code would not be equivalent as the original threshold was not 0.0.

Edit - you modified your post after I started to reply, but the modified code is still not equivalent to @Calgon 's original.

Edit - there is also a standard GLSL function that can be used for this, see

https://docs.gl/sl4/step

the original code would be equvalent t0

col.a = edge ( 0.01, col.r );
Z22
Inscrit en Aug 2017

1166 message(s)
13 November 2022
@TheEmu

To catch errors in shaders I rely on the error and warning messages written to the vghd.log file when any are encountered
Trouble is..... as I'm still learning. I don't always know what the error codes mean. So my procedure is usually:

1. Try to run the scene
2. Did it run ?
2.+Yes => Finished
2.+No => Read error log
3. Did I understand the error messages ?
3+No => Change the code in some random way => Go back to 1.

Thats what i am saying about having the error checking in editor as it tells you the problem. Eg:

if put
vec3 bug = 0.0;

it will say "cannot convert from 'const float' to temp 3-component vector of float

because it should be
vec3 bug = vec3(0.0);

It has saved me so much time just trying to find the problem as the line numbers in the log do not match line numbers in whatever editor you are using.

Obviously if it compiles and runs but looks weird its not going to help you with those type of errors, nor will the logfile though.

I used to use N++ but after switching to atom i'm not going back. It's just far easier to write scenes in, if you can add the same functionallity into N++ do so.

TheEmu
Inscrit en Jul 2012

3309 message(s)
13 November 2022
@Z22

Ahh - I see that it has a better syntax checker than I have been use to seeing in the editors.

I know I installed and tried atom a good few years ago and it seemed to be a good editor, but at that time I didn't see any strong reason to switch to it.

Obviously if it compiles and runs but looks weird its not going to help you with those type of errors, nor will the logfile though.

I normally have very little trouble in locating the error using the line number in the log even though it does not exactly match the line number in the editor. However, the discrepancy seems to depend on the GSL compiler being used, on my machine by default the discrepancy is usually only a line or two, but is more if I switch from the Intel to the Nvidia compiler.

On those few occassions when there is a problem I resort to introducing a deliberate error (usually just silly word, like bugger, on a line by itself) close to the line identified in the log as this then gives me the correction term to use for the line numbers - not elegant but a useful technique to have when it is needed.
Z22
Inscrit en Aug 2017

1166 message(s)
13 November 2022
@Z22

That is not equivalent to the code that @Calgon was asking about which tested col.r not col.a. He may well have what intended to test col.a but even then the code would not be equivalent as the original threshold was not 0.0.

Edit - you modified your post after I started to reply, but the modified code is still not equivalent to @Calgon 's original.

Edit - there is also a standard GLSL function that can be used for this, see

https://docs.gl/sl4/step

the original code would be equvalent t0

col.a = edge ( 0.01, col.r );

yeh, i noticed the error.

He didnt ask for equivelence though, he asked for a more elegant. I think i understand what he is trying to do in the scene as it is something i have used many times on the girls alpha. That being if the feathers r channel is not 0.0 then the alpha should be 1.0, if it is 0.0 the the alpha should be 0.0. the low number (0.01) is most likely because he doesnt know about != rather than a desire to slice part of the feather off.

this is assuming that col.a starts out at 0.0 which sometimes doesnt (weirdly) unless you define it with vec4 col = vec4(0.0). As an aside do you have any idea why it does that (sometimes is not zero if you define as vec4 col;)?
TheEmu
Inscrit en Jul 2012

3309 message(s)
13 November 2022
1. Try to run the scene
2. Did it run ?
2.+Yes => Finished
2.+No => Read error log
3. Did I understand the error messages ?
3+No => Change the code in some random way => Go back to 1.


That really should be

1. Try to run the scene
2. Read error log
3. Were there any error or warning messages
4. If yes - fix them and go back to step 1
5. Did it have a statisfactory effect
6. If no then update source and go to step 1
TheEmu
Inscrit en Jul 2012

3309 message(s)
13 November 2022
He didnt ask for equivelence though, he asked for a more elegant. I think i understand what he is trying to do in the scene as it is something i have used many times on the girls alpha. That being if the feathers r channel is not 0.0 then the alpha should be 1.0, if it is 0.0 the the alpha should be 0.0. the low number (0.01) is most likely because he doesnt know about != rather than a desire to slice part of the feather off.

If you just use a threshold of 0.0 for this then in a many cases, though not all, you get a poor result as it drives too many pixels to be transparent. I have found that it often better to use a threshold which can be tweaked.

For this problem it is often better to use the softstep() function to get a smoother edge rather than the hard edge you get with the binary if-then-else or the step() function - you get less jagged, less pixelated, edges with smoothstep().
Z22
Inscrit en Aug 2017

1166 message(s)
13 November 2022
on my machine by default the discrepancy is usually only a line or two, but is more if I switch from the Intel to the Nvidia compiler.

ahh, i'm using the nvidia complier. That explains why its such an arse. Calgon is on nvidia too.

As for atom, it doesnt have the functionality by default, you have to point it to "glslangValidator.exe" for it to compile and check for errors as you type. I'm sure yopu can remove the "garish" colours if you don't like them. It's also nice having the project folder browser tab, i don't remember n++ doing that, i always had to file/open/browse.
TheEmu
Inscrit en Jul 2012

3309 message(s)
13 November 2022
In my earlier post, which I can no longer edit because of another of my own posts, when I said

2. Read error log

I should have said

2. Read error log - even if the scene appeared to run properly.
Z22
Inscrit en Aug 2017

1166 message(s)
13 November 2022
For this problem it is often better to use the softstep() function to get a smoother edge rather than the hard edge you get with the binary if-then-else or the step() function - you get less jagged, less pixelated, edges with smoothstep().

softstep? typo?

yeh smoothstep would give a nicer edge so...

If (col.r > 0.0)
{
col.a = smoothstep(0.0, 0.01, col.r);
}

Is that right?
Z22
Inscrit en Aug 2017

1166 message(s)
13 November 2022
For this problem it is often better to use the softstep() function to get a smoother edge rather than the hard edge you get with the binary if-then-else or the step() function - you get less jagged, less pixelated, edges with smoothstep().
softstep? typo?

yeh smoothstep would give a nicer edge so...

If (col.r > 0.0)
{
col.a = smoothstep(0.0, 0.01, col.r);
}
Is that right?

edit:
col.a = smoothstep(0.0, 0.01, col.r);

don't need the if.
TheEmu
Inscrit en Jul 2012

3309 message(s)
13 November 2022 (edited)
don't need the if.

That is correct, with smoothstep you don't need any explicit logic for this sort of thing. You might want to tweak the limits, either or both of them, depending on exactly what you want to see but for this particular usage the values you have would seem to be sensible.

If, however, you wanted the transition to be a soft one centred at a value of 0.5 for col.r you would want something like

col.a = smoothstep(0.49, 0.51, col.r);
Z22
Inscrit en Aug 2017

1166 message(s)
13 November 2022
Yes - I've been trying to work through some of his tutorials though I haven't watched that one yet, just hacked the code around..

His tutorials are pretty good as he explains how it works and not just typing out code while we watch.

I've nabbed bits of his code too, the raymarching code mainly in a few scenes ...

eg: https://drive.google.com/file/d/1ER5FMRzTh_7TgCiIVfxLls5mJnEh89EK/view?usp=share_link
Z22
Inscrit en Aug 2017

1166 message(s)
13 November 2022
don't need the if.
That is correct, with smoothstep you don't need any explicit logic for this sort of thing. You might want to tweak the limits, either or both of them, depending on exactly what you want to see but for this particular usage the values you have would seem to be sensible.

If, however, you wanted the transition to be a soft one centred at a value of 0.5 for col.r you would want something like

col.a = smoothstep(0.49, 0.51, col.r);

Yeh, i have used near those values on the sexual predetor scene,
outp.rgb = mix(Girl1.rgb, outp.rgb, smoothstep(0.50, 0.51, col.b+(sin(u_Elapsed*0.5)) ) );

col.b is a restult of getluma of the Girl1.rgb.
Calgon
Inscrit en May 2022

355 message(s)
13 November 2022
@Z22 and @TheEmu

edit:
col.a = smoothstep(0.0, 0.01, col.r);

don't need the if.

Thanks guys - that's much neater. So much to learn.
Z22
Inscrit en Aug 2017

1166 message(s)
14 November 2022 (edited)
Depthmap aware contact hardening shadows WiP

https://drive.google.com/file/d/1C2dqhbYN4r9-XQlZuf3uhCZcLJjGX1Qw/view?usp=share_link


Create depthmap from background https://3dphoto.io/uploader/index_old.html

convert to grayscale and max the contrast.


There is a photoshop plugin version here https://3dphoto.io/uploader/ i've not used it though.

Included ARSE (anti ring sharpen effect) which fixes the blurring caused by GL_LINEAR when the girls are scaled by standing/sittingheight without causeing artifacts like "color.rgb+fwidth(colour.rgb)" which cause bright lines (ringing artifacts) between eg: a dark skirt and skin. It does increase aliasing though.
EverthangForever
Inscrit en Oct 2009

2459 message(s)
15 November 2022 (edited)
@Z22 GetNormal3Oct.fsh makes a nice variation from using Z22Glasstastic for a mod...Tks lots.
I noticed model left-right (x-axis) is reversed in the z22_SexualPredetor.scn version you posted.
I'd like to include this in the next batch of conversions (as per a shader from another shader)
if thats cool with you. 😎👍
Z22
Inscrit en Aug 2017

1166 message(s)
15 November 2022
@Z22 GetNormal3Oct.fsh makes a nice variation from using Z22Glasstastic for a mod...Tks lots.
I noticed model left-right (x-axis) is reversed in the z22_SexualPredetor.scn version you posted.
I'd like to include this in the next batch of conversions (as per a shader from another shader)
if thats cool with you. 😎👍

Sure no worries.

It's based on the Glass series rather than the glastastic ones.
Calgon
Inscrit en May 2022

355 message(s)
16 November 2022 (edited)
@Z22 and @EverthangForever

I'd been trying to use a shader as the background for @Z22 SexualPredetor but couldn't get it to work. I see the ET has done that in FG738. When I change the background shader for a different one I found it comes out upside down. Does anyone know why this might be ?
EverthangForever
Inscrit en Oct 2009

2459 message(s)
16 November 2022 (edited)
A shader running on another shader will invert its texture2D. I think what you are seeing was an oversight
when Totem initially incorporated the OpenGL platform into their player. A bit like the left-right reversal of clipsprites from their original films.
Rather than fix it, they left it as it is. ...If you want to correct the upside down, just refer the initial shader
output which is using the sprite, subsequently into a framebuffer using Emu's Null shader. You can find a
a spare copy of TheEmu - Null.fsh as an entry in the ET Scenes/Shaders folder or on @TheEmu 's website
as TheEmuLib.Emu_Null.fsh
TheEmu
Inscrit en Jul 2012

3309 message(s)
16 November 2022 (edited)
@Calgon - EverthangForever is correct. In some things the coordinate system has its origin in the top left corner and for others the origin is in the bottom left corner - so in some places Y increases as you go upwards and in others as you go downwards.

This can be a bit annoying but you can usually quite easily get the orientation you want either by a using a hotspot: clause to change the origin of the local coordinates or a pos: clause to shift things by the height of the "thing" and then using a negative scale factor for Y to perform an inversion. Basically you need to map Y => H - Y where H is height of the item.


Where 3d coordinates make sense you can use a rotation by 180 degrees about the Y axis.
Calgon
Inscrit en May 2022

355 message(s)
16 November 2022
Thanks @EverthangForever @TheEmu - I changed the coord system in the shader as a workaround but it would be better to deal with it in the scn file.
Z22
Inscrit en Aug 2017

1166 message(s)
17 November 2022
err, what? i've never had a problem swapping out an image for a shader. Did you set up a framebuffer for that shader eg;-



framebuffer
{
size: 3840, 2160
pos: 1920, 1080
id: Backgroundshader

quad
{
// you might need pos:, size:, hotspot: in here too, cant remember off hand
shader: fragment, Backgroundshader.fsh
}
}

framebuffer
{
size: 3840, 2160
pos: 1920, 1080
id: Refract

sprite
{
source: Girl01, 0
source: Backgroundshader, 1
source: Girl02, 2
source: Girl03, 3
shader: fragment, GetNormal3Oct.fsh
}
}
ComteDracula
Inscrit en Aug 2017

1266 message(s)
17 November 2022 (edited)
Thanks @EverthangForever.

All scenes FG737 to FG750 work fine for me.

And as mentioned, I also noticed a left/right image inversion in the FG738 scene. One girl had iStripper reversed on her t-shirt.


Merci @EverthangForever.

Toutes les scènes FG737 à FG750 fonctionnent bien pour moi.

Et comme il a été dit, j'ai constaté également une inversion gauche / droite de l'image dans la scène FG738. Une fille avait iStripper inversé sur son t-shirt.
Z22
Inscrit en Aug 2017

1166 message(s)
17 November 2022 (edited)
Maybe i didnt notice that type was upside down, but most of my scenes have shaders as inputs to other shader and never had a problem with y being flipped.

@Calgon Could i see your scn code plz?
EverthangForever
Inscrit en Oct 2009

2459 message(s)
17 November 2022 (edited)
Merci @ComteDracula.. Un bon résultat
Pour FG738 Oui, la gauche-droite est inversée pour le modèle.
C'était un bug laissé par @Z22 code, désolé pour cela.
Pour résoudre ce problème, ajoutez simplement pour chacun des trois nœuds clipsprite.
--
Thanks @ComteDracula..a good outcome
For FG738 Yes the left-right is reversed for the model.
It was a left over bug from @Z22 code , sorry about that.
To fix this simply add for each of the three clipsprite nodes..
source: Clip
scale: -1, 1
Socialhazard
Inscrit en Nov 2020

1150 message(s)
17 November 2022 (edited)
Yeah, that works. scale: -1, 1 after source: Clip

I knew that, it was there in the forum. Probably I got it from @EverthangForever but couldn't find it later.

I try to leave these things to people that can see the matrix 'cause I dunno what I am doing. 😄 😎

Vous n'êtes pas encore autorisé à participer

En tant qu'utilisateur gratuit de iStripper, vous n'êtes pas autorisé à répondre sur le forum ou à créer de nouveau sujet.
Vous pouvez cependant consulter les catégories de bases et commencer à découvrir notre communauté !