Welcome, Guest. Please login or register. Did you miss your activation email?

* TUTORIAL SECTION RULES

This section is for SMOD TUTORIALS & GUIDES ONLY.
You may create a new topic in the appropriate area to share your tutorial. If you post anything off-topic here you will be temp-banned. This is so we don't hassle the moderators too much, they are volunteers.

If you need help with a tutorial, post a reply in its thread . Do not start a new topic for help here!

Author Topic: [Tutorial] Realtime scopes  (Read 14363 times)

0 Members and 2 Guests are viewing this topic.

Offline Spasior

  • IKEA Meatballs Son!!!
  • *
  • *
  • +3% chance to make useful post
  • Spasior has no influence.
Re: [Tutorial] Realtime scopes
« Reply #15 on: October 22, 2012, 11:56:03 AM »
Late night development does that to the poor zombies... :/
erutangiS

Offline Counter-Life™

  • *
  • *
  • +17% chance to make useful post
  • Counter-Life™ is a rising star!Counter-Life™ is a rising star!Counter-Life™ is a rising star!Counter-Life™ is a rising star!Counter-Life™ is a rising star!Counter-Life™ is a rising star!
    • Youtube Channel
Re: [Tutorial] Realtime scopes
« Reply #16 on: October 22, 2012, 03:12:21 PM »
Anyone knows the correct values for 8x, 7x and 4x zoom?

Offline Counter-Life™

  • *
  • *
  • +17% chance to make useful post
  • Counter-Life™ is a rising star!Counter-Life™ is a rising star!Counter-Life™ is a rising star!Counter-Life™ is a rising star!Counter-Life™ is a rising star!Counter-Life™ is a rising star!
    • Youtube Channel
Re: [Tutorial] Realtime scopes
« Reply #17 on: October 22, 2012, 05:56:06 PM »
I have 2 questions:

1. I have some kind of lines on my scope, look like scretches going to the middle point of the lense

2.How to make it dosent zoom when ur not in ironsight mode?

Offline Pepsifan04

  • *
  • *
  • +11% chance to make useful post
  • Pepsifan04 might someday be someone...Pepsifan04 might someday be someone...Pepsifan04 might someday be someone...Pepsifan04 might someday be someone...
    • Smod: CryLife
Re: [Tutorial] Realtime scopes
« Reply #18 on: October 22, 2012, 08:13:01 PM »
post a screeshot of that first one, because I'm guessing that is not like this http://i.imgur.com/kbljP.jpg

And for the second one:
you need to have an overlay texture for RT_scope, eg:
Code: [Select]
"OverlayTexture" "models\weapons\v_models\Addons\Scope\glare"  <--glare.vtf is an overlay in this case

and full code
Code: [Select]
"UnlitGeneric"
{
"$basetexture" "models\weapons\v_models\Addons\Scope\scope_rt"
"$model" "1"
"Proxies" {
"SubViewCam" {
"ReplaceTexture" "$basetexture"
                        "OverlayTexture" "models\weapons\v_models\Addons\Scope\glare"
"DefaultAlpha" "1"
"SightedAlpha" ".1"
"BufferID"         "0"
"Size" "512"
"FOV" ".06"
}
}
}
« Last Edit: October 22, 2012, 08:15:19 PM by Pepsifan04 »
DROP DATABASE bsnooch

Offline Counter-Life™

  • *
  • *
  • +17% chance to make useful post
  • Counter-Life™ is a rising star!Counter-Life™ is a rising star!Counter-Life™ is a rising star!Counter-Life™ is a rising star!Counter-Life™ is a rising star!Counter-Life™ is a rising star!
    • Youtube Channel
Re: [Tutorial] Realtime scopes
« Reply #19 on: October 22, 2012, 08:46:34 PM »
post a screeshot of that first one, because I'm guessing that is not like this http://i.imgur.com/kbljP.jpg

And for the second one:
you need to have an overlay texture for RT_scope, eg:
Code: [Select]
"OverlayTexture" "models\weapons\v_models\Addons\Scope\glare"  <--glare.vtf is an overlay in this case

and full code
Code: [Select]
"UnlitGeneric"
{
"$basetexture" "models\weapons\v_models\Addons\Scope\scope_rt"
"$model" "1"
"Proxies" {
"SubViewCam" {
"ReplaceTexture" "$basetexture"
                        "OverlayTexture" "models\weapons\v_models\Addons\Scope\glare"
"DefaultAlpha" "1"
"SightedAlpha" ".1"
"BufferID"         "0"
"Size" "512"
"FOV" ".06"
}
}
}

It looks like this(Sry, I dont have a better pic)
http://cloud-2.steampowered.com/ugc/939258588269053225/8CA0C7D5A8A8D2C1AEDA793EDB22BFD33A1B1780/

Offline Pepsifan04

  • *
  • *
  • +11% chance to make useful post
  • Pepsifan04 might someday be someone...Pepsifan04 might someday be someone...Pepsifan04 might someday be someone...Pepsifan04 might someday be someone...
    • Smod: CryLife
Re: [Tutorial] Realtime scopes
« Reply #20 on: October 23, 2012, 06:25:05 PM »
that's the first time I'm seeing something like that, but my guesses are:

(it may be)
1.Non-properly coordinated textures

2.Lense vertexes (polygons) have an odd shape, and they distort the rt scope itself

3.Custom lense filter:
Code: [Select]
"SubViewCam" {
"Filter2" "shader/vm_lens"
}
4.To big zoom or "mistyped" dot or comma

that's all that I can think of right now
DROP DATABASE bsnooch

Offline alvaol62

  • *
  • +2% chance to make useful post
  • alvaol62 has no influence.
Re: [Tutorial] Realtime scopes
« Reply #21 on: October 23, 2012, 06:30:54 PM »
The Barrett M98B is now fully fixed. Doing it again from scratch did the trick.

See it in action:

 SMOD - RT Demo on M98B

Offline Pepsifan04

  • *
  • *
  • +11% chance to make useful post
  • Pepsifan04 might someday be someone...Pepsifan04 might someday be someone...Pepsifan04 might someday be someone...Pepsifan04 might someday be someone...
    • Smod: CryLife
Re: [Tutorial] Realtime scopes
« Reply #22 on: October 23, 2012, 06:39:48 PM »
The Barrett M98B is now fully fixed. Doing it again from scratch did the trick.

See it in action:

 [insert vid here][/url]

Looks really badass :D
Good to know that wasn't nothing too serious though.
DROP DATABASE bsnooch

Offline Monkatraz

  • *
  • *
  • +4% chance to make useful post
  • Monkatraz has no influence.
Re: [Tutorial] Realtime scopes
« Reply #23 on: October 24, 2012, 12:16:06 AM »
Modeling problem:
http://cloud-2.steampowered.com/ugc/595859116703456402/E5D4959363169BA9569882F5699E92155872FBFB/ (no image for a reason, it's huge)
That's the FNFAL after compiled, it seemingly has a arm in the way, and the scope is way back.
http://steamcommunity.com/sharedfiles/filedetails/?id=104363686
after applying extreme FOV, you can see where the scope is, but in milkshape it looks like this

what's going on?
MLG

Offline BIZ

  • 32-Bit Hobo
  • *
  • *
  • +0% chance to make useful post
  • BIZ hides in shadows.
    • BSNOOCH.COM
Re: [Tutorial] Realtime scopes
« Reply #24 on: October 24, 2012, 12:37:55 AM »
Modeling problem:
http://cloud-2.steampowered.com/ugc/595859116703456402/E5D4959363169BA9569882F5699E92155872FBFB/ (no image for a reason, it's huge)
That's the FNFAL after compiled, it seemingly has a arm in the way, and the scope is way back.
http://steamcommunity.com/sharedfiles/filedetails/?id=104363686
after applying extreme FOV, you can see where the scope is, but in milkshape it looks like this
http://i.imgur.com/QBD1O.png
what's going on?

If the animations go crazy when you shoot or reload it was a decompile issue. animations based on newer CSS engine dont compile right. At least thats what I ran into last time I messed with the models.

OneManShow suggested a certain version of studio compiler might fix it but it didn't work for me.

Offline Monkatraz

  • *
  • *
  • +4% chance to make useful post
  • Monkatraz has no influence.
Re: [Tutorial] Realtime scopes
« Reply #25 on: October 24, 2012, 12:43:51 AM »
Scope was a joint problem, although, the gigantic camo block is still there.
MLG

Offline Monkatraz

  • *
  • *
  • +4% chance to make useful post
  • Monkatraz has no influence.
Re: [Tutorial] Realtime scopes
« Reply #26 on: October 24, 2012, 01:09:28 AM »
Double post, but, last final problem, fixed everything else:
Code: [Select]
Late precache of models/weapons/v_rif_galil.mdl
Error: Material "models/weapons/v_models/slayer's_dsafal/scope_rt" : proxy "SubViewCam" unable to initialize!
Late precache of models/weapons/w_rif_galil.mdl

EDIT: Fixed, console command. But now I crash whenever I take it out, fuck.
« Last Edit: October 24, 2012, 03:39:22 AM by Monkatraz »
MLG

Offline alvaol62

  • *
  • +2% chance to make useful post
  • alvaol62 has no influence.
Re: [Tutorial] Realtime scopes
« Reply #27 on: October 24, 2012, 07:30:28 AM »
Double post, but, last final problem, fixed everything else:
Code: [Select]
Late precache of models/weapons/v_rif_galil.mdl
Error: Material "models/weapons/v_models/slayer's_dsafal/scope_rt" : proxy "SubViewCam" unable to initialize!
Late precache of models/weapons/w_rif_galil.mdl

EDIT: Fixed, console command. But now I crash whenever I take it out, fuck.

Reload the map after entering the command, otherwise the game will crash.

Offline Monkatraz

  • *
  • *
  • +4% chance to make useful post
  • Monkatraz has no influence.
Re: [Tutorial] Realtime scopes
« Reply #28 on: October 24, 2012, 10:54:19 PM »
alright, fixed it. just put the command in the autoexec and it worked.
MLG

Offline Pepsifan04

  • *
  • *
  • +11% chance to make useful post
  • Pepsifan04 might someday be someone...Pepsifan04 might someday be someone...Pepsifan04 might someday be someone...Pepsifan04 might someday be someone...
    • Smod: CryLife
Re: [Tutorial] Realtime scopes
« Reply #29 on: October 26, 2012, 01:33:38 PM »
Updated the first post to contain Troubleshooting section.

Now that's a long post there...
DROP DATABASE bsnooch