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 15173 times)

0 Members and 1 Guest are viewing this topic.

Offline Pepsifan04

  • *
  • *
  • +12% 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
[Tutorial] Realtime scopes
« on: October 20, 2012, 03:00:50 PM »
Hello.
That's my first ever try to make a tut (I'm no good with explaining things)
all the files that I've used are here: http://www.mediafire.com/?j1z5eu0046yd8  + little extras

I'm using Milkshape 3d and attaching "scope.ms3d".
The materials.7z file contains all the textures that I've been using

Scroll down for Troubleshooting


Screenshots:
normal view



Ironshight


Protip:
You can add VMDOF (viewmodel deph of field) in ironsight, and make it end just before scope, this will make it blur for a (less than)second when shooting(scope comes closer)



Most Common Problems:
1. If your scope looks like this: http://i.imgur.com/kbljP.jpg
       You need to Properly (re)coordinate textures, and you need to do that every time you decompile the model


2. My scope has missing textures
       a. Pathfiles in your .qc file are not showing proper directories for textures

       b. Pathfiles in .VMT files are not showing proper directories for textures


3. My Scope is not showing anything, just lense material like normal
        Type
Code: [Select]
r_subviewcam 1 in console and restart smod, type in console
Code: [Select]
restart3.b SMOD crashes when I'm trying to use weapon with Rt scope on it
        Put your weapon to precache in mapadd to prevent game crashes Thanks to  gpgpgpgp

4. My Scope constantly stays on, no mater if I'm using it or not
        You need to add overlay texture for rt_scope material
Code: [Select]
"OverlayTexture" "models\weapons\v_models\Addons\Scope\glare"  <--glare.vtf is an overlay in this caseand full
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"
}
}
}


5. My Scope is mirrored
    You need to mirror the polygons/vertexes in milkshape:
     Select scope_rt vertexes and:

        a. If it's mirroring horizontally:
        go to "vertex" menu and select "mirror left - right"
        re-position the lense, re-coordinate textures, and compile

        b. If it's mirroring Vertically:
        go to "vertex" menu and select "mirror top - bottom" (I've never seen a scope mirroring vertically,  0.01% chance to happen, or less)
         re-position the lense, re-coordinate textures, and compile



6. I'm still getting the old (2d) scope not 3d one
         Delete/comment out Scope section in your weapon_custom## file


7. My scope is not moving along with weapon/moving along with wrong part of it
         You have not assigned your scope model to any bone/ You have not assigned your scope model to wrong bone (that's model hacking issue you noob)

Conclusion:
In most cases Re-doing the scope fixes the problem,
so use your creativity to fix problems, also don't forget to make a backup before any modification, Have Fun!



If you have troubles with understanding me or anything else,
just say that, that'll help me to improve the quality of those tutorials
« Last Edit: January 20, 2015, 08:50:30 AM by Pepsifan04 »
DROP DATABASE bsnooch

Offline BIZ

  • 32-Bit Hobo
  • *
  • *
  • +0% chance to make useful post
  • BIZ hides in shadows.
    • BSNOOCH.COM
Re: [Tutorial] Realtime scopes
« Reply #1 on: October 20, 2012, 03:46:32 PM »
cool, could you send it as a video response to --> http://youtu. be/obM-1UHuXMo

That way we can send viewers of the old tutorial to your new one.

+rep
« Last Edit: October 20, 2012, 04:48:41 PM by BIZ »

Offline Xamp

  • *
  • +2% chance to make useful post
  • Xamp has no influence.
Re: [Tutorial] Realtime scopes
« Reply #2 on: October 20, 2012, 03:54:25 PM »
Wow, it looks so easy when somebody else does it, bevor this tutorial rt scopes where like magic to me, great tutorial.
And btw. could we get maybe a screenshot just to see how the working scope from the video looks ingame? Thank you.


On wall duty again

Offline Pepsifan04

  • *
  • *
  • +12% 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 #3 on: October 20, 2012, 04:48:58 PM »
Edited the first post, to include screenshots, (different weapon because I never compiled the weapon in tutorial :/ But scope is EXACTLY the same)
Quote from: BIZ
cool, could you send it as a video response to --> [inser vid here]
Not right now, but I'll do that in a week or few days from now


Fun Fact:
To make these screeshots in this resolution on my PC I had to wait:
5 min to change resolution and textures in menu
11 min to load map gm_flatgrass_nolag
3 to render weapons
2 min to stabilize game
[take screenshot]
1 min to open the console
[type "disconnect"]
11 min to change back resolution to smaller and textures/models to medium

TOTAL: 35 min of LOADING SCREEN
« Last Edit: October 20, 2012, 05:07:09 PM by Pepsifan04 »
DROP DATABASE bsnooch

Offline JoshZemlinsky

  • *
  • +2% chance to make useful post
  • JoshZemlinsky has no influence.
Re: [Tutorial] Realtime scopes
« Reply #4 on: October 20, 2012, 06:05:37 PM »
Awesome to see someone made a tutorial for this, i had problems with it. But thougth i figured it out, all that was wrong was that the texture broke ingame lol.

Now with this tut i might be able to figure it out.

:EDIT:

As i suspected, this was nothing different from what i did (except this was in Milkshape right?) and same happened, tho now that there seems to be "expert" help i guess i'll show what my problem is:
http://i.imgur.com/kbljP.jpg

That.... To me it looks.. Well i cant explain it lol
Btw i made my scope in 3Ds max, but i have many times questioned if a program made by trolls, should really be my primary modelling tool.  :P
« Last Edit: October 20, 2012, 07:21:53 PM by JoshZemlinsky »

Offline Pepsifan04

  • *
  • *
  • +12% 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 #5 on: October 20, 2012, 10:47:28 PM »
You probably just need to coordinate textures properly, CTRL + T  In milkshape, rememberer that you can rotate/scale/strech and move polygons in "texture coordinate editor" without actually changing them in model.

(polygons need to be over texture, not somewhere else, also make sure that you're coordinating the right texture with the right polygons
eg. group scope_rt coordinated with scope_rt.vtf)

And you need to do that EVERY TIME YOU DECOMPILE THE WEAPON WITH RT SCOPE

And just by looking at your screenshot I can tell that Crosshair is NOT at the middle! :P
« Last Edit: October 20, 2012, 10:57:36 PM by Pepsifan04 »
DROP DATABASE bsnooch

Offline JoshZemlinsky

  • *
  • +2% chance to make useful post
  • JoshZemlinsky has no influence.
Re: [Tutorial] Realtime scopes
« Reply #6 on: October 20, 2012, 11:13:21 PM »
You probably just need to coordinate textures properly, CTRL + T  In milkshape, rememberer that you can rotate/scale/strech and move polygons in "texture coordinate editor" without actually changing them in model.

(polygons need to be over texture, not somewhere else, also make sure that you're coordinating the right texture with the right polygons
eg. group scope_rt coordinated with scope_rt.vtf)

And you need to do that EVERY TIME YOU DECOMPILE THE WEAPON WITH RT SCOPE

And just by looking at your screenshot I can tell that Crosshair is NOT at the middle! :P

Yeah, 3Ds max has something similair to "texture coordinate editor" called Unwrap UVmap. And i am pretty sure i did it right, i have made some other models where i edited the texture, no problems with them.
And the crosshair isnt in the middle cause 3Ds max is a troll lol. Even after i applied the stupid crosshair texture, it didnt show up in the Unwrap UVmap thing. So i thougth i'd let it go till i found out what was wrong.
But i have been thinking i'd go ahead and grab Milkshape so i can follow the tutorial proberly, and you have no idea about how depressing 3Ds max 2012 is compared to the milkshake theme of Milkshape.
(some may dissagree, but i aint happy with 3Ds max 2012)

So anyways, thanks for you reply. Oh and a last thing, why did you copy the lens 3 times? As far as i remember the Scope_rt subviewcam has the feature of adding an overlay, such as a lens. My best guess is that it'll hide the crosshair, so that it wont show up when you aren't aiming.

Offline Pepsifan04

  • *
  • *
  • +12% 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 #7 on: October 20, 2012, 11:19:47 PM »
3dsmax was also pain for me (2010) that's why I bought Milkshape

Quote
Oh and a last thing, why did you copy the lens 3 times? As far as i remember the Scope_rt subviewcam has the feature of adding an overlay, such as a lens. My best guess is that it'll hide the crosshair, so that it wont show up when you aren't aiming.
That's how I'm doing it ^^ If you really want you can go just with one lense... everyone have their own preferences.

DROP DATABASE bsnooch

Offline JoshZemlinsky

  • *
  • +2% chance to make useful post
  • JoshZemlinsky has no influence.
Re: [Tutorial] Realtime scopes
« Reply #8 on: October 21, 2012, 09:56:51 AM »
Anyways thanks for you first reply, i must of been too confident that Eviltiki100's video explained it all... But he left out the most important apperently.

If i am not mistaking this is how the scope_rt texture was placed in his video:


And this is how you place it proberly


So thanks alot Pepsi!
Also here's how it looks now:
click me

The crosshair is still work in progress, i dont really know what is wrong with it, but i guess i'll figure it out.  :D


Offline alvaol62

  • *
  • +2% chance to make useful post
  • alvaol62 has no influence.
Re: [Tutorial] Realtime scopes
« Reply #9 on: October 21, 2012, 11:42:10 AM »
This is truly the best tutorial BSNOOCH has ever witnessed. Thanks a lot. This will open a lot of doors.

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 #10 on: October 21, 2012, 11:45:37 AM »
I will might use this for SMOD: Realism. I hear this can make the game unstable so I will test the game with this. Dunno when I get my hands on this.

mod edit: oops sorry, meant to quote !
« Last Edit: October 22, 2012, 05:17:03 AM by BIZ »

Offline Pepsifan04

  • *
  • *
  • +12% 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 #11 on: October 21, 2012, 04:50:53 PM »
I will might use this for SMOD: Realism. I hear this can make the game unstable so I will test the game with this. Dunno when I get my hands on this.
it messes up shadows sometimes, but not always and for a short time.


Thank you all for a such positive feedback :)
DROP DATABASE bsnooch

Offline JoshZemlinsky

  • *
  • +2% chance to make useful post
  • JoshZemlinsky has no influence.
Re: [Tutorial] Realtime scopes
« Reply #12 on: October 21, 2012, 05:11:01 PM »
Thank you too for making a prober tutorial, it helps out alot.  ;D

:EDIT:

once again i am in trouble... I added an Acog to a M16 etc, works fine. Only problem, when it fires the 3D scope doesnt move at all. It constantly show the same view from before the gun was fired, and i dont get why this is happening. Any ideas?
« Last Edit: October 21, 2012, 07:49:21 PM by JoshZemlinsky »

Offline BIZ

  • 32-Bit Hobo
  • *
  • *
  • +0% chance to make useful post
  • BIZ hides in shadows.
    • BSNOOCH.COM
Re: [Tutorial] Realtime scopes
« Reply #13 on: October 22, 2012, 05:17:24 AM »
I will might use this for SMOD: Realism. I hear this can make the game unstable so I will test the game with this. Dunno when I get my hands on this.


Here is this classic photo from outbreak circa 2008?




no idea why it caused this problem but it did. hahaha  :D

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 #14 on: October 22, 2012, 10:25:07 AM »
I will might use this for SMOD: Realism. I hear this can make the game unstable so I will test the game with this. Dunno when I get my hands on this.


Here is this classic photo from outbreak circa 2008?




no idea why it caused this problem but it did. hahaha  :D
LOL Zombies with shadows of trash canisters? xD