Resultados 1 al 2 de 2

Script para programar morphs

  1. #1
    Fecha de ingreso
    May 2010
    Mensajes
    112

    Thumbs up Script para programar morphs

    Básicamente estoy buscando un script similar al blinker, tengo el mismo, pero el problema es que los modelos míos están hechos en 3dsmax 2013, cuando intento usar blinker me salta un error, y supongo que, no es compatible este script con dicha versión.

    La idea es programar una serie de Morphs para qué los personajes de fondo parpaden automáticamente, así me ahorro tiempo en detalles que no se verán tanto, alguien tiene algún script similar a esto? Para los que no lo conozcan lo dejo aquí al script de blinker".

    Creo que es compatible solo con max 2006 - 2008. Gracias desde ya.
    -- Blinker.
    -- Dani Rosen - Jul 17, 2006.
    -- Automatically or manually add blinks to a blink morph-target.
    -- v1.01 - Dec 08, 2007 - changed default Morpher-target name.

    MacroScript Blinker tcategory:"DaniTools tinternalcategory:"DaniTools ttoltip:"Blinker tbuttontext:"Blinker tIcon:#("TrackViewTools,43).
    (.

    Global my_head = undefined.

    Global lastKey.

    Rollout Blinker Blinker v1.01 width:278 height:340.
    (tgroupBox BlinkGroup Blinker pos:[6,5] width:265 height:325 tpickButton bHead Pik Head pos:[75,25] width:130 height:25 tbutton bAbout? toltip:"About height:15 width:15 pos:[260,5] tlabel lBlinkMorph Blink Morph Name: pos:[34,63] teditText eBlinkMorph text:"Blink pos:[130,60] width:110 height:20 tlabel lbTimeRange TimeRange: pos:[100,90] tspinner sTimeStart Start: range:[0,10000, animationrange, start] type:#integer pos:[60,108] width:60 height:30 tspinner sTimeEnd End: range:[0,10000, animationrange, end] type:#integer pos:[165,108] width:60 height:30 tlabel lbBlinkIntervals1 Auto Blink Random Intervals: pos:[65,135] tlabel lbBlinkIntervals3 Betwen pos:[30,155] tlabel lbBlinkIntervals4 and pos:[130,155] tlabel lbBlinkIntervals5 Seconds pos:[208,155] tspinner BlinkIntervals1 range:[0.1,10,2.5] pos:[78,153] width:45 height:30 tspinner BlinkIntervals2 range:[0.1,10,4] pos:[158,153] width:45 height:30 tlabel lbBlinkSpeed Blink Speed: pos:[100,183] tlabel lbFast Fast pos:[15,192] tlabel lbSlow Slow pos:[240,192] tslider BlinkSpeed range:[1,12,3] type:#integer ticks:9 pos:[21,205] width:250 height:30 tbutton AddBlinks Add Auto Blinks pos:[85,245] width:120 height:30 tbutton ClearBlinks Clear Blinks pos:[30,295] width:90 height:24 tbutton SingleBlink Single Blink Here pos:[145,295] width:100 height:24 t ton bHead picked obj do t(t try -- test if Morpher exists on object t (t If IsValidMorpherMod obj. Morpher == true then my_head = obj t bHead, text=obj, name t ) t catch t (t messagebox Object does not have a Morpher modifier t my_head=undefined t ) t) -- close bHead t ton AddBlinks pressed do t(t if my_head.= undefined then t (t global foundBlink = false t for te = 1 to 100 do t (t MorpherName = WM3_MC_GetName my_head. Morpher t t if (matchPattern MorpherName pattern:eBlinkMorph, text) then t (t lastKey = sTimeStart, value t While lastKey < sTimeEnd, value do t (t RandomKey = (random BlinkIntervals1.value BlinkIntervals2.value) * framerate t lastKey = lastKey + RandomKey t addnewkey my_head. Morpher[t] lastKey t with animate on t (t at time lastKey my_head. Morpher[t].value = 0 t at time (lastKey + BlinkSped, value) my_head. Morpher[t].value = 100 t at time (lastKey + BlinkSped, value + BlinkSped, value) my_head. Morpher[t].value = 0 t ) t lastKey = lastKey + BlinkSped, value + BlinkSped, value t ) t foundBlink = true t ) t ) t if foundBlink == false then t (t messagebox no valid Blink Morpher found t return 0 t ) t ) else (t messagebox No Head selected t return 0 t ) t) t ton SingleBlink pressed do t(t if my_head.= undefined then t (t global foundBlink = false t for te = 1 to 100 do t (t MorpherName = WM3_MC_GetName my_head. Morpher t t if (matchPattern MorpherName pattern:eBlinkMorph, text) then t (t with animate on t (t at time currenttime my_head. Morpher[t].value = 0 t at time (currenttime + BlinkSped, value) my_head. Morpher[t].value = 100 t at time (currenttime + BlinkSped, value + BlinkSped, value) my_head. Morpher[t].value = 0 t ) t foundBlink = true t ) t ) t if foundBlink == false then t (t messagebox no valid Blink Morpher found t return 0 t ) t ) else (t messagebox No Head selected t return 0 t ) t) t ton ClearBlinks pressed do t(t if queryBox Are you sure you want to deleete Blink keysí then t (t if my_head.= undefined then t (t global foundBlink = false t for te = 1 to 100 do t (t MorpherName = WM3_MC_GetName my_head. Morpher t t if (matchPattern MorpherName pattern:eBlinkMorph, text) then t (t deleteKeys my_head. Morpher[t] #allKeys t messagebox Blink keys cleared t foundBlink = true t ) t ) t if foundBlink == false then t (t messagebox no valid Blink Morpher found t return 0 t ) t ) else (t messagebox No Head selected t return 0 t ) t ) t) t ton bAbout pressed do t(t rollout rolAbout About t (t label ab1 Blinker v1.01 t label ab2 Dani Rosen \xa9 2007 t progressBar horizLine ProgressBar height:3 enabled:true value:100 color color 10 10 0) t label ab3 Used to add blinks on the Blink morph target. height:20 t label ab4 The \"Auto Blink Random Intervals\ determines the t label ab5 spacing from one blink to another. Its a random t label ab6 number (in seconds) betwen the two values entered. height:20 t label ab7 Regular blinks should be on either the second or" t label ab8 third notch of the Blink-Sped. height:20 t label ab9 \"Single Blink Here\ adds a single blink at current time t ) t createdialog rolAbout width:280 height:200 t).
    ).

    Createdialog Blinker

  2. #2
    Fecha de ingreso
    Dec 2025
    Mensajes
    0
    El script Blinker que mencionas tiene problemas de compatibilidad con 3ds Max 2013 debido a cambios en la API de MaxScript. Para versiones modernas de 3ds Max (como la tuya de 2013), necesitas un script actualizado.

    Te recomiendo buscar directamente un script llamado AutoBlinker o Advanced Blinker que sea compatible con 3ds Max 2013 y superiores. Estos scripts suelen estar en foros especializados como ScriptSpot. La búsqueda debe incluir tu versión de 3ds Max.

    Como alternativa práctica, puedes intentar modificar el script original para que funcione. El error común en versiones nuevas es la función WM3_MC_GetName. En Morpher moderno, a veces se accede a los nombres de los canales de morph de otra forma. Podrías probar reemplazar esa línea con (WM3_GetMorphChannel my_head.Morpher t).name o similar, pero esto requiere conocimientos de MaxScript.

    Otra solución es no usar un script y aplicar una técnica dentro de 3ds Max. Puedes usar el Controlador de Lista (List Controller) o un controlador Waveform Sine combinado con un Noise Controller para automatizar el valor del morph de parpadeo. Esto simula el parpadeo aleatorio de forma nativa.

    Para personajes de fondo, también puedes crear una acción (Animation Layer) o un clip de Motion Mixer con varios parpadeos y luego loopearlo o instanciarlo. Es un método más visual y no depende de scripts.

    Si necesitas sí o sí un script, la mejor opción hoy es contactar a la comunidad en foros de scripting de 3ds Max. Allí pueden adaptar el código antiguo a tu versión específica. El código que compartiste tiene varios errores de sintaxis (como BlinkSped en lugar de BlinkSpeed) que también deben corregirse para cualquier versión.

Temas similares

  1. Cine Una aventura animada para aprender a programar desde pequeños
    Por 3dpoder en el foro Cine y TV VFX
    Respuestas: 0
    : 03-02-2025, 09:00
  2. Hardware Sobremesa para programar pv y diseño y mecanizado en Catia
    Por KyLoH en el foro Hardware
    Respuestas: 5
    : 24-01-2016, 20:36
  3. Sugerencias para programar desde cero
    Por lagunov en el foro Oferta y demanda profesional
    Respuestas: 0
    : 30-07-2008, 20:17
  4. Noticias Cuanto de necesario es saber programar para usar Linux
    Por renderiche en el foro Noticias 3D
    Respuestas: 38
    : 13-05-2008, 22:46
  5. Videojuegos Es necesario saber programar para crear un videojuego
    Por temujin-khan en el foro Videojuegos
    Respuestas: 41
    : 27-05-2007, 01:32

Etiquetas para este tema